all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: eric@ericabrahamsen.net
Cc: 44981@debbugs.gnu.org
Subject: bug#44981: 28.0.50; Restore nnimap-split-download-body?
Date: Fri, 04 Dec 2020 10:45:12 +0000	[thread overview]
Message-ID: <87zh2tyhmv.fsf@tcd.ie> (raw)
In-Reply-To: <87k0ty92ge.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Thu, 03 Dec 2020 10:20:01 -0800")

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

Thanks for cleaning this up, Eric.  Could someone please look into the
following byte-compilation warning?

  In spam-setup-widening:
  gnus/spam.el:1234:11: Warning: ‘nnimap-split-download-body-default’ is an
      obsolete variable (as of 28.1); use ‘nnimap-split-download-body’ instead.

I was thinking of the following change:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: spam.diff --]
[-- Type: text/x-diff, Size: 895 bytes --]

diff --git a/lisp/gnus/spam.el b/lisp/gnus/spam.el
index 96a7da2313..8634fa680d 100644
--- a/lisp/gnus/spam.el
+++ b/lisp/gnus/spam.el
@@ -44,12 +44,9 @@
 ;;; for the definitions of group content classification and spam processors
 (require 'gnus)
 
-(eval-when-compile (require 'hashcash))
-
-;; for nnimap-split-download-body-default
-(eval-when-compile (require 'nnimap))
-
-(eval-when-compile (require 'cl-lib))
+(eval-when-compile
+  (require 'cl-lib)
+  (require 'hashcash))
 
 ;; autoload query-dig
 (autoload 'query-dig "dig")
@@ -1230,8 +1227,9 @@ spam-generic-score
 
 ;;; set up IMAP widening if it's necessary
 (defun spam-setup-widening ()
+  (defvar nnimap-split-download-body)
   (when (spam-widening-needed-p)
-    (setq nnimap-split-download-body-default t)))
+    (setq nnimap-split-download-body t)))
 
 (defun spam-widening-needed-p (&optional force-symbols)
   (let (found)

[-- Attachment #3: Type: text/plain, Size: 397 bytes --]


But Ted explicitly changed spam-setup-widening in 2003 to use
nnimap-split-download-body-default instead of
nnimap-split-download-body, to avoid modifying a user option.

I don't know what spam-setup-widening is meant to do, and by extension I
don't know what TRT to do here is.  Either way, loading nnimap in
eval-when-compile "for a variable" is definitely dubious.  Ideas?

Thanks,

-- 
Basil

  reply	other threads:[~2020-12-04 10:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-01  4:12 bug#44981: 28.0.50; Restore nnimap-split-download-body? Eric Abrahamsen
2020-12-02 10:28 ` 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 [this message]
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=87zh2tyhmv.fsf@tcd.ie \
    --to=contovob@tcd.ie \
    --cc=44981@debbugs.gnu.org \
    --cc=eric@ericabrahamsen.net \
    /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.