restrict folder hook to specific folder(s)

Will Yardley mutt-users at veggiechinese.net
Wed May 3 16:59:17 UTC 2023


On Wed, May 03, 2023 at 11:27:05AM -0500, Ranjan Maitra wrote:

> I have a folder called "R". There are other folders that have "R" in
> their name. However, when I set up a
> 
> folder-hook '(R)'
> 
> it seems to apply to all folders with R in it, with embarrassing
> consequences. How do I make sure that the hook applies to the R folder
> and nothing else?

I've not used folder-hooks myself, but it looks like you may have to
anchor one or both sides of the regex to get the behavior you want.

http://www.mutt.org/doc/manual/#mailbox-hook

has some examples.

and
http://www.mutt.org/doc/manual/#regexp
has some info on the regex syntax

w



More information about the Mutt-users mailing list