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#33653: 27.0.50; Change Gnus obarrays-as-hash-tables into real hash tables Date: Tue, 26 Mar 2019 12:49:08 -0700 Message-ID: <87o95xto0b.fsf@ericabrahamsen.net> References: <8736raz3ec.fsf@ericabrahamsen.net> <87y392xoht.fsf@ericabrahamsen.net> <87imxzxa4s.fsf@ericabrahamsen.net> <87a7hn3h3w.fsf@ericabrahamsen.net> <87mulmkeo9.fsf@ericabrahamsen.net> <87pnqik7ld.fsf@ericabrahamsen.net> <834l7ur52w.fsf@gnu.org> <877ecqk1b5.fsf@ericabrahamsen.net> <86imw9abj3.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="96430"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 33653@debbugs.gnu.org To: Andy Moreton Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 26 21:02:30 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.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h8sHF-000Ow3-TM for geb-bug-gnu-emacs@m.gmane.org; Tue, 26 Mar 2019 21:02:30 +0100 Original-Received: from localhost ([127.0.0.1]:37266 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8sHE-00060f-T3 for geb-bug-gnu-emacs@m.gmane.org; Tue, 26 Mar 2019 16:02:28 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:44138) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8sH0-0005qE-3B for bug-gnu-emacs@gnu.org; Tue, 26 Mar 2019 16:02:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h8s5D-0006MX-0X for bug-gnu-emacs@gnu.org; Tue, 26 Mar 2019 15:50:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47050) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h8s5C-0006MM-GX for bug-gnu-emacs@gnu.org; Tue, 26 Mar 2019 15:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h8s5C-0006Gx-76 for bug-gnu-emacs@gnu.org; Tue, 26 Mar 2019 15:50: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: Tue, 26 Mar 2019 19:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33653 X-GNU-PR-Package: emacs Original-Received: via spool by 33653-submit@debbugs.gnu.org id=B33653.155362975824050 (code B ref 33653); Tue, 26 Mar 2019 19:50:02 +0000 Original-Received: (at 33653) by debbugs.gnu.org; 26 Mar 2019 19:49:18 +0000 Original-Received: from localhost ([127.0.0.1]:60594 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h8s4T-0006Fq-Q8 for submit@debbugs.gnu.org; Tue, 26 Mar 2019 15:49:18 -0400 Original-Received: from ericabrahamsen.net ([52.70.2.18]:44270 helo=mail.ericabrahamsen.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h8s4R-0006Fd-Ob for 33653@debbugs.gnu.org; Tue, 26 Mar 2019 15:49:17 -0400 Original-Received: from localhost (unknown [207.109.85.82]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 9DD35FA02B; Tue, 26 Mar 2019 19:49:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ericabrahamsen.net; s=mail; t=1553629749; bh=pCxGHJTiCjqnwWkaKDDlOUH6FGmWM81eDxaB0i19SeA=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=svndM9HeeRTfb5E2hs6HMcMTJbvPD9ZRTuOHXz3TjJHZZAkN27lzgilP/4LPbj+cI hoJ2h8rOZYGSuv8XQPRp1PsTuTzr8C6twU9Ya7MLdHMtnXe595QZxd+dQbuZToRFV1 PuOcEnto2pAebTbuWRPo0ux9gbRRKa2lmAgyyRj0= In-Reply-To: (Andy Moreton's message of "Tue, 26 Mar 2019 18:28:15 +0000") 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:156838 Archived-At: Andy Moreton writes: > On Sat 23 Mar 2019, Andy Moreton wrote: > >> On Fri 22 Mar 2019, Eric Abrahamsen wrote: >> >>> Eli Zaretskii writes: >>> >>>>> From: Eric Abrahamsen >>>>> Date: Fri, 22 Mar 2019 12:54:54 -0700 >>>>> >>>>> is there anything to be done besides warning people on the mailing >>>>> lists? >>>> >>>> A warning would be nice, yes. >>> >>> Okay, I'll do that. I've already gotten a bug report :( >> >> After bootstrapping, I observe that the summary buffer does not update >> the faces correctly for nntp articles that have been read: they still >> have an unread face. > > After more debugging, I have found the problem. > > Updating summary lines is handled in `gnus-summary-insert-line': > (condition-case () > (put-text-property > (point) > (progn (eval gnus-summary-line-format-spec) (point)) > 'gnus-number gnus-tmp-number) > (error (gnus-message 5 "Error updating the summary line"))) > > In my setup, `gnus-summary-line-format' used starts with "%U%R%u&score;" > to use a user format function for printing score info. That results in > calls to my user function to display summary lines: > > (defun gnus-user-format-function-score (header) > (let* ((article (mail-header-number header)) > (thread (gnus-id-to-thread (mail-header-id header))) > ... > > This now fails because `gnus-id-to-thread' sometimes throws an error, > because `gnus-newsgroup-dependencies' is nil when it is called. This > usage worked in emacs-26 and in master before your changes. > > I've fixed this in my user format function with: > > (defun gnus-user-format-function-score (header) > (let* ((article (mail-header-number header)) > (thread (and gnus-newsgroup-dependencies > (gnus-id-to-thread (mail-header-id header)))) > ... > > After that change, the marks are displayed correctly in the summary > buffer. I'm not sure if that is something that only worked by chance in > old code, or if it is a regression, but it is a change of behaviour. Yes, the format spec is eval'ed twice (to set summary buffer positions) before the threads are actually built, and `gnus-newsgroup-dependencies' is nil at that point. Back when this was a call to `intern', it would just silently return nil, now it errors. Your fix works, but I could also have `gnus-id-to-thread' return nil if `gnus-newsgroup-dependencies' is nil. That would mimic Gnus' previous behavior. Thanks, Eric