GNU bug report logs - #73545
30.0.91; Strange behaviour on switch-to-next-buffer

Previous Next

Package: emacs;

Reported by: Rahul Martim Juliato <rahuljuliato <at> gmail.com>

Date: Sun, 29 Sep 2024 04:27:02 UTC

Severity: normal

Found in version 30.0.91

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


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

From: martin rudalics <rudalics <at> gmx.at>
To: Rahul Martim Juliato <rahuljuliato <at> gmail.com>
Cc: 73545 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#73545: 30.0.91; Strange behaviour on switch-to-next-buffer
Date: Fri, 4 Oct 2024 10:07:47 +0200
> I just found a bit strange the default behaviour (I guess I am biased by
> my use case) being this way.

Historical reasons.  'switch-to-prev-buffer-skip' appeared in Emacs 27.1
and at that time I decided that if and only if it is a function it will
make sure that the buffer is never switched to.  More or less to avoid
that peoples shoot themselves in their feet.

'switch-to-prev-buffer-skip-regexp' was added in Emacs 29.1 introducing
the following design error (which I wouldn't propose to exploit).  With
emacs -Q do:

(setq switch-to-prev-buffer-skip-regexp "\\*[^*]+\\*")
(setq switch-to-prev-buffer-skip 'ignore)
C-x <left>

The fact that 'switch-to-prev-buffer-skip' was set to a function that
does nothing makes 'switch-to-prev-buffer-skip-regexp' miraculously
work when there are no other buffers left ...

'switch-to-prev-buffer-skip-regexp' should never have been added in the
first place.  Rather 'switch-to-prev-buffer-skip' should have been given
an optional regexp value.  But now it's too late to change that.

martin




This bug report was last modified 225 days ago.

Previous Next


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