From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 8872 invoked from network); 22 Mar 2022 00:05:13 -0000 Received: from mx1.math.uh.edu (129.7.128.32) by inbox.vuxu.org with ESMTPUTF8; 22 Mar 2022 00:05:13 -0000 Received: from lists1.math.uh.edu ([129.7.128.208]) by mx1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nWS1P-004e7K-7y for ml@inbox.vuxu.org; Mon, 21 Mar 2022 19:05:11 -0500 Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.94.2) (envelope-from ) id 1nWS1O-0064mc-HA for ml@inbox.vuxu.org; Mon, 21 Mar 2022 19:05:10 -0500 Received: from mx1.math.uh.edu ([129.7.128.32]) by lists1.math.uh.edu with esmtp (Exim 4.94.2) (envelope-from ) id 1nWS1N-0064mW-6S for ding@lists.math.uh.edu; Mon, 21 Mar 2022 19:05:09 -0500 Received: from quimby.gnus.org ([95.216.78.240]) by mx1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nWS1K-004e6y-45 for ding@lists.math.uh.edu; Mon, 21 Mar 2022 19:05:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :Date:Reply-To:References:In-Reply-To:Subject:Cc:To:From:Sender:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=6oAOI0j3DPwmu9kFVYEiemHs6PmVuflOMTmfUnrZEoY=; b=LD13vkVkhweJ74M+MBro0Cwakz 0kkjcWjao3WabPvGn0XucF1KwvsScel9h2GM06xOpJbDzF/2CO/YbuyYd6p3kZxCfQlUj8DAMuiQL tgg0LEJyVMVoH/CDTkqcHYu+6LiPL4xpgmP4ZhyMtZHCCjPtQGd9KZ6xcjH5ZfSgQxJo=; Received: from mail-qk1-x734.google.com ([2607:f8b0:4864:20::734]) by quimby.gnus.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nWS1B-0005oV-HA; Tue, 22 Mar 2022 01:05:01 +0100 Received: by mail-qk1-x734.google.com with SMTP id r127so12884583qke.13; Mon, 21 Mar 2022 17:04:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:in-reply-to:references:user-agent :return-receipt-to:reply-to:mail-followup-to:date:message-id :mime-version:content-transfer-encoding; bh=6oAOI0j3DPwmu9kFVYEiemHs6PmVuflOMTmfUnrZEoY=; b=V7Rr514HvdG/0KNcwe4DGe9OnS4EtCmb1ojyfxScexo7sm1KXtZ4SEc+RcIGRIBJbU gwFyEVcCaL7goLHyCjWHOgAaz57puK83HrxRQ6XumLAol+8SJ+GFiFHAO5WB0W1ZYgYY BRcI7u9Dh7oqTXVms2d5NDXRH5cEi6pJBWII51OWOda0bsmZJMPsJKYbjFXhA389bt67 U9OGMfARtJIqG6GoEOeM6xy3nxIwzBlfbom232dCmtWwBwdUtEcBN4GI/ejbNPmvYHrL iMmFnsRszTAc8b4KMf0+MOCx/C3rwnfj6L8dKYdn6BRenHazX1KlQFd5H8k8Pjq8fXN0 dwcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:in-reply-to:references :user-agent:return-receipt-to:reply-to:mail-followup-to:date :message-id:mime-version:content-transfer-encoding; bh=6oAOI0j3DPwmu9kFVYEiemHs6PmVuflOMTmfUnrZEoY=; b=KvSSwiXrWUE6Gd8jvAI2jVIs+zOOPOT+qieaS4am1UKbCLmGOcoAK0RH9Eyuub5VOc oqLgpRMES+z1fLWO5RErxXpyqUF31OOWw/tHc4XvE9g0AzpPgl6qH8R+4A2hd7Xk8rrG PjGo5zHLWpCB0vdrj2AQJNt2DFfxPV4c1wA4BnEWYw2w7UEcRG7X4ATas8R5ttcmcu78 VbZJh59mBzwUYmzSN1HpZlRmga/cpF9ICxZC1E1x3ur1UsUpWvqY7v6gAFd/yHM/igML t05XgQxBW5zuNNB4K9FkJyVYAYHN+8FBN/cbuuKiwLySBX5Y+6GyakhsANBO52U79G5K Gqqg== X-Gm-Message-State: AOAM533SZIh+U9Ydr4tnW8LWJ+6TSR2cn8+jTLy6Cljw7Mc0oVqdfDUh EbC/UcyjyMja+B4zYbyNoD7fTLaoYQ== X-Google-Smtp-Source: ABdhPJwxZW6eoEB/8sWnEc1EvtVqbt4jsOd2mujPrlOLwhveWat3ukdhRQkd8I38c48eoidv4BDCdA== X-Received: by 2002:a37:2e42:0:b0:67e:6d80:2707 with SMTP id u63-20020a372e42000000b0067e6d802707mr8462884qkh.365.1647907494786; Mon, 21 Mar 2022 17:04:54 -0700 (PDT) Received: from 3c22fb11fdab.ant.amazon.com (pool-108-30-23-113.nycmny.fios.verizon.net. [108.30.23.113]) by smtp.gmail.com with ESMTPSA id v12-20020a05622a130c00b002e1b3ccd9adsm13282361qtk.79.2022.03.21.17.04.54 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Mar 2022 17:04:54 -0700 (PDT) From: Sam Steingold To: Lars Ingebrigtsen Cc: 54423@debbugs.gnu.org, ding@gnus.org, bbdb-user@nongnu.org Subject: Re: bug#54423: 29.0.50; gnus-fetch-original-field returns nil in digest In-Reply-To: <87k0cssiaw.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 17 Mar 2022 16:35:51 +0100") References: <87ee30vo80.fsf@gnus.org> <87cziku6kv.fsf@gnus.org> <87k0cssiaw.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (darwin) Reply-To: sds@gnu.org X-Attribution: Sam X-Disclaimer: You should not expect anyone to agree with me. Mail-Followup-To: Lars Ingebrigtsen , 54423@debbugs.gnu.org, ding@gnus.org, bbdb-user@nongnu.org Date: Mon, 21 Mar 2022 20:04:53 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-ID: Precedence: bulk Context (see https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D54423): `bbdb-message-header' calls `gnus-fetch-original-field' which, for a digest ("nndoc") group, returns nil for every header. The root of the problem is that `gnus-fetch-original-field' relies on `gnus-original-article-buffer' which is buffer-local: --8<---------------cut here---------------start------------->8--- gnus-original-article-buffer is a variable defined in =E2=80=98gnus.el=E2= =80=99. Its value is " *Original Article nndoc:gmane.comp.security.risks-1023*" Local in buffer *Summary nndoc:gmane.comp.security.risks-1023*; global valu= e is the same. --8<---------------cut here---------------end--------------->8--- (buffer " *Original Article nndoc:gmane.comp.security.risks-1023*" is _empt= y_!) and at the _same_ time (no gnus command executed, just a buffer switch): --8<---------------cut here---------------start------------->8--- gnus-original-article-buffer is a variable defined in =E2=80=98gnus.el=E2= =80=99. Its value is " *Original Article gmane.comp.security.risks*" Local in buffer *Summary gmane.comp.security.risks*; global value is the sa= me. --8<---------------cut here---------------end--------------->8--- Lars suggested that I use this: --8<---------------cut here---------------start------------->8--- (gnus-info-params (gnus-get-info gnus-newsgroup-name)) --8<---------------cut here---------------end--------------->8--- and it appears that the following works: --8<---------------cut here---------------start------------->8--- diff --git a/lisp/bbdb-mua.el b/lisp/bbdb-mua.el index f9d141d..ab3863c 100644 --- a/lisp/bbdb-mua.el +++ b/lisp/bbdb-mua.el @@ -111,7 +111,17 @@ MIME encoded headers are decoded. Return nil if HEADE= R does not exist." ;; `bbdb-select-message' does not get fooled by an ap= parent ;; absence of some headers. ;; See http://permalink.gmane.org/gmane.emacs.gnus.ge= neral/78741 - (eq mua 'gnus) (gnus-fetch-original-field header)) + (eq mua 'gnus) + (or (gnus-fetch-original-field header) + ;; See https://debbugs.gnu.org/cgi/bugreport.cgi?= bug=3D54423 + ;; 'gnus-fetch-original-field' returns nil in nnd= oc groups + ;; (digests) because the 'qgnus-original-article-= buffer' is + ;; empty for the nndoc summary but not for the pa= rent summary. + (and-let* ((i (gnus-get-info gnus-newsgroup-name)) + (p (gnus-info-params i)) + (parent-summary-buffer (cadr (assq 'qu= it-config p)))) + (with-current-buffer parent-summary-buffer + (gnus-fetch-original-field header))))) ((eq mua 'vm) (bbdb/vm-header header)) ((eq mua 'rmail) (with-current-buffer rmail-buffer --8<---------------cut here---------------end--------------->8--- `quit-config' contains the parent summary buffer object. I would rather use that directly that construct the string " *Original Article gmane.comp.security.risks*" (especially since the relevant logic in `gnus-article-setup-buffer' is moderately convoluted). The question is whether this is TRT or there is a better way. Thanks to Lars for his patience, and to everyone else for possible suggestion. --=20 Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.2113 http://childpsy.net http://calmchildstories.com http://steingoldpsychology.= com https://honestreporting.com https://camera.org http://think-israel.org Money does not bother me at all. In fact, it calms me down.