GNU bug report logs - #78785
29.3; docs: switch-to-prev-buffer-skip is hard to find

Previous Next

Package: emacs;

Reported by: Chris Hibbert <hibbert <at> mydruthers.com>

Date: Fri, 13 Jun 2025 15:14:02 UTC

Severity: normal

Found in version 29.3

Full log


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

From: Chris Hibbert <hibbert <at> mydruthers.com>
To: Eli Zaretskii <eliz <at> gnu.org>, martin rudalics <rudalics <at> gmx.at>
Cc: 78785 <at> debbugs.gnu.org, shipmints <at> gmail.com
Subject: Re: bug#78785: 29.3; docs: switch-to-prev-buffer-skip is hard to find
Date: Mon, 16 Jun 2025 09:43:25 -0700
On 6/16/25 2:52 AM, Eli Zaretskii wrote:
> There are two related, but different behaviors here, which both happen
> when the current buffer is killed:
> 
>    . which buffer becomes the current one, and
>    . which buffer replaces the current buffer in its window
> 
> The manual's documentation of the behavior of kill-buffer which you
> quote talks about the former, whereas switch-to-prev-buffer-skip
> affects the latter.

I'm confused by this explanation. When kill-buffer starts re-using 
visible buffers, the statement "another buffer becomes current: one that 
was current in the recent past but is not displayed in any window now" 
doesn't seem true in any sense. When switch-to-prev-buffer-skip is nil, 
even if there are other non-displayed buffers available, it doesn't 
choose any of them, instead displaying one that's already visible.

One plausible interpretation of "one that was current in the recent 
past" is that there's a cache somewhere, and it gets exhausted. If that 
were the case, I'd hope for access to or control of the size of the 
cache. If there's no cache, then it should always be able to find the 
non-visible buffers to use before the visible ones.

> So I don't see a problem in the documentation, and AFAIU the
> correction you suggested for the manual is incorrect, because it
> wrongly conflates these two subtly different behaviors.

Martin's explanation is definitely an improvement on that.

> I'm adding Martin to this discussion, in the hope that he will have
> more comments (and will correct me if I'm wrong).

On 6/16/25 8:50 AM, martin rudalics wrote:
> We could say
>
>
>   If you kill the current buffer, Emacs makes another buffer
>   current and either shows another buffer in every window
>   showing the old current buffer or deletes such a window. If
>   you are not satisfied with that behavior, try customizing the
>   options `kill-buffer-quit-windows' and/or
>   `switch-to-prev-buffer-skip'. In either case, the command
>   loop will eventually make the now selectedwindow's buffer
>   current.

I couldn't find any documentation of kill-buffer-quit-windows either on 
the gnu site, within emacs (apropos, describe variables, ^h-d, searching 
within Info), or by asking google.

Chris
-- 
Market[s] sets wages as a function of the marginal productivity of
the worker. Therefore technology – which raises productivity –
drives wages up, not down.
     --  https://a16z.com/the-techno-optimist-manifesto/

Chris Hibbert
hibbert <at> mydruthers.com
Blog:   http://www.pancrit.org
http://mydruthers.com




This bug report was last modified 2 days ago.

Previous Next


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