[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Help needed: nnmaildir and create-directory parameter.
From: |
Eric Abrahamsen |
Subject: |
Re: Help needed: nnmaildir and create-directory parameter. |
Date: |
Wed, 23 Nov 2022 10:00:45 -0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Fernando de Morais <fernandodemorais.jf@gmail.com> writes:
> Hello everyone,
>
> According to the manual, for a `nnmaildir' server, if my split rules
> create new groups, I need to supply a `create-directory' server
> parameter[1]. Ok, so considering the following example snippet:
>
> #+begin_src emacs-lisp
> (customize-set-variable 'gnus-select-method '(nnnil ""))
> (customize-set-variable 'gnus-secondary-select-methods
> '((nntp "news.gwene.org")
> (nnmaildir ""
> (directory "~/Mail/maildirs")
> (target-prefix "")
> (get-new-mail t)
> (create-directory ...)))) ; <-- Here
> (customize-set-variable 'mail-sources '((file :path "~/Mail/emaple_mbox")))
> (customize-set-variable 'nnmail-split-methods '(("inbox" "")))
> #+end_src
>
> Following the example snippet above, what is the expected value for the
> parameter `create-directory'? Unfortunately the manual brings no
> details about it.
I won't claim to understand how this is supposed to work, but in
`nnmaildir-open-server' we've got the following chunk of
lisp-as-imperative-code:
(setq x (assq 'target-prefix defs))
(if x
(progn
(setq x (cadr x)
x (eval x t)) ;FIXME: Why `eval'?
(setf (nnmaildir--srv-target-prefix server) x))
(setq x (assq 'create-directory defs))
(if x
(progn
(setq x (cadr x)
x (eval x t) ;FIXME: Why `eval'?
x (file-name-as-directory x))
(setf (nnmaildir--srv-target-prefix server) x))
(setf (nnmaildir--srv-target-prefix server) "")))
This makes it look to me like, if you've got a 'target-prefix set (even
if it's the empty string), then 'create-directory never comes into play
at all.
So maybe try taking out the (target-prefix "") server config completely?
I really don't know how this is meant to work. If you figure it out we
should update the manual.
Thanks,
Eric