<<< Date Index >>>     <<< Thread Index >>>

Re: get mail in directory browser



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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.

~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"
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!

iEYEARECAAYFAknayuUACgkQBkIOoMqOI16lowCbBu4J7u/BR/UtzDaCiInaBeUA
S0MAoMjF4fgKLMn7phMhlKuTFNe/9oLv
=J24c
-----END PGP SIGNATURE-----