On Mon, Apr 06, 2009 at 10:39:17PM -0500, Kyle Wheeler wrote:
> On Monday, April  6 at 09:56 PM, quoth Zhengquan Zhang:
> >macro index,pager G "! /usr/bin/getmail -v \n" "Invoke getmail"
> >
> >to get mail from pop servers.
> 
> While simple-looking, it's generally a better idea to call the 
> functions you want to use directly from your macro, rather than use 
> keybindings that may later change. For example, if you ever decide to 
> rebind the ! key, or bind the "! " combination, this macro would stop 
> working unexpectedly.
> 
> Here's a better way of writing the same macro:
> 
> macro index,pager G "<shell-escape>/usr/bin/getmail -v<enter>" \
>                      "Invoke Getmail"
> 
> >But as you see the macro works only in index and pager environment.
> >I also want to be able to get mail when I was in directory browser, that
> >is when I was changing mailboxes.
> 
> Easy - just add another comma:
> 
> macro index,pager,browser G ...etc...
> 
> OR you could try:
> 
> macro generic G ...etc...
> 
> But that latter would be overridden by any 
> index/pager/browser-specific G keybindings.
> 
Thanks Kyle, I appreciate it so much.
Zhengquan

> 
> ~Kyle
> -- 
> The average Ph.D thesis is nothing but the transference of bones from 
> one graveyard to another.
>                                 -- J. Frank Dobie, "A Texan in England"

-- 
Zhengquan

Reply via email to