Rocco, et al -- ...and then Rocco Rutte said... % % Hi,
Hello! % % On Thu, Mar 21, 2002 at 07:25:50:AM -0500 David T-G wrote: % > ...and then Rocco Rutte said... % > % % > % define <my-command-1> '<mutt-command-1><mutt-command-2><enter>' ... % > (pager, index, compose, ...) to set the scope of the command, how are the % > two at all different? % % macro index ,filter 'set editor=filter;<edit-message>;set editor=vim' % define index ,filter 'set editor=filter;<edit-message>;set editor=vim' % % Good, this is the first step. See my example. As far as I experienced I OK; I agree that if you have a gawdawful $editor setting then it gets cumbersome or you have to have an editor-definition macro (though that's not so bad 'cuz then you're back to a single place to maintain it). But see below, apparently, about such a macro... % would have to include the first set of commands (instead of just the % name) if I wanted to create another macro which includes the first. I haven't seen that. % % Didn't unterstand that? Okay, another example: % % I start with: % % macro index ,filter 'set editor=filter;<edit-message>;set editor=vim' % % and then do: % % macro index ,name 'set sendmail=mail.pl;set editor=filter;<edit-message>;set editor=vim;set sendmail=/usr/sbin/sendmail' Gotcha. That's the long way around. % % What I'd love to have is instead: % % macro index ,name 'set sendmail=mail.pl;<myfirstmacroname>;sed sendmail=/usr/sbin/sendmail' You mean something like macro pager ,@r13on "<enter-command>set display_filter=$HOME/local/bin/rot13;macro pager \\cx ,@r13off 'Toggle ROT13 decoding'\n<display-toggle-weed><display-toggle-weed>" macro pager ,@r13off "<enter-command>set display_filter=;macro pager \\cx ,@r13on 'Toggle ROT13 decoding'\n<display-toggle-weed><display-toggle-weed>" macro pager \cx ,@r13on 'Toggle ROT13 decoding' or so? The on and off macros each define rot13 behavior and redefine the ctrl-x keystroke. Now, that's sort of boring (I haven't even considered enhancing this; it works and I never have to look at it, just as I suggested in an early reply in this thread), but the good part is that the ctrl-x macro simply calls the "on" macro. % % See? I think so. Do you, or do I not? % % Regards, Rocco :-D -- David T-G * It's easier to fight for one's principles (play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie (work) [EMAIL PROTECTED] http://www.justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
msg25912/pgp00000.pgp
Description: PGP signature