Discussion:
[VM] vm-auto-folder-alist and regexps?
Daniel Barrett
2017-06-20 16:32:21 UTC
Permalink
I can't seem to make vm-auto-folder-alist work with regular
expressions in the first argument. Am I doing something wrong? This VM
8.2.0b.

For example, I'd like to file all email to or from "***@bar.com" in
the folder ~/.Mail/myfolder. Here is a value without regexps, which
works correctly:

(setq vm-auto-folder-alist
'(
("From" ("***@bar.com" . "~/.Mail/myfolder"))
("To" ("***@bar.com" . "~/.Mail/myfolder"))
)
)

and here is an attempt with regexps, which does not work:

(setq vm-auto-folder-alist
'(
("From\|To" ("***@bar.com" . "~/.Mail/myfolder"))
)
)

When I use the second value and press "s" to save a message to or from
***@bar.com, the folder name (~/.Mail/myfolder) should auto-fill but
does not.

Thanks for any tips!

--
Dan Barrett
***@blazemonger.com
Uwe Bonnes
2017-06-20 16:37:03 UTC
Permalink
Daniel> I can't seem to make vm-auto-folder-alist work with regular
Daniel> expressions in the first argument. Am I doing something wrong?
Daniel> This VM 8.2.0b.

Daniel> For example, I'd like to file all email to or from "***@bar.com"
Daniel> in the folder ~/.Mail/myfolder. Here is a value without regexps,
Daniel> which works correctly:

Daniel> (setq vm-auto-folder-alist '( ("From" ("***@bar.com"
Daniel> . "~/.Mail/myfolder")) ("To" ("***@bar.com"
Daniel> . "~/.Mail/myfolder")) ) )

Daniel> and here is an attempt with regexps, which does not work:

Daniel> (setq vm-auto-folder-alist '( ("From\|To" ("***@bar.com"
Daniel> . "~/.Mail/myfolder")) ) )

Daniel> When I use the second value and press "s" to save a message to
Daniel> or from ***@bar.com, the folder name (~/.Mail/myfolder) should
Daniel> auto-fill but does not.

Daniel> Thanks for any tips!

Try "From\\|To"

Cheers
--
Uwe Bonnes ***@elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 1623569 ------- Fax. 06151 1623305 ---------
Daniel Barrett
2017-06-20 17:31:53 UTC
Permalink
Post by Uwe Bonnes
Try "From\\|To"
Thanks Uwe -- that worked!

--
Dan Barrett
***@blazemonger.com

Loading...