emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: patch gud-gdb to respect other-frame-window?


From: Stephen Leake
Subject: Re: patch gud-gdb to respect other-frame-window?
Date: Mon, 30 Jul 2018 15:23:50 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (windows-nt)

Stefan Monnier <address@hidden> writes:

>> Currently, 'gud-gdb' has its own notion of where to put the *gud-<exec name>*
>> buffer. Since I use other-frame-window (a GNU ELPA package), I'd like to
>> override that.
>
> Could you explain in more detail what's the problem you're seeing?

Sorry, I was not very clear.

If I type "M-x gud-gdb ...", the window in which the *gdb-<exec>* buffer
is shown is usually not the currently selected window, but sometimes it
is, depending on what buffer/window is currently selected. There is a
logic to it, but it's not what I want.

Since I'm used to other-frame-window, I expect newly created buffers to
appear in the currently selected window; that's what happens for
find-file and most other commands.

>> Never mind; I realized I can set 'display-buffer-overriding-action' to
>> 'display-buffer-same-window in my ~/.emacs; that overrides this code,
>
> [ ... Trying to infer what was the problem, based on this apparently
>   working workaround ... Nope, sorry, I still don't see what is the
>   problem you're trying to solve.  ]
>
> Just a wild guess: maybe the better solution would be for
> other-frame-window to provide another command to force displaying the
> buffer in the current window?

As I said in my response to Martin, I think setting the default value of
'display-buffer-overriding-action' to 'display-buffer-same-window is the
appropriate solution. That variable is intended to allow the user to
override Emac's choices about buffer display, and other-frame-window's
use of it is consistent with that intent.


On further examining the list of available display-buffer actions,
perhaps this would be a better default:

'(display-buffer-reuse-window
  display-buffer--maybe-same-window
  display-buffer-use-some-window)

I'll try that.


It might make sense for other-frame-window to set this as the default
for 'display-buffer-overriding-action' when it is loaded, but only if
the user has not already set it. 

-- 
-- Stephe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]