From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.org!not-for-mail
From: Dima Kogan <dima@secretsauce.net>
Newsgroups: gmane.emacs.bugs
Subject: 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-ID: <87vbhkx054.fsf@secretsauce.net>
References: <87a8yzy5t4.fsf@secretsauce.net> <551456ED.8060101@gmx.at>
	<871tk9y55v.fsf@secretsauce.net> <55167B5F.5040300@gmx.at>
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Trace: ger.gmane.org 1427579363 28997 80.91.229.3 (28 Mar 2015 21:49:23 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sat, 28 Mar 2015 21:49:23 +0000 (UTC)
Cc: 20206@debbugs.gnu.org
To: martin rudalics <rudalics@gmx.at>
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Mar 28 22:49:11 2015
Return-path: <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>
Envelope-to: geb-bug-gnu-emacs@m.gmane.org
Original-Received: from lists.gnu.org ([208.118.235.17])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>)
	id 1YbybN-0007WH-Ud
	for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 Mar 2015 22:49:10 +0100
Original-Received: from localhost ([::1]:55351 helo=lists.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>)
	id 1YbybN-0005e8-6K
	for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 Mar 2015 17:49:09 -0400
Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40409)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1YbybK-0005dx-Cs
	for bug-gnu-emacs@gnu.org; Sat, 28 Mar 2015 17:49:07 -0400
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1YbybG-0003hX-Ch
	for bug-gnu-emacs@gnu.org; Sat, 28 Mar 2015 17:49:06 -0400
Original-Received: from debbugs.gnu.org ([140.186.70.43]:49363)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1YbybG-0003gt-4S
	for bug-gnu-emacs@gnu.org; Sat, 28 Mar 2015 17:49:02 -0400
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1YbybF-0003qm-Ky
	for bug-gnu-emacs@gnu.org; Sat, 28 Mar 2015 17:49:01 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Dima Kogan <dima@secretsauce.net>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Sat, 28 Mar 2015 21:49:01 +0000
Resent-Message-ID: <handler.20206.B20206.142757933214781@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 20206
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
Original-Received: via spool by 20206-submit@debbugs.gnu.org id=B20206.142757933214781
	(code B ref 20206); Sat, 28 Mar 2015 21:49:01 +0000
Original-Received: (at 20206) by debbugs.gnu.org; 28 Mar 2015 21:48:52 +0000
Original-Received: from localhost ([127.0.0.1]:39139 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1Ybyb5-0003qL-KP
	for submit@debbugs.gnu.org; Sat, 28 Mar 2015 17:48:52 -0400
Original-Received: from out2-smtp.messagingengine.com ([66.111.4.26]:41650)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <dima@secretsauce.net>) id 1Ybyb3-0003qB-3d
	for 20206@debbugs.gnu.org; Sat, 28 Mar 2015 17:48:49 -0400
Original-Received: from compute3.internal (compute3.nyi.internal [10.202.2.43])
	by mailout.nyi.internal (Postfix) with ESMTP id B68DE207B8
	for <20206@debbugs.gnu.org>; Sat, 28 Mar 2015 17:48:45 -0400 (EDT)
Original-Received: from frontend2 ([10.202.2.161])
	by compute3.internal (MEProxy); Sat, 28 Mar 2015 17:48:48 -0400
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net;
	h=cc:content-type:date:from:in-reply-to:message-id:mime-version
	:references:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=B5niu
	vr5Z5/jJLULecJuQWEdt3I=; b=vV6Cux/brVH8355oii25/ebnTY3Wlp0DIre8k
	WBCleW6CcqXvINXzLz/xU+H7aUFUUsTzx4Jzx+03XyFp2FxmOwJdh3uAmBmrxVcx
	m+78SiVIAiFfXh7ZzUZuD7CaPmq5dNOXFMxbxjQag6OhLywG9rJQvDdtuBVgRbrg
	pFXyYk=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=
	messagingengine.com; h=cc:content-type:date:from:in-reply-to
	:message-id:mime-version:references:subject:to:x-sasl-enc
	:x-sasl-enc; s=smtpout; bh=B5niuvr5Z5/jJLULecJuQWEdt3I=; b=EwZQ8
	w2Iy5/QKT+MOuSXHT+Mq6atNoc/nb+tjcCsPEqmtLg3fhR0gXzIerPiq3pfQDRow
	iupSsByKMg4N1x0f3gAfQd3jScjtj5Hzmnxr9yNalcMPrl2AXWaLRx07qVGZWfQx
	/KQt8/+rlE2fNmbWXysaScHeSQjs9AhT+uYBjc=
X-Sasl-enc: CGbX4VAqC8vXAheuzyeCGM8ftHxlOF8iKDs0TgmYLqHs 1427579328
Original-Received: from shorty.local (unknown [104.35.103.243])
	by mail.messagingengine.com (Postfix) with ESMTPA id 682AE6801F2;
	Sat, 28 Mar 2015 17:48:48 -0400 (EDT)
Original-Received: from ip6-localhost ([::1] helo=shorty)
	by shorty.local with esmtp (Exim 4.84)
	(envelope-from <dima@secretsauce.net>)
	id 1YbycB-0006k0-3A; Sat, 28 Mar 2015 14:49:59 -0700
In-reply-to: <55167B5F.5040300@gmx.at>
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 140.186.70.43
X-BeenThere: bug-gnu-emacs@gnu.org
List-Id: "Bug reports for GNU Emacs,
	the Swiss army knife of text editors" <bug-gnu-emacs.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-gnu-emacs>,
	<mailto:bug-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-gnu-emacs>
List-Post: <mailto:bug-gnu-emacs@gnu.org>
List-Help: <mailto:bug-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>,
	<mailto:bug-gnu-emacs-request@gnu.org?subject=subscribe>
Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org
Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org
Xref: news.gmane.org gmane.emacs.bugs:101005
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/101005>

--=-=-=
Content-Type: text/plain

martin rudalics <rudalics@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.



--=-=-=
Content-Type: application/octet-stream
Content-Disposition: attachment; filename=dat
Content-Transfer-Encoding: base64

MQoyCjMKNAo1Cg==
--=-=-=
Content-Type: application/octet-stream
Content-Disposition: attachment; filename=dat.patch
Content-Transfer-Encoding: base64

LS0tIGRhdAkyMDE1LTAzLTI4IDEzOjQyOjM3Ljg5MzgxMzQ2NCAtMDcwMAorKysgZGF0CTIwMTUt
MDMtMjggMTM6NDI6MjAuNzI5NzI4MzUyIC0wNzAwCkBAIC0xLDUgKzEsNCBAQAogMQogMgotMwog
NAogNQo=
--=-=-=--