On Thu, Feb 10, 2000 at 09:48:08AM -0600, freix wrote:
> issue: One of the mailing lists I'm on has two domains
> merit.edu
> nanog.org
>
> i have
>
> save-hook "~C nanog@(nanog|merit)\.(edu|org)" +nanog
>
> as the epxression, and when i start mutt it says:
> Error in /home/freix/.muttrc, line 245: Unmatched ( or \(
> source: errors in /home/freix/.muttrc
>
> This is very similar to how i have all my $alternates setup, but this
> one doesn't seem to like it. Again, same as last issue, if I do it on
> two seperate lines it works no prob, but I'm sure there's a more elegant
> way of doing it.
>
> Anyone feel free to smack me with the hammer of enlightenment.
I see two problems with this hook:
1) it also accepts merit.org and nanog.edu
2) it gets parsed this way: "(~C ...) | (...) | (...)"
I'u use
save-hook "~C 'nanog@(nanog\.org|merit\.edu)'" +nanog
# ^ ^
(BTW it's easy to get lost in various ways of quoting. I'm not sure if
`\.' shouldn't be replaced to `\\.' in this case. A couple of my
save-hooks look like this:
save-hook '~C "\\<foo@bar"' +foo
I've found the need for double backslashes by trial and error. Perhaps
`[.]' would be a better and more universal solution?)
Marius Gedminas
--
I doubt, therefore I might be.