From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Roland Winkler Newsgroups: gmane.emacs.bugs Subject: bug#54423: 29.0.50; gnus-fetch-original-field returns nil in digest Date: Tue, 22 Mar 2022 11:49:14 -0500 Message-ID: <87mthi7x11.fsf__36172.7909579471$1647967834$gmane$org@gnu.org> References: <87ee30vo80.fsf@gnus.org> <87cziku6kv.fsf@gnus.org> <87k0cssiaw.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24602"; mail-complaints-to="usenet@ciao.gmane.io" Cc: bbdb-user@nongnu.org, Lars Ingebrigtsen , 54423@debbugs.gnu.org, ding@gnus.org To: Sam Steingold Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Mar 22 17:50:30 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nWhiH-0006Gd-FB for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 22 Mar 2022 17:50:29 +0100 Original-Received: from localhost ([::1]:44330 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nWhiG-0000Xi-28 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 22 Mar 2022 12:50:28 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:57658) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nWhhq-0000Vy-Mw for bug-gnu-emacs@gnu.org; Tue, 22 Mar 2022 12:50:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47827) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nWhhq-0004s3-1T for bug-gnu-emacs@gnu.org; Tue, 22 Mar 2022 12:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nWhhp-0004fs-V7; Tue, 22 Mar 2022 12:50:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Roland Winkler Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Tue, 22 Mar 2022 16:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54423 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: notabug Original-Received: via spool by 54423-submit@debbugs.gnu.org id=B54423.164796776217912 (code B ref 54423); Tue, 22 Mar 2022 16:50:01 +0000 Original-Received: (at 54423) by debbugs.gnu.org; 22 Mar 2022 16:49:22 +0000 Original-Received: from localhost ([127.0.0.1]:41723 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nWhhC-0004eq-6t for submit@debbugs.gnu.org; Tue, 22 Mar 2022 12:49:22 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:53636) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nWhhB-0004ee-1F for 54423@debbugs.gnu.org; Tue, 22 Mar 2022 12:49:21 -0400 Original-Received: from [2001:470:142:3::e] (port=41388 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nWhh5-0004kV-OM; Tue, 22 Mar 2022 12:49:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=wNkOhKEhUlwAUwd6hUxi58FQ5z/08S6e4EZMtUUFSvc=; b=bpuCcHQTlN+yn/FYGIJ1 GcO4SYQ+vbujCq8Yx+CMILWnRATf45Rj4fQ/63yIaJg20xQ/QYutx05hJtew+MAN3e84OhFL4RsqW 82+7tpuFcGgcrTZgZUPdONXSyz1NGlmctiFraSus3uxSVhA2CWpPlLNEWWi1fX6Q8mUtNed4Cqy/k HzphUcT++sQC2zRwi0knoCpVYi3DGc35ewlEy0D0BlUuESULXOjQR2JF0TR4JTOFpoqOJSp4rzZOq 5U774CLQBio1K8WXPAUcfiZ2RNSIBGMhCDZXVOZl3uebmihlWv92vh3+bMwzcHHCALwLc6KdJg7Sj wH4MB5InpD0ZFQ==; Original-Received: from lukas.physics.niu.edu ([131.156.224.124]:35744 helo=lukas) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nWhh5-00011d-FZ; Tue, 22 Mar 2022 12:49:15 -0400 In-Reply-To: (Sam Steingold's message of "Mon, 21 Mar 2022 20:04:53 -0400") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:228774 Archived-At: 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.