all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: 44981@debbugs.gnu.org
Subject: bug#44981: 28.0.50; Restore nnimap-split-download-body?
Date: Mon, 30 Nov 2020 20:12:13 -0800	[thread overview]
Message-ID: <87y2iip3ky.fsf@ericabrahamsen.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 1228 bytes --]


When splitting IMAP messages in Gnus' nnimap, there is a defvar called
`nnimap-split-download-body-default', which is consulted to decide
whether to download the whole message body during splitting, or only
consider its headers.

It appears that there used to be a defcustom called
`nnimap-split-download-body', which was advertised to the user, and this
defvar was used to hold... its default? It's odd.

In 2010, in commit 20a673b2d, a bunch of external Gnus code was merged
in, changing a lot of nnimap.el, and in the course of that the defcustom
was deleted. The defvar still remains, and is still effective. The
manual still refers to the customization option.

This looks unintentional, and I'd like to apply the attached diff,
restoring `nnimap-split-download-body' as a user option, and getting rid
of the default variable, which seems unnecessary. If this seems okay
I'll do up a proper commit, and make sure the documentation is all
accurate.

The same user who reported this also expressed a desire to be able to
download message bodies conditionally, based on the headers, only if
a split rule required it. I'm not at all sure about the feasibility of
that, but wanted to see if anyone else had an opinion.

Eric



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: nnimap-split-body.diff --]
[-- Type: text/x-patch, Size: 968 bytes --]

diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
index 7984998d21..1a1e13a23a 100644
--- a/lisp/gnus/nnimap.el
+++ b/lisp/gnus/nnimap.el
@@ -146,13 +146,16 @@ nnimap-request-articles-find-limit
   :version "24.4"
   :group 'nnimap)
 
+(defcustom nnimap-split-download-body nil
+  "If non-nil, splitting may also consider message bodies.
+This requires downloading the full message from the IMAP server
+during splitting, which may be slow."
+  :type 'boolean)
+
 (defvar nnimap-process nil)
 
 (defvar nnimap-status-string "")
 
-(defvar nnimap-split-download-body-default nil
-  "Internal variable with default value for `nnimap-split-download-body'.")
-
 (defvar nnimap-keepalive-timer nil)
 (defvar nnimap-process-buffers nil)
 
@@ -2100,7 +2103,7 @@ nnimap-fetch-inbox
 		 "BODY.PEEK"
 	       "RFC822.PEEK"))
 	    (cond
-	     (nnimap-split-download-body-default
+	     (nnimap-split-download-body
 	      "[]")
 	     ((nnimap-ver4-p)
 	      "[HEADER]")

             reply	other threads:[~2020-12-01  4:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-01  4:12 Eric Abrahamsen [this message]
2020-12-02 10:28 ` bug#44981: 28.0.50; Restore nnimap-split-download-body? Lars Ingebrigtsen
2020-12-02 21:01   ` Basil L. Contovounesios
2020-12-02 21:18     ` Eric Abrahamsen
2020-12-03  8:03       ` Lars Ingebrigtsen
2020-12-02 23:56   ` Eric Abrahamsen
2020-12-03  8:10     ` Lars Ingebrigtsen
2020-12-03 18:20       ` Eric Abrahamsen
2020-12-04 10:45         ` Basil L. Contovounesios
2020-12-04 18:39           ` Eric Abrahamsen
2020-12-05 15:57             ` Basil L. Contovounesios
2020-12-05 19:48               ` Eric Abrahamsen
2020-12-06 12:06                 ` Basil L. Contovounesios

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=87y2iip3ky.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=44981@debbugs.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.
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.