GNU bug report logs - #75935
tab-bar-select-tab buffer-list and buried-buffer-list bug

Previous Next

Package: emacs;

Reported by: Ship Mints <shipmints <at> gmail.com>

Date: Wed, 29 Jan 2025 21:03:01 UTC

Severity: normal

Fixed in version 31.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 75935 in the body.
You can then email your comments to 75935 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#75935; Package emacs. (Wed, 29 Jan 2025 21:03:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ship Mints <shipmints <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 29 Jan 2025 21:03:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ship Mints <shipmints <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org, Juri Linkov <juri <at> linkov.net>
Subject: tab-bar-select-tab buffer-list and buried-buffer-list bug
Date: Wed, 29 Jan 2025 15:59:49 -0500
[Message part 1 (text/plain, inline)]
Happy to submit a patch for this but first wanted to discuss it to make
sure there's agreement.

(defun tab-bar-select-tab (&optional tab-number)
...
            (when wc-bl  (set-frame-parameter nil 'buffer-list wc-bl))
            (when wc-bbl (set-frame-parameter nil 'buried-buffer-list
wc-bbl))

What this skips is that if either the originating window-configuration
buffer-list or its twin is nil, that the frame's parameters are not
properly reset to nil.

This is a function that we've had to work around in an ELPA package by
advising tab-bar--tab to first clear these frame parameters before
tab-bar-select-tab goes to set them when selecting the specified tab. This
avoids the bug, but is annoying. This advice has been in place for three
years without issue.

The patch would eliminate the 'when' conditions.

What do you think?

-Stephane
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75935; Package emacs. (Thu, 30 Jan 2025 07:39:01 GMT) Full text and rfc822 format available.

Message #8 received at 75935 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Ship Mints <shipmints <at> gmail.com>
Cc: 75935 <at> debbugs.gnu.org
Subject: Re: bug#75935: tab-bar-select-tab buffer-list and buried-buffer-list
 bug
Date: Thu, 30 Jan 2025 09:35:18 +0200
> Happy to submit a patch for this but first wanted to discuss it to make
> sure there's agreement.
>
> (defun tab-bar-select-tab (&optional tab-number)
> ...
>             (when wc-bl  (set-frame-parameter nil 'buffer-list wc-bl))
>             (when wc-bbl (set-frame-parameter nil 'buried-buffer-list
> wc-bbl))
>
> What this skips is that if either the originating window-configuration
> buffer-list or its twin is nil, that the frame's parameters are not
> properly reset to nil.
>
> This is a function that we've had to work around in an ELPA package by
> advising tab-bar--tab to first clear these frame parameters before
> tab-bar-select-tab goes to set them when selecting the specified tab. This
> avoids the bug, but is annoying. This advice has been in place for three
> years without issue.
>
> The patch would eliminate the 'when' conditions.
>
> What do you think?

Thanks for finding this bug!

A week ago I fixed a similar bug in 6b71d0b1786
where needed to reset tab-bar-history-back to nil
after selecting the specified tab.
We should do the same for buffer-lists as well.

So you proposed the right fix.  Please submit a patch.
Then I will push all your other patches too.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75935; Package emacs. (Thu, 30 Jan 2025 12:32:02 GMT) Full text and rfc822 format available.

Message #11 received at 75935 <at> debbugs.gnu.org (full text, mbox):

From: Ship Mints <shipmints <at> gmail.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: 75935 <at> debbugs.gnu.org
Subject: Re: bug#75935: tab-bar-select-tab buffer-list and buried-buffer-list
 bug
Date: Thu, 30 Jan 2025 07:29:33 -0500
[Message part 1 (text/plain, inline)]
No problem. Patch attached.

On Thu, Jan 30, 2025 at 2:38 AM Juri Linkov <juri <at> linkov.net> wrote:

> > Happy to submit a patch for this but first wanted to discuss it to make
> > sure there's agreement.
> >
> > (defun tab-bar-select-tab (&optional tab-number)
> > ...
> >             (when wc-bl  (set-frame-parameter nil 'buffer-list wc-bl))
> >             (when wc-bbl (set-frame-parameter nil 'buried-buffer-list
> > wc-bbl))
> >
> > What this skips is that if either the originating window-configuration
> > buffer-list or its twin is nil, that the frame's parameters are not
> > properly reset to nil.
> >
> > This is a function that we've had to work around in an ELPA package by
> > advising tab-bar--tab to first clear these frame parameters before
> > tab-bar-select-tab goes to set them when selecting the specified tab.
> This
> > avoids the bug, but is annoying. This advice has been in place for three
> > years without issue.
> >
> > The patch would eliminate the 'when' conditions.
> >
> > What do you think?
>
> Thanks for finding this bug!
>
> A week ago I fixed a similar bug in 6b71d0b1786
> where needed to reset tab-bar-history-back to nil
> after selecting the specified tab.
> We should do the same for buffer-lists as well.
>
> So you proposed the right fix.  Please submit a patch.
> Then I will push all your other patches too.
>
[Message part 2 (text/html, inline)]
[0001-lisp-tab-bar.el-tab-bar-select-tab-Fix-wc-bl-wc-bbl-.patch (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75935; Package emacs. (Thu, 30 Jan 2025 18:39:02 GMT) Full text and rfc822 format available.

Message #14 received at 75935 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Ship Mints <shipmints <at> gmail.com>
Cc: 75935 <at> debbugs.gnu.org
Subject: Re: bug#75935: tab-bar-select-tab buffer-list and
 buried-buffer-list bug
Date: Thu, 30 Jan 2025 20:35:27 +0200
close 75935 31.0.50
thanks

> No problem. Patch attached.

Thanks for the fix, this is pushed as well.




bug marked as fixed in version 31.0.50, send any further explanations to 75935 <at> debbugs.gnu.org and Ship Mints <shipmints <at> gmail.com> Request was from Juri Linkov <juri <at> linkov.net> to control <at> debbugs.gnu.org. (Thu, 30 Jan 2025 18:39:04 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 28 Feb 2025 12:24:14 GMT) Full text and rfc822 format available.

This bug report was last modified 169 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.