From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 26 14:24:38 2015 Received: (at submit) by debbugs.gnu.org; 26 Mar 2015 18:24:38 +0000 Received: from localhost ([127.0.0.1]:37555 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YbCSL-0000YR-RT for submit@debbugs.gnu.org; Thu, 26 Mar 2015 14:24:38 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56920) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YbCSI-0000Y9-Ts for submit@debbugs.gnu.org; Thu, 26 Mar 2015 14:24:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YbCSC-000552-Jk for submit@debbugs.gnu.org; Thu, 26 Mar 2015 14:24:29 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:47209) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbCSC-00054y-HF for submit@debbugs.gnu.org; Thu, 26 Mar 2015 14:24:28 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58637) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbCSB-0008Jn-Au for bug-gnu-emacs@gnu.org; Thu, 26 Mar 2015 14:24:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YbCS6-00054G-Ah for bug-gnu-emacs@gnu.org; Thu, 26 Mar 2015 14:24:27 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:59872) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbCS5-00053o-Ur for bug-gnu-emacs@gnu.org; Thu, 26 Mar 2015 14:24:22 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id B835F205BF for ; Thu, 26 Mar 2015 14:24:15 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute2.internal (MEProxy); Thu, 26 Mar 2015 14:24:18 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=x-sasl-enc:from:to:subject:date:message-id:mime-version :content-type; s=mesmtp; bh=pVacRAZgxRe0vrHN1M/3j+obIk4=; b=je3v BFiCwiH0uRE+fMGhRrJRUDp/iaD/lqisn6Co+6Ghd4N4CGF+6Z9nhYMubVvzUKxz iFVu7q1OQNtAjcd3YMEu7bh70sXbZoc1dqmfyYN4oHNYMmQVTW0r/YXLRqPH7tlo FL7NeDMjjzNtJ5hKWRmeSngv0oxb7bTCof8LROA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:from:to:subject:date :message-id:mime-version:content-type; s=smtpout; bh=pVacRAZgxRe 0vrHN1M/3j+obIk4=; b=D52VBlCy1oFwiB9hxCS8eiBLbNbKd2RhQTWqoCZata7 v1fsQiNY2W/xrT/eNg77KWpN/oQgr8t3h6/1LxlMFh+zi4h9IhR5T91PBhfzjgl0 RSWleE/DZB5Vjt9UraCdmxvSOAs2qXfZjAKH6XZ9Se+8WLj2vqUweMTLpwgtbuuY = X-Sasl-enc: 8dpalZ06ETSojXSCOcwMmweZPFN0g2AucrDQaxjikAFY 1427394258 Received: from shorty.local (unknown [104.35.103.243]) by mail.messagingengine.com (Postfix) with ESMTPA id 3C448C00015 for ; Thu, 26 Mar 2015 14:24:18 -0400 (EDT) Received: from ip6-localhost ([::1] helo=shorty) by shorty.local with esmtp (Exim 4.84) (envelope-from ) id 1YbCT9-0000HN-QN for bug-gnu-emacs@gnu.org; Thu, 26 Mar 2015 11:25:27 -0700 From: Dima Kogan To: bug-gnu-emacs@gnu.org Subject: 25.0.50; [PATCH] keep diff-mode's window visible when we visit sources from diff-mode Date: Thu, 26 Mar 2015 11:25:27 -0700 Message-ID: <87a8yzy5t4.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --=-=-= Content-Type: text/plain When looking at a patch in diff-mode, one can visit the sources being patched with several functions, for instance (diff-goto-source). This patch makes sure that the source buffer does not cover up the diff-mode buffer in its window, but uses any other window instead. This really is a continuation of bug 20034 (and 17675 and 19901). I feel like the earlier display-buffer implementation had a nicer default in this regard. Should we keep adding this patch wherever a user operation on a buffer can cause a different buffer to be displayed, or should display-buffer defaults be changed to make the "don't steal user's focus" behavior the default? --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-keep-diff-mode-s-window-visible-when-we-visit-source.patch >From fa88533777a500784cb5def1733aa182c6bd4135 Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Thu, 26 Mar 2015 11:21:06 -0700 Subject: [PATCH] keep diff-mode's window visible when we visit sources from diff-mode When looking at a patch in diff-mode, one can visit the sources being patched with several functions, for instance (diff-goto-source). This patch makes sure that the source buffer does not cover up the diff-mode buffer in its window, but uses any other window instead --- lisp/vc/diff-mode.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index a9614e9..15cdae9 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -1318,7 +1318,7 @@ See `after-change-functions' for the meaning of BEG, END and LEN." ;; Select a window that displays the current buffer so that point ;; movements are reflected in that window. Otherwise, the user might ;; never see the hunk corresponding to the source she's jumping to. - (pop-to-buffer (current-buffer)) + (pop-to-buffer (current-buffer) '(display-buffer-use-some-window (inhibit-same-window . t))) (if reset (goto-char (point-min))) (diff-hunk-next arg) (diff-goto-source)) @@ -1801,7 +1801,7 @@ With a prefix argument, REVERSE the hunk." (delete-region (car pos) (cdr pos)) (insert (car new))) ;; Display BUF in a window - (set-window-point (display-buffer buf) (+ (car pos) (cdr new))) + (set-window-point (display-buffer buf '(display-buffer-use-some-window (inhibit-same-window . t))) (+ (car pos) (cdr new))) (diff-hunk-status-msg line-offset (diff-xor switched reverse) nil) (when diff-advance-after-apply-hunk (diff-hunk-next)))))) @@ -1813,7 +1813,7 @@ With a prefix argument, try to REVERSE the hunk." (interactive "P") (pcase-let ((`(,buf ,line-offset ,pos ,src ,_dst ,switched) (diff-find-source-location nil reverse))) - (set-window-point (display-buffer buf) (+ (car pos) (cdr src))) + (set-window-point (display-buffer buf '(display-buffer-use-some-window (inhibit-same-window . t))) (+ (car pos) (cdr src))) (diff-hunk-status-msg line-offset (diff-xor reverse switched) t))) @@ -1843,7 +1843,7 @@ then `diff-jump-to-old-file' is also set, for the next invocations." (let ((rev (not (save-excursion (beginning-of-line) (looking-at "[-<]"))))) (pcase-let ((`(,buf ,line-offset ,pos ,src ,_dst ,switched) (diff-find-source-location other-file rev))) - (pop-to-buffer buf) + (pop-to-buffer buf '(display-buffer-use-some-window (inhibit-same-window . t))) (goto-char (+ (car pos) (cdr src))) (diff-hunk-status-msg line-offset (diff-xor rev switched) t)))) -- 2.1.4 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 26 14:41:52 2015 Received: (at 20206) by debbugs.gnu.org; 26 Mar 2015 18:41:52 +0000 Received: from localhost ([127.0.0.1]:37578 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YbCj1-0000z3-QY for submit@debbugs.gnu.org; Thu, 26 Mar 2015 14:41:52 -0400 Received: from mtaout28.012.net.il ([80.179.55.184]:42507) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YbCiz-0000yo-18 for 20206@debbugs.gnu.org; Thu, 26 Mar 2015 14:41:50 -0400 Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0NLU000000QDXY00@mtaout28.012.net.il> for 20206@debbugs.gnu.org; Thu, 26 Mar 2015 20:40:21 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NLU00L7V179W460@mtaout28.012.net.il>; Thu, 26 Mar 2015 20:40:21 +0200 (IST) Date: Thu, 26 Mar 2015 20:41:38 +0200 From: Eli Zaretskii Subject: Re: bug#20206: 25.0.50; [PATCH] keep diff-mode's window visible when we visit sources from diff-mode In-reply-to: <87a8yzy5t4.fsf@secretsauce.net> X-012-Sender: halo1@inter.net.il To: Dima Kogan Message-id: <83pp7vmwil.fsf@gnu.org> References: <87a8yzy5t4.fsf@secretsauce.net> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 20206 Cc: 20206@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Dima Kogan > Date: Thu, 26 Mar 2015 11:25:27 -0700 > > When looking at a patch in diff-mode, one can visit the sources being > patched with several functions, for instance (diff-goto-source). This > patch makes sure that the source buffer does not cover up the diff-mode > buffer in its window, but uses any other window instead. IMO, this should be controlled by a user option, since we can never be sure there isn't someone who likes the current behavior. Not having an option will not allow them to get the old behavior back, which IMO is not a good idea. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 26 14:59:10 2015 Received: (at 20206) by debbugs.gnu.org; 26 Mar 2015 18:59:10 +0000 Received: from localhost ([127.0.0.1]:37582 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YbCzl-0001NZ-Ei for submit@debbugs.gnu.org; Thu, 26 Mar 2015 14:59:09 -0400 Received: from mout.gmx.net ([212.227.15.19]:53629) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YbCzj-0001N2-3j for 20206@debbugs.gnu.org; Thu, 26 Mar 2015 14:59:07 -0400 Received: from [62.47.140.183] ([62.47.140.183]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0M08ia-1ZTB3l2kk0-00uHlf; Thu, 26 Mar 2015 19:58:57 +0100 Message-ID: <551456ED.8060101@gmx.at> Date: Thu, 26 Mar 2015 19:58:53 +0100 From: martin rudalics MIME-Version: 1.0 To: Dima Kogan , 20206@debbugs.gnu.org Subject: Re: bug#20206: 25.0.50; [PATCH] keep diff-mode's window visible when we visit sources from diff-mode References: <87a8yzy5t4.fsf@secretsauce.net> In-Reply-To: <87a8yzy5t4.fsf@secretsauce.net> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:MdnDvwhyokiBhoLteGg8Ql9ClR9bi5yzFBqJoXzHwiUdmItgopC DcFRZ1H5WUH7tdqRmftRSvqbmIlJc+6uKYdEH1QiZW9ddoXnX2JZSajkL/6OQrQkjIwZzRj w+zZKBCTM+8uslP56ZhQdfbrTWAnrdgFLDTG1zC+VVpXG/302gLzfu5mcNfFc5/EC57kjnF HSw3iApuacl5OykGFKa/g== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 20206 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > - (pop-to-buffer (current-buffer)) Something must be wrong here. According to its doc-string `pop-to-buffer' should "Select buffer BUFFER in some window, preferably a different one." But I nowhere see that it tries to enforce that. Am I blind? And `display-buffer' should not use the selected window either, after all it's likely the most recently used one. Could you please debug this in order to explain why the selected window gets used in all these cases? > + (pop-to-buffer (current-buffer) '(display-buffer-use-some-window (inhibit-same-window . t))) In any case `display-buffer-use-some-window' as sole action doesn't look right. It should be preceded by `display-buffer-reuse-window' and `display-buffer-pop-up-window'. And `pop-to-buffer' should do that already. Thanks, martin From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 28 03:02:49 2015 Received: (at 20206) by debbugs.gnu.org; 28 Mar 2015 07:02:49 +0000 Received: from localhost ([127.0.0.1]:38523 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ybklc-0006NU-TH for submit@debbugs.gnu.org; Sat, 28 Mar 2015 03:02:49 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:56263) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ybkla-0006NK-QG for 20206@debbugs.gnu.org; Sat, 28 Mar 2015 03:02:47 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 99B7520A40 for <20206@debbugs.gnu.org>; Sat, 28 Mar 2015 03:02:43 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute3.internal (MEProxy); Sat, 28 Mar 2015 03:02:46 -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=rOYo3 h2pg5Isi/yhmTRg7sX+HUQ=; b=EbrtuQWsd8WjnRFoKEUf23jQrqBO+F05j7yzB dqQT34Ex2YbzG7elqRz8abathWaY786NTJ0G+tJJFAs+uynI9Ih1fAB2vy70hXhW uN428Hll6AOxFs3Xd4ri2bMHHj1mffCFIll/slgINb8k3hmpQpRpX6eRPu51roOS BZ66Eo= 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=rOYo3h2pg5Isi/yhmTRg7sX+HUQ=; b=OGpe0 SfmeiW4oNMI3w3PO9JhLFomw0f3Z5XZ0ZgBv3S4A973qBT4P84lJyOBEwHF6ytEx xTzy/bX9VIS2e3pH2Kut3A89tYi9i33mVSGAGOSfHmZ30lZ038w452h+80bZh7GZ zKIK/bGz0l5JrdGvAUaS/skdJRvr7EwVzxJChM= X-Sasl-enc: RNRm/55fpmUmWdFNR/0VJK37qvRCMr5MXp9eZcwS6yU+ 1427526166 Received: from shorty.local (unknown [104.35.103.243]) by mail.messagingengine.com (Postfix) with ESMTPA id 3B349C00015; Sat, 28 Mar 2015 03:02:46 -0400 (EDT) Received: from ip6-localhost ([::1] helo=shorty) by shorty.local with esmtp (Exim 4.84) (envelope-from ) id 1Ybkmi-0003OB-Hf; Sat, 28 Mar 2015 00:03:56 -0700 References: <87a8yzy5t4.fsf@secretsauce.net> <551456ED.8060101@gmx.at> From: Dima Kogan To: martin rudalics Subject: Re: bug#20206: 25.0.50; [PATCH] keep diff-mode's window visible when we visit sources from diff-mode Date: Fri, 27 Mar 2015 23:01:32 -0700 In-reply-to: <551456ED.8060101@gmx.at> Message-ID: <871tk9y55v.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 20206 Cc: 20206@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) martin rudalics writes: > > - (pop-to-buffer (current-buffer)) > > Something must be wrong here. According to its doc-string > `pop-to-buffer' should > > "Select buffer BUFFER in some window, preferably a different one." > > But I nowhere see that it tries to enforce that. Am I blind? I don't see it either. (pop-to-buffer buf) simply does (display-buffer buf). > And `display-buffer' should not use the selected window either, after > all it's likely the most recently used one. Could you please debug > this in order to explain why the selected window gets used in all > these cases? I think it uses the most recent window a buffer was displayed in. If this most-recenty-used window now shows a different buffer, then this new buffer is covered up. Example: emacs24 -Q --eval '(progn (split-window-horizontally) # split into left,right; *scratch* in each (other-window 1) # focus the right window (*scratch*) (switch-to-buffer "asdf") # right window now has buffer "asdf" (other-window 1) # focus the left window (*scratch*) (switch-to-buffer "*Messages*") # left window now has buffer *Messages* (switch-to-buffer "*scratch*") # left window back to buffer *scratch* (display-buffer "*Messages*") # display *Messages* somewhere )' Running the above covers up the focused *scratch* buffer in the left window. Running it in emacs23 instead does NOT cover it up, which is the behavior that feels more right to me. The recent patches try to get back to this state. If we do not do the (switch-to-buffer "*Messages*") (switch-to-buffer "*scratch*") dance then the *scratch* buffer isn't covered up even in emacs24. > > + (pop-to-buffer (current-buffer) '(display-buffer-use-some-window (inhibit-same-window . t))) > > In any case `display-buffer-use-some-window' as sole action doesn't look > right. It should be preceded by `display-buffer-reuse-window' and > `display-buffer-pop-up-window'. And `pop-to-buffer' should do that > already. 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. dima From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 28 05:59:15 2015 Received: (at 20206) by debbugs.gnu.org; 28 Mar 2015 09:59:15 +0000 Received: from localhost ([127.0.0.1]:38559 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YbnWM-0002MS-TH for submit@debbugs.gnu.org; Sat, 28 Mar 2015 05:59:15 -0400 Received: from mout.gmx.net ([212.227.15.19]:57856) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YbnWJ-0002MF-U5 for 20206@debbugs.gnu.org; Sat, 28 Mar 2015 05:59:12 -0400 Received: from [88.117.86.111] ([88.117.86.111]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0LxxKu-1ZVuqC1wP6-015Ftn; Sat, 28 Mar 2015 10:59:04 +0100 Message-ID: <55167B5F.5040300@gmx.at> Date: Sat, 28 Mar 2015 10:58:55 +0100 From: martin rudalics MIME-Version: 1.0 To: Dima Kogan Subject: Re: bug#20206: 25.0.50; [PATCH] keep diff-mode's window visible when we visit sources from diff-mode References: <87a8yzy5t4.fsf@secretsauce.net> <551456ED.8060101@gmx.at> <871tk9y55v.fsf@secretsauce.net> In-Reply-To: <871tk9y55v.fsf@secretsauce.net> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:fsqs4BhgmCuB7xNWrFno2DbfwoeU5zO2k8IMNxqFGgfh8knqYbg /3SQybKHtGeMK91kqFef5YjG9lXocYbgoLwwe+oVJPotKO6e3PAmHggswaV3PzLuAbYr3rW H8LguXx1lJs9DRto8JxO0r0E2UYUmGaZUzi+/7mWhDibC9bFB4x5gKa/KILXgFioc9iOW3u MW6k9Aw+ylmcM9DbimPPQ== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 20206 Cc: 20206@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) >> And `display-buffer' should not use the selected window either, after >> all it's likely the most recently used one. Could you please debug >> this in order to explain why the selected window gets used in all >> these cases? > > I think it uses the most recent window a buffer was displayed in. If > this most-recenty-used window now shows a different buffer, then this > new buffer is covered up. Example: > > emacs24 -Q --eval '(progn > (split-window-horizontally) # split into left,right; *scratch* in each > (other-window 1) # focus the right window (*scratch*) > (switch-to-buffer "asdf") # right window now has buffer "asdf" > (other-window 1) # focus the left window (*scratch*) > (switch-to-buffer "*Messages*") # left window now has buffer *Messages* > (switch-to-buffer "*scratch*") # left window back to buffer *scratch* > (display-buffer "*Messages*") # display *Messages* somewhere > )' > > Running the above covers up the focused *scratch* buffer in the left > window. Running it in emacs23 instead does NOT cover it up, which is the > behavior that feels more right to me. The recent patches try to get back > to this state. > > If we do not do the > > (switch-to-buffer "*Messages*") (switch-to-buffer "*scratch*") > > dance then the *scratch* buffer isn't covered up even in emacs24. I see. This is due to `display-buffer-in-previous-window' which covers such idiosyncrasies like *Backtrace* alternately appearing in one and the other window (because the least recently used window alternates continuously). Your `switch-to-buffer' calls imply that you do want to see both *Messages* and *scratch* preferably in the left window and `display-buffer' complies. 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'? martin From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 28 17:48:52 2015 Received: (at 20206) by debbugs.gnu.org; 28 Mar 2015 21:48:52 +0000 Received: from localhost ([127.0.0.1]:39139 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ybyb5-0003qL-KP for submit@debbugs.gnu.org; Sat, 28 Mar 2015 17:48:52 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:41650) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ybyb3-0003qB-3d for 20206@debbugs.gnu.org; Sat, 28 Mar 2015 17:48:49 -0400 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) 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 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) Received: from ip6-localhost ([::1] helo=shorty) by shorty.local with esmtp (Exim 4.84) (envelope-from ) id 1YbycB-0006k0-3A; Sat, 28 Mar 2015 14:49:59 -0700 References: <87a8yzy5t4.fsf@secretsauce.net> <551456ED.8060101@gmx.at> <871tk9y55v.fsf@secretsauce.net> <55167B5F.5040300@gmx.at> From: Dima Kogan To: martin rudalics 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 In-reply-to: <55167B5F.5040300@gmx.at> Message-ID: <87vbhkx054.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 20206 Cc: 20206@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --=-=-= Content-Type: text/plain martin rudalics 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= --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 28 17:55:47 2015 Received: (at 20206) by debbugs.gnu.org; 28 Mar 2015 21:55:47 +0000 Received: from localhost ([127.0.0.1]:39155 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ybyhn-00041i-96 for submit@debbugs.gnu.org; Sat, 28 Mar 2015 17:55:47 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:52665) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ybyhl-00041Z-Eg for 20206@debbugs.gnu.org; Sat, 28 Mar 2015 17:55:45 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 40F2F20A0A for <20206@debbugs.gnu.org>; Sat, 28 Mar 2015 17:55:42 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute2.internal (MEProxy); Sat, 28 Mar 2015 17:55:45 -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=tvgmP SjaFoytj7DtniHdcG/q9Tw=; b=cUd37aC6BQcUH7167xof7gVHNuNRSv9wcqMw3 9aQwSQzAfdDIHLMAzPOTeuhvKqhXcsw/TskUHr4qPmYG04I0rmI0I0Mk6ZYmNHFG h7BKC+ueONTyolFySUuiWSdZplUKV4+8Ti39VyTOxe3HTNYhXzq+VFAt6NSLQg9V qIfNa0= 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=tvgmPSjaFoytj7DtniHdcG/q9Tw=; b=fzP3z Gu7y0fxt576TqIG4Fcjw+GTOcASXqj+YMejeHK1LXqfVV2TuFUKzn3HiXAUjyDtM AHYzXiB64nK9ewSHs+crmCs8Cig2PUAky52IoY4I62KtwVHj9rGfsg6x6flNuCfS c+Yi0IY+PCdc2j78+FYe33mxSbT1aN+YMuTqPA= X-Sasl-enc: skpNIgmSYRSzfFJFkp6amU114qWPKn6WHAaWlsx0ox+b 1427579744 Received: from shorty.local (unknown [104.35.103.243]) by mail.messagingengine.com (Postfix) with ESMTPA id E6D676800BE; Sat, 28 Mar 2015 17:55:44 -0400 (EDT) Received: from ip6-localhost ([::1] helo=shorty) by shorty.local with esmtp (Exim 4.84) (envelope-from ) id 1Ybyit-0006lJ-Kx; Sat, 28 Mar 2015 14:56:55 -0700 References: <87a8yzy5t4.fsf@secretsauce.net> <551456ED.8060101@gmx.at> From: Dima Kogan To: martin rudalics 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:53:38 -0700 In-reply-to: <551456ED.8060101@gmx.at> Message-ID: <87twx4wztk.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 20206 Cc: 20206@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) martin rudalics writes: > > + (pop-to-buffer (current-buffer) '(display-buffer-use-some-window (inhibit-same-window . t))) > > In any case `display-buffer-use-some-window' as sole action doesn't look > right. It should be preceded by `display-buffer-reuse-window' and > `display-buffer-pop-up-window'. To be clear, this action came from two desires: 1. The (inhibit-same-window . t) is there to get the dont-cover-up-control-buffer behavior 2. The display-buffer-pop-up-window action is there to handle bug 19901. There the user already has two windows, and by default a third is created. It's less obvious to me which is the "right" behavior here, but the earlier behavior of reusing the window seems reasonable. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 29 14:01:18 2015 Received: (at 20206) by debbugs.gnu.org; 29 Mar 2015 18:01:18 +0000 Received: from localhost ([127.0.0.1]:39798 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YcHWQ-0003LG-0G for submit@debbugs.gnu.org; Sun, 29 Mar 2015 14:01:18 -0400 Received: from mout.gmx.net ([212.227.17.20]:54452) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YcHWN-0003L1-Tw for 20206@debbugs.gnu.org; Sun, 29 Mar 2015 14:01:17 -0400 Received: from [178.190.17.92] ([178.190.17.92]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0MDV5t-1Yfn5i1xQD-00GuDr; Sun, 29 Mar 2015 20:01:07 +0200 Message-ID: <55183DD8.8000709@gmx.at> Date: Sun, 29 Mar 2015 20:00:56 +0200 From: martin rudalics MIME-Version: 1.0 To: Dima Kogan Subject: Re: bug#20206: 25.0.50; [PATCH] keep diff-mode's window visible when we visit sources from diff-mode References: <87a8yzy5t4.fsf@secretsauce.net> <551456ED.8060101@gmx.at> <871tk9y55v.fsf@secretsauce.net> <55167B5F.5040300@gmx.at> <87vbhkx054.fsf@secretsauce.net> In-Reply-To: <87vbhkx054.fsf@secretsauce.net> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:zXicsmXjwU56MvF0PlAFBOIVLJzkVjzJoQ6hPzgw9CUTMi1ftW5 7Iud8PzCcpE4mweVGEiVPHjvW8eeysdbRkQAev9g0CRN60jWtOp9U82eY5CHJ/VG3248zZF n8gv+HGoZnxUz0AQU28hYz9XQBXLlXZYf7sG2iNQCX7OiOaVzxeApgcuvid1Bnx2CGpadGM fliU/k17GUhGNX4NTsEog== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 20206 Cc: 20206@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > (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. > 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. martin From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 29 14:01:21 2015 Received: (at 20206) by debbugs.gnu.org; 29 Mar 2015 18:01:21 +0000 Received: from localhost ([127.0.0.1]:39801 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YcHWT-0003LV-CN for submit@debbugs.gnu.org; Sun, 29 Mar 2015 14:01:21 -0400 Received: from mout.gmx.net ([212.227.17.20]:53765) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YcHWR-0003L7-OM for 20206@debbugs.gnu.org; Sun, 29 Mar 2015 14:01:20 -0400 Received: from [178.190.17.92] ([178.190.17.92]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0MQzoI-1Z29Yf3bzi-00UNAz; Sun, 29 Mar 2015 20:01:12 +0200 Message-ID: <55183DDD.7070303@gmx.at> Date: Sun, 29 Mar 2015 20:01:01 +0200 From: martin rudalics MIME-Version: 1.0 To: Dima Kogan Subject: Re: bug#20206: 25.0.50; [PATCH] keep diff-mode's window visible when we visit sources from diff-mode References: <87a8yzy5t4.fsf@secretsauce.net> <551456ED.8060101@gmx.at> <87twx4wztk.fsf@secretsauce.net> In-Reply-To: <87twx4wztk.fsf@secretsauce.net> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:iopMvm63WL8J9h74SboEjMjfN+uQovKGRERkfkXkOSx5PuZyMOL IbR9Eq5QMb1rph6bmL3MD9zhSkpVHfW7psI3WowyAkjV4ek97/zbwl2LlHxg5DwY1TLiCwY ntvKMu/6kamG7B1jyTjbc1KX1Hzc6AW8kQjp+atvCTEz7c/QicBR8Gpt50Reb4BRRqr2fB6 saxdsaYWOTAgaejcyiaIg== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 20206 Cc: 20206@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) >> > + (pop-to-buffer (current-buffer) '(display-buffer-use-some-window (inhibit-same-window . t))) >> >> In any case `display-buffer-use-some-window' as sole action doesn't look >> right. It should be preceded by `display-buffer-reuse-window' and >> `display-buffer-pop-up-window'. > > To be clear, this action came from two desires: > > 1. The (inhibit-same-window . t) is there to get the > dont-cover-up-control-buffer behavior OK. > 2. The display-buffer-pop-up-window action is there to handle bug 19901. > There the user already has two windows, and by default a third is > created. It's less obvious to me which is the "right" behavior here, but > the earlier behavior of reusing the window seems reasonable. Agreed. But if you have a two windows frame and your settings for popping up a third window would normally allow that, your solution would nevertheless try to use another window in that case. Wouldn't it be sufficient to just use '((inhibit-same-window . t))? martin From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 29 15:53:26 2015 Received: (at 20206) by debbugs.gnu.org; 29 Mar 2015 19:53:26 +0000 Received: from localhost ([127.0.0.1]:39827 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YcJGv-0005yS-Uo for submit@debbugs.gnu.org; Sun, 29 Mar 2015 15:53:26 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:43504) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YcJGt-0005yH-AM for 20206@debbugs.gnu.org; Sun, 29 Mar 2015 15:53:24 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 68806209F2 for <20206@debbugs.gnu.org>; Sun, 29 Mar 2015 15:53:19 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute5.internal (MEProxy); Sun, 29 Mar 2015 15:53:22 -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=Qnx6b MVBdjwVYdXnDpDfN+m9TlY=; b=JYnpMQH8XmDQA2XsNe4Qc1f2Qq2KIiuM3b4KL q+v0I5xuK78YWnXiCj3x4qerdEncrl4JB1vH+Phf7vz75kIKF5+hyo9Jhg3FEofn A8a/sADHUF2O+wxpo0esmdc2xvBI1WmApfQML7XGsPafEksT/LfhkIbuFz0oFVhx 6qogPY= 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=Qnx6bMVBdjwVYdXnDpDfN+m9TlY=; b=Dy89U WY6PLHjb3XmSxXFDeaMl6XdQVqi1Y2J63bQLznqungeHmYg/Mjkw48cCberpWvcn cybHh1QiXGSenKxtYHM2vwAfMg1KhpZOFDk7IQbXURS58xnSO8fLJO6umGEucUso DvOj7M2bn/oy9aWYh/Tva7QPBwt8RtHolOkxWw= X-Sasl-enc: FRREwZznWYxOxoxAoMqetEPkaO3dQSXzwUWE81Q3/l0C 1427658802 Received: from shorty.local (unknown [104.35.103.243]) by mail.messagingengine.com (Postfix) with ESMTPA id 2CC1B68009D; Sun, 29 Mar 2015 15:53:22 -0400 (EDT) Received: from ip6-localhost ([::1] helo=shorty) by shorty.local with esmtp (Exim 4.84) (envelope-from ) id 1YcJHx-0004HW-Rk; Sun, 29 Mar 2015 12:54:29 -0700 References: <87a8yzy5t4.fsf@secretsauce.net> <551456ED.8060101@gmx.at> <87twx4wztk.fsf@secretsauce.net> <55183DDD.7070303@gmx.at> From: Dima Kogan To: martin rudalics Subject: Re: bug#20206: 25.0.50; [PATCH] keep diff-mode's window visible when we visit sources from diff-mode Date: Sun, 29 Mar 2015 12:48:12 -0700 In-reply-to: <55183DDD.7070303@gmx.at> Message-ID: <87r3s7wpe2.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 20206 Cc: 20206@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) martin rudalics writes: > > 2. The display-buffer-pop-up-window action is there to handle bug 19901. > > There the user already has two windows, and by default a third is > > created. It's less obvious to me which is the "right" behavior here, but > > the earlier behavior of reusing the window seems reasonable. > > Agreed. But if you have a two windows frame and your settings for > popping up a third window would normally allow that, your solution would > nevertheless try to use another window in that case. Wouldn't it be > sufficient to just use '((inhibit-same-window . t))? I'm not sure what you mean: '((inhibit-same-window . t)) is not a valid as an action argument to display-buffer, and emacs barfs if I try to use it as such. I'm not at all married to using display-buffer-pop-up-window here. If you have a better idea for solving 19901 (or if you think there's nothing to fix), then I'm fine with it. Another wrinkle is that the behavior reported in 19901 as a bug is only observable with particular geometries of the emacs X11 window. On my machine, 19901 is reproducible if emacs takes up my whole screen (1440x1050), but not if it takes only half (720x1050). Presumably emacs thinks that splitting into a 3rd window will create new windows that are too narrow. That is all to say that maybe 19901 is not a bug. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 29 16:11:32 2015 Received: (at 20206) by debbugs.gnu.org; 29 Mar 2015 20:11:32 +0000 Received: from localhost ([127.0.0.1]:39831 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YcJYR-0006Nx-Q1 for submit@debbugs.gnu.org; Sun, 29 Mar 2015 16:11:32 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:51694) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YcJYP-0006Np-PG for 20206@debbugs.gnu.org; Sun, 29 Mar 2015 16:11:30 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 8B7F020C89 for <20206@debbugs.gnu.org>; Sun, 29 Mar 2015 16:11:26 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Sun, 29 Mar 2015 16:11:29 -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=134KB 7dgF3CK4XS8nlh9+o5fhgo=; b=gr4m6CZSaXnJB+oN/zR3xa0KpTRQoJ1Lm5dyk IKWYe9xMiUTpiX3o4CdV0EWr7FGKKvuLo5FwpB8FTVpKPVh1/JaMC/7Moe+lGcs+ 1ResrD7+zAGgUbzlnCCoqPn1z/K6kz0UTd8OD+GslrQE5AZXSU0y+dO6eaTZ3UMC ivtKYk= 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=134KB7dgF3CK4XS8nlh9+o5fhgo=; b=HvdWs xWzzeGr92fDfp0OOubrDZI4ivnRJbrAiT25/ti28t4vcDrB1hxetzYqno1A/IGJt k98Toz47S8kpLtCLK/JfLDVqYyWDfC561c9r8V0SHgtws0M2HvDwYxxNf4pdQLQr 9yFDb9Ghp/VnHDgMrQ94Zps5UxQZ3Cfr/ikBf4= X-Sasl-enc: JwgzOo5MKujTGTKQzg3Z7KLayvk/kjmVD4XFaODKztRT 1427659889 Received: from shorty.local (unknown [104.35.103.243]) by mail.messagingengine.com (Postfix) with ESMTPA id 4C7A6680109; Sun, 29 Mar 2015 16:11:29 -0400 (EDT) Received: from ip6-localhost ([::1] helo=shorty) by shorty.local with esmtp (Exim 4.84) (envelope-from ) id 1YcJZY-0004MF-3U; Sun, 29 Mar 2015 13:12:40 -0700 References: <87a8yzy5t4.fsf@secretsauce.net> <551456ED.8060101@gmx.at> <871tk9y55v.fsf@secretsauce.net> <55167B5F.5040300@gmx.at> <87vbhkx054.fsf@secretsauce.net> <55183DD8.8000709@gmx.at> From: Dima Kogan To: martin rudalics Subject: Re: 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 In-reply-to: <55183DD8.8000709@gmx.at> Message-ID: <87pp7rwojr.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 20206 Cc: 20206@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) martin rudalics 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? From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 30 04:37:46 2015 Received: (at 20206) by debbugs.gnu.org; 30 Mar 2015 08:37:47 +0000 Received: from localhost ([127.0.0.1]:39996 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YcVCb-0008SH-Vi for submit@debbugs.gnu.org; Mon, 30 Mar 2015 04:37:46 -0400 Received: from mout.gmx.net ([212.227.15.18]:49851) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YcVCZ-0008S0-3n for 20206@debbugs.gnu.org; Mon, 30 Mar 2015 04:37:44 -0400 Received: from [194.166.85.52] ([194.166.85.52]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0Lqi70-1Z80Gi2bXG-00eP67; Mon, 30 Mar 2015 10:37:34 +0200 Message-ID: <55190B4D.9070904@gmx.at> Date: Mon, 30 Mar 2015 10:37:33 +0200 From: martin rudalics MIME-Version: 1.0 To: Dima Kogan Subject: Re: bug#20206: 25.0.50; [PATCH] keep diff-mode's window visible when we visit sources from diff-mode References: <87a8yzy5t4.fsf@secretsauce.net> <551456ED.8060101@gmx.at> <87twx4wztk.fsf@secretsauce.net> <55183DDD.7070303@gmx.at> <87r3s7wpe2.fsf@secretsauce.net> In-Reply-To: <87r3s7wpe2.fsf@secretsauce.net> Content-Type: multipart/mixed; boundary="------------020105050308070105050308" X-Provags-ID: V03:K0:I4pGNvwCRHQeZmdQX5M2Lwhv/9muRu+O2T355E2+0cFNwqEO2QL gL4TEGyp6tPO1FCxw/rNzlWuNxX95yhyEqOtNvq8M8TExK2DZmli6m8B/Z3fBeDqdBn6mXV l8+MSLCbI/YpSVIYSCQitJyGM0i2QxSsdzhNX/HAmy6MTY8BFEnY10o/gqZ0GG/CgE5kfIJ GGXtpUoXgogBtRIzP+s7w== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 20206 Cc: 20206@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) This is a multi-part message in MIME format. --------------020105050308070105050308 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit > I'm not sure what you mean: '((inhibit-same-window . t)) is not a valid > as an action argument to display-buffer, Sorry, I meant '(nil (inhibit-same-window . t)). > and emacs barfs if I try to use > it as such. I'm not at all married to using display-buffer-pop-up-window > here. If you have a better idea for solving 19901 (or if you think > there's nothing to fix), then I'm fine with it. I'm afraid we are miscommunicating or I am misssing something. You propose the following change: - (pop-to-buffer (current-buffer)) + (pop-to-buffer (current-buffer) '(display-buffer-use-some-window (inhibit-same-window . t))) I think this precludes the following scenario: Consider a frame that contains two windows. The user has set `split-height-threshold' and/or `split-width-threshold' to very small values which easily allow further splitting. In this case, a `pop-to-buffer' call for a buffer that doesn't appear on the frame yet will usually try to split one of the two windows and show the buffer in a third one. Agreed? Now with your proposed change `pop-to-buffer' will always use the "other window" for displaying the current buffer, thus overriding the user's customizations of `split-height-threshold' and `split-width-threshold'. The reason is that `display-buffer-pop-up-window' will not be called because `display-buffer-use-some-window' is always called first. Do you agree? And can we agree that such behavior would be wrong? Also, a user who wants to show the buffer in a separate frame via say (setq pop-up-frames t) will be disappointed as well. With a two windows frame he'll never get a new frame. Agreed? Maybe (pop-to-buffer (current-buffer) t) is already what we want here because we know that the current buffer is not shown in the selected window. Otherwise we could try a patch like the one I attached. Then we could do ... (pop-to-buffer (current-buffer) '(nil (previous-window))) ... if I got it right this time. WDYT? > Another wrinkle is that the behavior reported in 19901 as a bug is only > observable with particular geometries of the emacs X11 window. On my > machine, 19901 is reproducible if emacs takes up my whole screen > (1440x1050), but not if it takes only half (720x1050). Presumably emacs > thinks that splitting into a 3rd window will create new windows that are > too narrow. That is all to say that maybe 19901 is not a bug. I have no problems with Bug#19901. Let's care only about Bug#20206 here. martin --------------020105050308070105050308 Content-Type: text/plain; charset=windows-1252; name="window.el.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="window.el.diff" --- a/lisp/window.el +++ b/lisp/window.el @@ -6371,6 +6371,10 @@ Recognized alist entries include: window that already displays the buffer. See `display-buffer-reuse-window'. + `previous-window' -- A window `display-buffer-in-previous-window' + should use or nil to not try finding such a + window. + `pop-up-frame-parameters' -- Value specifies an alist of frame parameters to give a new frame, if one is created. @@ -6678,43 +6682,47 @@ selected frame if `display-buffer-reuse-frames' and `pop-up-frames' are both nil; search all frames on the current terminal if either of those variables is non-nil. -If ALIST has a `previous-window' entry, the window specified by -that entry will override any other window found by the methods -above, even if that window never showed BUFFER before." - (let* ((alist-entry (assq 'reusable-frames alist)) - (inhibit-same-window - (cdr (assq 'inhibit-same-window alist))) - (frames (cond - (alist-entry (cdr alist-entry)) - ((if (eq pop-up-frames 'graphic-only) - (display-graphic-p) - pop-up-frames) - 0) - (display-buffer-reuse-frames 0) - (t (last-nonminibuffer-frame)))) - best-window second-best-window window) - ;; Scan windows whether they have shown the buffer recently. - (catch 'best - (dolist (window (window-list-1 (frame-first-window) 'nomini frames)) - (when (and (assq buffer (window-prev-buffers window)) - (not (window-dedicated-p window))) - (if (eq window (selected-window)) - (unless inhibit-same-window - (setq second-best-window window)) - (setq best-window window) - (throw 'best t))))) - ;; When ALIST has a `previous-window' entry, that entry may override - ;; anything we found so far. - (when (and (setq window (cdr (assq 'previous-window alist))) - (window-live-p window) - (not (window-dedicated-p window))) - (if (eq window (selected-window)) - (unless inhibit-same-window - (setq second-best-window window)) - (setq best-window window))) - ;; Return best or second best window found. - (when (setq window (or best-window second-best-window)) - (window--display-buffer buffer window 'reuse alist)))) +If ALIST has a `previous-window' entry, the window specified in +the cdr of that entry will override any other window found by the +methods above, even if that window never showed BUFFER before. +If the cdr of that entry is nil, do not try to find a window that +previously showed BUFFER." + (unless (let ((previous-window (assq 'previous-window alist))) + (and previous-window (not (cdr previous-window)))) + (let* ((alist-entry (assq 'reusable-frames alist)) + (inhibit-same-window + (cdr (assq 'inhibit-same-window alist))) + (frames (cond + (alist-entry (cdr alist-entry)) + ((if (eq pop-up-frames 'graphic-only) + (display-graphic-p) + pop-up-frames) + 0) + (display-buffer-reuse-frames 0) + (t (last-nonminibuffer-frame)))) + best-window second-best-window window) + ;; Scan windows whether they have shown the buffer recently. + (catch 'best + (dolist (window (window-list-1 (frame-first-window) 'nomini frames)) + (when (and (assq buffer (window-prev-buffers window)) + (not (window-dedicated-p window))) + (if (eq window (selected-window)) + (unless inhibit-same-window + (setq second-best-window window)) + (setq best-window window) + (throw 'best t))))) + ;; When ALIST has a `previous-window' entry, that entry may override + ;; anything we found so far. + (when (and (setq window (cdr (assq 'previous-window alist))) + (window-live-p window) + (not (window-dedicated-p window))) + (if (eq window (selected-window)) + (unless inhibit-same-window + (setq second-best-window window)) + (setq best-window window))) + ;; Return best or second best window found. + (when (setq window (or best-window second-best-window)) + (window--display-buffer buffer window 'reuse alist))))) (defun display-buffer-use-some-window (buffer alist) "Display BUFFER in an existing window. --------------020105050308070105050308-- From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 30 04:37:49 2015 Received: (at 20206) by debbugs.gnu.org; 30 Mar 2015 08:37:49 +0000 Received: from localhost ([127.0.0.1]:39999 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YcVCe-0008SY-UX for submit@debbugs.gnu.org; Mon, 30 Mar 2015 04:37:49 -0400 Received: from mout.gmx.net ([212.227.15.15]:61963) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YcVCc-0008S6-G4 for 20206@debbugs.gnu.org; Mon, 30 Mar 2015 04:37:47 -0400 Received: from [194.166.85.52] ([194.166.85.52]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0LoVBq-1Z5nLC26Ac-00gaXn; Mon, 30 Mar 2015 10:37:40 +0200 Message-ID: <55190B52.4030603@gmx.at> Date: Mon, 30 Mar 2015 10:37:38 +0200 From: martin rudalics MIME-Version: 1.0 To: Dima Kogan Subject: Re: bug#20206: 25.0.50; [PATCH] keep diff-mode's window visible when we visit sources from diff-mode References: <87a8yzy5t4.fsf@secretsauce.net> <551456ED.8060101@gmx.at> <871tk9y55v.fsf@secretsauce.net> <55167B5F.5040300@gmx.at> <87vbhkx054.fsf@secretsauce.net> <55183DD8.8000709@gmx.at> <87pp7rwojr.fsf@secretsauce.net> In-Reply-To: <87pp7rwojr.fsf@secretsauce.net> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:6w126c/bToyhi04ioGYqO5q8AUwyDG3CGEybil0ytpcR7ADjqh6 y1zZMVzI0LJ5S4LQLEa3e5V2YAwjcCLt6S75z0wX67Sb/fA4zyFx6AF5tyMw5tEMglKlG+z Ps2HwVizSY0upDZhd/IlhOBXPQ03vtZS43Ar/uZkIhcN5jiKoDoZ2FWq612mSwnrFAjxzxx p8EZSXbHgDg8vh8Ljv5+A== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 20206 Cc: 20206@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > 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. OK. I believe you. > 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? The exclusion would be one and one only: namely that the buffer these functions are supposed to show has appeared in the selected window before. In general a user might want to see *Help* or *info* at a location where she has seen it before and not literally jump through the available windows of the frame. Maybe this misfires in the case at hand. martin From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 13 10:34:04 2015 Received: (at 20206) by debbugs.gnu.org; 13 Apr 2015 14:34:04 +0000 Received: from localhost ([127.0.0.1]:55111 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YhfR6-00049W-1y for submit@debbugs.gnu.org; Mon, 13 Apr 2015 10:34:04 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]:39578) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YhfR3-000490-9C for 20206@debbugs.gnu.org; Mon, 13 Apr 2015 10:34:02 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NMR00D001M3XH00@a-mtaout20.012.net.il> for 20206@debbugs.gnu.org; Mon, 13 Apr 2015 17:33:54 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NMR00DLV1SHY200@a-mtaout20.012.net.il>; Mon, 13 Apr 2015 17:33:54 +0300 (IDT) Date: Mon, 13 Apr 2015 17:34:03 +0300 From: Eli Zaretskii Subject: Re: bug#20206: 25.0.50; [PATCH] keep diff-mode's window visible when we visit sources from diff-mode In-reply-to: <552BB316.1000204@gmx.at> X-012-Sender: halo1@inter.net.il To: martin rudalics Message-id: <83y4lwcd2c.fsf@gnu.org> References: "cone.1428897239.195461.31778.1004@monster.email-scan.com" <552BB316.1000204@gmx.at> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 20206 Cc: mrsam@courier-mta.com, 20206@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Mon, 13 Apr 2015 14:14:14 +0200 > From: martin rudalics > Cc: help-gnu-emacs@gnu.org > > > The change in behavior is when there are already two buffers being shown, with different files. So, with two files, a and b: > > > > > > $ emacs -Q a b > > > > I get just "b" displayed. > > > > ^X^B^Xo, cursor down, Enter. > > > > I get the "b" file in the top window, "a" file in the bottom window, with the cursor in the "a" file's window. > > > > > > ^X^B > > > > The buffer window now replaces the "a" file, where the cursor was, and the cursor now winds up in the buffer list window. That's the different behavior than what I'm used to. > > > > > > Now, if instead of doing ^X^B at this point, I press ^Xo, moving the cursor back to the "b" file's window, then ^X^B still opens the list buffer in the "a" file's window (also). > > > > > > So, maybe the change in behavior is that list-buffers' window is "sticky", and it tries to open the buffer window in the same window it was previously shown in, apparently. If that window is showing another file buffer, even if the cursor is still in that file buffer the buffer list window still gets opened there, replacing the buffer the cursor was in. > > > > > > So, depending on window history, ^X^B ends up either opening the buffer list window in some other window, than the one the cursor is currently in, or the same window where the cursor is. I'm pretty sure that in earlier versions of emacs, ^X^B never opened the list buffer in the same window the cursor was, at the time the list-buffers command was executed. > > > > > > And that's where my muscle memory is failing me now. I'm used to having multiple windows open; and with the cursor in one of them, ^X^B opening the buffer in some other window, and then typing ^Xo to jump into the buffer list window. Now, depending on where the buffer-list window was previously shown, it will now open in the same window with the cursor, and I realize belatedly, after I already jumped somewhere else with ^Xo. > > Your explanation is correct. The behavior is intended as a feature but > inherently breaks the behavior of `pop-to-buffer', especially when used > interactively. I intend to fix this soonish for Emacs 25 and also post > a simple workaround you can use for Emacs 24.4. I think the following piece of magic will do what Sam wanted: (setq display-buffer-alist '(("\\*Buffer List\\*" . (display-buffer-pop-up-window '((inhibit-same-window . t)))))) If this is desired for all buffers, the regexp should be changed to something that matches any buffer name. From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 14 11:51:30 2015 Received: (at 20206) by debbugs.gnu.org; 14 Apr 2015 15:51:30 +0000 Received: from localhost ([127.0.0.1]:56377 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yi37a-0004H8-1T for submit@debbugs.gnu.org; Tue, 14 Apr 2015 11:51:30 -0400 Received: from mout.gmx.net ([212.227.15.15]:51260) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yi37X-0004Gv-Ki for 20206@debbugs.gnu.org; Tue, 14 Apr 2015 11:51:28 -0400 Received: from [88.117.49.12] ([88.117.49.12]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0MbgKD-1YyKus1pIb-00J2Ze; Tue, 14 Apr 2015 17:51:15 +0200 Message-ID: <552D376E.8030508@gmx.at> Date: Tue, 14 Apr 2015 17:51:10 +0200 From: martin rudalics MIME-Version: 1.0 To: Eli Zaretskii Subject: Re: bug#20206: 25.0.50; [PATCH] keep diff-mode's window visible when we visit sources from diff-mode References: "cone.1428897239.195461.31778.1004@monster.email-scan.com" <552BB316.1000204@gmx.at> <83y4lwcd2c.fsf@gnu.org> In-Reply-To: <83y4lwcd2c.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:zWCOxaeN2GFv5ifP+cQcU6Z/I+LnRe3gVofW/qRgsF5dlHyWw0j yh/6CN0+4Hrx9oZW0dextQTsyNCu5drsq5qpQQ6U1bN2XpCbcveeMnJUhxUUAHR++FWUhWX DXSDQPIy+cfxRk3atQoBpVl7ILdXqro83Q3MBVZNr/eDHUIGI8XbJuMqDmQAGE+o4ugxocE 37IJIv3fBFeIoGo/h0oUg== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 20206 Cc: mrsam@courier-mta.com, 20206@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > I couldn't find an obvious way to contribute to the thread. Please try a "wide reply", "reply to list" or "reply to all" to this mail. > Anyway, I tried adding Eli's suggestions to ~/.emacs; this didn't seem > to make any difference, even if I temporarily remove everything else > from there. What Eli meant was more or less (setq display-buffer-alist '(("\\*Buffer List\\*" nil (inhibit-same-window . t)))) But this is still problematic because it will disallow reusing a window that already shows the buffer list. Even if you explicitly ask for it as in (setq display-buffer-alist '(("\\*Buffer List\\*" display-buffer-reuse-window (inhibit-same-window . t)))) it won't work when you do C-x C-b in the selected window and that window shows the buffer list already. You might call it a feature but when `display-buffer' is used programmatically, popping up or using another window to show a buffer already shown elsewhere is usually considered a nuisance. So something better is needed here. martin From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 25 13:33:24 2019 Received: (at 20206) by debbugs.gnu.org; 25 Jun 2019 17:33:24 +0000 Received: from localhost ([127.0.0.1]:33464 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfpJs-0001cZ-Ij for submit@debbugs.gnu.org; Tue, 25 Jun 2019 13:33:24 -0400 Received: from quimby.gnus.org ([80.91.231.51]:53356) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfpJq-0001cR-QC for 20206@debbugs.gnu.org; Tue, 25 Jun 2019 13:33:23 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hfpJn-0002RR-Hn; Tue, 25 Jun 2019 19:33:21 +0200 From: Lars Ingebrigtsen To: Dima Kogan Subject: Re: bug#20206: 25.0.50; [PATCH] keep diff-mode's window visible when we visit sources from diff-mode References: <87a8yzy5t4.fsf@secretsauce.net> Date: Tue, 25 Jun 2019 19:33:19 +0200 In-Reply-To: <87a8yzy5t4.fsf@secretsauce.net> (Dima Kogan's message of "Thu, 26 Mar 2015 11:25:27 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Dima Kogan writes: > When looking at a patch in diff-mode, one can visit the sources being > patched with several functions, for instance (diff-goto-source). This > patch makes sure that the source buffer does not cover [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 20206 Cc: 20206@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Dima Kogan writes: > When looking at a patch in diff-mode, one can visit the sources being > patched with several functions, for instance (diff-goto-source). This > patch makes sure that the source buffer does not cover up the diff-mode > buffer in its window, but uses any other window instead. This is what happens to me on the Emacs trunk -- has this been fixed in the meantime? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 25 14:10:42 2019 Received: (at 20206) by debbugs.gnu.org; 25 Jun 2019 18:10:42 +0000 Received: from localhost ([127.0.0.1]:33518 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfpty-0004sA-71 for submit@debbugs.gnu.org; Tue, 25 Jun 2019 14:10:42 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:58059) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfptw-0004rr-Cl for 20206@debbugs.gnu.org; Tue, 25 Jun 2019 14:10:41 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 6AD9A2293A; Tue, 25 Jun 2019 14:10:34 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 25 Jun 2019 14:10:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=secretsauce.net; h=references:from:to:cc:subject:in-reply-to:date:message-id :mime-version:content-type; s=fm3; bh=0XbGeXaAd680vstqFIUjY2BoiM KEDBKF9PkIntUwOLU=; b=S83i3d5RsZ+b6dvh7fiSuolHbV914vz4plr/GJ1u8x pOPpWonSpNLjFamh96LVSqSYNWps73uZXIqR9sIil1mbOaPhROUE/ea9djmIIRbK 2s6MF11juAppgJBHAqY+o2QuaLECM47tMIrY6FILlbnLroj3yq+nLQ5B7HXkXbkb gsxmITb8/JvyiSgMMzyg2RRYDalLRqN8KTeTteM2q/h+gnSqVWggoZqYhYiRRP17 iNI1Md2iFdM/tTyl+LlCbl7yDtkInAO/AFV5xS+yF28U8JfFq6m4Jx1J60PyBh4F iol38hK/CfDLxlQbkFEgi2yxDg1AS7bjQTrN8elRqizA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=0XbGeX aAd680vstqFIUjY2BoiMKEDBKF9PkIntUwOLU=; b=sTUi5Chd+tsKQW5nFbnh9h VOzKBfhJCVVzrU2UINZc8HuG6gb3Vh8S5IqyqYqdZSZzypXXUQ+Gd3nhlBczrlKe rvUqpIoY25ufPft/UPDElrQYzwafRjWd3koom6bHlg7OzUz2N0wT02eGjzZAzq4n 7Q592cWF31Z3pCFDlk17Nq9TUMAd6dgK9fgdl1vPS3+GQVbLTCVkJ5ErnIhp28aE VF0wLXaoitMx0gDo2HLpQ+dim5rbSQkYZSwf7/xq5NN0qW6qkm8m0ioQqVOG9ojE tzXKwMSHR3kIdN9hvNdLNKhva2hZnfN3vLOLKjUqhxaFOPID25wf3eiNVBSGUDWg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrudeggdduvddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfhgfhffvufgjfffkgggtsehttdertddtredtnecuhfhrohhmpeffihhmrgcu mfhoghgrnhcuoeguihhmrgesshgvtghrvghtshgruhgtvgdrnhgvtheqnecukfhppedvtd ejrdduhedurddvvdefrddukeelnecurfgrrhgrmhepmhgrihhlfhhrohhmpeguihhmrges shgvtghrvghtshgruhgtvgdrnhgvthenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from shorty.local (nat-guest-189.vonkarman.net [207.151.223.189]) by mail.messagingengine.com (Postfix) with ESMTPA id CC309380074; Tue, 25 Jun 2019 14:10:33 -0400 (EDT) Received: from dima by shorty.local with local (Exim 4.90) (envelope-from ) id 1hfpto-0007jd-Jm; Tue, 25 Jun 2019 11:10:32 -0700 References: <87a8yzy5t4.fsf@secretsauce.net> User-agent: mu4e 1.0; emacs 27.0.50 From: Dima Kogan To: Lars Ingebrigtsen Subject: Re: bug#20206: 25.0.50; [PATCH] keep diff-mode's window visible when we visit sources from diff-mode In-reply-to: Date: Tue, 25 Jun 2019 11:10:32 -0700 Message-ID: <87blyl5yef.fsf@shorty.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 20206 Cc: 20206@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Lars Ingebrigtsen writes: > This is what happens to me on the Emacs trunk -- has this been fixed > in the meantime? Oof, this was a long time ago. I want to say that I still see this now, but intermittently. Probably closing this issue make sense, and I can open a new one if I want to dig into this again. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 25 14:13:37 2019 Received: (at control) by debbugs.gnu.org; 25 Jun 2019 18:13:37 +0000 Received: from localhost ([127.0.0.1]:33528 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfpwn-0004xZ-1P for submit@debbugs.gnu.org; Tue, 25 Jun 2019 14:13:37 -0400 Received: from quimby.gnus.org ([80.91.231.51]:53964) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfpwj-0004xP-O8 for control@debbugs.gnu.org; Tue, 25 Jun 2019 14:13:34 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hfpwg-0002nm-Ex for control@debbugs.gnu.org; Tue, 25 Jun 2019 20:13:32 +0200 Date: Tue, 25 Jun 2019 20:13:30 +0200 Message-Id: To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #20206 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 20206 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) close 20206 quit From unknown Mon Jun 23 00:35:15 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 24 Jul 2019 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator