* bug#48218: [PATCH] ibuffer.el: Use display-buffer properly
@ 2021-05-04 8:54 Miha Rihtaršič via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-05-04 9:16 ` martin rudalics
2021-05-18 15:10 ` Lars Ingebrigtsen
0 siblings, 2 replies; 4+ messages in thread
From: Miha Rihtaršič via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-05-04 8:54 UTC (permalink / raw)
To: 48218; +Cc: Miha Rihtaršič
Minor simplification for C-o command in ibuffer.
C-o can pop up a new frame under some display-buffer configurations.
In this case, `pop-to-buffer' focuses the new frame, but `select-window'
usually fails to focus the original frame. This simple patch fixes that (if
your window manager doesn't automatically focus newly created frames).
---
* lisp/ibuffer.el (ibuffer-visit-buffer-other-window-noselect): Use
display-buffer instead of pop-to-buffer and selecting the old window.
---
lisp/ibuffer.el | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el
index b484dd717c..c80222ed0f 100644
--- a/lisp/ibuffer.el
+++ b/lisp/ibuffer.el
@@ -988,9 +988,7 @@ ibuffer-visit-buffer-other-window
(let ((buf (ibuffer-current-buffer t)))
(bury-buffer (current-buffer))
(if noselect
- (let ((curwin (selected-window)))
- (pop-to-buffer buf)
- (select-window curwin))
+ (display-buffer buf)
(switch-to-buffer-other-window buf))))
(defun ibuffer-visit-buffer-other-window-noselect ()
--
2.31.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* bug#48218: [PATCH] ibuffer.el: Use display-buffer properly
2021-05-04 8:54 bug#48218: [PATCH] ibuffer.el: Use display-buffer properly Miha Rihtaršič via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-05-04 9:16 ` martin rudalics
2021-05-18 15:10 ` Lars Ingebrigtsen
1 sibling, 0 replies; 4+ messages in thread
From: martin rudalics @ 2021-05-04 9:16 UTC (permalink / raw)
To: Miha Rihtaršič, 48218
> This simple patch fixes that (if
> your window manager doesn't automatically focus newly created frames
If it does we could apply one of these
(make-frame '((no-accept-focus . t)))
(make-frame '((no-focus-on-map . t)))
but I didn't have the time to look into this. It would require
experimenting with a number of window managers and their default
settings and customizations.
> ).
martin
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#48218: [PATCH] ibuffer.el: Use display-buffer properly
2021-05-04 8:54 bug#48218: [PATCH] ibuffer.el: Use display-buffer properly Miha Rihtaršič via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-05-04 9:16 ` martin rudalics
@ 2021-05-18 15:10 ` Lars Ingebrigtsen
2021-05-18 15:58 ` martin rudalics
1 sibling, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2021-05-18 15:10 UTC (permalink / raw)
To: Miha Rihtaršič; +Cc: 48218
Miha Rihtaršič <miha@kamnitnik.top> writes:
> Minor simplification for C-o command in ibuffer.
> C-o can pop up a new frame under some display-buffer configurations.
> In this case, `pop-to-buffer' focuses the new frame, but `select-window'
> usually fails to focus the original frame. This simple patch fixes that
Thanks; applied to Emacs 28.
> (if > your window manager doesn't automatically focus newly created
> frames).
Martin had a comment about this bit, but if I interpreted his comment
correctly, he didn't object to the patch.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#48218: [PATCH] ibuffer.el: Use display-buffer properly
2021-05-18 15:10 ` Lars Ingebrigtsen
@ 2021-05-18 15:58 ` martin rudalics
0 siblings, 0 replies; 4+ messages in thread
From: martin rudalics @ 2021-05-18 15:58 UTC (permalink / raw)
To: Lars Ingebrigtsen, Miha Rihtaršič; +Cc: 48218
> Martin had a comment about this bit, but if I interpreted his comment
> correctly, he didn't object to the patch.
Right. The patch is good IMHO.
martin
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-05-18 15:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-04 8:54 bug#48218: [PATCH] ibuffer.el: Use display-buffer properly Miha Rihtaršič via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-05-04 9:16 ` martin rudalics
2021-05-18 15:10 ` Lars Ingebrigtsen
2021-05-18 15:58 ` martin rudalics
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.