From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tom Gillespie Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Fix display-buffer-use-some-window to honor reusable-frames Date: Thu, 2 Feb 2023 14:57:18 -0500 Message-ID: References: <834jsccepb.fsf@gnu.org> <30c3d810-ed96-a9bd-c622-1761a138515c@gmx.at> <115a6020-2b86-2653-844e-d19eb03cf62c@gmx.at> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000008da26b05f3bcf931" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="603"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , emacs-devel@gnu.org, larsi@gnus.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Feb 02 20:58:02 2023 Return-path: Envelope-to: ged-emacs-devel@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 1pNfic-000Aab-Bh for ged-emacs-devel@m.gmane-mx.org; Thu, 02 Feb 2023 20:58:02 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pNfiM-0007Zk-Uj; Thu, 02 Feb 2023 14:57:46 -0500 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 1pNfiA-0007Wy-8G for emacs-devel@gnu.org; Thu, 02 Feb 2023 14:57:35 -0500 Original-Received: from mail-yb1-xb2e.google.com ([2607:f8b0:4864:20::b2e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pNfi7-000193-PK; Thu, 02 Feb 2023 14:57:34 -0500 Original-Received: by mail-yb1-xb2e.google.com with SMTP id m199so3677121ybm.4; Thu, 02 Feb 2023 11:57:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=jAe+nOhQe/UR0pesElhK87JTqkQa8SJ8mXvuox8Zih4=; b=AoSMgpKcMMYLQ4CFUw6oCFdVc6ukAB1bwr7Tydh/5EzKL89YR0Ax2oSjJZv6eclXrj j38Fqv/EJN8EE+UMG+DF4Oaa0Amc/IaKQD7V5JIAVgNaoshPUpylW/cFiJfqBNSIKywE pHIGuEvOFXv+jn5DDs3DQS8rZCwNGFZlftHv8sG+Tb4QSLKTkH0VU/lr0fjfqNo3yUgU ric3GhfUVDh/KOba3nPB0QiwzIZrfZnh4qz52uOvniB/GYFFPIE+xgt+QW/dpuVw/hjB F0cAmHQEI/71e2UpUS6eOcOdfscHpOmt7b57tQXzsMjU1CSNIU/bVw0z153BmFQBRTKQ 060Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jAe+nOhQe/UR0pesElhK87JTqkQa8SJ8mXvuox8Zih4=; b=fg9CfVmPv7QpDWM38Zh8CoP37Ryvu6PfwnqzZeczxWeaypJ0wFJNM9IZGFPNNatXeP 9CoS7OzvOKOrxTlVmOWyrgghu0oaCxY35FEkcWLGmtGAqtXc70hoWs5nefE/hVpb5nrC d44VrUKslvqPqnQx0q+icEjRkVw0/Efqbi04/gdHD7qwvod4VCxYeFAkKM5U57od6lDa v6L1TqhAuKHiKT9vvUGs8PS302dEyiZn9CnpV76XuK1gQGDMKQo5ar7ZmpkBnRtXzdVg tVzUiETlNplRmzZddKeO7kjpZmljqhx8mTx45uDdQJzOSek7luOoLzRHyBN+72RIWUVA 2wcA== X-Gm-Message-State: AO0yUKUdUQ5SNMadAJheU/pejcJsIJJ0/wXjRAW3USiFCvfMO1wLejU0 vxzQH9H3mA2ZZVquFpPrjQMKofnE2okn7+w+t7I5l0DhIuc= X-Google-Smtp-Source: AK7set/4jl73fIWEm4f1+aZYANXE5DIOuCfbqNGeoKFr0bLmE5po1c/ftyLx2xsYdivh02nT9gR/JJKnWdvfIoUgPCc= X-Received: by 2002:a25:3491:0:b0:860:c195:14fe with SMTP id b139-20020a253491000000b00860c19514femr158803yba.368.1675367849759; Thu, 02 Feb 2023 11:57:29 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::b2e; envelope-from=tgbugs@gmail.com; helo=mail-yb1-xb2e.google.com 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, 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: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:302913 Archived-At: --0000000000008da26b05f3bcf931 Content-Type: text/plain; charset="UTF-8" This patch produces the desired behavior for me and matches the xemacs behavior when I use the following. (setq display-buffer-base-action '((display-buffer-use-least-recent-window) (not-this-window . t))) The explicit not-this-window is required to get display-buffer-pop-up-window to trigger in a single window single frame case. It might be worth adding a note to that effect to the docstring? > Commenting out these lru-time settings will make > it use as window for *bar* the window it previously used for *foo*. This results in the behavior of the example matching that of xemacs. With the lru-time option enabled the display multiple buffers case seems to be served (I assume there is some other mechanism that can be used to restore the previous window configuration in such cases that is not included in this example). The addition of lru-frames to decouple from reusable-frames is also good. It produces the desired behavior in the context of multiple frames. Many thanks! Tom --0000000000008da26b05f3bcf931 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
This patch produces the desired behavior for me and matche= s
the xemacs behavior when I use the following.

(= setq display-buffer-base-action '((display-buffer-use-least-recent-wind= ow) (not-this-window . t)))

The explicit not-this-= window is required to get display-buffer-pop-up-window
to trigger= in a single window single frame case. It might be worth adding a note
to that effect to the docstring?

> Commen= ting out these lru-time settings will make
> it use as window for *ba= r* the window it previously used for *foo*.

This results in the behavior of the example matching tha= t of xemacs.
With the lru-time option enabled the display multipl= e buffers case seems
to be served (I assume there is some other m= echanism that can be used
to restore the previous window configur= ation in such cases that is not
included in this example).
<= div>
The addition of lru-frames to decouple from reusable-fra= mes is also good.
It produces the desired behavior in the context= of multiple frames.

Many thanks!
Tom
--0000000000008da26b05f3bcf931--