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

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

bug#54423: 29.0.50; gnus-fetch-original-field returns nil in digest


From: Roland Winkler
Subject: bug#54423: 29.0.50; gnus-fetch-original-field returns nil in digest
Date: Tue, 22 Mar 2022 11:49:14 -0500

On Mon, Mar 21 2022, Sam Steingold wrote:
> Lars suggested that I use this:
>
> (gnus-info-params (gnus-get-info gnus-newsgroup-name))
>
> and it appears that the following works:
>
[snip]
> +          (and-let* ((i (gnus-get-info gnus-newsgroup-name))
> +                     (p (gnus-info-params i))
> +                     (parent-summary-buffer (cadr (assq 'quit-config p))))
> +            (with-current-buffer parent-summary-buffer
> +              (gnus-fetch-original-field header)))))

...Is the (and-let*... needed?  Of course, one could wrap all code that
way.  But and-let* is not even part of Emacs 25 that current BBDB is
supposed to support.  Also, if the above code should fail in certain
cases, it might be an indication that the above code is not yet exactly
what is needed so that this should not be swept under the carpet.  So I
feel that
 
  (with-current-buffer (cadr (assq 'quit-config
                                   (gnus-info-params
                                    (gnus-get-info gnus-newsgroup-name))))

is the better way to go.  Am I missing something?

Or: If the corner cases when the code can still fail are known and the
failure is in that sense intentional, this should be made more explicit
in the code.





reply via email to

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