From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#18181: bug in display-buffer-below-selected Date: Tue, 05 Aug 2014 10:36:09 +0200 Message-ID: <53E09779.6000005@gmx.at> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1407227844 22012 80.91.229.3 (5 Aug 2014 08:37:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 Aug 2014 08:37:24 +0000 (UTC) Cc: 18181@debbugs.gnu.org To: Trevor Jim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 05 10:37:18 2014 Return-path: 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 ) id 1XEaFB-0000WT-Eq for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Aug 2014 10:37:17 +0200 Original-Received: from localhost ([::1]:57748 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEaFA-00006K-Pp for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Aug 2014 04:37:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60598) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEaF2-00005N-AA for bug-gnu-emacs@gnu.org; Tue, 05 Aug 2014 04:37:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XEaEw-0000GA-Cu for bug-gnu-emacs@gnu.org; Tue, 05 Aug 2014 04:37:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51287) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEaEw-0000G6-9a for bug-gnu-emacs@gnu.org; Tue, 05 Aug 2014 04:37:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XEaEv-0007nV-Pi for bug-gnu-emacs@gnu.org; Tue, 05 Aug 2014 04:37:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Aug 2014 08:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18181 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 18181-submit@debbugs.gnu.org id=B18181.140722780229941 (code B ref 18181); Tue, 05 Aug 2014 08:37:01 +0000 Original-Received: (at 18181) by debbugs.gnu.org; 5 Aug 2014 08:36:42 +0000 Original-Received: from localhost ([127.0.0.1]:58230 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XEaEb-0007mq-AE for submit@debbugs.gnu.org; Tue, 05 Aug 2014 04:36:41 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:61124) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XEaEY-0007md-Ta for 18181@debbugs.gnu.org; Tue, 05 Aug 2014 04:36:40 -0400 Original-Received: from [93.82.78.228] ([93.82.78.228]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0MN1j6-1XLAsH130K-006cMB; Tue, 05 Aug 2014 10:36:29 +0200 In-Reply-To: X-Provags-ID: V03:K0:wgDcc0xmeNNR90B4R4hUv8tF2M3xV5wyQSKAOqlLtrLBmx881Y3 NoL2pYW9zYM6v7L7JtieByp14ntrH+Z+wtNDe7juHPiLVbP/zSOQT+1q1bJ5uQYMraXJNs6 +JWHY0fR8YX3Vv7VDaPEW3timIdM53WukUg1PXzmfcRG+xeVGoxHMZArQLzyVO30aZYpF2F rcE+QEfQBFHPo3dtl78GA== 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" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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:92119 Archived-At: >> This is the intended behavior > > OK. I'm afraid you don't like it. But let me explain why it's this way: As a first step, `display-buffer' usually searches all windows whether the buffer is already displayed. This search doesn't come without any cost because we have to check whether the selected window or another frame are eligible. Hence, it makes sense to do that search in the separate action function `display-buffer-reuse-window'. Usually, that function is the very first tried by `display-buffer'. The remaining action functions have been written based on the idea that `display-buffer-reuse-window' already failed to find a suitable window and either a new window or one that doesn't display the buffer already has to be provided. > Just FYI however, there has been a change in behavior. It's possible that other software has been affected by the change. For example, the reason I used display-buffer-below-selected was because I saw it used in rmail. You might want to make sure that rmail is still working correctly. Can you elaborate how rmail might be affected by this? > I'm not sure how it corresponds to bzr but you can see the git commit here: > > http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=6a5d9e9a3247566bf69575444e2a1f75f5b3e021 > > With that commit I see the new behavior. Before that commit, all the way up to 24.3 at least, I see the old behavior. I understand what you mean now. That indeed changed the behavior for the "frame has more than one window" case. Though IIRC its intention was to handle the case where the buffer is _not_ displayed yet, a fact `display-buffer-reuse-window' should have implicitly checked before. > Also: I have to say that looking at the documentation it is hard to say what the intended behavior is. As a rule: The idea is that an application should always try `display-buffer-reuse-window' first unless the intended behavior is to strictly use a new window or one that displays another buffer. If you (or anyone else) have any good ideas how to change the documentation such that this idea becomes immediately evident, please don't hesitate to propose the necessary change. I have not written the present documentation and my English probably isn't well enough to do the job. Thanks, martin