From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#74361: [PATCH] New option xref-navigation-display-window-action Date: Wed, 20 Nov 2024 21:12:36 +0200 Message-ID: <2ef677aa-1433-4aaa-92a5-c600774dd457@gutov.dev> References: <87msi1ueb0.fsf@mail.linkov.net> <4256f446-e11b-450c-b455-131cb75acab0@gutov.dev> <871pzbj8mq.fsf@mail.linkov.net> <87sernhxoa.fsf@mail.linkov.net> <875xoi4cei.fsf@mail.linkov.net> 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="29280"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: martin rudalics , 74361@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 20 20:13:29 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 1tDq8l-0007S0-7Y for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 20 Nov 2024 20:13:27 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tDq8S-0006Al-K3; Wed, 20 Nov 2024 14:13:08 -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 1tDq8N-0006AD-Gz for bug-gnu-emacs@gnu.org; Wed, 20 Nov 2024 14:13:04 -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 1tDq8N-0004pT-7D for bug-gnu-emacs@gnu.org; Wed, 20 Nov 2024 14:13:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:From:References:MIME-Version:Date:To:Subject; bh=8snatnoYhHrUL5pl16+oA56+cV7BkqJdy6Ipnqa+FGw=; b=US4Srn0AZBeqVcs0gDJL2EVTXgc3SJc0axbTA5yEZF2ahunepNnUOoaqAkrwsKLVzZhMgGrTD+/hWXwzxBBTLKR3nRch1q3ub6p0XF5xKqIDTWoBxyQeD6ctkUJRQI0isjMBC1C/JoqjI4YB2eYsiCkS00EcIGX5laZK/rld3+x4vF5TF/Of2ts2JqF69i/VDrASVDpc4BHMp0bWZ6CrusQpaAnc3D8EQvEnFPjw8mI/85Kpa6zpwKWsxGK5IDTjfhloDs1K8UMc1MTShrZA3bz5qchP8N0ocq01lJJnnjzFsez+9cSBjhlUa6vLBpdoulql/ouD+LYWTOtnWtk5mg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tDq8M-0003VO-W5 for bug-gnu-emacs@gnu.org; Wed, 20 Nov 2024 14:13:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 20 Nov 2024 19:13:02 +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.173212996713429 (code B ref 74361); Wed, 20 Nov 2024 19:13:02 +0000 Original-Received: (at 74361) by debbugs.gnu.org; 20 Nov 2024 19:12:47 +0000 Original-Received: from localhost ([127.0.0.1]:47799 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tDq86-0003UW-Iy for submit@debbugs.gnu.org; Wed, 20 Nov 2024 14:12:46 -0500 Original-Received: from fout-b7-smtp.messagingengine.com ([202.12.124.150]:39147) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tDq84-0003UJ-IW for 74361@debbugs.gnu.org; Wed, 20 Nov 2024 14:12:45 -0500 Original-Received: from phl-compute-08.internal (phl-compute-08.phl.internal [10.202.2.48]) by mailfout.stl.internal (Postfix) with ESMTP id 4BA411140114; Wed, 20 Nov 2024 14:12:39 -0500 (EST) Original-Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-08.internal (MEProxy); Wed, 20 Nov 2024 14:12:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1732129959; x=1732216359; bh=8snatnoYhHrUL5pl16+oA56+cV7BkqJdy6Ipnqa+FGw=; b= AZVUQMQPG+Gk8OT2ti+tlZOvd9BU9M2ixp5AuDZ2qRBtjaI0enYXllf7kP41dC18 WPaSUfDO67b/N/XZpATQ0Ap3xXzxXopJoBQVDjOpcS2ptPyqiJ4LW90O6dEkEBje 5rBajj7CfZRPFgnoZnqH1NGQUt+PFrdyKHjmorA8Soy7Yiwxjekn8xV9s2RWZTYL E/OWpdAyvhBNzbIotlj7c54dJ8cUB8+z/pHBgwXiiABuudCBTl6QvyCSsxkfkzjH 1guefiGUxqDy9UZytKt4MqulYDZM6tVQH5+3VT2bmBa2qGdyj57PVWGbp4cZe4Ic 3sdbohbcZTwsBWO8us/TMA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1732129959; x= 1732216359; bh=8snatnoYhHrUL5pl16+oA56+cV7BkqJdy6Ipnqa+FGw=; b=e 5s3PJxwJuW2418Y0nRBArXMil2plNSDtrxE8RBouMas8gGKgR0B/4IBadx78kRkg EFdGFrJJA3jmV5Z3HeMrFdfWLdko2jbz+aFMtFpsISRz2CzNLR3i9fC6VyHibwtj nIIUkXsVK3I3CLOxPwcKWP9vcIenu2vf/4nsQhBm49UEmPTsvIqtbiubU30LZvLz 75FRlYk6BqSRWkcUQsE2PxF4aZisQwKI9z6GnwhpuKq95i+JXsGyi5alNbgnTCdL 6KAIZZSD+rluC7N6i1waAupnigq44p1bYCjyUQnu0LQymWzRoq5csI4vSeNGcAX+ oFfksw8GHZCRxTkDPmqHg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrfeeggdduvddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdej necuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdrug gvvheqnecuggftrfgrthhtvghrnhepteduleejgeehtefgheegjeekueehvdevieekueef tddvtdevfefhvdevgedujeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghvpdhnsggprhgtphhtthho peefpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehjuhhriheslhhinhhkohhvrd hnvghtpdhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthdprhgtphhtthhopeej geefieduseguvggssghughhsrdhgnhhurdhorhhg X-ME-Proxy: Feedback-ID: i07de48aa:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 20 Nov 2024 14:12:37 -0500 (EST) Content-Language: en-US In-Reply-To: <875xoi4cei.fsf@mail.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:295695 Archived-At: On 20/11/2024 09:11, Juri Linkov wrote: >> Yep, even the 'mru' strategy doesn't choose the currently selected window, >> so this should also work well, selecting "some window" in a stable fashion >> (whereas 'lru' - the default - uses a different window each time). > Unless the user customizes it to call with NOT-SELECTED=nil explicitly: > > (setq display-buffer-alist > '(((category . xref) > (display-buffer-use-some-window) > (some-window . (lambda (_buffer alist) > (get-mru-window nil nil nil)))))) Yeah, being able to compute the specific window is nice too. > PS: after testing I noticed that in your patch > nil needs to be added as a placeholder for empty action: > > `((xref--display-buffer-in-window) > (category . xref) > (window . ,xref--original-window))) > (t > - '((category . xref)))))) > + '(nil (category . xref)))))) Did you trigger some error with the original patch? LGTM, but I'm not seeing a difference in behavior.