GNU bug report logs -
#75557
gnus-highlight-selected-tree is broken (fix)
Previous Next
Reported by: Pranshu Sharma <pranshu <at> bauherren.ovh>
Date: Tue, 14 Jan 2025 14:05:01 UTC
Severity: normal
Fixed in version 31.1
Done: Stefan Kangas <stefankangas <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Sat, 1 Mar 2025 20:32:59 -0800
with message-id <CADwFkmkQ+=Auj2hmE6hhscU5eFtM0eOeX1_vVsdsp0Tfd2Gv_A <at> mail.gmail.com>
and subject line Re: bug#75557: gnus-highlight-selected-tree is broken (fix)
has caused the debbugs.gnu.org bug report #75557,
regarding gnus-highlight-selected-tree is broken (fix)
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
75557: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=75557
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
[Message part 3 (text/plain, inline)]
seems like buffer-live-p does not accept string buffer names anymore
[Message part 4 (text/x-diff, inline)]
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)
[Message part 5 (text/plain, inline)]
--
Pranshu Sharma <https://p.bauherren.ovh>
[Message part 6 (message/rfc822, inline)]
Stefan Monnier <monnier <at> iro.umontreal.ca> 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.
This bug report was last modified 133 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.