From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: Andy Moreton <andrewjmoreton@gmail.com>
Cc: 33653@debbugs.gnu.org
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 [thread overview]
Message-ID: <87o95xto0b.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <vz1pnqda3sw.fsf@gmail.com> (Andy Moreton's message of "Tue, 26 Mar 2019 18:28:15 +0000")
Andy Moreton <andrewjmoreton@gmail.com> writes:
> On Sat 23 Mar 2019, Andy Moreton wrote:
>
>> On Fri 22 Mar 2019, Eric Abrahamsen wrote:
>>
>>> Eli Zaretskii <eliz@gnu.org> writes:
>>>
>>>>> From: Eric Abrahamsen <eric@ericabrahamsen.net>
>>>>> 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
next prev parent reply other threads:[~2019-03-26 19:49 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-06 22:39 bug#33653: 27.0.50; Change Gnus obarrays-as-hash-tables into real hash tables Eric Abrahamsen
2018-12-06 22:46 ` Eric Abrahamsen
[not found] ` <m35zvzq34a.fsf@gnus.org>
2018-12-11 23:30 ` Eric Abrahamsen
2019-02-05 2:05 ` Eric Abrahamsen
2019-03-22 0:09 ` Eric Abrahamsen
2019-03-22 9:20 ` Robert Pluim
2019-03-22 17:21 ` Eric Abrahamsen
2019-03-22 19:54 ` Eric Abrahamsen
2019-03-22 21:07 ` Eli Zaretskii
2019-03-22 22:10 ` Eric Abrahamsen
2019-03-23 14:52 ` Andy Moreton
2019-03-23 16:14 ` Eric Abrahamsen
2019-03-26 18:28 ` Andy Moreton
2019-03-26 19:49 ` Eric Abrahamsen [this message]
2019-03-22 22:40 ` Glenn Morris
2019-03-22 22:51 ` Eric Abrahamsen
2019-03-23 6:46 ` Eli Zaretskii
2019-03-24 22:29 ` Bastien
2019-03-24 23:40 ` Eric Abrahamsen
2019-03-30 12:09 ` Deus Max
2019-03-31 23:27 ` Eric Abrahamsen
2019-04-01 22:39 ` Deus Max
2019-04-02 5:23 ` Eric Abrahamsen
2019-03-25 2:14 ` Katsumi Yamaoka
2019-03-25 2:35 ` Eric Abrahamsen
2019-03-25 14:45 ` Andy Moreton
2019-03-25 17:35 ` Eric Abrahamsen
2019-03-25 17:51 ` Robert Pluim
2019-03-25 18:17 ` Basil L. Contovounesios
2019-03-25 19:04 ` Bastien
2019-03-25 20:15 ` Andy Moreton
2019-03-26 19:58 ` Eric Abrahamsen
2019-03-26 21:44 ` Eric Abrahamsen
2019-03-27 4:54 ` Katsumi Yamaoka
2019-03-27 18:47 ` Eric Abrahamsen
2019-03-27 21:27 ` Eric Abrahamsen
2019-03-27 22:10 ` Eric Abrahamsen
2019-03-31 22:55 ` Eric Abrahamsen
2019-04-01 20:18 ` Adam Sjøgren
2019-04-01 20:57 ` Eric Abrahamsen
2019-04-02 16:43 ` Adam Sjøgren
2019-04-03 22:16 ` Katsumi Yamaoka
2019-04-03 22:36 ` Eric Abrahamsen
2019-04-05 4:25 ` Katsumi Yamaoka
2019-04-05 6:44 ` Katsumi Yamaoka
2019-04-05 11:02 ` Basil L. Contovounesios
2019-04-08 1:47 ` Katsumi Yamaoka
2019-04-05 20:18 ` Eric Abrahamsen
2019-04-08 1:58 ` Katsumi Yamaoka
2019-04-08 4:31 ` Katsumi Yamaoka
2019-04-11 21:29 ` Basil L. Contovounesios
2019-04-11 23:56 ` Katsumi Yamaoka
2019-04-12 11:05 ` Basil L. Contovounesios
2019-06-22 13:11 ` Lars Ingebrigtsen
2019-04-05 11:01 ` Basil L. Contovounesios
2019-04-08 8:13 ` Katsumi Yamaoka
2019-04-08 8:57 ` Andreas Schwab
2019-04-09 0:55 ` Katsumi Yamaoka
2019-04-08 18:31 ` Eric Abrahamsen
2019-04-09 0:55 ` Katsumi Yamaoka
2019-04-09 2:01 ` Eric Abrahamsen
2019-04-09 4:18 ` Katsumi Yamaoka
2019-04-09 4:30 ` Eric Abrahamsen
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=87o95xto0b.fsf@ericabrahamsen.net \
--to=eric@ericabrahamsen.net \
--cc=33653@debbugs.gnu.org \
--cc=andrewjmoreton@gmail.com \
/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.