I know this is a blast from the past, but I wanted to thank Christian for this long-ago message! I often put aside messages for when I have time to explore something that is interesting to me. I am not so good at actually going back and looking at them later. <grin> I had a little time recently and found his message. I knew and use the first two of his points in my mutt config, so obviously 8-years-ago me was interested in the last one.
What a wonder! I'm much happier now that all my macros use a space to begin all <shell-escape> and <pipe-message> commands, the shell escape and pipe-messages I do manually have only the commands that I typed in manually, not ones from macros. Thanks Christian, and thanks to the mutt devs for such a great mail reader! Ed On Fri, Sep 25, 2015 at 09:42:50AM +0100, Christian Ebert wrote: > * Ben Boeckel on Monday, September 21, 2015 at 14:36:34 -0400 > > On Mon, Sep 21, 2015 at 12:32:02 -0500, David Champion wrote: > >> set my_wait_key=$wait_key > >> unset wait_key > >> set wait_key=$my_wait_key > > > > Well, that looks nasty, but it works: > > > > macro generic \Cy \ > > ":set my_wait_key = $wait_key<return>:unset > > wait_key<return><shell-escape>killall -USR1 offlineimap<enter>:set wait_key > > = $my_wait_key<return>:unset my_wait_key<return>" \ > > "kick offlineimap" > > > > I still think some command or function to do this would help a lot. > > Wrapping all functions like this is…tedious to say the least. It also > > makes reading these things annoying since the meat of the binding is > > buried 65 characters into the line. > > Sure. You can make it more readable though with line breaks: > > macro pager <Esc>F "\ > <enter-command> set my_pipe_decode=\$pipe_decode my_wait_key=\$wait_key \ > pipe_decode=no wait_key=no<enter>\ > <pipe-message> /usr/bin/procmail -p -m > ~/.procmail/show-x-face.procmailrc<enter>\ > <enter-command> set pipe_decode=\$my_pipe_decode wait_key=\$my_wait_key \ > &my_pipe_decode &my_wait_key<enter>\ > " "view x-face" > > The above also: > - uses key-binding independent <enter-command> > - unsets the my_* variables at the end to avoid conflicts > - precedes commands with a space, so the macro internal commands > do not become part of history > > > -- > Was heißt hier Dogma, ich bin Underdogma! > [ What the hell do you mean dogma, I am underdogma. ] > free movies --->>> http://www.blacktrash.org/underdogma > http://itunes.apple.com/podcast/underdogma-movies/id363423596 -- Ed Blackman