all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Robert Pluim <rpluim@gmail.com>
To: Nikolaus Rath <Nikolaus@rath.org>
Cc: Eric Abrahamsen <eric@ericabrahamsen.net>,
	Andreas Schwab <schwab@suse.de>,
	Lars Ingebrigtsen <larsi@gnus.org>,
	21057@debbugs.gnu.org
Subject: bug#21057: [PATCH] nnimap.el: add support for IMAP namespaces
Date: Mon, 23 Jul 2018 13:28:50 +0200	[thread overview]
Message-ID: <87r2jukx71.fsf@gmail.com> (raw)
In-Reply-To: <87o9eyjn0t.fsf@thinkpad.rath.org> (Nikolaus Rath's message of "Mon, 23 Jul 2018 10:53:54 +0100")

Nikolaus Rath <Nikolaus@rath.org> writes:

Nitpicks below.

> Hi,
>
> Reworked patch is attached.
>
> I tested with and and without nnimap-use-namespaces on Emacs 25.1.1.
>
> Best,
> Nikolaus
>
> -- 
> GPG Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F
>
>              »Time flies like an arrow, fruit flies like a Banana.«
>
> From ff88c4969617ede5742e039136159fe3650ac693 Mon Sep 17 00:00:00 2001
> From: Nikolaus Rath <Nikolaus@rath.org>
> Date: Mon, 23 Jul 2018 10:21:46 +0100
> Subject: [PATCH] Make nnimap support IMAP namespaces
>
> * lisp/gnus/nnimap.el (nnimap-use-namespaces): Introduce new
> server variable.
> (nnimap-group-to-imap, nnimap-get-groups): Transform IMAP group
> names to Gnus group name by stripping / prefixing personal
> namespace prefix.
> (nnimap-open-connection-1): Ask server for namespaces and store them.
>
> * lisp/gnus/nnimap.el (nnimap-request-group-scan)
> (nnimap-request-create-group, nnimap-request-delete-group)
> (nnimap-request-rename-group, nnimap-request-move-article)
> (nnimap-process-expiry-targets)
> (nnimap-request-update-group-status)
> (nnimap-request-accept-article, nnimap-request-list)
> (nnimap-retrieve-group-data-early, nnimap-change-group)
> (nnimap-split-incoming-mail): Use nnimap-group-to-imap.
> (nnimap-group-to-imap): New function to map Gnus group names to
> IMAP folder names.
> ---
>  doc/misc/gnus.texi  |  6 ++++
>  etc/NEWS            |  5 +++
>  lisp/gnus/nnimap.el | 93 +++++++++++++++++++++++++++++++++++++----------------
>  3 files changed, 77 insertions(+), 27 deletions(-)
>
> diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
> index 6793ed..cd97cf 100644
> --- a/doc/misc/gnus.texi
> +++ b/doc/misc/gnus.texi
> @@ -14320,6 +14320,12 @@ fetch all textual parts, while leaving the rest on the server.
>  If non-@code{nil}, record all @acronym{IMAP} commands in the
>  @samp{"*imap log*"} buffer.
>  
> +@item nnimap-use-namespaces
> +If non-@code{nil}, omit the IMAP namespace prefix in nnimap group
> +names. If your IMAP mailboxes are called something like @samp{INBOX}
> +and @samp{INBOX.Lists.emacs}, but you'd like the nnimap group names to
> +be @samp{INBOX} and @samp{Lists.emacs}, you should enable this option.
> +
>  @end table
>

Does this also work for secondary servers? I imagine it does.

>  
> diff --git a/etc/NEWS b/etc/NEWS
> index fc2a5..57b51 100644
> --- a/etc/NEWS
> +++ b/etc/NEWS
> @@ -46,6 +46,11 @@ option --enable-check-lisp-object-type is therefore no longer as
>  useful and so is no longer enabled by default in developer builds,
>  to reduce differences between developer and production builds.
>  
> +** Gnus
> +
> ++++
> +*** The nnimap backend now has support for IMAP namespaces.
> +

This should mention the 'nnimap-use-namespaces' variable.

>  \f
>  * Startup Changes in Emacs 27.1
>  
> diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
> index 3b397..efcb68 100644
> --- a/lisp/gnus/nnimap.el
> +++ b/lisp/gnus/nnimap.el
> @@ -55,6 +55,13 @@
>  If nnimap-stream is `ssl', this will default to `imaps'.  If not,
>  it will default to `imap'.")
>  
> +(defvoo nnimap-use-namespaces nil
> +  "Whether to use IMAP namespaces.
> +If in Gnus your folder names in all start with (e.g.) `INBOX',
> +you probably want to set this to t. The effects of this are
> +purely cosmetical, but changing this variable will affect the

cosmetical⇒cosmetic

Thanks

Robert





  reply	other threads:[~2018-07-23 11:28 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-13  1:52 bug#21057: [PATCH] nnimap.el: add support for IMAP namespaces Nikolaus Rath
2017-01-26 19:40 ` Lars Ingebrigtsen
2017-09-05 15:18 ` Nikolaus Rath
2017-09-05 15:26   ` Nikolaus Rath
2017-09-05 15:36     ` Andreas Schwab
2017-09-07 16:01       ` Nikolaus Rath
2017-09-13 17:30         ` Lars Ingebrigtsen
2017-09-17  8:16           ` Nikolaus Rath
2017-12-06 14:25             ` Nikolaus Rath
2017-12-27 21:10             ` Lars Ingebrigtsen
2018-05-31 11:38               ` Nikolaus Rath
2018-07-03  7:40                 ` Nikolaus Rath
2018-07-07  9:12                   ` Eli Zaretskii
2018-07-17 19:43                     ` Nikolaus Rath
2018-07-20  9:43                       ` Eli Zaretskii
2018-07-20 19:16                         ` Nikolaus Rath
2018-07-20 19:50                           ` Eli Zaretskii
2018-07-22 13:31                 ` Lars Ingebrigtsen
2018-07-23  6:00                   ` Eric Abrahamsen
2018-07-23  7:03                     ` Lars Ingebrigtsen
2018-07-23  7:22                       ` Nikolaus Rath
2018-07-23  7:39                         ` Lars Ingebrigtsen
2018-07-23  8:58                           ` Nikolaus Rath
2018-07-23  9:00                             ` Lars Ingebrigtsen
2018-07-23  9:01                             ` Lars Ingebrigtsen
2018-07-23  9:53                               ` Nikolaus Rath
2018-07-23 11:28                                 ` Robert Pluim [this message]
2018-07-23 18:00                                   ` Nikolaus Rath
2018-07-27  7:54                                     ` Nikolaus Rath
2018-08-05  9:54                                       ` Nikolaus Rath
2018-08-11  7:49                                         ` Eli Zaretskii
2018-07-23 16:47                                 ` Eric Abrahamsen

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=87r2jukx71.fsf@gmail.com \
    --to=rpluim@gmail.com \
    --cc=21057@debbugs.gnu.org \
    --cc=Nikolaus@rath.org \
    --cc=eric@ericabrahamsen.net \
    --cc=larsi@gnus.org \
    --cc=schwab@suse.de \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.