From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.bugs Subject: bug#38011: 27.0.50; [PATCH] WIP on allowing Gnus backends to return header data directly Date: Fri, 01 Nov 2019 11:41:26 -0700 Message-ID: <8736f7l9rd.fsf@ericabrahamsen.net> References: <87y2x0a9bl.fsf@ericabrahamsen.net> <87a79f3cu3.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="258394"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 38011@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 01 19:42:11 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iQbsB-00155y-0Z for geb-bug-gnu-emacs@m.gmane.org; Fri, 01 Nov 2019 19:42:11 +0100 Original-Received: from localhost ([::1]:42104 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iQbs9-0000cq-Lz for geb-bug-gnu-emacs@m.gmane.org; Fri, 01 Nov 2019 14:42:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53100) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iQbs3-0000X8-E1 for bug-gnu-emacs@gnu.org; Fri, 01 Nov 2019 14:42:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iQbs2-0002uo-8d for bug-gnu-emacs@gnu.org; Fri, 01 Nov 2019 14:42:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48308) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iQbs2-0002uc-5D for bug-gnu-emacs@gnu.org; Fri, 01 Nov 2019 14:42:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iQbs1-0002kJ-W1 for bug-gnu-emacs@gnu.org; Fri, 01 Nov 2019 14:42:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 01 Nov 2019 18:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38011 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 38011-submit@debbugs.gnu.org id=B38011.157263369810511 (code B ref 38011); Fri, 01 Nov 2019 18:42:01 +0000 Original-Received: (at 38011) by debbugs.gnu.org; 1 Nov 2019 18:41:38 +0000 Original-Received: from localhost ([127.0.0.1]:57129 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQbrd-0002jT-R4 for submit@debbugs.gnu.org; Fri, 01 Nov 2019 14:41:38 -0400 Original-Received: from ericabrahamsen.net ([52.70.2.18]:40874 helo=mail.ericabrahamsen.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQbra-0002jC-Qz for 38011@debbugs.gnu.org; Fri, 01 Nov 2019 14:41:35 -0400 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 17291FA07E; Fri, 1 Nov 2019 18:41:27 +0000 (UTC) In-Reply-To: <87a79f3cu3.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 01 Nov 2019 15:12:20 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:170655 Archived-At: Lars Ingebrigtsen writes: > Eric Abrahamsen writes: > >> This patch provides the possibility for backends to return their own >> headers (ie a list of vectors), though it doesn't actually change any of >> the backends to do that -- that will be another patch. > > Great! > >> I have one question at this stage: the 'nov or 'headers value gets >> stored into the `gnus-headers-retrieved-by' variable. That variable is >> later checked in a couple of places like so: >> >> (when (and gnus-fetch-old-headers >> (eq gnus-headers-retrieved-by 'nov)) >> (if (eq gnus-fetch-old-headers 'invisible) >> (gnus-build-all-threads) >> (gnus-build-old-threads))) >> >> If the variable is 'headers, the `gnus-build-*-threads' functions don't >> get called at all. >> >> What's the difference between 'nov and 'headers, and why can we build >> threads in one case and not the other? If backends were to return their >> own headers, what value should they return? > > It's not about threading per se, but about displaying information about > already-read articles (or more precisely -- about articles not in the > set that was requested). Threads are build no matter how the backend > delivers the data. > > If nn-*retrieve-headers supports NOV fetching, then certain Gnus > variables about filling in threads with "old" articles is switched on, > because fetching extra NOV headers is fast (you just say "fetch 100-150" > instead of "fetch 100-110,120-130,150"). With the backends that fetch > head by head, this is slow, so it's not done. > > It's basically a distinction between NNTP and almost all the other > backends. Okay, that makes sense. So it's basically a flag saying header retrieval is cheap enough that we might as well pull in more old messages than we otherwise would. For example, nnmaildir builds and stores nov data (which drives people with large maildirs insane because it takes enormous amounts of time and space), so it returns 'nov, but if we ever got rid of that (or made it optional) it would return 'headers. I'm going to assume that any backend capable of returning its own headers is probably going to... return 'headers. At any rate, as I implement this for various backends, I'll start with the ones that return 'headers to begin with. At some point, though, I'd still like to get rid of this flag and build the distinction into the backend functions themselves. Hmmm... nnmaildir needs some love. Eric