VM

Provide generic framework for calling message-next

Bug #1153675 reported by Ryan Kavanagh
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
VM
Triaged
Wishlist
Unassigned

Bug Description

 affects vm
 importance wishlist

It would be nice to have a generic framework to call "message-next"
after a certain command (e.g. reading, deleting, marking unread, etc.),
similar to the current vm-move-after-{reading,deleting} variables.
Presumably this could be configured via an "alist" of some sort, e.g.

(setq vm-post-commands
    '((vm-delete-message . '(vm-next-message))
      (vm-mark-message-read . '(vm-next-message))
      (vm-mark-message-unread . '(vm-previous-message))
      (vm-blah . '(vm-cmd1 vm-cmd2 ... vm-cmdN))))

where for each time a command is called (this can presumably be limited
to a reasonable subset like reading, deleting, unreading, marking, etc.
in implementation), its associated "post-commands", if any, are
sequentially called. In the above example, vm-next-message would be
called after deleting and reading a message, but vm-previous-message
would be called after unreading a message.

This would render vm-move-after-reading and vm-move-after-deleting
obsolete, but would be cleaner in my opinion than having to submit a
vm-move-after-XYZ patch for each command I'd like to move after :)

I'm not yet familiar with lisp, but if someone would like to guide me in
implementing this, I'll gladly do the legwork.

--
|_)|_/ Ryan Kavanagh | Debian Developer
| \| \ http://ryanak.ca/ | GPG Key 4A11C97A

Revision history for this message
Uday Reddy (reddyuday) wrote : Re: [Bug 1153675] [NEW] Provide generic framework for calling message-next

Hi Ryan, What other operations would require auto-movement commands? What
would be the rationale for auto-movement?

In the case of delete, the rationale is clear. Since we are getting rid of
the current message, we presumably want to move to another one. For
vm-flag-message-read, the motivation is similar. We are getting rid of it
from the "unread messages" pool. So, presumably we want to move to another
unread message (though I discovered that I do not always want this). Why do
you need auto-movement for other commands?

Changed in vm:
milestone: none → 8.2.90a
Revision history for this message
Ryan Kavanagh (ryanakca) wrote :

Hi Uday,

On Mon, Mar 11, 2013 at 06:38:06PM -0000, Uday Reddy wrote:
> Hi Ryan, What other operations would require auto-movement commands?

Off the top of my head:
 * mark a message read/unread
 * mark a message delete/undelete
 * mark a message flag/unflag
 * mark/unmark a message (vm-mark-message)

> What would be the rationale for auto-movement?

The ability to save a vm-next-message when going through a mailbox and
applying a series of commands. That's to say, if I'm going through a
mailbox to flag important messages, having vm call `vm-next-message'
automatically for me saves me from having to do so. Thus, when going
through n messages, I only need n keystrokes, rather than n+k, where k
is the number of operations (flag/unflag/delete/etc) I perform.
Similarly for the other operations.

Best wishes,
Ryan

--
|_)|_/ Ryan Kavanagh | Debian Developer
| \| \ http://ryanak.ca/ | GPG Key 4A11C97A

Uday Reddy (reddyuday)
Changed in vm:
status: New → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.