* bug#17719: 24.4.50; REGRESSION: `switch-to-buffer-other-frame' does not use other frame [not found] ` <<83wqct3jy6.fsf@gnu.org> @ 2014-06-06 21:32 ` Drew Adams 2021-07-14 14:40 ` Lars Ingebrigtsen 0 siblings, 1 reply; 4+ messages in thread From: Drew Adams @ 2014-06-06 21:32 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 17719 > > This regression seems to have been introduced in Emacs 23. There is no > > such problem in Emacs 22.3 and prior. > > emacs -Q > > Visit some file, say foo.el, alone in the frame. > > C-x 2 C-x 3 ; show the buffer in 3 windows > > C-x 5 b foo.el ; type the same buffer name, explicitly > > One of the other windows on the same frame is selected. > > That's the intended behavior, AFAIK. The behavior changed in one of > the last versions (not sure exactly which one, but could very well be > Emacs 23). Ah yes. I remember now. This is not the first bug report about this. Mark Kennedy filed a report entitled "switch-to-buffer-other-frame fails to pop-up window" on Dec 3, 2007 (before we used the bug tracker, I believe). I even said then that I liked the new behavior (!). However, I wonder now if that shouldn't be the behavior just for `C-x 4 b' with non-nil `pop-up-frames', and not for `C-x 5 b'. Just a thought. The doc of `pop-up-frames' used to say that it: looks for an existing window already displaying the desired buffer, on any visible frame. If it finds one, it returns that window. Otherwise it makes a new ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ frame. (Martin's emphasis, from the cited thread.) IOW, it was documented as not necessarily using another frame. The combination of non-nil `pop-up-frames' with `switch-to-buffer-other-window' would then not always impose using a separate frame. (However, the doc of `p-u-f' has changed to say now that it always uses a separate frame (for graphic displays).) Interactively, a user can use `C-x 5 2' to get the desired new-frame behavior (but that means s?he needs to know about the exceptional case and remember another key sequence to cover it). And if s?he wants to see similar names of other buffers before choosing, then s?he needs to use first `C-x 5 b' (or similar) to see the names, then `C-g', then `C-x 5 2' if the one s?he wants is in fact the current buffer (e.g., after verifying that what s?he wants is not some other buffer with a similar name). Admittedly, those are only minor inconveniences. In any case, non-interactively things are not so simple. The circumstance leading to the exceptional behavior is somewhat complicated: 1. Current buffer is in more than one window of the selected frame. 2. Current buffer is not in any other frame. If either (1) or (2) is not true then the a new frame is created and selected for the current buffer. IOW, this special case means special-casing one's code, if you want it to switch to an arbitrary buffer (e.g., a BUFFER arg) in another frame (always). So regardless of whether we make a change for interactive use, I wonder if non-interactive (switch-to-buffer-other-frame BUFFER) shouldn't always create a new frame for BUFFER when it is not already shown in another frame, even when BUFFER is the current buffer. Finally, even if you decide not to change the current behavior, it should be documented. Anyone reading the doc will expect that (switch-to-buffer-other-frame BUFFER) always, not just sometimes, selects the BUFFER in another frame, and that is not the case. For the current buffer, it is sometimes the case and sometimes not the case. ^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#17719: 24.4.50; REGRESSION: `switch-to-buffer-other-frame' does not use other frame 2014-06-06 21:32 ` bug#17719: 24.4.50; REGRESSION: `switch-to-buffer-other-frame' does not use other frame Drew Adams @ 2021-07-14 14:40 ` Lars Ingebrigtsen 0 siblings, 0 replies; 4+ messages in thread From: Lars Ingebrigtsen @ 2021-07-14 14:40 UTC (permalink / raw) To: Drew Adams; +Cc: 17719 Drew Adams <drew.adams@oracle.com> writes: > Finally, even if you decide not to change the current behavior, > it should be documented. Anyone reading the doc will expect that > (switch-to-buffer-other-frame BUFFER) always, not just sometimes, > selects the BUFFER in another frame, and that is not the case. > For the current buffer, it is sometimes the case and sometimes > not the case. I've now mentioned this in the command's doc string. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no ^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#17719: 24.4.50; REGRESSION: `switch-to-buffer-other-frame' does not use other frame @ 2014-06-06 17:53 Drew Adams 2014-06-06 19:40 ` Eli Zaretskii 0 siblings, 1 reply; 4+ messages in thread From: Drew Adams @ 2014-06-06 17:53 UTC (permalink / raw) To: 17719 This regression seems to have been introduced in Emacs 23. There is no such problem in Emacs 22.3 and prior. emacs -Q Visit some file, say foo.el, alone in the frame. C-x 2 C-x 3 ; show the buffer in 3 windows C-x 5 b foo.el ; type the same buffer name, explicitly One of the other windows on the same frame is selected. What should happen: the buffer is shown in another frame. In GNU Emacs 24.4.50.1 (i686-pc-mingw32) of 2014-06-01 on ODIEONE Bzr revision: 117212 michael.albinus@gmx.de-20140601104945-g88x0mwrxorz302h Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --prefix=/c/Devel/emacs/snapshot/trunk --enable-checking=yes,glyphs 'CFLAGS=-O0 -g3' LDFLAGS=-Lc:/Devel/emacs/lib 'CPPFLAGS=-DGC_MCHECK=1 -Ic:/Devel/emacs/include'' ^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#17719: 24.4.50; REGRESSION: `switch-to-buffer-other-frame' does not use other frame 2014-06-06 17:53 Drew Adams @ 2014-06-06 19:40 ` Eli Zaretskii 0 siblings, 0 replies; 4+ messages in thread From: Eli Zaretskii @ 2014-06-06 19:40 UTC (permalink / raw) To: Drew Adams; +Cc: 17719 > Date: Fri, 6 Jun 2014 10:53:25 -0700 (PDT) > From: Drew Adams <drew.adams@oracle.com> > > This regression seems to have been introduced in Emacs 23. There is no > such problem in Emacs 22.3 and prior. > > emacs -Q > > Visit some file, say foo.el, alone in the frame. > > C-x 2 C-x 3 ; show the buffer in 3 windows > > C-x 5 b foo.el ; type the same buffer name, explicitly > > One of the other windows on the same frame is selected. That's the intended behavior, AFAIK. The behavior changed in one of the last versions (not sure exactly which one, but could very well be Emacs 23). ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-07-14 14:40 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <<0e1661a2-0661-4f9a-a2cf-5bde51ffdb5f@default> [not found] ` <<83wqct3jy6.fsf@gnu.org> 2014-06-06 21:32 ` bug#17719: 24.4.50; REGRESSION: `switch-to-buffer-other-frame' does not use other frame Drew Adams 2021-07-14 14:40 ` Lars Ingebrigtsen 2014-06-06 17:53 Drew Adams 2014-06-06 19:40 ` Eli Zaretskii
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.