From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#70949: display-buffer-choose-some-window Date: Tue, 28 May 2024 10:05:41 +0200 Message-ID: <963412d9-85b9-4afe-a29f-52981f24aa5b@gmx.at> References: <86jzjwqqmd.fsf@mail.linkov.net> <8d1947c7-a4d1-4920-8638-f8ae17acfe65@gmx.at> <86r0e32fnj.fsf@mail.linkov.net> <867cft0xt2.fsf@mail.linkov.net> <86ed9xvz3o.fsf@mail.linkov.net> <73251208-1e4c-4231-ae58-faf82363f241@gmx.at> <86jzjoo23l.fsf@mail.linkov.net> <9e29cbbc-65ee-4dd8-8a41-539946e19a7c@gmx.at> <86cypfm6s7.fsf@mail.linkov.net> <86o78xm9y5.fsf@mail.linkov.net> <78dfee56-80b4-4ba7-a012-df31abd21743@gmx.at> <86sey8jv66.fsf@mail.linkov.net> <86zfsfqgtl.fsf@mail.linkov.net> <86plt7dyvu.fsf@mail.linkov.net> Reply-To: martin rudalics Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8498"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: 70949@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 28 10:06:09 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sBrqS-0001wO-MZ for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 28 May 2024 10:06:08 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sBrqE-0007x4-As; Tue, 28 May 2024 04:05:54 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sBrqC-0007wr-OF for bug-gnu-emacs@gnu.org; Tue, 28 May 2024 04:05:52 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sBrqC-0007Xi-Fg for bug-gnu-emacs@gnu.org; Tue, 28 May 2024 04:05:52 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sBrqL-0003yk-Js for bug-gnu-emacs@gnu.org; Tue, 28 May 2024 04:06: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, 28 May 2024 08:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70949 X-GNU-PR-Package: emacs Original-Received: via spool by 70949-submit@debbugs.gnu.org id=B70949.171688356015287 (code B ref 70949); Tue, 28 May 2024 08:06:01 +0000 Original-Received: (at 70949) by debbugs.gnu.org; 28 May 2024 08:06:00 +0000 Original-Received: from localhost ([127.0.0.1]:45625 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sBrqJ-0003yU-Pr for submit@debbugs.gnu.org; Tue, 28 May 2024 04:06:00 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]:32791) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sBrqI-0003yI-Bt for 70949@debbugs.gnu.org; Tue, 28 May 2024 04:05:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at; s=s31663417; t=1716883542; x=1717488342; i=rudalics@gmx.at; bh=NH0pdDh2Fw9j1/X8R0+ZzMNI+/V48uQY0RntJgp9TJ8=; h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc: References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=IMmRoI9TdvnQKWQhRLwTntCtbniEMLEPfDZyajWMCBZT9aLLvMDSWKbI5PS0QzlH KDOzITznf1TqQ/hLSa9V0oJRxSWPiTxTeXqDbZ8nM1aL3/MzkNItj+DceBq3i9jeL elvTR/XTrhRql9EsElzsYJgb9EZ7RmkCrKIHOe/Bd9AvcKJcepBMxse2t98Un1sDg KNc1M977oMnY6tOZPmmSzV9DZMkjFlnFtKoKwLBNIPT3xKms1YJroAN+npprYUbU4 eM+0SPYz6nVVuUhkR033T1tv++chfI7bpzt+iHqVQ984P9iAjUVM1JMbRaeEChocS rvYknH1HNE+g8WCJ2w== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from [192.168.31.113] ([213.142.97.114]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MGhuU-1sGpvA2Ajq-00HM9l; Tue, 28 May 2024 10:05:42 +0200 Content-Language: en-US In-Reply-To: <86plt7dyvu.fsf@mail.linkov.net> X-Provags-ID: V03:K1:z79vKSgKWvw0W0VdzcLYHBL7xKzja4E6jTqWVozprR/Wa54OZoy KvAfYkCydcgA91RFAsDQ80AM4hXZXrmxxyVCCnKoWfcsb9o9YXM3nQaafRKQvyTTh5JDyVr sAcCtkmeND1F3BzVmRT53h8iijXbjtt/DPurDzB9oIbCH3191OxN2K73/MATvhwh5j6+4Nh 0MC/zmJ5NUBn645WjbwlQ== UI-OutboundReport: notjunk:1;M01:P0:5imLF4coiJg=;16vof5SPiNS/wTJyCnXa/ZAOlwA T+/W6Y1Og8hldL2ec8EIXJP0QQfybqtBl9ohQ1ehjNp7eyX/KPuk2LdTg+HBidhKoSUn9gQHu v1ypaubSv3/zB4SeswrMbB9bx6URJa6RutMujAT2uTvFvsJq2HsQ+ZtP1Um83h+PQ9XXhW4V+ FkHm58iBz7k46QRxyo6SJ3ikgWhjZVPJuBKk3RmAT+eQmo5g/1LQ+EP+S9/DrMTOQu/6otJcb BM/oo/FOuXAt0p0eRVebzNxTqKG3hgoj1fukfmeAEQ8WXvW7qgdpAfrHKWKEZL0IbOxouNICZ GMuk3n5inJRztFz2SyM6vPy8JWg2bOFcyQNiaImL/lsT2pdTiiuspJiKcThfGrhoDdf1VgsnK xPmru4FD22YC8pSVlnDUcRLvIplKX/S/lKGj5brmt7l3WvItTOsSE9leOE9V3XM/FpxZzQ2Fa yDLi3KnjMvp4orKA9fZkyl0Tt1OgxQBT+6v2ewLNc0tRGGuZNn5xaK1CjHOCVROWDuAaV0fEi T1wcVyS8bVTsRpuSS/DgMIItHFksEeYirqSIGxOcsEFT5XLkVgUZRWUhEo9uwHuyiQME5Cm/W sV+DXOfW7vmNFLTn2z4FVK9icNjGt8Z2QU8QoHqKlmEv8CP5NldZvxm79D7EjXCurMQFyZFFp oEnWThKWOfT25bzSUhiIlTpF1I6XuWcuVHSyGGlvCGqUhykx8PQA3AtAdFWH3bBtLBBV4L4XE dgW9aG2ptmJQntLtBzjUa7KSpTFJO5I/uTeSDrdowVOPev0sU1QjdIDDlAiZabfQVPfa+JlV X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:286081 Archived-At: >> Who would switch to the window? The user or 'display-buffer' itself? > > The user. Tedious to explain and not really practicable. > I don't understand why 'compilation-next-error' does not display > the source buffer? Historical reasons, I suppose. > Currently the main question is where to add display-buffer-in-related-window? > It should be added to display-buffer-fallback-action between > display-buffer-in-previous-window and display-buffer-use-some-window? > If not, then users should add it by customizing display-buffer-base-action? Hopefully it can be merged into 'display-buffer-in-previous-window'. Some random thoughts: I suppose that 'next-error-find-buffer' should determine the "does the selected window show the next-/previous-error capable buffer" predicate and, together with some option, set up either the one window fits all strategy (whether a file buffer should be shown in the results window) or a multiple windows strategy. Always considering the possibility that the results buffer is nowhere shown initially. If 'next-error-find-buffer' finds a buffer other than 'next-error-last-buffer', it should probably tell 'display-buffer' that we apparently start a new series of results, that we shall push the last buffer somehow, start the new series of results, and pop to that last buffer when quitting the new series. 'display-buffer' should then reuse the "same" window in the one-window case or the file window in the multiple windows case to continue with the previous series of results. Whether and how to handle the case where two series of results should be displayed in some intertwined fashion is another question. One thing we should consider carefully is how to side-step the special case that one of the file buffers is already shown in some other window and how to either avoid showing the same buffer twice or rather show it twice when the next error location is not shown in that other window. martin