bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#33653: 27.0.50; Change Gnus obarrays-as-hash-tables into real hash t


From: Andy Moreton
Subject: bug#33653: 27.0.50; Change Gnus obarrays-as-hash-tables into real hash tables
Date: Tue, 26 Mar 2019 18:28:15 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt)

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.

    AndyM






reply via email to

[Prev in Thread] Current Thread [Next in Thread]