From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#45688: 28.0.50; New action for display-buffer? Date: Wed, 06 Jan 2021 13:02:12 +0100 Message-ID: <87im8a1dff.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15998"; mail-complaints-to="usenet@ciao.gmane.io" To: 45688@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 06 13:03:23 2021 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 1kx7X9-00042w-9X for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 06 Jan 2021 13:03:23 +0100 Original-Received: from localhost ([::1]:39736 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kx7X8-00039D-1n for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 06 Jan 2021 07:03:22 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46294) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kx7Ws-00038j-RN for bug-gnu-emacs@gnu.org; Wed, 06 Jan 2021 07:03:06 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60339) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kx7Wo-0000su-AL for bug-gnu-emacs@gnu.org; Wed, 06 Jan 2021 07:03:06 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kx7Wo-00087y-7L for bug-gnu-emacs@gnu.org; Wed, 06 Jan 2021 07:03:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Jan 2021 12:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 45688 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.160993455031170 (code B ref -1); Wed, 06 Jan 2021 12:03:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 6 Jan 2021 12:02:30 +0000 Original-Received: from localhost ([127.0.0.1]:43652 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kx7WI-00086g-0F for submit@debbugs.gnu.org; Wed, 06 Jan 2021 07:02:30 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:32986) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kx7WG-00086V-A1 for submit@debbugs.gnu.org; Wed, 06 Jan 2021 07:02:28 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46156) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kx7WG-0002lo-2K for bug-gnu-emacs@gnu.org; Wed, 06 Jan 2021 07:02:28 -0500 Original-Received: from quimby.gnus.org ([2a01:4f9:2b:f0f::2]:42522) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kx7WE-0000cs-Bg for bug-gnu-emacs@gnu.org; Wed, 06 Jan 2021 07:02:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=ipyg62zUlwPHC/a+WxRUg3vtkgKVrgnv/kKK53K9y9k=; b=Fzv2TN7h/WH+6C0AB8d6kubijR heGEvTpqO+729X8NcwD022Xz/PeJ/hfuCVyv3dWGPAqHjJp+t/AEah0HhlcUuyiksWpU7tmwXzMS5 /Tj91Xelad6/k3DA49UByVreahAcII8c4AhWysAyg/NxS/Qp54vm4eG2t7Y2tQXPQrzM=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kx7W2-0005ap-1H; Wed, 06 Jan 2021 13:02:20 +0100 X-Now-Playing: Jane Siberry's _The Speckless Sky_: "The Empty City" Received-SPF: pass client-ip=2a01:4f9:2b:f0f::2; envelope-from=larsi@gnus.org; helo=quimby.gnus.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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" Xref: news.gmane.io gmane.emacs.bugs:197413 Archived-At: Reading this: https://www.jwz.org/blog/2021/01/very-much-do-not-have-my-emacs-setup-just-= how-i-like-it/ I was curious how XEmacs did this command, so I installed XEmacs. If there's two (or one) window, the command works the same in Emacs and XEmacs, but it's interesting what XEmacs does when there's more than two windows: It cycles the windows. Say you start with this: ----- buf 1 ----- buf 2 ----- buf 3 ----- and you're in buf 1. `M-x display-buffer RET RET' then gives you: ----- buf 1 ----- buf 4 ----- buf 3 ----- Repeat, and: ----- buf 1 ----- buf 4 ----- buf 2 ----- Repeat, and: ----- buf 1 ----- buf 3 ----- buf 2 ----- Repeat, and: ----- buf 1 ----- buf 3 ----- buf 4 ----- Repeat, and: ----- buf 1 ----- buf 2 ----- buf 4 ----- That is, it cycles the windows. If there are more windows, it'll go through all the other windows in order, choosing the least-recently-switched-to window. This does indeed seem quite nice, and apparently none of the built-in actions has this effect? Action functions and the action they try to perform are: =E2=80=98display-buffer-same-window=E2=80=99 -- Use the selected window. =E2=80=98display-buffer-reuse-window=E2=80=99 -- Use a window already show= ing the buffer. =E2=80=98display-buffer-in-previous-window=E2=80=99 -- Use a window that d= id show the buffer before. =E2=80=98display-buffer-use-some-window=E2=80=99 -- Use some existing wind= ow. =E2=80=98display-buffer-pop-up-window=E2=80=99 -- Pop up a new window. =E2=80=98display-buffer-below-selected=E2=80=99 -- Use or pop up a window = below the selected one. =E2=80=98display-buffer-at-bottom=E2=80=99 -- Use or pop up a window at the bottom of the selected frame. =E2=80=98display-buffer-pop-up-frame=E2=80=99 -- Show the buffer on a new = frame. =E2=80=98display-buffer-in-child-frame=E2=80=99 -- Show the buffer in a child frame. =E2=80=98display-buffer-no-window=E2=80=99 -- Do not display the buffer and have =E2=80=98display-buffer=E2=80=99 return nil immediately. So I wonder whether it would make sense to add this.=20 In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.23, c= airo version 1.16.0) of 2020-12-31 built on xo Repository revision: 72b8430fea79cb1ebb8c3652babf42a12569ab8a Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12008000 System Description: Debian GNU/Linux bullseye/sid --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no