Mutt: return to index after deleting or saving message in pager view

mutt

After deleting or saving a message in pager view in the MUA mutt, the program remains in pager view and jumps to the next message in the current folder. Can this default behavior be changed so that after deleting or filing an email, the pager mode is exited and the folder index is displayed?

Best Answer

You want to execute two functions (delete-message and exit) at once so you have to use a macro:

macro pager d '<delete-message><exit>'

This will bind d to delete the current message and exit the pager.

You can do the same for s but it gets a little bit more complicated as you need to have user input, if you just accept the default save location or use save-hooks you can simply use

macro pager s '<save-message><enter><exit>'

If you want to alter the save location interactively I unfortunately don't have a tip how to change it, I'd try to use/leverage save-hooks

Related Question