Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: Fernando de Morais <fernandodemorais.jf@gmail.com>
Cc: info-gnus-english@gnu.org, Andrew Cohen <cohen@bu.edu>
Subject: Re: Help needed: nnmaildir and create-directory parameter.
Date: Fri, 25 Nov 2022 11:21:43 -0800	[thread overview]
Message-ID: <87sfi6lu0o.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <87r0xs526s.fsf@gmail.com> (Fernando de Morais's message of "Thu,  24 Nov 2022 02:52:43 -0300")

Fernando de Morais <fernandodemorais.jf@gmail.com> 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 <eric@ericabrahamsen.net> 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.)

Thanks,
Eric


  reply	other threads:[~2022-11-25 19:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-23 14:44 Fernando de Morais
2022-11-23 18:00 ` Eric Abrahamsen
2022-11-24  5:52   ` Fernando de Morais
2022-11-25 19:21     ` Eric Abrahamsen [this message]
2022-11-26  0:16       ` Andrew Cohen
2022-11-26 18:02         ` Eric Abrahamsen
  -- strict thread matches above, loose matches on Subject: below --
2022-11-23 14:25 Fernando de Morais

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sfi6lu0o.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=cohen@bu.edu \
    --cc=fernandodemorais.jf@gmail.com \
    --cc=info-gnus-english@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).