Path: utzoo!utgpu!watmath!uunet!mcsun!sunic!tut!pk From: pk@tut.fi (Kellom{ki Pertti) Newsgroups: gnu.emacs Subject: Re: vm-auto-folder-alist -- how? Message-ID: Date: 31 Aug 89 07:16:21 GMT References: <8908301406.AA01144@asylum.gsfc.nasa.gov> Sender: News@tut.fi Distribution: gnu Organization: Tampere Univ. of Technology, Finland. Lines: 38 In-reply-to: kuro@shochu.Sun.Com's message of 30 Aug 89 18:40:19 GMT On 30 Aug 89 18:40:19 GMT, kuro@shochu.Sun.Com (Teruhiko Kurosaka - Sun Intercon) said: kuro> In article <8908301406.AA01144@asylum.gsfc.nasa.gov> chris@ASYLUM.GSFC.NASA.GOV (Chris Shenton) writes: kuro> |I'm a new vm convert, trying to do the following: kuro> |(setq vm-auto-folder-alist kuro> | '( kuro> ... kuro> | ("(From)|(Sender)" kuro> | ("steve" . "steve") kuro> | ("chris" . "chris") kuro> ... kuro> | kuro> |It doesn't work. It frequently makes the auto-suggestion `c++', kuro> Mine doesn't work either. I started suspecting that in vm-auto-folder-alist, kuro> regular expressions of the form [xy] can be recognized properly but kuro> xxxx|yyyy is not. Does anyone know if this guess is right. From the elisp manual: `\|' specifies an alternative. Two regular expressions A and B with `\|' in between form an expression that matches anything that either A or B will match. ... Note that `\' also has special meaning inside the read syntax of Lisp strings (*Note String Type::). Therefore, to build a regular expression that matches the `\' character, you must preceed each `\' in `"\\"' with another `\', i.e., `"\\\\"'. Thus, the regexp that matches both (From) and (Sender) is, as an elisp string, "(From)\\|(Sender)". Hope this helps. -- Pertti Kellom\"aki (TeX format) # Software will be a science when programmers Tampere Univ. of Technology # stand on each other's shoulders instead Software Systems Lab # of each other's toes