mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-24 20:08:10 +01:00
notmuch-mutt: improve robustness of mutt macros
Details: - $pipe_decode is turned off, to prevent message-id from being filtered out by "ignore" settings in the muttrc. - Original values for $pipe_decode and $wait_key are saved and restored. - The macros, being much longer now, are line wrapped for improved readability.
This commit is contained in:
parent
9b98e9bcbf
commit
c34effad9a
2 changed files with 26 additions and 6 deletions
|
@ -270,13 +270,23 @@ the following in your Mutt configuration (usually one of: F<~/.muttrc>,
|
|||
F</etc/Muttrc>, or a configuration snippet under F</etc/Muttrc.d/>):
|
||||
|
||||
macro index <F8> \
|
||||
"<enter-command>unset wait_key<enter><shell-escape>notmuch-mutt -r --prompt search<enter><change-folder-readonly>~/.cache/notmuch/mutt/results<enter>" \
|
||||
"<enter-command>set my_old_pipe_decode=\$pipe_decode my_old_wait_key=\$wait_key nopipe_decode nowait_key<enter>\
|
||||
<shell-escape>notmuch-mutt -r --prompt search<enter>\
|
||||
<change-folder-readonly>`echo ${XDG_CACHE_HOME:-$HOME/.cache}/notmuch/mutt/results`<enter>\
|
||||
<enter-command>set pipe_decode=\$my_old_pipe_decode wait_key=\$my_old_wait_key<enter>" \
|
||||
"notmuch: search mail"
|
||||
|
||||
macro index <F9> \
|
||||
"<enter-command>unset wait_key<enter><pipe-message>notmuch-mutt -r thread<enter><change-folder-readonly>~/.cache/notmuch/mutt/results<enter><enter-command>set wait_key<enter>" \
|
||||
"<enter-command>set my_old_pipe_decode=\$pipe_decode my_old_wait_key=\$wait_key nopipe_decode nowait_key<enter>\
|
||||
<pipe-message>notmuch-mutt -r thread<enter>\
|
||||
<change-folder-readonly>`echo ${XDG_CACHE_HOME:-$HOME/.cache}/notmuch/mutt/results`<enter>\
|
||||
<enter-command>set pipe_decode=\$my_old_pipe_decode wait_key=\$my_old_wait_key<enter>" \
|
||||
"notmuch: reconstruct thread"
|
||||
|
||||
macro index <F6> \
|
||||
"<enter-command>unset wait_key<enter><pipe-message>notmuch-mutt tag -- -inbox<enter>" \
|
||||
"<enter-command>set my_old_pipe_decode=\$pipe_decode my_old_wait_key=\$wait_key nopipe_decode nowait_key<enter>\
|
||||
<pipe-message>notmuch-mutt tag -- -inbox<enter>\
|
||||
<enter-command>set pipe_decode=\$my_old_pipe_decode wait_key=\$my_old_wait_key<enter>" \
|
||||
"notmuch: remove message from inbox"
|
||||
|
||||
The first macro (activated by <F8>) prompts the user for notmuch search terms
|
||||
|
|
|
@ -1,9 +1,19 @@
|
|||
macro index <F8> \
|
||||
"<enter-command>unset wait_key<enter><shell-escape>notmuch-mutt -r --prompt search<enter><change-folder-readonly>`echo ${XDG_CACHE_HOME:-$HOME/.cache}/notmuch/mutt/results`<enter>" \
|
||||
"<enter-command>set my_old_pipe_decode=\$pipe_decode my_old_wait_key=\$wait_key nopipe_decode nowait_key<enter>\
|
||||
<shell-escape>notmuch-mutt -r --prompt search<enter>\
|
||||
<change-folder-readonly>`echo ${XDG_CACHE_HOME:-$HOME/.cache}/notmuch/mutt/results`<enter>\
|
||||
<enter-command>set pipe_decode=\$my_old_pipe_decode wait_key=\$my_old_wait_key<enter>" \
|
||||
"notmuch: search mail"
|
||||
|
||||
macro index <F9> \
|
||||
"<enter-command>unset wait_key<enter><pipe-message>notmuch-mutt -r thread<enter><change-folder-readonly>`echo ${XDG_CACHE_HOME:-$HOME/.cache}/notmuch/mutt/results`<enter><enter-command>set wait_key<enter>" \
|
||||
"<enter-command>set my_old_pipe_decode=\$pipe_decode my_old_wait_key=\$wait_key nopipe_decode nowait_key<enter>\
|
||||
<pipe-message>notmuch-mutt -r thread<enter>\
|
||||
<change-folder-readonly>`echo ${XDG_CACHE_HOME:-$HOME/.cache}/notmuch/mutt/results`<enter>\
|
||||
<enter-command>set pipe_decode=\$my_old_pipe_decode wait_key=\$my_old_wait_key<enter>" \
|
||||
"notmuch: reconstruct thread"
|
||||
|
||||
macro index <F6> \
|
||||
"<enter-command>unset wait_key<enter><pipe-message>notmuch-mutt tag -- -inbox<enter>" \
|
||||
"<enter-command>set my_old_pipe_decode=\$pipe_decode my_old_wait_key=\$wait_key nopipe_decode nowait_key<enter>\
|
||||
<pipe-message>notmuch-mutt tag -- -inbox<enter>\
|
||||
<enter-command>set pipe_decode=\$my_old_pipe_decode wait_key=\$my_old_wait_key<enter>" \
|
||||
"notmuch: remove message from inbox"
|
||||
|
|
Loading…
Reference in a new issue