* 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

Reply via email to