From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#36161: 27.0.50; display-buffer-in-previous-window might choose not to use PREVIOUS-WINDOW Date: Thu, 13 Jun 2019 10:43:56 +0200 Message-ID: References: <4f4fc867-7b6c-161f-68e9-6f5516e8b580@yandex.ru> <78fc4891-dffb-e828-baca-118a5a300c9a@gmx.at> <1f4197c2-05b0-7ab6-41be-605eaf918200@yandex.ru> <3415bbc7-54fd-111e-a18b-0a927d93a7b2@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="255782"; mail-complaints-to="usenet@blaine.gmane.org" To: Dmitry Gutov , 36161@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 13 10:50:47 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hbLRR-0014KU-Hb for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Jun 2019 10:50:46 +0200 Original-Received: from localhost ([::1]:37804 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbLRQ-0002BO-JI for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Jun 2019 04:50:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41077) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbLQq-0002AD-KA for bug-gnu-emacs@gnu.org; Thu, 13 Jun 2019 04:50:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbLQp-0003lY-9b for bug-gnu-emacs@gnu.org; Thu, 13 Jun 2019 04:50:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49209) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hbLQp-0003lT-4D for bug-gnu-emacs@gnu.org; Thu, 13 Jun 2019 04:50:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hbLQo-0007Ma-WA for bug-gnu-emacs@gnu.org; Thu, 13 Jun 2019 04:50:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Jun 2019 08:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36161 X-GNU-PR-Package: emacs Original-Received: via spool by 36161-submit@debbugs.gnu.org id=B36161.156041576028198 (code B ref 36161); Thu, 13 Jun 2019 08:50:02 +0000 Original-Received: (at 36161) by debbugs.gnu.org; 13 Jun 2019 08:49:20 +0000 Original-Received: from localhost ([127.0.0.1]:34516 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hbLQ7-0007Kk-TH for submit@debbugs.gnu.org; Thu, 13 Jun 2019 04:49:20 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:33489) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hbLQ5-0007KQ-Mg for 36161@debbugs.gnu.org; Thu, 13 Jun 2019 04:49:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1560415749; bh=H7zJKUXZOC/9as6Spyju5dlEU9zpLYrL4vm7jk6kxZM=; h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To; b=MgiHeVIyKIPWB7UZDr5Hx9OJWiFBlaBcYWx3lBnvdTnvBO1Bs9VJNYAGneoQEm/GI P4YUTFPHBOdfuQkWxi4NS0+dtBRSjuYGesWYUt6VZ9AEdwPJ91NvqWbUmWVCllBZP8 icXQvn4/O+OH/whcPLjnYpGyGM8/Pd89N4yv01/4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.101] ([213.162.73.176]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MTzb8-1i1IS449xK-00R0GH; Thu, 13 Jun 2019 10:44:02 +0200 In-Reply-To: <3415bbc7-54fd-111e-a18b-0a927d93a7b2@yandex.ru> Content-Language: de-DE X-Provags-ID: V03:K1:q9b/d5BDpNzrgZnzDfqTJnPhqemPgKD2Wt1VQmQYTbf0QWtSQDU 3rdt8rvafy/0YEqLOWIsxGpmBRlyJQbnXnXRFqCRuZ6Lw4c9HioPcJnpV+zvDIStRNHAmC2 gjwdryxkDWpslHtwzPbX9o7q7OOVOkmWFAEkxV64LxcuZR3MLZRuf2fz0a7RfJwR6nP9qby pWAIVxAuzWVJm//CNaKqA== X-UI-Out-Filterresults: notjunk:1;V03:K0:zqC0e/IPogw=:JWcU8IcX7JNcA6XX/uxFQP NM/6vkIz/R/QYcG82vd47xkak5ZaUJDnQS/9OEa2WkQAlElcRGNiHL0RMQQ040Cv9/AeAf10Y blVgXMUClX+nAv7C/sYOFX2qqCXnM9nj6eibT+FzNPS+ZIFGrHLBtx+XCMIqoZet0uq4la5CF uQl31v9ex08dugI5krnRZW1IEu5BTxvhxJiieZJVX9CrIoHC0xaSj5IWHolWAJK6a7Y47yguB v0a4KOrSWI1Sn2PPoBQrD5RJAHlPrdRm091GCvb0B+ikcqaCtf4x3eD9ztKRuLZm642d/I5Pu Vy2pM+whSos2vqfM29pIC3vzkkdshwLitb0NMsp3CpLq1PSn9eKSUKt2HWrEsMLKdMKsFCxHH 1t/buiCLTfOq0yM8VK39tov5c+73Orv5bSWobCvT94TPeBfc3isnVqxbR8Y6ro+thZ5vA1A6M cnXfaezD12GhAdq4RnaX1FEGxWorUA4Z+NE9PpFC0Dv7EvOkRS1jEO07XQiGT4Fy+ElshH3N7 ictg7EspnfGbTRwiZ1zOlGunjWN9HLd6ymXl2UD9jO8tywAOuRn/5L2zHdStloxz1ww3MryGx 1r1ajr4zlCU6+8RxwtLS2Pgbz3KsQGn+UHd0tHdtnHWj0UBzYm4iqakS3RZm1z6G4mfS8fqc0 QVVCWh92HeLF7BvOiQMpndwYwkSUgfCprIpYwxd8DIQCua9w047T7OlE/UblBD4o9ceM5/EZn 6u767IJX6QDpW0Czaj5hlYfs2Agn2H6kqV/hcowaL1F64xf+7mEa7xxk+xH+WZQ8r2FQGvMg X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.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" Xref: news.gmane.org gmane.emacs.bugs:160481 Archived-At: > > I would have to understand first why one and the same buffer was > > displayed in different windows previously. > > Not sure what answer you're looking for. Suppose a user used switch-to-buffer sometime in the past to show it there? > > I think the question is, if the caller supplies the `previous-window' cons in ALIST, is there a point in second-guessing its choice? > > FWIW, I've only found one user of this function that does that, and it's `debug'. Which behavior do you think that command would prefer? 'display-buffer-in-previous-window' was added to fix a problem with the debugger buffer (Bug#8789). The idea behind it is that once a buffer was shown in a specific window and that window still exists, it would support the principle of least surprise to show it there again. And to _not_ have this function do anything when a window showing that buffer was just ephemeral and got deleted in between. In that latter case a more deterministic function (like below-selected, at-bottom) should take over. 'display-buffer-in-previous-window' will work well if it is exclusively used for showing a buffer a second time (maybe together with 'prev-buffer' and 'next-buffer'). It's behavior deteriorates as soon as a user switches to that buffer in some arbitrary fashion. Hence it's more suitable for buffers popping up in special occasions (like, for example, when a bug occurred and the debugger should be entered) and less suitable for buffer editing. A 'previous-window' ALIST entry should continue to support the principle of least surprise by allowing to choose a non-selected window that never showed the buffer before. The selected window, however, should be always either chosen or excluded from choice by special means - either via 'display-buffer-same-window' or using an 'inhibit-same-window' entry. martin