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

Re: problems with index_format



* On 2004.11.22, in <20041123003818.GA19445@xxxxxxx>,
*       "David Bear" <David.Bear@xxxxxxx> wrote:
> I'm trying the following folder hook
> 
> ####
> folder-hook mutt-sent set sort=date
> folder-hook mutt-sent set index_format="%C %d %t %s"
> ######

Use this instead:

folder-hook mutt-sent 'set index_format=%C %d %t %s"'


> This seems more difficult than it should be. Advice please?

It's probably not useful for me to get into the semantics of whether
this is more difficult than it should be. The reason you're having
trouble is twofold:

    a) folder-hook's argument (after the folder expression) is a mutt
       command, and gets re-evaluated by the command parser; this
       includes removing quotations.

    b) set can set multiple variables in a single invocation. Since
       the command that gets executed, after quotation remval, is
           set index_format=%C %d %t %s
       what mutt is doing is to set index_format to %C, then to set %d,
       %t, and %s. These three are not settable variables.

Quoting the full expression in the hook preserves the internal
quotation, giving you the set command that you really wanted.

-- 
 -D.    dgc@xxxxxxxxxxxx                                  NSIT::ENSS