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

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 really don't know how this is meant to work. If you figure it out we
> should update the manual.

If its of any use, I'd would like to suggest:

- Inform in the manual that if the user wants to configure something
  like `(target-prefix "maildirs/")', he will need to create the
  `"maildirs"' folder (in my example above, inside the `"~/Dir"'), by
  code or manually; and

- Switch the `create-directory' to `target-prefix' in the last
  paragraph.  But the code will still be there...

I don't know if there would be any practical benefit in making changes
in a way that using `create-directory' works as expected, especially
when `target-prefix' already does the job.  But anyway, I'm just
rambling here, the question has been answered.

Thank you very much for pointing the direction to address this issue,
Eric.

-- 
Regards,
Fernando de Morais.


  reply	other threads:[~2022-11-24  5:53 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 [this message]
2022-11-25 19:21     ` Eric Abrahamsen
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=87r0xs526s.fsf@gmail.com \
    --to=fernandodemorais.jf@gmail.com \
    --cc=eric@ericabrahamsen.net \
    --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).