Currently, I'm using a browser macro in conjunction with an external
script to cycle through maildir hierarchies.  Hackish to be sure, but it
works well enough and saves me a lot of keystrokes (among other things).

Now I'm trying to see whether I can accomplish the same using only
user-defined variables.

The following is a simplified case of 2 hierarchies to cycle through in
a single direction and is as far as I seem to be able to get.  Maybe
someone can offer some suggestions.

--------------------

# store the current folder name in '$my_folder' (unused for now)
folder-hook . "set my_oldrecord=$record; set record=^; \
set my_folder=$record; set record=$my_oldrecord"

# order to cycle through
folder-hook ~/Mail       "set my_next=~/Mail/lists"
folder-hook ~/Mail/lists "set my_next=~/Mail"

# 'c' for Change
macro index c "<change-folder>?" "change folder"

# 'n' for Next (or 'No progress beyond this point')
folder-hook . "macro browser n <change-dir><kill-line>\$my_next<enter>"

--------------------

Thanks.

-- 
George

Reply via email to