[Top][All Lists]

[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: Fri, 25 Nov 2022 11:21:43 -0800
User-agent: Gnus/5.13 (Gnus v5.13)

Fernando de Morais <> writes:

> Hello Eric,
> I've managed to figure out.  The TL;DR is: simply, don't use the
> `create-directory' server parameter.  Using only `target-prefix' is what
> is needed.  😅
> Eric Abrahamsen <> writes:
>> So maybe try taking out the (target-prefix "") server config completely?
> With something like this:
> #+begin_src emacs-lisp
> ...
>   (nnmaildir ""
>              (directory "~/Dir")
>              ;; (target-prefix "")
>              (get-new-mail t)
>              (create-directory ""))
> ...
> #+end_src
> Gnus will create groups (and respective folders) specified in
> `nnmail-split-method', however it will raise an error, saying that the
> directories already exists (?) and we will get a crash box, again.  With
> my testes, any other value besides `""' will result in error.
> But, uncommenting the `target-prefix' line and removing the
> `create-directory' one, we'll end with the expected behaviour, without
> errors.

I'm guessing this is because, if you use create-directory instead of
target-prefix, the empty string additionally gets run through
`file-name-as-directory', which converts the "" to "./" and sets that as
the value of target-prefix, and lord knows what that ends up doing.

I just don't understand how any of this is supposed to work -- I don't
even know why you'd use symlinks in your maildirs to begin with. This
part of the manual was written by Andy Cohen and I'm cc'ing him here,
though he doesn't have a lot of time for Emacs these days and we might
not get him.

Andy, you wrote this section of the manual 10+ years ago, do you still
remember how it's supposed to work? What is the intended relationship
between 'remove-prefix and 'create-directory, when the latter simply
gets copied to the former if the former is nil?

(I suspect the end result of all this will be the removal of
'create-directory altogether.)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]