On Sun, Oct 30, 2011 at 10:11:03PM +0100, Rado Q wrote:
> Your mutt-version supports mutt-var-expansion?

Yes.

> Define at run-time a temporary alias, then TAB-expand it to get a
> list of _all_ defined aliases.
> If none exists beyond the temporary, you file is not slurped.

I got everything working. Here's what I did:

    ~/.muttrc:
        folder-hook "gmail.com" "source ~/.mutt/gmail.rc"
        folder-hook "example.com" "source ~/.mutt/work.rc"
        source ~/.mutt/gmail.rc         # open gmail on startup

    ~/.mutt/gmail.rc:
        bind editor <Tab> complete-query
        bind editor ^T complete
        set query_command = "goobook query '%s'"

    ~/.mutt/work.rc:
        bind editor <Tab> complete      # default Mutt setting
        bind editor ^T complete-query   # default Mutt setting
        unset query_command             # default Mutt setting
        source ~/.mutt/work_aliases

Notice the differences between the key bindings for "complete" and
"complete-query" in the different RC files. Also note that I'm unsetting
"query_command" in my ~/.mutt/work.rc. This was necessary to tab complete
the aliases out of the ~/.mutt/work_aliases file.

Hope this is helpful to someone else. I'm sure this is only helpful to a
very small subset of users, but I wouldn't be doing my due diligence if I
didn't post it. https://xkcd.com/979/ seems relevant.

Sorry if you read my blog, or follow me on Google+, but it seemed most
appropriate to post here as well.

Thanks,

--
. o .   o . o   . . o   o . .   . o .
. . o   . o o   o . o   . o o   . . o
o o o   . o .   . o o   o o .   o o o

Attachment: signature.asc
Description: Digital signature

Reply via email to