Gnus development mailing list
 help / color / mirror / Atom feed
From: Roland Winkler <winkler@gnu.org>
To: Sam Steingold <sds@gnu.org>
Cc: 54423@debbugs.gnu.org,  ding@gnus.org,  bbdb-user@nongnu.org,
	Lars Ingebrigtsen <larsi@gnus.org>
Subject: Re: bug#54423: 29.0.50; gnus-fetch-original-field returns nil in digest
Date: Tue, 22 Mar 2022 11:49:14 -0500	[thread overview]
Message-ID: <87mthi7x11.fsf@gnu.org> (raw)
In-Reply-To: <lzfsnaj1i2.fsf@3c22fb11fdab.ant.amazon.com> (Sam Steingold's message of "Mon, 21 Mar 2022 20:04:53 -0400")

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	other threads:[~2022-03-22 18:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <lzr172szfa.fsf@3c22fb11fdab.ant.amazon.com>
     [not found] ` <87ee30vo80.fsf@gnus.org>
     [not found]   ` <87cziku6kv.fsf@gnus.org>
     [not found]     ` <lzmthotxdi.fsf@3c22fb11fdab.ant.amazon.com>
     [not found]       ` <87k0cssiaw.fsf@gnus.org>
2022-03-22  0:04         ` Sam Steingold
2022-03-22 16:49           ` Roland Winkler [this message]
     [not found]             ` <lzbkxxj4nq.fsf@3c22fb11fdab.ant.amazon.com>
2022-03-22 17:27               ` Roland Winkler
2022-03-22 18:06                 ` Sam Steingold

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=87mthi7x11.fsf@gnu.org \
    --to=winkler@gnu.org \
    --cc=54423@debbugs.gnu.org \
    --cc=bbdb-user@nongnu.org \
    --cc=ding@gnus.org \
    --cc=larsi@gnus.org \
    --cc=sds@gnu.org \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).