[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: folder name syntax



At Sun, 27 Sep 2009 20:56:43 -0400,
Rodrigo Amestica wrote:
>
> Hello Masaru,
>
> what you propose would certainly work but it is exactly what I'm trying to
> avoid. I have hundreds of folders and I do not want you go around defining a pet
> name for each individual folder. I thought that there will some way for defining
> a regular expression that would change the way folder names are displayed in the
> folder buffer, completely orthogonal with any other functionality in the buffer.

Hi Rodrigo -

I do not think that this functionality exists currently in WL. If
access groups and the wl-folder-hierarchy-access-folders do not suit
you, you could take a look at the function wl-folder-get-petname and
redefine it to match using a regex against the
wl-folder-petname-alist, for instance:

(defun wl-folder-get-petname (name)
  (let ((replace (elmo-string-matched-assoc name wl-folder-petname-alist)))
    (if replace
        (replace-match (cdr replace) t nil name)
      name)))

(setq wl-folder-petname-alist
  '(("^%\\(.*\\)@imap\\.gmail\\.com:993!$" . "%\\1@gmail")))

best,
Erik

Attachment: pgpT6Mke06i1K.pgp
Description: PGP signature