Re: ":source ~/.muttrc" command weirdly moves message around in
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Tuesday, June 17 at 02:48 AM, quoth Russell Hoover:
> I originally had this:
>
> <|cv|dm
>
> and you suggested this:
>
> '(<|=cv|=dm)$'
>
> but the only two things that works are these:
>
> <|cv|dm and '<|cv|dm'
>
> No other combination lets it read the %c to the right of the line.
Hm. I just tested it. It seems like mutt doesn't want to do more than
one shortcut substitution per pattern (I haven't checked the source to
double-check, but that's how it seems to behave). I learned something
new about mutt! Thanks!
I still think you should make your patterns a little tighter, but
making them bulletproof won't be as elegant looking.
Adding the $ to the end will tighten the pattern without hurting:
'(<|cv|dm)$'
It's not bulletproof, but that will prevent a lot of false-positives.
Another thing you can do is add a separator matcher, so that you can
make sure you only match folders of that name, like so:
'(<|[./]cv|[./]dm)$'
And that should work pretty well also. Finally, for something *really*
bulletproof, but much more ugly, you can use $folder directly (rather
than the shortcut), because mutt substitutes variables as often as
necessary, unlike (apparently) shortcuts. Also, you'd have to use
double-quotes, to get mutt to do the right substitution. So, something
like this:
"(<|$folder[./]cv|$folder[./]dm)$"
Use whatever works for you; I just recommend using a tighter pattern
when possible. Your original pattern of just two lowercase letters
seems to be just begging to match things you don't intend.
~Kyle
- --
The purpose of computing is insight, not numbers.
-- Richard W. Hamming
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!
iEYEARECAAYFAkhXaAUACgkQBkIOoMqOI17L9QCguwQjBsTDV09W1DCeutzp+MS/
GJ8An2st6P8z1WG+oTpH5G3pS6MrhOli
=Cshb
-----END PGP SIGNATURE-----