unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Dima Kogan <dima@secretsauce.net>
To: martin rudalics <rudalics@gmx.at>
Cc: 20206@debbugs.gnu.org
Subject: bug#20206: 25.0.50; [PATCH] keep diff-mode's window visible when we visit sources from diff-mode
Date: Sun, 29 Mar 2015 13:06:18 -0700	[thread overview]
Message-ID: <87pp7rwojr.fsf@secretsauce.net> (raw)
In-Reply-To: <55183DD8.8000709@gmx.at>

martin rudalics <rudalics@gmx.at> writes:

>  >    (find-file "dat")
>  >    (find-file "dat.patch")        # open both files; one window/frame
>
> You here ...
>
>  >    (split-window-horizontally)    # two windows; both show "dat.patch"
>  >    (other-window 1)               # switch to right window
>  >    (switch-to-buffer "asdf")      # switch to dummy "asdf" buffer
>  >    (other-window 1)               # left window active with "dat.patch",
>  >                                   # right shows "asdf"
>  >
>  >    (switch-to-buffer "dat")
>  >    (switch-to-buffer "dat.patch") # left window: show "dat" and then back
>  >                                   # to "dat.patch"
>
> ... and here tell Emacs that you very much like having dat and dat.patch
> share the same window.  OTOH, the split-window-horizontally,
> other-window, switch-to-buffer "asdf" sequence indicates that you rather
> want the other window keep showing asdf.  So `display-buffer' will have
> a hard time concluding here ...
>
>  >    (diff-goto-source))            # navigate to the diff source
>
> ... that you want to show dat in the window formerly occupied by asdf.

Well sure. This was a contrived example specifically constructed to show
this behavior. The original bug report came from seeing this during
normal use of gud, so I still think the complaint is valid.


>  > In emacs23 the "dat" buffer is shown in the window OTHER than the one
>  > showing the diff. In emacs24, the diff window is covered up.
>
> I see.  I don't yet have a solution for this.

I think this is only a question of defaults. Specifically, any time we
(pop-to-buffer) or (display-buffer) in response to an interactive user
action, we should default to not covering up the user's buffer. This
would apply to use cases like gud, diff, cscope and so on. I don't know
enough about the development of this to know if it makes sense to change
the defaults only in the interactive case or in general. Do you see
reasons to keep the default as it is?





  reply	other threads:[~2015-03-29 20:06 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-26 18:25 bug#20206: 25.0.50; [PATCH] keep diff-mode's window visible when we visit sources from diff-mode Dima Kogan
2015-03-26 18:41 ` Eli Zaretskii
2015-03-26 18:58 ` martin rudalics
2015-03-28  6:01   ` Dima Kogan
2015-03-28  9:58     ` martin rudalics
2015-03-28 21:44       ` Dima Kogan
2015-03-29 18:00         ` martin rudalics
2015-03-29 20:06           ` Dima Kogan [this message]
2015-03-30  8:37             ` martin rudalics
2015-03-28 21:53   ` Dima Kogan
2015-03-29 18:01     ` martin rudalics
2015-03-29 19:48       ` Dima Kogan
2015-03-30  8:37         ` martin rudalics
2019-06-25 17:33 ` Lars Ingebrigtsen
2019-06-25 18:10   ` Dima Kogan
     [not found] <552BB316.1000204@gmx.at>
2015-04-13 14:34 ` Eli Zaretskii
2015-04-14 15:51   ` martin rudalics

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87pp7rwojr.fsf@secretsauce.net \
    --to=dima@secretsauce.net \
    --cc=20206@debbugs.gnu.org \
    --cc=rudalics@gmx.at \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).