On Thu, Jan 27, 2000 at 05:20:21PM +1100, Shao Zhang wrote:

> Hi,
>       I would like to bind a key where when I am in the brower mode
>       with a list of folders, I would like to press a key that goes to
>       the next folder which contains unread message.

That would be difficult, I think, because there is no function
for moving to the next folder with new messages, I believe.

Someone wrote for me a macro to step through the folders with a
single key press. It was something like (on one line):

> macro browser I ':macro browser \cXJ "`$HOME/.jayplus; 
>$HOME/.jayread`"'\n<first-entry>\cXJl
 
and in .jayplus:

> #!/bin/bash

> #test if last-entry has been reached. If not, add another
> #<next-entry>.
> #I have 33 mailboxes including spool, so 32 <next-entry> are needed.
> #There is something wrong with the test. I get an error message
> #but it still seems to work.

> touch $HOME/.jay
> JAY=`cat $HOME/.jay`
> if [ $JAY = 
>"<next-entry><next-entry><next-entry><next-entry><next-entry><next-entry><next-entry><next-entry><next-entry><next-entry><next-entry><next-entry><next-entry><next-entry><next-entry><next-entry><next-entry><next-entry><next-entry><next-entry><next-entry><next-entry><next-entry><next-entry><next-entry><next-entry><next-entry><next-entry><next-entry><next-entry><next-entry><next-entry><next-entry><next-entry>"
> ] 
> then 
>       exit
> else
>       echo -n "<next-entry>" >> $HOME/.jay
> fi

and in .jayread:

> #!/bin/sh

> #writes '<next-entry><next-entry>...' to macro definition

> cat $HOME/.jay
> echo

-- 
Greg Matheson                                      The Internet from time
Chinmin College, Taiwan                            to time claims this 
[EMAIL PROTECTED]                             address does not exist

Reply via email to