* change buffer in other frame, multiple monitors
@ 2015-05-27 14:16 Sam Halliday
2015-05-28 11:22 ` Sam Halliday
0 siblings, 1 reply; 7+ messages in thread
From: Sam Halliday @ 2015-05-27 14:16 UTC (permalink / raw)
To: help-gnu-emacs
Hi all,
I have a setup with multiple monitors and when using Emacs I have a frame in each monitor.
I recently asked a question on this list and the solution was to set
(setq-default display-buffer-reuse-frames t)
so that 'next-error would not popup a new window (when the window was already open in a new frame).
That worked great! I've recently been extending my use of basic emacs commands to include the commands under `C-x 5 ...` (i.e. the "do in the other frame" commands)
However, when I type `C-x 5 b` and select a buffer name, I am expecting the buffer to be shown in the other frame. But instead, the buffer is opened in a new frame.
It would appear that setting 'display-buffer-reuse-frames is not enough to force re-use of existing frames and this function is popping up a new one.
Is there something else I must do to re-use frames? I note that display-buffer-reuse-frames is deprecated, but I'm not entirely sure how to migrate to the new world.
Best regards,
Sam
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: change buffer in other frame, multiple monitors
2015-05-27 14:16 change buffer in other frame, multiple monitors Sam Halliday
@ 2015-05-28 11:22 ` Sam Halliday
2015-05-28 14:02 ` Sam Halliday
0 siblings, 1 reply; 7+ messages in thread
From: Sam Halliday @ 2015-05-28 11:22 UTC (permalink / raw)
To: help-gnu-emacs
I've updated the below with the newer display-buffer-alist approach with
(setq display-buffer-alist
'((".*" display-buffer-reuse-window (reusable-frames . t))
(".*" display-buffer-pop-up-frame (inhibit-switch-frame . t))))
The reuse-window entry seems to reproduce the behaviour of the legacy setting I was using.
I have added a display-buffer-pop-up-frame entry as per the documentation for display-buffer but it seems to be ignored.
Is my syntax perhaps incorrect? Maybe there should only be one ".*"?
On Wednesday, 27 May 2015 15:16:27 UTC+1, Sam Halliday wrote:
> Hi all,
>
> I have a setup with multiple monitors and when using Emacs I have a frame in each monitor.
>
> I recently asked a question on this list and the solution was to set
>
> (setq-default display-buffer-reuse-frames t)
>
> so that 'next-error would not popup a new window (when the window was already open in a new frame).
>
> That worked great! I've recently been extending my use of basic emacs commands to include the commands under `C-x 5 ...` (i.e. the "do in the other frame" commands)
>
> However, when I type `C-x 5 b` and select a buffer name, I am expecting the buffer to be shown in the other frame. But instead, the buffer is opened in a new frame.
>
> It would appear that setting 'display-buffer-reuse-frames is not enough to force re-use of existing frames and this function is popping up a new one.
>
> Is there something else I must do to re-use frames? I note that display-buffer-reuse-frames is deprecated, but I'm not entirely sure how to migrate to the new world.
>
> Best regards,
> Sam
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: change buffer in other frame, multiple monitors
2015-05-28 11:22 ` Sam Halliday
@ 2015-05-28 14:02 ` Sam Halliday
2015-05-28 14:16 ` Sam Halliday
2015-05-28 14:25 ` Michael Heerdegen
0 siblings, 2 replies; 7+ messages in thread
From: Sam Halliday @ 2015-05-28 14:02 UTC (permalink / raw)
To: help-gnu-emacs
I'm starting to think there must be a bug somewhere. Setting the explicit action is still causing `C-x 5 b` to open a new frame even if one is already open:
(setq display-buffer--other-frame-action
'((display-buffer-reuse-window display-buffer-pop-up-frame)
(reusable-frames . t) (inhibit-same-window . t)))
I'm on Debian Jessie but some mac users have said that the out-of-the-box behaviour is for `C-x 5 b` to reuse the other frame.
I'm stumped. Any help appreciated.
On Thursday, 28 May 2015 12:22:25 UTC+1, Sam Halliday wrote:
> I've updated the below with the newer display-buffer-alist approach with
>
> (setq display-buffer-alist
> '((".*" display-buffer-reuse-window (reusable-frames . t))
> (".*" display-buffer-pop-up-frame (inhibit-switch-frame . t))))
>
> The reuse-window entry seems to reproduce the behaviour of the legacy setting I was using.
>
> I have added a display-buffer-pop-up-frame entry as per the documentation for display-buffer but it seems to be ignored.
>
> Is my syntax perhaps incorrect? Maybe there should only be one ".*"?
>
>
>
> On Wednesday, 27 May 2015 15:16:27 UTC+1, Sam Halliday wrote:
> > Hi all,
> >
> > I have a setup with multiple monitors and when using Emacs I have a frame in each monitor.
> >
> > I recently asked a question on this list and the solution was to set
> >
> > (setq-default display-buffer-reuse-frames t)
> >
> > so that 'next-error would not popup a new window (when the window was already open in a new frame).
> >
> > That worked great! I've recently been extending my use of basic emacs commands to include the commands under `C-x 5 ...` (i.e. the "do in the other frame" commands)
> >
> > However, when I type `C-x 5 b` and select a buffer name, I am expecting the buffer to be shown in the other frame. But instead, the buffer is opened in a new frame.
> >
> > It would appear that setting 'display-buffer-reuse-frames is not enough to force re-use of existing frames and this function is popping up a new one.
> >
> > Is there something else I must do to re-use frames? I note that display-buffer-reuse-frames is deprecated, but I'm not entirely sure how to migrate to the new world.
> >
> > Best regards,
> > Sam
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: change buffer in other frame, multiple monitors
2015-05-28 14:02 ` Sam Halliday
@ 2015-05-28 14:16 ` Sam Halliday
2015-05-28 14:26 ` Sam Halliday
2015-05-28 14:25 ` Michael Heerdegen
1 sibling, 1 reply; 7+ messages in thread
From: Sam Halliday @ 2015-05-28 14:16 UTC (permalink / raw)
To: help-gnu-emacs
I'm starting to think that `C-x 5` commands are not really intended to reuse the other frame (despite their name). From the docs http://www.gnu.org/software/emacs/manual/html_node/emacs/Creating-Frames.html
> If an existing visible or iconified ("minimized") frame already displays the requested buffer, that frame is raised and deiconified ("un-minimized"); otherwise, a new frame is created on the current display terminal.
e.g. starting emacs24 (debian jessie) with -Q and type
C-x 5 2 ;; new frame
C-x 5 b ;; *Messages*
a THIRD frame is opened. I had expected the other frame to be reused.
Is there any way to get the `C-x 5` commands to reuse the other frame instead of creating a new one or am I going to have to rewrite my own functions that first call `other-frame`?
On Thursday, 28 May 2015 15:02:45 UTC+1, Sam Halliday wrote:
> I'm starting to think there must be a bug somewhere. Setting the explicit action is still causing `C-x 5 b` to open a new frame even if one is already open:
>
> (setq display-buffer--other-frame-action
> '((display-buffer-reuse-window display-buffer-pop-up-frame)
> (reusable-frames . t) (inhibit-same-window . t)))
>
> I'm on Debian Jessie but some mac users have said that the out-of-the-box behaviour is for `C-x 5 b` to reuse the other frame.
>
> I'm stumped. Any help appreciated.
>
>
> On Thursday, 28 May 2015 12:22:25 UTC+1, Sam Halliday wrote:
> > I've updated the below with the newer display-buffer-alist approach with
> >
> > (setq display-buffer-alist
> > '((".*" display-buffer-reuse-window (reusable-frames . t))
> > (".*" display-buffer-pop-up-frame (inhibit-switch-frame . t))))
> >
> > The reuse-window entry seems to reproduce the behaviour of the legacy setting I was using.
> >
> > I have added a display-buffer-pop-up-frame entry as per the documentation for display-buffer but it seems to be ignored.
> >
> > Is my syntax perhaps incorrect? Maybe there should only be one ".*"?
> >
> >
> >
> > On Wednesday, 27 May 2015 15:16:27 UTC+1, Sam Halliday wrote:
> > > Hi all,
> > >
> > > I have a setup with multiple monitors and when using Emacs I have a frame in each monitor.
> > >
> > > I recently asked a question on this list and the solution was to set
> > >
> > > (setq-default display-buffer-reuse-frames t)
> > >
> > > so that 'next-error would not popup a new window (when the window was already open in a new frame).
> > >
> > > That worked great! I've recently been extending my use of basic emacs commands to include the commands under `C-x 5 ...` (i.e. the "do in the other frame" commands)
> > >
> > > However, when I type `C-x 5 b` and select a buffer name, I am expecting the buffer to be shown in the other frame. But instead, the buffer is opened in a new frame.
> > >
> > > It would appear that setting 'display-buffer-reuse-frames is not enough to force re-use of existing frames and this function is popping up a new one.
> > >
> > > Is there something else I must do to re-use frames? I note that display-buffer-reuse-frames is deprecated, but I'm not entirely sure how to migrate to the new world.
> > >
> > > Best regards,
> > > Sam
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: change buffer in other frame, multiple monitors
2015-05-28 14:02 ` Sam Halliday
2015-05-28 14:16 ` Sam Halliday
@ 2015-05-28 14:25 ` Michael Heerdegen
2015-05-28 15:03 ` Yuri Khan
1 sibling, 1 reply; 7+ messages in thread
From: Michael Heerdegen @ 2015-05-28 14:25 UTC (permalink / raw)
To: help-gnu-emacs
Sam Halliday <sam.halliday@gmail.com> writes:
> (setq display-buffer--other-frame-action
> '((display-buffer-reuse-window display-buffer-pop-up-frame)
> (reusable-frames . t) (inhibit-same-window . t)))
That makes the thing reuse a frame only when there is a window already
displaying the buffer - see doc of `display-buffer-reuse-window'.
This is seemingly not what you want. What do you want instead: that a
random window in a random frame is selected and forced to display the
buffer?
Michael.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: change buffer in other frame, multiple monitors
2015-05-28 14:16 ` Sam Halliday
@ 2015-05-28 14:26 ` Sam Halliday
0 siblings, 0 replies; 7+ messages in thread
From: Sam Halliday @ 2015-05-28 14:26 UTC (permalink / raw)
To: help-gnu-emacs
Workaround incase anybody else comes across this
(defun switch-to-buffer-other-frame--no-really (buffer-or-name)
"Switch to buffer BUFFER-OR-NAME in the other frame."
(interactive
(list (read-buffer-to-switch "Switch to buffer in other frame: ")))
(other-frame 1)
(switch-to-buffer buffer-or-name nil t)
(other-frame -1))
(global-set-key (kbd "C-x 5 b") 'switch-to-buffer-other-frame--no-really)
On Thursday, 28 May 2015 15:16:42 UTC+1, Sam Halliday wrote:
> I'm starting to think that `C-x 5` commands are not really intended to reuse the other frame (despite their name). From the docs http://www.gnu.org/software/emacs/manual/html_node/emacs/Creating-Frames.html
>
> > If an existing visible or iconified ("minimized") frame already displays the requested buffer, that frame is raised and deiconified ("un-minimized"); otherwise, a new frame is created on the current display terminal.
>
>
> e.g. starting emacs24 (debian jessie) with -Q and type
>
> C-x 5 2 ;; new frame
> C-x 5 b ;; *Messages*
>
> a THIRD frame is opened. I had expected the other frame to be reused.
>
>
> Is there any way to get the `C-x 5` commands to reuse the other frame instead of creating a new one or am I going to have to rewrite my own functions that first call `other-frame`?
>
>
>
> On Thursday, 28 May 2015 15:02:45 UTC+1, Sam Halliday wrote:
> > I'm starting to think there must be a bug somewhere. Setting the explicit action is still causing `C-x 5 b` to open a new frame even if one is already open:
> >
> > (setq display-buffer--other-frame-action
> > '((display-buffer-reuse-window display-buffer-pop-up-frame)
> > (reusable-frames . t) (inhibit-same-window . t)))
> >
> > I'm on Debian Jessie but some mac users have said that the out-of-the-box behaviour is for `C-x 5 b` to reuse the other frame.
> >
> > I'm stumped. Any help appreciated.
> >
> >
> > On Thursday, 28 May 2015 12:22:25 UTC+1, Sam Halliday wrote:
> > > I've updated the below with the newer display-buffer-alist approach with
> > >
> > > (setq display-buffer-alist
> > > '((".*" display-buffer-reuse-window (reusable-frames . t))
> > > (".*" display-buffer-pop-up-frame (inhibit-switch-frame . t))))
> > >
> > > The reuse-window entry seems to reproduce the behaviour of the legacy setting I was using.
> > >
> > > I have added a display-buffer-pop-up-frame entry as per the documentation for display-buffer but it seems to be ignored.
> > >
> > > Is my syntax perhaps incorrect? Maybe there should only be one ".*"?
> > >
> > >
> > >
> > > On Wednesday, 27 May 2015 15:16:27 UTC+1, Sam Halliday wrote:
> > > > Hi all,
> > > >
> > > > I have a setup with multiple monitors and when using Emacs I have a frame in each monitor.
> > > >
> > > > I recently asked a question on this list and the solution was to set
> > > >
> > > > (setq-default display-buffer-reuse-frames t)
> > > >
> > > > so that 'next-error would not popup a new window (when the window was already open in a new frame).
> > > >
> > > > That worked great! I've recently been extending my use of basic emacs commands to include the commands under `C-x 5 ...` (i.e. the "do in the other frame" commands)
> > > >
> > > > However, when I type `C-x 5 b` and select a buffer name, I am expecting the buffer to be shown in the other frame. But instead, the buffer is opened in a new frame.
> > > >
> > > > It would appear that setting 'display-buffer-reuse-frames is not enough to force re-use of existing frames and this function is popping up a new one.
> > > >
> > > > Is there something else I must do to re-use frames? I note that display-buffer-reuse-frames is deprecated, but I'm not entirely sure how to migrate to the new world.
> > > >
> > > > Best regards,
> > > > Sam
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: change buffer in other frame, multiple monitors
2015-05-28 14:25 ` Michael Heerdegen
@ 2015-05-28 15:03 ` Yuri Khan
0 siblings, 0 replies; 7+ messages in thread
From: Yuri Khan @ 2015-05-28 15:03 UTC (permalink / raw)
To: Michael Heerdegen; +Cc: help-gnu-emacs@gnu.org
On Thu, May 28, 2015 at 8:25 PM, Michael Heerdegen
<michael_heerdegen@web.de> wrote:
> What do you want instead: that a
> random window in a random frame is selected and forced to display the
> buffer?
I think the implicit assumption is that there exists a unique frame
other than the current one, and that it contains a single window.
I find myself in such a setup quite often, although my normal workflow
is then to switch to the other frame (using windmove + framemove) and
then select whatever buffer I need in that frame.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-05-28 15:03 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-27 14:16 change buffer in other frame, multiple monitors Sam Halliday
2015-05-28 11:22 ` Sam Halliday
2015-05-28 14:02 ` Sam Halliday
2015-05-28 14:16 ` Sam Halliday
2015-05-28 14:26 ` Sam Halliday
2015-05-28 14:25 ` Michael Heerdegen
2015-05-28 15:03 ` Yuri Khan
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.