From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#74361: [PATCH] New option xref-navigation-display-window-action Date: Sat, 23 Nov 2024 20:45:51 +0200 Organization: LINKOV.NET Message-ID: <878qt9pz4w.fsf@mail.linkov.net> References: <87msi1ueb0.fsf@mail.linkov.net> <4256f446-e11b-450c-b455-131cb75acab0@gutov.dev> <871pzbj8mq.fsf@mail.linkov.net> <87sernhxoa.fsf@mail.linkov.net> <1d08c589-2d0e-4f10-8c2e-e21c206ac118@gmx.at> <78a96965-31c1-4688-b808-2de09d1832c4@gmx.at> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25524"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) Cc: Dmitry Gutov , 74361@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 23 19:48:21 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 1tEvB6-0006XS-OW for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 23 Nov 2024 19:48:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tEvAp-0004wC-UV; Sat, 23 Nov 2024 13:48:03 -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 1tEvAo-0004w2-Cs for bug-gnu-emacs@gnu.org; Sat, 23 Nov 2024 13:48:02 -0500 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 1tEvAo-0008Qz-3m for bug-gnu-emacs@gnu.org; Sat, 23 Nov 2024 13:48:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=v/f25KUqJV7S1YAtUmsxJUioRSHFvyHPCE8dGYg1Tno=; b=HRfHYos4IpN7Zbyd/zHxEgG8Crg26rdP/rEnDE1TiO71XkE67Zg+JH86argxEKRmpo4wc+irhILV8g1NytonMKKb3aUCHcxe1+yEpLz9WIUz2qaGxANS6M0Z3L6SNatFVSjH3HX5dDTW/xYjfTU30rhl33wmKymltTj7DAJxkqGbC/oMbYkEj5q9BMLT1T81Dl8O2Swoj91d1R7IlpJ7tbsaRlUFEGvy7NAq2vC0zWVycXgZXJiDcjSyyX/NfxgCmaKl4X4zy1B7VgnSaJwDyjpQ9geL6gH9kROryD8LO7mreuiDn5/axLR3/tjyq/SYvlTjPK/I5H2FOILz1t4rqw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tEvAn-0007DD-Ta for bug-gnu-emacs@gnu.org; Sat, 23 Nov 2024 13:48:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Nov 2024 18:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74361 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 74361-submit@debbugs.gnu.org id=B74361.173238763327594 (code B ref 74361); Sat, 23 Nov 2024 18:48:01 +0000 Original-Received: (at 74361) by debbugs.gnu.org; 23 Nov 2024 18:47:13 +0000 Original-Received: from localhost ([127.0.0.1]:59134 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tEvA1-0007B0-1d for submit@debbugs.gnu.org; Sat, 23 Nov 2024 13:47:13 -0500 Original-Received: from relay2-d.mail.gandi.net ([217.70.183.194]:37509) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tEv9z-0007AZ-AS for 74361@debbugs.gnu.org; Sat, 23 Nov 2024 13:47:12 -0500 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 1DE3B40003; Sat, 23 Nov 2024 18:47:03 +0000 (UTC) In-Reply-To: <78a96965-31c1-4688-b808-2de09d1832c4@gmx.at> (martin rudalics's message of "Sat, 23 Nov 2024 10:35:43 +0100") X-GND-Sasl: juri@linkov.net 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:295861 Archived-At: >> In either case, 'display-buffer' would look whether an appropriate >> window exists and use that window, maybe also ignoring certain aspects >> (dedicatedness, minimum size) that would otherwise prevent its use. > > Attached find how a 'category' list entry could be handled by > 'display-buffer-use-some-window' where a 'some-window' entry would be > given precedence. Tested with > > (display-buffer > (get-buffer-create "*foo*") > '((display-buffer-use-some-window) (inhibit-same-window . t) (category . foo))) > > (display-buffer > (get-buffer-create "*bar*") > '((display-buffer-use-some-window) (inhibit-same-window . t) (category . foo))) This is a nice feature. But please use a different name since the 'category' alist entry is reserved exclusively to match display-buffer calls in user's configuration in the user option 'display-buffer-alist'. When using the same name for different purposes then the users won't be able to match by category and not to reuse the same window.