From unknown Fri Aug 15 19:30:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#75557: gnus-highlight-selected-tree is broken (fix) Resent-From: Pranshu Sharma Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 14 Jan 2025 14:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 75557 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 75557@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17368634637610 (code B ref -1); Tue, 14 Jan 2025 14:05:01 +0000 Received: (at submit) by debbugs.gnu.org; 14 Jan 2025 14:04:23 +0000 Received: from localhost ([127.0.0.1]:54255 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tXhWo-0001yg-QD for submit@debbugs.gnu.org; Tue, 14 Jan 2025 09:04:23 -0500 Received: from lists.gnu.org ([2001:470:142::17]:58420) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tXhWm-0001y9-68 for submit@debbugs.gnu.org; Tue, 14 Jan 2025 09:04:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tXhWd-0001mb-GI for bug-gnu-emacs@gnu.org; Tue, 14 Jan 2025 09:04:11 -0500 Received: from mail.bauherren.ovh ([45.32.179.127]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tXhWU-0003G0-DM for bug-gnu-emacs@gnu.org; Tue, 14 Jan 2025 09:04:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=bauherren.ovh; s=mail; t=1736863433; bh=gk4Pq0aBcJposzkdqebvOmW2o89/fStvNN5VYeBTe8A=; h=From:To:Subject:Date:From; b=dBYwGNhU9iFl8awsmIAPPiPUkgKUWGNwj2HRV4xxHOJuLCatLJZZ0p5ADAQ4rA24E KxOqBlT1Taoawr7m26daWhtoxGvp0l1aESi+IW6vd5+pm2aPRS23TJvJEmyjDsFDUn qczPH8cDQzVCctGNY9jmFX2mbXHSNb6FzFEzU+io6i3srJzmwvjam1hSMq6qVYeUwQ ieQafFu/b/uyGO8Ak9RE40rJKZE5KubUAL3I+pLQbsR1mWJxHAqV1LO75bfaU5bJ6s 29HcWW5PwLHymgaFyZNDPRFT2JYtCIngucPtycJ4mJ/wGg1EP+/ri298w1rST4Ulnr v3i6kfiFLxQiQ== From: Pranshu Sharma Date: Wed, 15 Jan 2025 00:03:40 +1000 Message-ID: <87ldvdh4qr.fsf@bauherren.ovh> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=45.32.179.127; envelope-from=pranshu@bauherren.ovh; helo=mail.bauherren.ovh X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) --=-=-= Content-Type: text/plain seems like buffer-live-p does not accept string buffer names anymore --=-=-= Content-Type: text/x-diff Content-Disposition: inline Content-Description: dif diff --git a/lisp/gnus/gnus-salt.el b/lisp/gnus/gnus-salt.el index 6514d8d4174..75daf7e7cfa 100644 --- a/lisp/gnus/gnus-salt.el +++ b/lisp/gnus/gnus-salt.el @@ -808,7 +808,7 @@ gnus-tree-perhaps-minimize (defun gnus-highlight-selected-tree (article) "Highlight the selected article in the tree." - (when (buffer-live-p gnus-tree-buffer) + (when (buffer-live-p (get-buffer gnus-tree-buffer)) (let ((buf (current-buffer)) region) (set-buffer gnus-tree-buffer) --=-=-= Content-Type: text/plain -- Pranshu Sharma --=-=-=-- From unknown Fri Aug 15 19:30:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#75557: gnus-highlight-selected-tree is broken (fix) Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 Mar 2025 04:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75557 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Pranshu Sharma Cc: Eli Zaretskii , Stefan Monnier , 75557@debbugs.gnu.org Received: via spool by 75557-submit@debbugs.gnu.org id=B75557.174088829514764 (code B ref 75557); Sun, 02 Mar 2025 04:05:02 +0000 Received: (at 75557) by debbugs.gnu.org; 2 Mar 2025 04:04:55 +0000 Received: from localhost ([127.0.0.1]:49507 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1toaZT-0003py-9c for submit@debbugs.gnu.org; Sat, 01 Mar 2025 23:04:55 -0500 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]:54775) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1toaZP-0003pF-RG for 75557@debbugs.gnu.org; Sat, 01 Mar 2025 23:04:52 -0500 Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-5dca468c5e4so5911188a12.1 for <75557@debbugs.gnu.org>; Sat, 01 Mar 2025 20:04:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1740888286; x=1741493086; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=eo2JPnZo0q/CXsbvUi1SGtF+lW3PccxtdRm/DfEQxOY=; b=a3AFS38/JUtPxT9muEHvaOPGAYCRU/43ihiMk+s1NQMSyf9LZ2YPuuEQ3oqXOLVsv+ l1Jj8xdQAkvavaqWVG5Ki663lTGLyOM7A77Ff0Za2L+a4gZL0ErKyUKcnp66Dv1iihCX DwHY6P6s0bsfTVXHfIQ4guJj8FGeUVXSYsbz9PNpUdXGGDEGQnmiNo8ZCvC5ZY4aWxvy SUvIlUOnB/OsEel0fnpg2tYQUfU8ZhTmYC2RHu4hErjNYD0f8VRlbqZFQDEhx7vrUdml eX0NKglzrmmkW+dAlpLXEa4FzwfjUbzeW/wvBPKHP5mPgJDKJUJwAokk4vnREtmO8flT 9jIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740888286; x=1741493086; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=eo2JPnZo0q/CXsbvUi1SGtF+lW3PccxtdRm/DfEQxOY=; b=r1JfDlTPFh9vkWKu7LQ48b3NlkFaPAfI2aVDiPiMPyFwYdoFjsCL7fXbjs6JceR1mI 47I9GhaKzF9S9na+WMsteddmAn3SKGTp/XJDG+7bxIb3IkN8fU0pYRoRV887BjK9UlmA utH827c2Dh1HRLgtB7Tb1DY7HEIU0BHz3CAhR48Lns785d4qWAEESHy2YUhn2Fp1vfkO IbiEtfqZG1yaqcGlYnIFmgXC7z8bRI62k962v/iZ9ZPeUHMytaw5W2wKy8TkN8vbPSy8 13StzXfy4iGwTBnD6ix/jcYHZNp9XHCD0obDTlMTX7Qoha+crdHgeMpm5DlamOHl5GWP /kWA== X-Gm-Message-State: AOJu0YwMLpxTA1oZqRD8kXsMUI6fuD/6GuBgwl6kbGcVQ6ip/1KBnU/G JF6I+YiyNWEcEFBFFDN4cmtGa6T9A5CHiMqQdLLqfD9CgmLOHhnTAT5t7EorG0G+M8e01ByUQ1R cd8fQB3T/JRLTezcRV2w6JQngbYY= X-Gm-Gg: ASbGncv/jkRLVKcY+cdVPy0FRJmRIRM6re/OuL++lmtq9zfOFLLpK/O1Sb0dEquDyut MjNCUs2FKDZ48xUqcbqdMWcZcPEkTFAay6HH38msJ9MT41Vmv/Nys3XsACZAz/UwYMMuyKNS9bF ptplvEq1nLQzP1tHYchQVkcLMWdQ== X-Google-Smtp-Source: AGHT+IEz5aDcofL+0B8bNUx6Gl5RforMIIdBjgkeoUy7iyC+NAjCrjlrNsj3wzFSnQ9zGNpNOYrzOLgE31mIG7Pg56w= X-Received: by 2002:a05:6402:2790:b0:5e4:d229:ad3d with SMTP id 4fb4d7f45d1cf-5e4d6afa4c4mr10399441a12.16.1740888285637; Sat, 01 Mar 2025 20:04:45 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 1 Mar 2025 20:04:45 -0800 From: Stefan Kangas In-Reply-To: <87ldvdh4qr.fsf@bauherren.ovh> References: <87ldvdh4qr.fsf@bauherren.ovh> MIME-Version: 1.0 Date: Sat, 1 Mar 2025 20:04:45 -0800 X-Gm-Features: AQ5f1JpMcGt31FBY6SA7vzRlua1RLLVNomo6sglw-Cg06Iar8rr6B3HBPl3xOWE Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) fixed 75557 31.1 thanks Pranshu Sharma writes: > seems like buffer-live-p does not accept string buffer names anymore It actually never did. I installed the below change on master (in your name), thanks. > > diff --git a/lisp/gnus/gnus-salt.el b/lisp/gnus/gnus-salt.el > index 6514d8d4174..75daf7e7cfa 100644 > --- a/lisp/gnus/gnus-salt.el > +++ b/lisp/gnus/gnus-salt.el > @@ -808,7 +808,7 @@ gnus-tree-perhaps-minimize > > (defun gnus-highlight-selected-tree (article) > "Highlight the selected article in the tree." > - (when (buffer-live-p gnus-tree-buffer) > + (when (buffer-live-p (get-buffer gnus-tree-buffer)) > (let ((buf (current-buffer)) > region) > (set-buffer gnus-tree-buffer) My only question is if we should perhaps make `buffer-live-p` throw an error in case it is passed something of the wrong type. Yes, it is a backwards-incompatible change, but OTOH it would catch real bugs like the above, instead of silently returning nil. For example, we can currently do all of this nonsense: (buffer-live-p 123) => nil (buffer-live-p [foo]) => nil (buffer-live-p (make-symbol "foo")) => nil (buffer-live-p (lambda () (message "foo"))) => nil Eli, Stefan, WDYT? From unknown Fri Aug 15 19:30:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#75557: gnus-highlight-selected-tree is broken (fix) Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 Mar 2025 04:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75557 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Kangas Cc: Eli Zaretskii , Pranshu Sharma , 75557@debbugs.gnu.org Received: via spool by 75557-submit@debbugs.gnu.org id=B75557.174088986612301 (code B ref 75557); Sun, 02 Mar 2025 04:32:01 +0000 Received: (at 75557) by debbugs.gnu.org; 2 Mar 2025 04:31:06 +0000 Received: from localhost ([127.0.0.1]:49976 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1toayn-0003BO-KC for submit@debbugs.gnu.org; Sat, 01 Mar 2025 23:31:06 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:21995) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1toayk-0002wH-HR for 75557@debbugs.gnu.org; Sat, 01 Mar 2025 23:31:03 -0500 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id A959644153F; Sat, 1 Mar 2025 23:30:56 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1740889855; bh=UQ6LF5Wq5e7wa37STn5g40rl3Xvde9UnL+uLKk1Ge1Q=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Ur+hL2wxEs/FyGWATfj4MLeT6cVLhUOLv60OxL9wyMD+qLlzCXMPCce+YiFdLAkWK BvZDRpLQsZ+uuqkMGjdy/7czjoWRdP6+jDHsAHMwd001gp5YhMuBsMR80jNJRfmDfY 6CxBbKVv74i1aSNk/B19oWeCyqva6BxFNALQoRyoUIAa3nOvMtRL4cOc3miRltOSIM QoIUsS2Mbb5IDUkEkNNEvPPLj5dpXfb6XswAh0RLcpMt33RtcvaSNq2yitRUD7n6t/ ELuvlPAI3GkYvWia8QCF7YR34jNkYnBUGwFnlkHTYuXaAgIXoikBIdlWgKGrJem52q FwZrbiJdsMcsg== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id A27CA4414AE; Sat, 1 Mar 2025 23:30:55 -0500 (EST) Received: from alfajor (unknown [104.247.242.5]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 63CD112049C; Sat, 1 Mar 2025 23:30:55 -0500 (EST) From: Stefan Monnier In-Reply-To: Message-ID: References: <87ldvdh4qr.fsf@bauherren.ovh> Date: Sat, 01 Mar 2025 23:30:55 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.394 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > My only question is if we should perhaps make `buffer-live-p` throw an > error in case it is passed something of the wrong type. Yes, it is a > backwards-incompatible change, but OTOH it would catch real bugs like > the above, instead of silently returning nil. > > For example, we can currently do all of this nonsense: > > (buffer-live-p 123) => nil > (buffer-live-p [foo]) => nil > (buffer-live-p (make-symbol "foo")) => nil > (buffer-live-p (lambda () (message "foo"))) => nil > > Eli, Stefan, WDYT? I'm pretty sure it would introduce bugs because I know I wrote code which relies on `buffer-live-p` behaving "like a type check" (i.e. accepting any object). I'd be surprised if I was the only one. Stefan "who doesn't like the tendency of ELisp functions to accept buffer names in place of buffer objects." From unknown Fri Aug 15 19:30:38 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Pranshu Sharma Subject: bug#75557: closed (Re: bug#75557: gnus-highlight-selected-tree is broken (fix)) Message-ID: References: <87ldvdh4qr.fsf@bauherren.ovh> X-Gnu-PR-Message: they-closed 75557 X-Gnu-PR-Package: emacs Reply-To: 75557@debbugs.gnu.org Date: Sun, 02 Mar 2025 04:34:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1740890043-18018-1" This is a multi-part message in MIME format... ------------=_1740890043-18018-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #75557: gnus-highlight-selected-tree is broken (fix) which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 75557@debbugs.gnu.org. --=20 75557: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D75557 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1740890043-18018-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 75557-done) by debbugs.gnu.org; 2 Mar 2025 04:33:10 +0000 Received: from localhost ([127.0.0.1]:50012 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tob0o-0004cR-2E for submit@debbugs.gnu.org; Sat, 01 Mar 2025 23:33:10 -0500 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]:56372) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tob0k-0004ae-24 for 75557-done@debbugs.gnu.org; Sat, 01 Mar 2025 23:33:07 -0500 Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-5e4d50ed90aso3259062a12.0 for <75557-done@debbugs.gnu.org>; Sat, 01 Mar 2025 20:33:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1740889980; x=1741494780; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=rH7HHgKxhQbz/zVxUf3haxsfQsw6Fl/UBBxGXXrf5fc=; b=PEywy+JHa+uXwOVhgGTEn4C7dJen8CeUTqz7OcNV0QENNC8pey23nvJ9sCOJyftTpx oxg2mKBJUZky2o6DuHQgdNPnZXp1JKXOQvDwiO55ebZ0thOJeo49ijxKl9aC56Gl0eKY JOjkJpycVxix45rKXUxeGBNSAk7fkFTemuIsnoBHuKehSwMfUZFlzwSXf8c2HnY2fvXO 9hRiuMXDCLdJCRCp6gCniAZ7hbEGv+tFUmFioClUgjjI9OZ4RJmNHW2ELb3DFuRQI4yy F4tRhSzbsCaKZB4CqxlNEgrDmR24s1WwBObpG1LrgfbMuQfqDModPtTMmPZBnwwVvm1F LPkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740889980; x=1741494780; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=rH7HHgKxhQbz/zVxUf3haxsfQsw6Fl/UBBxGXXrf5fc=; b=fcltY3cjlfauaFAZvXBeD8vta/c/vZkIi+Ci8VeLCAONDCvbe4zO8vfT3sRWOKPiH3 h/paDCJy90KelIu9mjEr21TidSb4lLbFtQXI53MzxSRNe9jLP53mWuMS2PR/jypbKOHx SZfMF6Ji5AnKiGzRNDRCAsAV7M5iNppGTnKt9L67NvUggpRWPoRMctO+uPzgzFZyBEI3 /jmasp6PAUp+i85ljU6pfHn61d83mDD2dDvNZ6IyQGVUJzxwJEzPZn4R4G8PHY1AaLW2 EYiEr5PmswH3PVDRtnzDQrd/zWuOTZdIOC3t3bhw/+DL+mtqWtgRI+cQu3puo8G9EDXv DG0Q== X-Forwarded-Encrypted: i=1; AJvYcCW7D9sX9n4kslIdEOHBy2XDUaOC1QtOrOM1r82qB3Dfe6SIBfl60ZipB9X2iPIe0mo5XQlJ+ksvVH53@debbugs.gnu.org X-Gm-Message-State: AOJu0YyAEqtZ9fbAmugmGKgwEQP6H8a/FItOWr1VlmcrQpMb4D4FR7Yk sb8OB1cYHCXQA4fJuQy487sU7trhSWcaGTrz9aQLFYBijqcqBS0NfVef82G/SNYMkln6gv7TTXx idUxGYPpD5gQQuGupfWm2d5MBt5b88LM+Rp0= X-Gm-Gg: ASbGncuZ10A5aOsPAgTfMddU+adn/OieRZkkVw1qnWb6PGs6b7sPlZHQ+JTj1uYn38i 5gBmJIhEUiAnKz8bUJTgfIlO/VzwMjcTxhVfWhJx/neYCB8cE56vFQ3Wzoadxrf+snLSurEb4qD fq5HOtqm0HQ5GaIFgfkMsxUC6mrg== X-Google-Smtp-Source: AGHT+IGLMwUhrRG/v9CFJ3tTR9YdwDKpa4ublAEuOl3d5Xt+FWJ1jL39nw8Vd0vzpdnBtziOymXj7m366gPaH3q8TuM= X-Received: by 2002:a05:6402:2713:b0:5dc:5a34:1296 with SMTP id 4fb4d7f45d1cf-5e4d6b050afmr9999174a12.16.1740889979862; Sat, 01 Mar 2025 20:32:59 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 1 Mar 2025 20:32:59 -0800 From: Stefan Kangas In-Reply-To: References: <87ldvdh4qr.fsf@bauherren.ovh> MIME-Version: 1.0 Date: Sat, 1 Mar 2025 20:32:59 -0800 X-Gm-Features: AQ5f1Jp_J3yu9mAXHl1unQPUAIGCAPLuVLOCWqkyE9VAaN89wN3JsWz-64Rmh1o Message-ID: Subject: Re: bug#75557: gnus-highlight-selected-tree is broken (fix) To: Stefan Monnier Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 75557-done Cc: Eli Zaretskii , Pranshu Sharma , 75557-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Stefan Monnier writes: >> My only question is if we should perhaps make `buffer-live-p` throw an >> error in case it is passed something of the wrong type. Yes, it is a >> backwards-incompatible change, but OTOH it would catch real bugs like >> the above, instead of silently returning nil. >> >> For example, we can currently do all of this nonsense: >> >> (buffer-live-p 123) => nil >> (buffer-live-p [foo]) => nil >> (buffer-live-p (make-symbol "foo")) => nil >> (buffer-live-p (lambda () (message "foo"))) => nil >> >> Eli, Stefan, WDYT? > > I'm pretty sure it would introduce bugs because I know I wrote code > which relies on `buffer-live-p` behaving "like a type check" > (i.e. accepting any object). > I'd be surprised if I was the only one. OK, then I guess there's not much more to do here. I'm therefore closing this bug report. ------------=_1740890043-18018-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 14 Jan 2025 14:04:23 +0000 Received: from localhost ([127.0.0.1]:54255 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tXhWo-0001yg-QD for submit@debbugs.gnu.org; Tue, 14 Jan 2025 09:04:23 -0500 Received: from lists.gnu.org ([2001:470:142::17]:58420) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tXhWm-0001y9-68 for submit@debbugs.gnu.org; Tue, 14 Jan 2025 09:04:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tXhWd-0001mb-GI for bug-gnu-emacs@gnu.org; Tue, 14 Jan 2025 09:04:11 -0500 Received: from mail.bauherren.ovh ([45.32.179.127]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tXhWU-0003G0-DM for bug-gnu-emacs@gnu.org; Tue, 14 Jan 2025 09:04:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=bauherren.ovh; s=mail; t=1736863433; bh=gk4Pq0aBcJposzkdqebvOmW2o89/fStvNN5VYeBTe8A=; h=From:To:Subject:Date:From; b=dBYwGNhU9iFl8awsmIAPPiPUkgKUWGNwj2HRV4xxHOJuLCatLJZZ0p5ADAQ4rA24E KxOqBlT1Taoawr7m26daWhtoxGvp0l1aESi+IW6vd5+pm2aPRS23TJvJEmyjDsFDUn qczPH8cDQzVCctGNY9jmFX2mbXHSNb6FzFEzU+io6i3srJzmwvjam1hSMq6qVYeUwQ ieQafFu/b/uyGO8Ak9RE40rJKZE5KubUAL3I+pLQbsR1mWJxHAqV1LO75bfaU5bJ6s 29HcWW5PwLHymgaFyZNDPRFT2JYtCIngucPtycJ4mJ/wGg1EP+/ri298w1rST4Ulnr v3i6kfiFLxQiQ== From: Pranshu Sharma To: bug-gnu-emacs@gnu.org Subject: gnus-highlight-selected-tree is broken (fix) Date: Wed, 15 Jan 2025 00:03:40 +1000 Message-ID: <87ldvdh4qr.fsf@bauherren.ovh> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=45.32.179.127; envelope-from=pranshu@bauherren.ovh; helo=mail.bauherren.ovh X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) --=-=-= Content-Type: text/plain seems like buffer-live-p does not accept string buffer names anymore --=-=-= Content-Type: text/x-diff Content-Disposition: inline Content-Description: dif diff --git a/lisp/gnus/gnus-salt.el b/lisp/gnus/gnus-salt.el index 6514d8d4174..75daf7e7cfa 100644 --- a/lisp/gnus/gnus-salt.el +++ b/lisp/gnus/gnus-salt.el @@ -808,7 +808,7 @@ gnus-tree-perhaps-minimize (defun gnus-highlight-selected-tree (article) "Highlight the selected article in the tree." - (when (buffer-live-p gnus-tree-buffer) + (when (buffer-live-p (get-buffer gnus-tree-buffer)) (let ((buf (current-buffer)) region) (set-buffer gnus-tree-buffer) --=-=-= Content-Type: text/plain -- Pranshu Sharma --=-=-=-- ------------=_1740890043-18018-1--