From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.bugs Subject: bug#44981: 28.0.50; Restore nnimap-split-download-body? Date: Mon, 30 Nov 2020 20:12:13 -0800 Message-ID: <87y2iip3ky.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6276"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) To: 44981@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 01 05:13:11 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kjx2M-0001Uk-QU for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 01 Dec 2020 05:13:10 +0100 Original-Received: from localhost ([::1]:38022 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kjx2L-0008Tg-As for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 30 Nov 2020 23:13:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53798) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kjx2E-0008TW-Qz for bug-gnu-emacs@gnu.org; Mon, 30 Nov 2020 23:13:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45844) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kjx2E-0006Bg-Hy for bug-gnu-emacs@gnu.org; Mon, 30 Nov 2020 23:13:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kjx2E-0002kt-Dd for bug-gnu-emacs@gnu.org; Mon, 30 Nov 2020 23:13:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 01 Dec 2020 04:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 44981 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.160679595010549 (code B ref -1); Tue, 01 Dec 2020 04:13:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 1 Dec 2020 04:12:30 +0000 Original-Received: from localhost ([127.0.0.1]:57390 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kjx1i-0002k5-9f for submit@debbugs.gnu.org; Mon, 30 Nov 2020 23:12:30 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:37426) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kjx1g-0002jx-DJ for submit@debbugs.gnu.org; Mon, 30 Nov 2020 23:12:28 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53734) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kjx1e-0008RJ-4v for bug-gnu-emacs@gnu.org; Mon, 30 Nov 2020 23:12:28 -0500 Original-Received: from ericabrahamsen.net ([52.70.2.18]:56102 helo=mail.ericabrahamsen.net) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kjx1Z-0005zG-GF for bug-gnu-emacs@gnu.org; Mon, 30 Nov 2020 23:12:24 -0500 Original-Received: from localhost (c-73-254-86-141.hsd1.wa.comcast.net [73.254.86.141]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 10D13FA226 for ; Tue, 1 Dec 2020 04:12:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1606795939; bh=pBOqNHDn15DVM9nM1h1HlC7DziPjtT2RYRYkti9VZDc=; h=From:To:Subject:Date:From; b=jCBAJ41nBN2dlYF2wy2kWPX/ldaCf4eBz6aKMe687ZN+L5/35J8aqgDdtw3CciNvD CSnamnWrPU4c6a+A8mRImhHyRDdggiFHbzOwv8u5933G2GTa/RKLL75w+z6tKmBqha eSfGSaKrsZl0HaBQ2mSyxhgwAZgWdeqDaOb7qUjc= Received-SPF: pass client-ip=52.70.2.18; envelope-from=eric@ericabrahamsen.net; helo=mail.ericabrahamsen.net X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:194703 Archived-At: --=-=-= Content-Type: text/plain 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 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=nnimap-split-body.diff 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]") --=-=-=--