Re: use current folder name as argument to abitrary command
On 25Jun2009 23:50, David J. Weller-Fahy
<dave-lists-mutt-users@xxxxxxxxxxxxxxx> wrote:
| * Cameron Simpson <cs@xxxxxxxxxx> [2009-06-03 23:56 -0500]:
| > On 31May2009 21:29, David J. Weller-Fahy
<dave-lists-mutt-users@xxxxxxxxxxxxxxx> wrote:
| > | * Cameron Simpson <cs@xxxxxxxxxx> [2009-05-31 01:41 -0500]:
| > Thank you, I've adopted exactly this incantation in my own muttrc:
| >
| > folder-hook . "macro index '\$' \"<change-folder>\$my_folder<enter>\""
| > folder-hook . 'push ":\`cs-mutt-per-folder\ $my_folder\`\<enter\>"'
|
| Hrm... so every-time you sync your mailbox, you change folders to the
| current folder? Why is that - checking for new mail?
That was an excessive cut/paste on my part.
The first hook does indeed re-enter the folder if I type '$' in the
index view. ('$' in pager view still does a plain <sync>.)
The reason for this is that the <sync> operation only commits my
changes (deleted, unread->read transitions etc) to the folder. It does
not check the folder for new mail. So your surmise is exactly correct.
The outstanding task is to have the re-enter return to the current
message. If only there were bookmarks! I lamented the lack of "go to
message by Message-ID" and David Champion pointed out:
<search>~i <20090609040352.GA18267@xxxxxxxxxxxxxxx><enter>
which is exactly that. So I want to write a small script to make
bookmarks. A short script to write such a search to a file and a
get-bookmark macro to source it is the plan.
WHat I really wish is to use filename completion, to the "go to
bookmark" macro is something like:
:source /path/to/bookmark/<tab>
to pop up a file browser to choose a file to source.
| That is the problem (apparently) with having a muttrc which evolves with
| you.
Yeah, I've got one of them. I've just ripped out a bunch of macros whose
keystrokes I could never remember...
| Now I can clean out my
| mutt config folder again, and update my master muttrc file. This will
| be quite a change to the master muttrc considering the lines made
| obsolete.
You have a config folder? How's that work? A bunch of special purpose
muttrcs that get sourced at need?
Cheers,
--
Cameron Simpson <cs@xxxxxxxxxx> DoD#743
http://www.cskk.ezoshosting.com/cs/
Uh, this is only temporary...unless it works. - Red Green