VM

Merge lp:~ryanakca/vm/vm-move-after-reading into lp:vm

Proposed by Ryan Kavanagh
Status: Merged
Merged at revision: 1485
Proposed branch: lp:~ryanakca/vm/vm-move-after-reading
Merge into: lp:vm
Diff against target: 82 lines (+33/-13)
3 files modified
info/vm.texinfo (+5/-3)
lisp/vm-folder.el (+16/-10)
lisp/vm-vars.el (+12/-0)
To merge this branch: bzr merge lp:~ryanakca/vm/vm-move-after-reading
Reviewer Review Type Date Requested Status
Uday Reddy Approve
Review via email: mp+151987@code.launchpad.net

Description of the change

Add variable to enable vm to move to the next message after marking one as read, similar to vm-move-after-delete .

To post a comment you must log in.
1485. By Ryan Kavanagh

Add support for vm-move-after-reading

Revision history for this message
Ryan Kavanagh (ryanakca) wrote :

Sorry, "bzr revert -n ...." didn't behave as I expected to and I mistakenly included the install-info patch.

Revision history for this message
Uday Reddy (reddyuday) wrote :

This is a good idea. Thanks for implementing it!

I didn't find any install-info changes. So, it was ok.

Revision history for this message
Uday Reddy (reddyuday) wrote :

Merging it with some additional corrections.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'info/vm.texinfo'
2--- info/vm.texinfo 2013-02-15 08:44:48 +0000
3+++ info/vm.texinfo 2013-03-06 15:29:23 +0000
4@@ -1898,11 +1898,13 @@
5 @findex vm-mark-message-unread
6 @kindex U
7 @kindex .
8+@vindex vm-move-after-reading
9 You can ``unread'' a message (so to speak) by typing @kbd{U}
10 (@code{vm-unread-message}, also called @code{vm-mark-message-unread}).
11-The current message will be marked unread. Conversely, you can mark
12-an unread message as read by typing @kbd{.}
13-(@code{vm-mark-message-read}).
14+The current message will be marked unread. Conversely, you can mark an
15+unread message as read by typing @kbd{.} (@code{vm-mark-message-read}).
16+Setting the variable @var{vm-move-after-reading} will cause vm to move
17+to the next undeleted message after marking the current message as read.
18
19 @findex vm-toggle-flag-message
20 @kindex !
21
22=== modified file 'lisp/vm-folder.el'
23--- lisp/vm-folder.el 2013-01-02 21:38:39 +0000
24+++ lisp/vm-folder.el 2013-03-06 15:29:23 +0000
25@@ -3253,18 +3253,24 @@
26 thread are affected."
27 (interactive "p")
28 (or count (setq count 1))
29- (vm-follow-summary-cursor)
30- (vm-select-folder-buffer-and-validate 1 (vm-interactive-p))
31- (let ((mlist (vm-select-operable-messages
32- count (vm-interactive-p) "Mark as read")))
33- (while mlist
34- (when (or (vm-unread-flag (car mlist))
35- (vm-new-flag (car mlist)))
36+ (let ((used-marks (eq last-command 'vm-next-command-uses-marks))
37+ (del-count 0))
38+ (vm-follow-summary-cursor)
39+ (vm-select-folder-buffer-and-validate 1 (vm-interactive-p))
40+ (let ((mlist (vm-select-operable-messages
41+ count (vm-interactive-p) "Mark as read")))
42+ (while mlist
43+ (when (or (vm-unread-flag (car mlist))
44+ (vm-new-flag (car mlist)))
45 (vm-set-unread-flag (car mlist) nil)
46 (vm-set-new-flag (car mlist) nil))
47- (setq mlist (cdr mlist))))
48- (vm-display nil nil '(vm-mark-message-read) '(vm-mark-message-read))
49- (vm-update-summary-and-mode-line))
50+ (setq mlist (cdr mlist))))
51+ (vm-display nil nil '(vm-mark-message-read) '(vm-mark-message-read))
52+ (vm-update-summary-and-mode-line)
53+ (when (and vm-move-after-reading (not used-marks))
54+ (let ((vm-circular-folders (and vm-circular-folders
55+ (eq vm-move-after-deleting t))))
56+ (vm-next-message count t executing-kbd-macro)))))
57 (defalias 'vm-flag-message-read 'vm-mark-message-read)
58 (make-obsolete 'vm-flag-message-read
59 'vm-mark-message-read "8.2.0")
60
61=== modified file 'lisp/vm-vars.el'
62--- lisp/vm-vars.el 2013-02-12 00:09:02 +0000
63+++ lisp/vm-vars.el 2013-03-06 15:29:23 +0000
64@@ -4733,6 +4733,18 @@
65 (const :tag "Yes" t)
66 (const :tag "Skip if some undeleted" skip-if-some-undeleted)))
67
68+(defcustom vm-move-after-reading nil
69+ "*Non-nil value causes VM's `.' command to automatically invoke
70+`vm-next-message' or `vm-previous-message' after killing messages, to try
71+to move past the read messages. A value of t means motion
72+should honor the value of `vm-circular-folders'. A value that is
73+not t and not nil means that motion should be done as if
74+`vm-circular-folders' is set to nil."
75+ :group 'vm-summary
76+ :type '(choice (const :tag "No" nil)
77+ (const :tag "Yes" t)
78+ (const :tag "Skip if some undeleted" skip-if-some-undeleted)))
79+
80 (defcustom vm-delete-after-saving nil
81 "*Non-nil value causes VM automatically to mark messages for deletion
82 after successfully saving them to a folder."

Subscribers

People subscribed via source and target branches

to all changes: