GNU bug report logs - #20206
25.0.50; [PATCH] keep diff-mode's window visible when we visit sources from diff-mode

Previous Next

Package: emacs;

Reported by: Dima Kogan <dima <at> secretsauce.net>

Date: Thu, 26 Mar 2015 18:25:02 UTC

Severity: wishlist

Tags: patch

Found in version 25.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 20206 <at> debbugs.gnu.org (full text, mbox):

From: Dima Kogan <dima <at> secretsauce.net>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 20206 <at> debbugs.gnu.org
Subject: Re: bug#20206: 25.0.50;
 [PATCH] keep diff-mode's window visible when we visit sources from
 diff-mode
Date: Sat, 28 Mar 2015 14:44:14 -0700
[Message part 1 (text/plain, inline)]
martin rudalics <rudalics <at> gmx.at> writes:

> You can switch this off by customizing `display-buffer-base-action'
> accordingly.
>
>  > OK, but if the larger question is now on the table, (about what should
>  > (pop-to-buffer) and (display-buffer) do by default), we should probably
>  > answer that first.
>
> Can you tell me whether and how `display-buffer-in-previous-window' is
> used in the `diff-mode' scenario (I use a highly customized `ediff-mode'
> so I can't easily check that myself).  Does it use `switch-to-buffer'?

The diff-mode scenario is the same as the other example. M-enter invokes
(diff-goto-source), which invokes (pop-to-buffer), which invokes
(display-buffer). Here's the previous example, but using diff-mode
instead. Assuming "dat" and "dat.patch" exist in the current directory
(attached):


emacs -Q --eval '(progn

  (find-file "dat")
  (find-file "dat.patch")        # open both files; one window/frame
  (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"

  (diff-goto-source))            # navigate to the diff source


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.


[dat (application/octet-stream, attachment)]
[dat.patch (application/octet-stream, attachment)]

This bug report was last modified 5 years and 335 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.