all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stephen Leake <stephen_leake@stephe-leake.org>
To: emacs-devel <emacs-devel@gnu.org>
Subject: Re: patch gud-gdb to respect other-frame-window?
Date: Mon, 30 Jul 2018 15:23:50 -0500	[thread overview]
Message-ID: <864lggqxpl.fsf@stephe-leake.org> (raw)
In-Reply-To: <jwvo9eok5nb.fsf-monnier+gmane.emacs.devel@gnu.org> (Stefan Monnier's message of "Mon, 30 Jul 2018 13:17:36 -0400")

Stefan Monnier <monnier@iro.umontreal.ca> 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	other threads:[~2018-07-30 20:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-29 17:22 patch gud-gdb to respect other-frame-window? Stephen Leake
2018-07-29 17:30 ` Eli Zaretskii
2018-07-30  6:56   ` Stephen Leake
2018-07-30  7:34     ` martin rudalics
2018-07-30 16:49       ` Stephen Leake
2018-07-31  6:37         ` martin rudalics
2018-07-31  9:21           ` [SPAM UNSURE] " Stephen Leake
2018-07-30  6:23 ` martin rudalics
2018-07-30 17:17 ` Stefan Monnier
2018-07-30 20:23   ` Stephen Leake [this message]
2018-07-30 20:28     ` Stefan Monnier
2018-07-30 20:30     ` Stephen Leake
2018-07-30 21:22       ` Stephen Leake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=864lggqxpl.fsf@stephe-leake.org \
    --to=stephen_leake@stephe-leake.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.