GNU bug report logs - #74361
[PATCH] New option xref-navigation-display-window-action

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Dmitry Gutov <dmitry@HIDDEN>; Keywords: patch; dated Thu, 14 Nov 2024 22:30:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 13 Feb 2025 10:10:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 13 05:10:45 2025
Received: from localhost ([127.0.0.1]:40703 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tiWBA-0002Vf-NN
	for submit <at> debbugs.gnu.org; Thu, 13 Feb 2025 05:10:45 -0500
Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]:55363)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <stefankangas@HIDDEN>)
 id 1tiWB8-0002VJ-3a
 for 74361 <at> debbugs.gnu.org; Thu, 13 Feb 2025 05:10:42 -0500
Received: by mail-ej1-x634.google.com with SMTP id
 a640c23a62f3a-ab7f838b92eso118245666b.2
 for <74361 <at> debbugs.gnu.org>; Thu, 13 Feb 2025 02:10:42 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1739441436; x=1740046236; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=FJmCYiD+MajfnemEWHiujLHDtUsCUvpAttbGFX611mQ=;
 b=HObFfe0mZ1h3MpnfYCRvw/WH81HgkTaKZ0BiUUYjFhE9UE5MVRqzGM9SsN8TLLJ+ZE
 RxKzXaVT34hXc3O1q42kvYqCc5T18CSJpF0jeZvqpqKin/3189j5XkMFp82ib/3BhsRF
 HSXm/Sz1dOL3Stkf6M7PGynIet53R+rmbVl4hnSk1HiRoFyHbjKOYG4zq6YO53mnG/W5
 JtmpL2ezrW5YMGcfp6zU0VNVyyNOsdT8o5ahtn4Swvv/GQIXy3Mx4JdTsFAf76V0Yh2s
 6JJ3BQiX1s1YVn/TozApW+jDHCvtFjQURgwHbgFTaFSUnz68sSKMjs60Pzk5el6oYDYN
 Ouww==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1739441436; x=1740046236;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=FJmCYiD+MajfnemEWHiujLHDtUsCUvpAttbGFX611mQ=;
 b=i7CdrF3sqFKT5KB+BkWzBLPU8lJ42j8x5l2biTEFx3Gw71m6SY7GSQJKurkdOLi03r
 Cnt/iVsdc8ooAH8zt0qG8o5Ao5EFIYfy8liEqhY8d1r6loUn7QRYecfW682iGjCHyYEo
 WwYdq4T4di9jxwKpqra4w0zYu+tlSQn9lFM5jp4u6QKUpxAM5++FBykwgckPAvzqDfId
 xYE1YY6DnuIH9yxuenODZl0rAvZ840Vv5yQKLHwKsLS6tbkb5k2aheIlsvoQ0spG5Yxf
 n4kyoCmfg2EJg7fO9iB/2gbD2HahIWu5zMVRGVuFnHUDXvD3lEZExpV7hqiYOkZWL3ES
 PD4w==
X-Forwarded-Encrypted: i=1;
 AJvYcCUC7WrG9oiAiEI9EnGTpTzeVpWL/A2ku0jWHoh06DJxSJs8fIMwCYb12Rwo+mDeHgQ8+B45dA==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YzPOAfQgIfXZkDmV+FcHkNny65xheWjP63EJJ3yfIzVvyyK2J5y
 Smrj7U/JivLgGYmDhThw2LpgAHudMqBJIa5FbnLhUCxWMRHBLzIJCMmFVvRKSEgGXV1aNrwyHlu
 Rwg+wWIQEDL/QmrArgcE5+KzmVU9ks70OywQZ2w==
X-Gm-Gg: ASbGncvRmAUNEidKMDZkllP8bgHVjRuT1AivHtbj2lj1ophHWfYix8ag4SMp3Yhq1gx
 fP9vZtIP/F0nfCtOL0zWSH1Y4WaGrCMyu5DT0lYvLg9ss6grnJ5eaQ+m0twclcqA0dg9cAUup/U
 w=
X-Google-Smtp-Source: AGHT+IGfmRhz05jDqj0nS04AiD14SRNnFFwDrwmCsTmTdE3a0Y1KNPGRlYn7U3W8+TOg1cMEEvaWxbT2UnfaQjkwmV0=
X-Received: by 2002:a17:907:3f1c:b0:ab7:1816:e8a with SMTP id
 a640c23a62f3a-aba5018d61dmr307711766b.36.1739441435809; Thu, 13 Feb 2025
 02:10:35 -0800 (PST)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Thu, 13 Feb 2025 04:10:34 -0600
From: Stefan Kangas <stefankangas@HIDDEN>
In-Reply-To: <87h67jj3of.fsf@HIDDEN>
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <86ikskvie0.fsf@HIDDEN> <97e7ec85-7e5c-4aa4-a85f-b5f40adc8de6@HIDDEN>
 <8634jov5ir.fsf@HIDDEN> <c5265c5b-b48a-4e48-a52d-79cd956a4082@HIDDEN>
 <86serntf0h.fsf@HIDDEN> <86h680rhxr.fsf@HIDDEN>
 <87h680fotv.fsf@HIDDEN>
 <864j40pfbw.fsf@HIDDEN> <87bjy8e5qc.fsf@HIDDEN>
 <86y11cnyws.fsf@HIDDEN>
 <87iksfpwlr.fsf@HIDDEN> <86jzcvof10.fsf@HIDDEN>
 <87h67xren9.fsf@HIDDEN>
 <864j3xlr2r.fsf@HIDDEN> <87r071oj96.fsf@HIDDEN>
 <8634jhlp3p.fsf@HIDDEN>
 <87o725f5p4.fsf@HIDDEN> <86frnhj7cc.fsf@HIDDEN>
 <87ldx73h7t.fsf@HIDDEN> <87h67jj3of.fsf@HIDDEN>
MIME-Version: 1.0
Date: Thu, 13 Feb 2025 04:10:34 -0600
X-Gm-Features: AWEUYZlmrvwkgttNlPqUfnRrFZh0o5WhBbOtFlvnlbM7EsNu1UWkOXIGyo849TQ
Message-ID: <CADwFkmmVKZtmzJe=7emLZckYM32s39LbB=bufOaQCBSgecEKRw@HIDDEN>
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
To: Juri Linkov <juri@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: dmitry@HIDDEN, Eli Zaretskii <eliz@HIDDEN>, 74361 <at> debbugs.gnu.org,
 rudalics@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.3 (/)

Juri Linkov <juri@HIDDEN> writes:

>>>> Do you mean that the users might want to shoot themselves in the foot
>>>> and remove '(category . comint)' from the default value of
>>>> display-comint-buffer-action?
>>>
>>> Yes, that's the scenario that bothers me.  Users could do that without
>>> understanding the subtleties of the issue.
>>>
>>>> Then indeed we need to move '(category . comint)' directly
>>>> to every display-buffer call that currently uses
>>>> display-comint-buffer-action.
>>>
>>> I think we should do that for Emacs 31, yes.
>>
>> Ok, here is the patch for Emacs 31:
>>
>> diff --git a/etc/NEWS b/etc/NEWS
>> +*** The user option 'display-comint-buffer-action' has been removed.
>> +It has been obsolete since Emacs 30.1.  Use '(category . comint)' instead.
>> +Another user option 'display-tex-shell-buffer-action' has been removed too
>> +for which you can use '(category . tex-shell)'.
>
> This patch is now pushed to master.

Is there anything left to do here, or should the bug be closed?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.
Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefankangas@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 8 Dec 2024 16:55:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 08 11:55:51 2024
Received: from localhost ([127.0.0.1]:51524 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tKKZT-0003Ho-2J
	for submit <at> debbugs.gnu.org; Sun, 08 Dec 2024 11:55:51 -0500
Received: from mout.gmx.net ([212.227.17.20]:48357)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1tKKZR-0003HS-AZ
 for 74361 <at> debbugs.gnu.org; Sun, 08 Dec 2024 11:55:50 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at;
 s=s31663417; t=1733676940; x=1734281740; i=rudalics@HIDDEN;
 bh=en2no8wkcLzw0LSKwbgiLMW+UAS7Ps8YeId9BqIoLLM=;
 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=RGyi6w0vA71+2liJS9IMrvAY8MOyQ+MhQAUEQ2/RrJA0xG2N2GctvZZ0gJxOVQbb
 jpkHC4dt+YsQvw6XSpJkY9QY9Im/UNCgcDa2McU+sagorpXlEHC9Vk5Z6N487+CAb
 fcKQIRtA9rH1OUYSjcetE+/NNRc5prfsXFe7UNrtgeeZSbmsgDoSF0H8qKeWYanBs
 1L1DQEtaP0pJcDeUlLVVXdibN4GGDFl4kqLd5DvyxtJl9d1OXotX7+Jdjl+T8YnC8
 yd+f+cmebfSLDkJibGvjBANwD1XZ7F4OhH8/WMaYq3CLkywlFV+8C6q2utJsamVtn
 qS77mJ7cG19MKtc+fA==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.31.113] ([212.95.5.71]) by mail.gmx.net (mrgmx104
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MpUUm-1tyvei2GZI-00eVfJ; Sun, 08
 Dec 2024 17:55:40 +0100
Message-ID: <4c0f97ff-1ca4-4a4c-a46c-10b7b300eafe@HIDDEN>
Date: Sun, 8 Dec 2024 17:55:39 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
To: Juri Linkov <juri@HIDDEN>
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <e740a50f-ab57-4155-a011-053c3f203841@HIDDEN>
 <78a96965-31c1-4688-b808-2de09d1832c4@HIDDEN>
 <878qt9pz4w.fsf@HIDDEN>
 <05452bef-dd2e-4e93-abdd-6eb391027197@HIDDEN>
 <87y118cyyk.fsf@HIDDEN>
 <f2702b3a-36cc-49d7-a7e5-8833d1f95a3e@HIDDEN>
 <871pyzp6br.fsf@HIDDEN>
 <25443bb1-788a-4f06-9350-5d2c666f6795@HIDDEN>
 <32b8cc56-afa1-40f6-933f-6de0df2b9f63@HIDDEN>
 <c258e801-846a-4408-a913-4f986a483a33@HIDDEN>
 <dcf518ec-4dc5-4dc0-a491-b45f6968a9ae@HIDDEN>
 <688d5119-0900-46a4-86c7-32a9b06cc349@HIDDEN>
 <87ed2v1aec.fsf@HIDDEN>
 <19124901-e749-4daa-bf47-27e12ea619aa@HIDDEN>
 <87mshbj4lk.fsf@HIDDEN>
 <4a81429a-ef9e-473c-989f-cff1314f5633@HIDDEN>
 <8734j3l69p.fsf@HIDDEN>
 <c1151c04-7740-45de-aa71-7dc005ed275b@HIDDEN>
 <87o71qghzf.fsf@HIDDEN>
 <0e432e8e-c17c-4408-8f0d-1236b60e4879@HIDDEN>
 <877c8bwhd9.fsf@HIDDEN>
Content-Language: en-US
From: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <877c8bwhd9.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:DJJzf1f4ged6s1PwrR2tuBfagukINjS7i5EPisbtBRZZHqFFJEK
 lSEZHXPqVt0MZVdc5Kftibr0qmqESrfKoGLh7mrJMgDTh4q36extTqLjMBYCwzE7i7wXR7I
 ESjgSXlO5e7Fu8WgLr+7Jf82g/KUpvU9SWFZWi3BgFyECdmqMuUYqxCVw9dI1vgnrEOpbSN
 uh6JXpHs1Ylo8Ms+V8qhg==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:VAb1mOk399Y=;LmBFRITgvL7rXJhiImiikIHTp+R
 8sa9Pq0eBkdS9ncu09EwmQyUDox7pxes9gJFfR71QdLeW01n4rQlkzk8CxnDlQ7TK3c7Sa/sz
 zjtrcl5Ryt4OoelBWkiKHPZ0qUcZZXqmj1d7d/43MKowXA2DZfKBEdqyCtbvdgCkywmd1xlIF
 3Fn5uVNPaDDAcGrs1oSRZ28x2pC6e9G45baeiA7L9yWdJdxa59vGynVZWpssCCHLldafcl3/Z
 6SFs/9HVCgsnrttgFIPKVBZC5LhfXruqRCJWa8Kd48Yip42qGVP0Nxk59vc3sgbl403NAJoWy
 VlMf7g99rnIDmx29iygE0iUb6res6AEOhM40LL2/yr07clnGKVSIJSC/IH/ZLc+m9F1819h4J
 2SfGcU0SKSQE2sK9aC1Ay+h6vA3A4zI142fMocDS2Irb419iVAWmAcVxiJENpsJL5YQLIrVcW
 mF9LMDYErvwJTy5/qiRd6JhQtwggIFIbNqaz8sz/yAzgvoskaU/pz9xaQ47+5NjUkRykRWciD
 CnM7ByVhgFDw2yI1zUYItZSUjpKV4m2y78fFNi6F/BfDif7i5C+ak1xIVmSskHugpHDKP72mv
 H83Fjo2bH87SByFuPjl9Brh7fbzEQYb6S7u6E9DJFuee3f1fjt8U4H937z9Tod/LfFLe7sGRI
 MCIZ7ilrvaJeermAqbROkvoasTmwjmcuY1Pb4RXEJBpbI8p6v66MwDIhtCcYF58fWPOIAq5I6
 JNP4CXewzRdbo3PT0DBk6Mn7AxyggiWZiDn6OrT7XImK5MNHVQvxLZ/gzDjy0UAGx7/L9kmyn
 zc7njwD2IrZJWwtOm6mFgBZ5qZ8pRprtlOI5Rot+ypKijaH4hZok0H+/OuKfpCvegzGQBLz8c
 JbiHmX5nJRYK/kAQGLRp7r31WkuOrDFL3zYpQJq3sgZ2V99AAJ1xYw+KsOL+jkZTOvR+ZH0eX
 rdwpq3A4fX1xJRoOIV1XTvlhPut5XwqD0jn7WZQkXblasyFtqCPSQd6epSS5IAT3CApnL/eQG
 R0iy+5eyZVsXAZEqs9GouGc4EPkhKZTTn/5WZMoXPlYywmg+znxKTFeR/zAXd7vmdHopRLKE3
 YgWLOtX/v8tJmn+56wHnWEbzQiUyIy
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: Dmitry Gutov <dmitry@HIDDEN>, 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 >> 'display-buffer' per se doesn't care about the current buffer.  The
 >> assumption that the selected window also holds the current buffer is
 >> nowhere guaranteed.  Just think of 'display-buffer' running from a
 >> timer.
 >
 > I meant the buffer that was current at the beginning of the command:
 > (window-buffer (old-selected-window)).

The doc-string of 'old-selected-window' says

   The return value is the window selected the last time window change
   functions were run.

One and the same command may encompass an arbitrary number of redisplays
(think of a command reading the minibuffer) which all may affect the
return value of that function.  So there is no guarantee that
'old-selected-window' will get you what you expect.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 7 Dec 2024 17:19:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 07 12:19:31 2024
Received: from localhost ([127.0.0.1]:48364 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tJySp-0000Bd-Ao
	for submit <at> debbugs.gnu.org; Sat, 07 Dec 2024 12:19:31 -0500
Received: from relay7-d.mail.gandi.net ([217.70.183.200]:37001)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1tJySm-0000BE-Hu
 for 74361 <at> debbugs.gnu.org; Sat, 07 Dec 2024 12:19:29 -0500
Received: by mail.gandi.net (Postfix) with ESMTPSA id D2A7E20002;
 Sat,  7 Dec 2024 17:19:01 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
In-Reply-To: <0e432e8e-c17c-4408-8f0d-1236b60e4879@HIDDEN> (martin rudalics's
 message of "Fri, 6 Dec 2024 09:31:28 +0100")
Organization: LINKOV.NET
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <e740a50f-ab57-4155-a011-053c3f203841@HIDDEN>
 <78a96965-31c1-4688-b808-2de09d1832c4@HIDDEN>
 <878qt9pz4w.fsf@HIDDEN>
 <05452bef-dd2e-4e93-abdd-6eb391027197@HIDDEN>
 <87y118cyyk.fsf@HIDDEN>
 <f2702b3a-36cc-49d7-a7e5-8833d1f95a3e@HIDDEN>
 <871pyzp6br.fsf@HIDDEN>
 <25443bb1-788a-4f06-9350-5d2c666f6795@HIDDEN>
 <32b8cc56-afa1-40f6-933f-6de0df2b9f63@HIDDEN>
 <c258e801-846a-4408-a913-4f986a483a33@HIDDEN>
 <dcf518ec-4dc5-4dc0-a491-b45f6968a9ae@HIDDEN>
 <688d5119-0900-46a4-86c7-32a9b06cc349@HIDDEN>
 <87ed2v1aec.fsf@HIDDEN>
 <19124901-e749-4daa-bf47-27e12ea619aa@HIDDEN>
 <87mshbj4lk.fsf@HIDDEN>
 <4a81429a-ef9e-473c-989f-cff1314f5633@HIDDEN>
 <8734j3l69p.fsf@HIDDEN>
 <c1151c04-7740-45de-aa71-7dc005ed275b@HIDDEN>
 <87o71qghzf.fsf@HIDDEN>
 <0e432e8e-c17c-4408-8f0d-1236b60e4879@HIDDEN>
Date: Sat, 07 Dec 2024 19:18:34 +0200
Message-ID: <877c8bwhd9.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: Dmitry Gutov <dmitry@HIDDEN>, 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>>>>         (with-current-buffer buffer
>>>>           (setq-local display-buffer-previous-window (selected-window)))))
>>>
>>> This relies on 'ofun' selecting a window and would not work for plain
>>> 'display-buffer'.  Right?
>>
>> It should work for plain 'display-buffer' because of using 'with-current-buffer'.
>
> 'display-buffer' per se doesn't care about the current buffer.  The
> assumption that the selected window also holds the current buffer is
> nowhere guaranteed.  Just think of 'display-buffer' running from a
> timer.

I meant the buffer that was current at the beginning of the command:
(window-buffer (old-selected-window)).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 6 Dec 2024 08:31:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 06 03:31:45 2024
Received: from localhost ([127.0.0.1]:41923 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tJTkW-0003Ca-Ql
	for submit <at> debbugs.gnu.org; Fri, 06 Dec 2024 03:31:45 -0500
Received: from mout.gmx.net ([212.227.15.15]:35917)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1tJTkR-0003C6-TS
 for 74361 <at> debbugs.gnu.org; Fri, 06 Dec 2024 03:31:43 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at;
 s=s31663417; t=1733473891; x=1734078691; i=rudalics@HIDDEN;
 bh=ppuVrTpFTBmmUcz4Q1QTPtB7UdizCxqIRdVy9pLqjLU=;
 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=S+8S6wpkllTSAkSQswm1e6DAvGbTmIubS2QEak70ZgrVLxMsxsjiCS1s0Yx0oxs9
 7zwwElOLP4MMKX4jc+gUnnHUAp2YN99XtDTxXPDr2licdzfAQuxMFX2o59e+nSPE8
 pEIWDyIXRumNXY8XCJWhkdt4SU9BZvqdDGXyhmZ0J1qoFah29jOxCMm/cyEezNOwO
 wBL84D9mi/s7/2WP+aIO5I5bybGaSod2N2n8RY/ek665PCaZGVn+Mer5mbtExy/VA
 HpFay7NtWUZcYx5x2AaSZ+yiGJRMBOVFc4cn0r+/Ja6vOM893M5CsmYPbWZbMkCfX
 MiYu4bE4Fbvraf/ibQ==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.31.113] ([213.142.96.233]) by mail.gmx.net (mrgmx004
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M6Ue3-1tHXwZ3H7x-00GnWq; Fri, 06
 Dec 2024 09:31:30 +0100
Message-ID: <0e432e8e-c17c-4408-8f0d-1236b60e4879@HIDDEN>
Date: Fri, 6 Dec 2024 09:31:28 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
To: Juri Linkov <juri@HIDDEN>
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <1d08c589-2d0e-4f10-8c2e-e21c206ac118@HIDDEN>
 <f6fbc018-84e0-4137-8c83-0477ee47beff@HIDDEN>
 <e740a50f-ab57-4155-a011-053c3f203841@HIDDEN>
 <78a96965-31c1-4688-b808-2de09d1832c4@HIDDEN>
 <878qt9pz4w.fsf@HIDDEN>
 <05452bef-dd2e-4e93-abdd-6eb391027197@HIDDEN>
 <87y118cyyk.fsf@HIDDEN>
 <f2702b3a-36cc-49d7-a7e5-8833d1f95a3e@HIDDEN>
 <871pyzp6br.fsf@HIDDEN>
 <25443bb1-788a-4f06-9350-5d2c666f6795@HIDDEN>
 <32b8cc56-afa1-40f6-933f-6de0df2b9f63@HIDDEN>
 <c258e801-846a-4408-a913-4f986a483a33@HIDDEN>
 <dcf518ec-4dc5-4dc0-a491-b45f6968a9ae@HIDDEN>
 <688d5119-0900-46a4-86c7-32a9b06cc349@HIDDEN>
 <87ed2v1aec.fsf@HIDDEN>
 <19124901-e749-4daa-bf47-27e12ea619aa@HIDDEN>
 <87mshbj4lk.fsf@HIDDEN>
 <4a81429a-ef9e-473c-989f-cff1314f5633@HIDDEN>
 <8734j3l69p.fsf@HIDDEN>
 <c1151c04-7740-45de-aa71-7dc005ed275b@HIDDEN>
 <87o71qghzf.fsf@HIDDEN>
Content-Language: en-US
From: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <87o71qghzf.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:sEO6F4VPLFajr4bCp438t703blXAzqoa2KfF2bF41qBRSj4qZyg
 Qb+/nSiWJYUYWI9UrzR4XCz7k/ZbtpToM5aUFSaHJPISU0IPuoLCxpX59dv7QdI5eyXszCD
 s8Bks8/oZoEuEd9MQ1Wy1S2mA/piLZ8b7rRcweEwB7GRiZ8Tpml+XP5qj8WmWocwdOnFdGa
 u5G5bHd2NuMC6l8ZyI/uw==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:EENPbJqk2vc=;dwgFEErBJEmFIX63B1JNohsi2pt
 5hF66VVNmf9kJbtmH82lTgiTKJrPiZTkb4iHmLxCQeAB2HFTPjgikf7pF91BPJDs1/OEMoyw0
 khY9n+44ctvID4wjMb0x5EUhFtVh/rCaLLyPinDJHtlTPqx9sWM3iN1f0S1FLRDqKESIcjVwb
 GgcCfJgHNq8HrvfyqZwhOsBVRfUk2SLjcDAi9hnsIwjAanMvc9j4/cIXqp52o+tom++c4NuhP
 uZi44L8qECeMBNLVoYeAAV2QsRvD/pTEbnAoKYLDGEx2fFRbLKP8YdjKqrABy4qQPC4qm3c7E
 lTxRQfriYljHNQjakl73oD/RPE0GexXfzdTGjXfynGzAceX8JmKoSPSd7CSjRYoLEzVWqUjEX
 FE860KL6dK/07MltEskaz0gXnLALXtEgN59Y7QHtw3AW6VXNfm3dzEX4kksyzI9qzi6/sYZLF
 Vsw8gzyeX1MHz8QkA3hku8rdrVAU1DfMS3N3yoJcE0+O7SF0z4gt4jCBRmabkblCTeA6aHShm
 4QbegDIDH4z0I9m4KefmEnSRCQWJnZxFiZUjnMOkFBkfOyhqwURUHgE/bRMlUq2+eWsLW9z3L
 iEE7e8aJgoocPoFJWAjKTWcG9bNxY4jNey21p7UE2yOt7PE+cz6Hslp4Rcjg5ESUl3AErM0V3
 QJUbT14WYwTniiUwyOTOfM/X5qJ5RWM+RceCIGoPg2km63Jhv/KOhWfTDK+8n0etq3vTBjN4s
 S6XPc8av1f//i+pza0nVM7eC24KhOaFIPeNHWabeMln+nViNcJt+jHloSb7ip4eUiyLgymojF
 Q7CqZfiNa+uii7VWYXkv0leSivkQysC1jVjYYq/1wtj152EY2/oiKrAozgv4V2lyr+GEVVZW8
 Gb8a2RcAWcGUMS1Ae2b3FAx+Wg7bkGsWWwzCEcIaYjhXwudW+1AEyHt8d/ix4q9D5aL141fr/
 X7vHkXnSMlKzByH0EhyharDEUP2OLczCAXfYaycqLyp039U/PeN2IW3m/EZuQYGOcDZhSRNO3
 o0tSxOOYg/X3Pg/VYAYI9BH8uJ/EOq6+litGTQ1kH/PTto0ZUn0ATaHwWngUqPWFm9e6HUo4y
 lrCMvCyycGSx7xgOAGifwVkn5uAtih
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: Dmitry Gutov <dmitry@HIDDEN>, 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 >>>         (with-current-buffer buffer
 >>>           (setq-local display-buffer-previous-window (selected-window)))))
 >>
 >> This relies on 'ofun' selecting a window and would not work for plain
 >> 'display-buffer'.  Right?
 >
 > It should work for plain 'display-buffer' because of using 'with-current-buffer'.

'display-buffer' per se doesn't care about the current buffer.  The
assumption that the selected window also holds the current buffer is
nowhere guaranteed.  Just think of 'display-buffer' running from a
timer.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 5 Dec 2024 18:08:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 05 13:08:21 2024
Received: from localhost ([127.0.0.1]:40709 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tJGGz-0002iQ-GZ
	for submit <at> debbugs.gnu.org; Thu, 05 Dec 2024 13:08:21 -0500
Received: from fout-a8-smtp.messagingengine.com ([103.168.172.151]:54589)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1tJGGw-0002i6-NO
 for 74361 <at> debbugs.gnu.org; Thu, 05 Dec 2024 13:08:19 -0500
Received: from phl-compute-11.internal (phl-compute-11.phl.internal
 [10.202.2.51])
 by mailfout.phl.internal (Postfix) with ESMTP id 4F2B11382041;
 Thu,  5 Dec 2024 13:08:13 -0500 (EST)
Received: from phl-mailfrontend-02 ([10.202.2.163])
 by phl-compute-11.internal (MEProxy); Thu, 05 Dec 2024 13:08:13 -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=fm3; t=1733422093;
 x=1733508493; bh=xKtYt2jUleAPzT/FRAAtJQlPx2keysu+H1EAXyUq/i4=; b=
 M9RGlqDoNXZ5Ei86mDw69pGZk42N4YAuO7u9sa673n2f+RlLvr3/be/mjHZow4Ek
 e5CfGE1l49goaSWhG91YCsbndHFmIwZlNN8V/zaFmqD238q2p2YGF8zZCe5XE1LV
 6ZZbLrJafU2BRO8nVNncxUxMid2dEOJLwwVxL+yQeYPmVV6o1AQW2ijy6ZXBLBNr
 P/DiPvOCwSw8x5UlVOvnNoAhst7sSvKWHbSP0Bj/6l9vhEsT1ftgby/owGU214o8
 CxBAFgtQvYAI/u7lWFhDkwieAGe2QoK/uAHB8tujZ8bIiqgwJ4PpFt5U7KOyMBm6
 jt4NSVYbGj4uM7+RUiew1g==
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=1733422093; x=
 1733508493; bh=xKtYt2jUleAPzT/FRAAtJQlPx2keysu+H1EAXyUq/i4=; b=Y
 JTirqRgXrV3pKi3hm6wzqhGqnDk2YmR2lDC2+Qxa4W9zhAE4rMJx0npjRBaTV8cP
 hGeXj/fkfe2B+IANZUMAJPlKtSZTg+mWbYPo2gjCg9gxc5kOpwjisPjOuxMFeOFU
 7Y/8Y8rqD9QGzZX5p+Nq0uC/RpDF6Idi8xhqb3xsEUknPbW5EEobRC0DMoLvSjIj
 WIUREuon9UXcXQjrdA7naIVNJY0mhaM9bnBcKLDzG4Z7LIhFJHegmdV8/8rDiND3
 d+1sMIJsHQHLnvgbevbUHO7jht5iNYYllK4x4lzwLeqpCdNRLfAaGTowRi/hoB4u
 0o67oaYyZ16s6oe0K5aHg==
X-ME-Sender: <xms:DOxRZ9tb2qm8c9xuUC7FmEq3EXUBViHLbLZaN1jwk8w5N2lC4Y7XIw>
 <xme:DOxRZ2f6WWAnxbhKApWPAOzVsD7Y9eLi_HzGJ6Fwjabu_o0Kjdivt0ycRcTtR53xK
 n5--RNIzpyEO3RW27Y>
X-ME-Received: <xmr:DOxRZwyAnP273OnoaQieq-bB-Zqajx5hqUVBW938fHw66kU3NSskFNxnyxTPIj9PTyfN>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrieejgddutdejucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu
 rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh
 htshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdej
 necuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdrug
 gvvheqnecuggftrfgrthhtvghrnhepteduleejgeehtefgheegjeekueehvdevieekueef
 tddvtdevfefhvdevgedujeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe
 hmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghvpdhnsggprhgtphhtthho
 peefpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehjuhhriheslhhinhhkohhvrd
 hnvghtpdhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthdprhgtphhtthhopeej
 geefieduseguvggssghughhsrdhgnhhurdhorhhg
X-ME-Proxy: <xmx:DOxRZ0O5oE6g2a-lIH_gFbfILoyW4ItwFyIsWaDDpmW-gb0rYuiAXg>
 <xmx:DOxRZ9_X6ADSa9yExiBODWmjCp9pcrHK3caH8Iy00X7smwVa-YVXRg>
 <xmx:DOxRZ0XgkHmaGKL3jTxleGnlTVYLAGvGaHMPgiBe-Wq333lfZIB2bg>
 <xmx:DOxRZ-cMZ_RWlswM4qi6WGLSIzC4BMRymSq6QhOjNAEdor9yOgydSQ>
 <xmx:DexRZ4YpmdElu4bvtUfa_rgJBk-5CJGhKlLOHPu65u_1FcZUfp6vGZ-G>
Feedback-ID: i07de48aa:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu,
 5 Dec 2024 13:08:11 -0500 (EST)
Message-ID: <cd61bb6a-3883-44c2-b021-e3303c20caa2@HIDDEN>
Date: Thu, 5 Dec 2024 20:08:09 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
To: Juri Linkov <juri@HIDDEN>
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <871pzbj8mq.fsf@HIDDEN>
 <c05a2b89-cc0b-4489-9011-7449f306cb19@HIDDEN>
 <87sernhxoa.fsf@HIDDEN>
 <fd3fe857-b1fb-41f6-ab4b-72223948b814@HIDDEN>
 <1d08c589-2d0e-4f10-8c2e-e21c206ac118@HIDDEN>
 <f6fbc018-84e0-4137-8c83-0477ee47beff@HIDDEN>
 <e740a50f-ab57-4155-a011-053c3f203841@HIDDEN>
 <78a96965-31c1-4688-b808-2de09d1832c4@HIDDEN>
 <878qt9pz4w.fsf@HIDDEN>
 <05452bef-dd2e-4e93-abdd-6eb391027197@HIDDEN>
 <87y118cyyk.fsf@HIDDEN>
 <f2702b3a-36cc-49d7-a7e5-8833d1f95a3e@HIDDEN>
 <871pyzp6br.fsf@HIDDEN>
 <25443bb1-788a-4f06-9350-5d2c666f6795@HIDDEN>
 <32b8cc56-afa1-40f6-933f-6de0df2b9f63@HIDDEN>
 <c258e801-846a-4408-a913-4f986a483a33@HIDDEN>
 <dcf518ec-4dc5-4dc0-a491-b45f6968a9ae@HIDDEN>
 <688d5119-0900-46a4-86c7-32a9b06cc349@HIDDEN>
 <87ed2v1aec.fsf@HIDDEN>
 <19124901-e749-4daa-bf47-27e12ea619aa@HIDDEN>
 <87mshbj4lk.fsf@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <87mshbj4lk.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 74361
Cc: martin rudalics <rudalics@HIDDEN>, 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 04/12/2024 09:35, Juri Linkov wrote:
>> The replacement for xref--display-buffer-in-window seems easier to do,
>> IIUC this keeps all the current behavior (but it's also Emacs 31+ only):
>>
>> @@ -690,9 +690,9 @@ xref--show-pos-in-buf
>>                      (window-live-p xref--original-window)
>>                      (or (not (window-dedicated-p xref--original-window))
>>                          (eq (window-buffer xref--original-window) buf)))
>> -                 `((xref--display-buffer-in-window)
>> +                 `((display-buffer-use-some-window)
>>                       (category . xref-jump)
>> -                   (window . ,xref--original-window)))
>> +                   (some-window . ,(cl-constantly xref--original-window))))
> I see no problems with this patch.  Even better would be if Martin agrees
> to modify 'display-buffer-use-some-window' to accept a window in
> '(some-window . WINDOW)'.

Thanks.

In any case, like with some other changes, we should probably wait 
one-two Emacs releases before installing. Or organize it as 
backward-compatible dispatch along two paths, which unfortunately 
doesn't make things simpler in the short run.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 5 Dec 2024 18:01:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 05 13:01:12 2024
Received: from localhost ([127.0.0.1]:40642 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tJGA3-0002Lu-UG
	for submit <at> debbugs.gnu.org; Thu, 05 Dec 2024 13:01:12 -0500
Received: from relay3-d.mail.gandi.net ([217.70.183.195]:39399)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1tJGA1-0002Lc-5x
 for 74361 <at> debbugs.gnu.org; Thu, 05 Dec 2024 13:01:10 -0500
Received: by mail.gandi.net (Postfix) with ESMTPSA id 5EDEC60002;
 Thu,  5 Dec 2024 18:01:02 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
In-Reply-To: <c1151c04-7740-45de-aa71-7dc005ed275b@HIDDEN> (martin rudalics's
 message of "Thu, 5 Dec 2024 10:23:15 +0100")
Organization: LINKOV.NET
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <1d08c589-2d0e-4f10-8c2e-e21c206ac118@HIDDEN>
 <f6fbc018-84e0-4137-8c83-0477ee47beff@HIDDEN>
 <e740a50f-ab57-4155-a011-053c3f203841@HIDDEN>
 <78a96965-31c1-4688-b808-2de09d1832c4@HIDDEN>
 <878qt9pz4w.fsf@HIDDEN>
 <05452bef-dd2e-4e93-abdd-6eb391027197@HIDDEN>
 <87y118cyyk.fsf@HIDDEN>
 <f2702b3a-36cc-49d7-a7e5-8833d1f95a3e@HIDDEN>
 <871pyzp6br.fsf@HIDDEN>
 <25443bb1-788a-4f06-9350-5d2c666f6795@HIDDEN>
 <32b8cc56-afa1-40f6-933f-6de0df2b9f63@HIDDEN>
 <c258e801-846a-4408-a913-4f986a483a33@HIDDEN>
 <dcf518ec-4dc5-4dc0-a491-b45f6968a9ae@HIDDEN>
 <688d5119-0900-46a4-86c7-32a9b06cc349@HIDDEN>
 <87ed2v1aec.fsf@HIDDEN>
 <19124901-e749-4daa-bf47-27e12ea619aa@HIDDEN>
 <87mshbj4lk.fsf@HIDDEN>
 <4a81429a-ef9e-473c-989f-cff1314f5633@HIDDEN>
 <8734j3l69p.fsf@HIDDEN>
 <c1151c04-7740-45de-aa71-7dc005ed275b@HIDDEN>
Date: Thu, 05 Dec 2024 19:52:08 +0200
Message-ID: <87o71qghzf.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: Dmitry Gutov <dmitry@HIDDEN>, 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> Ok.  This reminds me adding '(previous-window . WINDOW)'
>> to 'display-buffer-in-previous-window' with:
>>
>>      (when (and previous-window (symbolp previous-window)
>>                 (boundp previous-window))
>>        (setq previous-window (symbol-value previous-window)))
>
> Where and how is or would this be used?  In the sources all I see is
>
> 		          `((previous-window . ,debugger-previous-window))))))
>
> so I suppose the symbol value would be used in customizations only.

I just tried to understand the differences between
display-buffer-in-previous-window and display-buffer-use-some-window.

>>      (when (and (setq window previous-window)
>> 	       (window-live-p window)
>>
>> Probably we should support both a symbol and a value for 'some-window'
>> as well.
>
> Where and how would this be used?

Mostly in customizations to support both ways:

    `((previous-window . display-buffer-previous-window))
    `((previous-window . ,display-buffer-previous-window))

    `((some-window . display-buffer-some-window))
    `((some-window . ,display-buffer-some-window))

>> BTW, here is an example of using 'previous-window' with an advice on
>> 'window--display-buffer' that could be combined with 'some-window':
>>
>>    (defvar-local display-buffer-previous-window nil)
>>
>>    (add-to-list 'display-buffer-alist
>>                 '((category . xref-jump)
>>                   display-buffer-in-previous-window
>>                   (previous-window . display-buffer-previous-window)
>
> So here 'display-buffer' would retrieve the symbol-value of whatever is
> in the buffer-local value of 'display-buffer-previous-window'.  Right?

Right.

>>                   (inhibit-same-window . nil))
>>                 ;; Append to not override display-buffer-same-window
>>                 'append)
>>
>>    (define-advice xref-goto-xref (:around (ofun &rest args) previous-window)
>>      (let ((buffer (current-buffer)))
>>        (apply ofun args)
>>        (with-current-buffer buffer
>>          (setq-local display-buffer-previous-window (selected-window)))))
>
> This relies on 'ofun' selecting a window and would not work for plain
> 'display-buffer'.  Right?

It should work for plain 'display-buffer' because of using 'with-current-buffer'.

>>    (define-advice window--display-buffer (:around (ofun &rest args) previous-window)
>>      (let ((buffer (current-buffer))
>>            (window (apply ofun args)))
>>        (with-current-buffer buffer
>>          (setq-local display-buffer-previous-window window))
>>        window))
>
> And this assumes that the current buffer is the one where to set the
> variable.  Would this work with a function calling 'xref-goto-xref',
> bound to a key and called interactively with an arbitrary window
> selected?

This is how it's designed to work: to associate the displayed window
with the buffer that was current.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 5 Dec 2024 09:23:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 05 04:23:29 2024
Received: from localhost ([127.0.0.1]:38252 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tJ853-0001ov-Ds
	for submit <at> debbugs.gnu.org; Thu, 05 Dec 2024 04:23:29 -0500
Received: from mout.gmx.net ([212.227.15.18]:46365)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1tJ851-0001og-SJ
 for 74361 <at> debbugs.gnu.org; Thu, 05 Dec 2024 04:23:28 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at;
 s=s31663417; t=1733390596; x=1733995396; i=rudalics@HIDDEN;
 bh=TraqunPv0M3Ba09oLPNzH2RF7tvV2vB1nMGFFTK/itk=;
 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=hpcyYFhyV6UlBv+ttckFb+rFJm4tSj33GEtGf4gPgIvO4m+lWLdNpnAUyYiWulxG
 Cvu+l7QxD0cP4NgKo/2LYavefrfyldOKPNISf4sDNDMNq5mHWL5XpzoqvhpMxZa7y
 ZrT4SE+HRT3Mj8MVxs39powBblVXm4HYyVbUD3UEgwj1lOZQ27M/ArS49kJ6UTR2q
 xCT36Ly3NC2oncF65JcL7gzMZflYbgVSVhBQEQtgWKiii8d4ZA425Ylsjf9OAQ2wd
 bm2Iwz++Meno4JS1Nzg/E+hgico9dnqFF4qxh9kUPjveWNhl7ouCwc/T0CU2zZ22a
 ZbLz2e0JpR7j526X3g==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.31.113] ([213.142.97.121]) by mail.gmx.net (mrgmx004
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MMGN2-1t37OU2U7i-00R25A; Thu, 05
 Dec 2024 10:23:16 +0100
Message-ID: <c1151c04-7740-45de-aa71-7dc005ed275b@HIDDEN>
Date: Thu, 5 Dec 2024 10:23:15 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
To: Juri Linkov <juri@HIDDEN>
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <87sernhxoa.fsf@HIDDEN>
 <fd3fe857-b1fb-41f6-ab4b-72223948b814@HIDDEN>
 <1d08c589-2d0e-4f10-8c2e-e21c206ac118@HIDDEN>
 <f6fbc018-84e0-4137-8c83-0477ee47beff@HIDDEN>
 <e740a50f-ab57-4155-a011-053c3f203841@HIDDEN>
 <78a96965-31c1-4688-b808-2de09d1832c4@HIDDEN>
 <878qt9pz4w.fsf@HIDDEN>
 <05452bef-dd2e-4e93-abdd-6eb391027197@HIDDEN>
 <87y118cyyk.fsf@HIDDEN>
 <f2702b3a-36cc-49d7-a7e5-8833d1f95a3e@HIDDEN>
 <871pyzp6br.fsf@HIDDEN>
 <25443bb1-788a-4f06-9350-5d2c666f6795@HIDDEN>
 <32b8cc56-afa1-40f6-933f-6de0df2b9f63@HIDDEN>
 <c258e801-846a-4408-a913-4f986a483a33@HIDDEN>
 <dcf518ec-4dc5-4dc0-a491-b45f6968a9ae@HIDDEN>
 <688d5119-0900-46a4-86c7-32a9b06cc349@HIDDEN>
 <87ed2v1aec.fsf@HIDDEN>
 <19124901-e749-4daa-bf47-27e12ea619aa@HIDDEN>
 <87mshbj4lk.fsf@HIDDEN>
 <4a81429a-ef9e-473c-989f-cff1314f5633@HIDDEN>
 <8734j3l69p.fsf@HIDDEN>
Content-Language: en-US
From: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <8734j3l69p.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:B1K7U5ngjh68mCmZuDeWjUGxr52My59II3CfkHA9fhN99BlnA05
 dpAkn4eEVFunm8lGkQvJ+yAx6eX+c5SoEgfkuFByJPg8hfC21afO9asckEjGA9fq03pcfK1
 x8bjVHYiEpkHHACwlLz5Ik9GJzsl4GIxQLwvU1RG6J7GObVQRDvSuQz+caetsDphHiLWus0
 TaeCWxXaRtQg0j7P72Q1w==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:T5PW91LEr3Y=;5oug21+l0Fvyadm9XFQdgLHBhhp
 dfdOOD7AwEvNWGIbQ5MlTZagFxrtgaVpknpVk9t7yBrf1vQiEAr78y8ZS/S3nJOGIN45+EHze
 DTK/lTmxyNHY0CrexY8h6QMHjwxHLZSZmn3Bxtv0Shn+QKP07YvybzohZ/TQQizDJAt/kYUMK
 fyk19EJLo8FiwXWZf6i2HV8UIFNdb7UvLWG+adT7pXqd8cMg1ANDIAcF9r2TqxnoBrDD5OKAj
 oAJ5B10SJCG2Qjq8CCqRMd+d6+Ib111r4mFcrJS+T0flcQzDXesgUZAPuWSQ5FGEJxAagSBai
 VZgcotj0OXC8QJMaP7z0SUtOhuV2JIzqknkGp+a70dur2wp7ET8gKrHzXcO0/73inYI89/9XB
 6pYlyc7T1ibWnpK8PIvn4OpBAaaup4lQrUnPv1eiVoESzToYwc6s5MWtvW9uwuqfaAB+hmw2/
 OFPruyoETPknxx8jZXQl1zrUyELGMK+LQfXElBDo/HCZCIYIip7lNy7JS45K5ume+nF/pn3BH
 txoBlj9y1n5Fpa8xMr+S/OdskeIkG9aWTwW1wOpFn/OvZXf8H1ZbHtP9HVgS1y0hXlX1j6YPm
 l8qffVyFfPYbRBLY/f5yf8LNkXLXhssra/ER7HojcyF02GlrIiqWGSYWBLFVccNpz4DDA14Pt
 gIs8RkEqRzMq9gHnfM603jn2UUNKgj74Jyef0g98b0XAxyR4wwsk5UzEOpCw5eT58SNeSEvHZ
 2ENKa4k0KkVK3q4uqPC0/PnlEJf/jA5LAdXijwjOPdKiWkmN6VCms0OxfXwDmeclAiLQybO0G
 z8TEvkV0PhN2xtmtctW7LkNA9D7cj7HeiZqK34wNaLPs2OJR7A8fNC3+wD9n4jDLD8Bcrmq3T
 5QlrTcpS3FTSo5NiNYk9pKCbiJsK5sTrjlVwuzSbsG7vxjXvg5s82wPfkP1inudkQWlg3itKt
 BnzbjKg2SwYShT2HodtRRLpTiaQkg+PcELj0Hl/AJN+IH2rP3ffcj+wzhTx9e+8mwr2qFyiw+
 bIMRzHijF2qoKZC9tmjHVZY7t55F1ZhSi/DYj9zPgTH5IClcXDo3UnPogxB40HJRGIgswh0ff
 Buw7DILPasr9GOUjOeSEPHgtDVwDxx
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: Dmitry Gutov <dmitry@HIDDEN>, 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 > Ok.  This reminds me adding '(previous-window . WINDOW)'
 > to 'display-buffer-in-previous-window' with:
 >
 >      (when (and previous-window (symbolp previous-window)
 >                 (boundp previous-window))
 >        (setq previous-window (symbol-value previous-window)))

Where and how is or would this be used?  In the sources all I see is

		          `((previous-window . ,debugger-previous-window))))))

so I suppose the symbol value would be used in customizations only.

 >      (when (and (setq window previous-window)
 > 	       (window-live-p window)
 >
 > Probably we should support both a symbol and a value for 'some-window'
 > as well.

Where and how would this be used?

 > BTW, here is an example of using 'previous-window' with an advice on
 > 'window--display-buffer' that could be combined with 'some-window':
 >
 >    (defvar-local display-buffer-previous-window nil)
 >
 >    (add-to-list 'display-buffer-alist
 >                 '((category . xref-jump)
 >                   display-buffer-in-previous-window
 >                   (previous-window . display-buffer-previous-window)

So here 'display-buffer' would retrieve the symbol-value of whatever is
in the buffer-local value of 'display-buffer-previous-window'.  Right?

 >                   (inhibit-same-window . nil))
 >                 ;; Append to not override display-buffer-same-window
 >                 'append)
 >
 >    (define-advice xref-goto-xref (:around (ofun &rest args) previous-window)
 >      (let ((buffer (current-buffer)))
 >        (apply ofun args)
 >        (with-current-buffer buffer
 >          (setq-local display-buffer-previous-window (selected-window)))))

This relies on 'ofun' selecting a window and would not work for plain
'display-buffer'.  Right?

 >    (define-advice window--display-buffer (:around (ofun &rest args) previous-window)
 >      (let ((buffer (current-buffer))
 >            (window (apply ofun args)))
 >        (with-current-buffer buffer
 >          (setq-local display-buffer-previous-window window))
 >        window))

And this assumes that the current buffer is the one where to set the
variable.  Would this work with a function calling 'xref-goto-xref',
bound to a key and called interactively with an arbitrary window
selected?

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 4 Dec 2024 17:33:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 04 12:33:02 2024
Received: from localhost ([127.0.0.1]:36653 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tItFF-0005Uu-Fc
	for submit <at> debbugs.gnu.org; Wed, 04 Dec 2024 12:33:01 -0500
Received: from relay8-d.mail.gandi.net ([217.70.183.201]:56269)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1tItFE-0005Ub-A2
 for 74361 <at> debbugs.gnu.org; Wed, 04 Dec 2024 12:33:00 -0500
Received: by mail.gandi.net (Postfix) with ESMTPSA id 123DC1BF206;
 Wed,  4 Dec 2024 17:32:31 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
In-Reply-To: <4a81429a-ef9e-473c-989f-cff1314f5633@HIDDEN> (martin rudalics's
 message of "Wed, 4 Dec 2024 09:00:09 +0100")
Organization: LINKOV.NET
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <87sernhxoa.fsf@HIDDEN>
 <fd3fe857-b1fb-41f6-ab4b-72223948b814@HIDDEN>
 <1d08c589-2d0e-4f10-8c2e-e21c206ac118@HIDDEN>
 <f6fbc018-84e0-4137-8c83-0477ee47beff@HIDDEN>
 <e740a50f-ab57-4155-a011-053c3f203841@HIDDEN>
 <78a96965-31c1-4688-b808-2de09d1832c4@HIDDEN>
 <878qt9pz4w.fsf@HIDDEN>
 <05452bef-dd2e-4e93-abdd-6eb391027197@HIDDEN>
 <87y118cyyk.fsf@HIDDEN>
 <f2702b3a-36cc-49d7-a7e5-8833d1f95a3e@HIDDEN>
 <871pyzp6br.fsf@HIDDEN>
 <25443bb1-788a-4f06-9350-5d2c666f6795@HIDDEN>
 <32b8cc56-afa1-40f6-933f-6de0df2b9f63@HIDDEN>
 <c258e801-846a-4408-a913-4f986a483a33@HIDDEN>
 <dcf518ec-4dc5-4dc0-a491-b45f6968a9ae@HIDDEN>
 <688d5119-0900-46a4-86c7-32a9b06cc349@HIDDEN>
 <87ed2v1aec.fsf@HIDDEN>
 <19124901-e749-4daa-bf47-27e12ea619aa@HIDDEN>
 <87mshbj4lk.fsf@HIDDEN>
 <4a81429a-ef9e-473c-989f-cff1314f5633@HIDDEN>
Date: Wed, 04 Dec 2024 19:14:42 +0200
Message-ID: <8734j3l69p.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: Dmitry Gutov <dmitry@HIDDEN>, 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> I see no problems with this patch.  Even better would be if Martin agrees
>> to modify 'display-buffer-use-some-window' to accept a window in
>> '(some-window . WINDOW)'.
>
> He obviously agrees (provided WINDOW is a live window).

Ok.  This reminds me adding '(previous-window . WINDOW)'
to 'display-buffer-in-previous-window' with:

    (when (and previous-window (symbolp previous-window)
               (boundp previous-window))
      (setq previous-window (symbol-value previous-window)))
    (when (and (setq window previous-window)
	       (window-live-p window)

Probably we should support both a symbol and a value for 'some-window'
as well.

BTW, here is an example of using 'previous-window' with an advice on
'window--display-buffer' that could be combined with 'some-window':

  (defvar-local display-buffer-previous-window nil)

  (add-to-list 'display-buffer-alist
               '((category . xref-jump)
                 display-buffer-in-previous-window
                 (previous-window . display-buffer-previous-window)
                 (inhibit-same-window . nil))
               ;; Append to not override display-buffer-same-window
               'append)

  (define-advice xref-goto-xref (:around (ofun &rest args) previous-window)
    (let ((buffer (current-buffer)))
      (apply ofun args)
      (with-current-buffer buffer
        (setq-local display-buffer-previous-window (selected-window)))))

  (define-advice window--display-buffer (:around (ofun &rest args) previous-window)
    (let ((buffer (current-buffer))
          (window (apply ofun args)))
      (with-current-buffer buffer
        (setq-local display-buffer-previous-window window))
      window))




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 4 Dec 2024 08:00:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 04 03:00:21 2024
Received: from localhost ([127.0.0.1]:34146 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tIkJ3-00027f-M4
	for submit <at> debbugs.gnu.org; Wed, 04 Dec 2024 03:00:21 -0500
Received: from mout.gmx.net ([212.227.17.22]:46257)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1tIkJ1-00023K-46
 for 74361 <at> debbugs.gnu.org; Wed, 04 Dec 2024 03:00:19 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at;
 s=s31663417; t=1733299210; x=1733904010; i=rudalics@HIDDEN;
 bh=YXZ1VI1xTM9xibh0Od/HirGZqPwZhSJMU5USyO0uJTs=;
 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=eEan7m12jvKiUXm3Ad5esv+2A9nPbvsA0Qo8NhE0+VddS7orK4ngBSVkLGpcLdFF
 fUoBIY16YiMwnl1TcnrUSe0mKYNZUw3G8w5oTPqp7vuz7OMi8ey0DqMCd57DDOEoG
 9+5ui27W5EaLMWTCizBi6kb+y31Av1O2orssd6pB2TXMeUcE6u+bsX9qT7+u2NyPB
 0pDkdpzuifLgOjFqG9C8UQAtcm54WNeyqGh6xXbreiRLN1tu/vK8SRNDOCiTvrhMG
 QjlxeusfZ0ZAnvZNFZKo6Qnb2OyEGvGSPWIXrFo7QK1ZzjTIL0hxjdb9P6++SNS7D
 gj9ORs/xx7+JNagahA==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.31.113] ([212.95.8.217]) by mail.gmx.net (mrgmx105
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MS3il-1tD4MM3h7b-00ULWV; Wed, 04
 Dec 2024 09:00:09 +0100
Message-ID: <4a81429a-ef9e-473c-989f-cff1314f5633@HIDDEN>
Date: Wed, 4 Dec 2024 09:00:09 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
To: Juri Linkov <juri@HIDDEN>, Dmitry Gutov <dmitry@HIDDEN>
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <871pzbj8mq.fsf@HIDDEN>
 <c05a2b89-cc0b-4489-9011-7449f306cb19@HIDDEN>
 <87sernhxoa.fsf@HIDDEN>
 <fd3fe857-b1fb-41f6-ab4b-72223948b814@HIDDEN>
 <1d08c589-2d0e-4f10-8c2e-e21c206ac118@HIDDEN>
 <f6fbc018-84e0-4137-8c83-0477ee47beff@HIDDEN>
 <e740a50f-ab57-4155-a011-053c3f203841@HIDDEN>
 <78a96965-31c1-4688-b808-2de09d1832c4@HIDDEN>
 <878qt9pz4w.fsf@HIDDEN>
 <05452bef-dd2e-4e93-abdd-6eb391027197@HIDDEN>
 <87y118cyyk.fsf@HIDDEN>
 <f2702b3a-36cc-49d7-a7e5-8833d1f95a3e@HIDDEN>
 <871pyzp6br.fsf@HIDDEN>
 <25443bb1-788a-4f06-9350-5d2c666f6795@HIDDEN>
 <32b8cc56-afa1-40f6-933f-6de0df2b9f63@HIDDEN>
 <c258e801-846a-4408-a913-4f986a483a33@HIDDEN>
 <dcf518ec-4dc5-4dc0-a491-b45f6968a9ae@HIDDEN>
 <688d5119-0900-46a4-86c7-32a9b06cc349@HIDDEN>
 <87ed2v1aec.fsf@HIDDEN>
 <19124901-e749-4daa-bf47-27e12ea619aa@HIDDEN>
 <87mshbj4lk.fsf@HIDDEN>
Content-Language: en-US
From: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <87mshbj4lk.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:tXo0h3fz2eBWkaRYQNm9MItB5cCdPcnE6yWHYb1p70WJmMEn6G3
 vn8EjUvfbcoq6+dnO6jhMYmAwRZEUWPe5koc5unNVpAp2172MW/QN+d7TjsLpSTeZyp0thN
 Ct3ETvoz2/oyfip2Z743unsTq3JRbv/QyQdaVfoZ4hM/mWVRgjgCenHAs26XeQTUdxoiymL
 aZjAEU51hnOiFNDMbFsnA==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:OBruv2s3HaE=;qDaZZAtnB+KVoOtD9JGzOskWcCI
 gTpjdAEdEpXW+aTZf3Mmm+SQj6oJe4S6t4fm3fjUroeZq7vdpolAulOlCMoG4wMdnFpymidVG
 qk2+qODtUa2wGPKzsACS6Su7Z7S8PcXTQWzYLpekJe9aapPUSpECrFslTHe+nzfxrKFD9Gx4u
 sPXcIt78npopzZijmg6sgAkYhlFd6b8oHmXqu0F8mNr6E2Ol8JZNGtne39cqKIrCjMC00SuGw
 yCPKS3WfK4hoeChmujCGZpgxp8vClJUWee9FVpgToOz/SFn4uuFOyjfxd7I4uFO1myXB1Y83c
 5XOfe9k8uIN3FAUo79DEzvi2kuxpDM8STfpf0sXmZ2bTtsqNONnLOJiiEVg01h4q+/cYOkUf5
 HQuwzxX4GBUrTj3QSULMBLap/Y4x7AAh3cPit8C7hmVXZ4JN3HTl0hI3fOVXVYvaLstyvYZny
 2Vh7R0V7dyA9ZqIO3saQYPGwmCZjB7Kh+2TkZZfJMvQy/f/smeRKVxL20RbNJ4kceUxnw8ynt
 OP6UTHbFZJ/2uwsDX6PZVi1bJ389viq0S8shOsuxKA0jB6m6FhEZCs5WoV7L7tCpFmPWr1CjG
 GADppts0LwkUtXl2Gw290IIc5R085774FmG8mfF8+aB3ChIHw2XWPIanYXGacVlkofYttN0RI
 +LSmOI9tu1nqolgIUyfxzDYgvzE87bffpQdhkitFHqrdME7hwAMKSmLl8H7iXXwtTmeEW/o5b
 zDHweD/qLbHWc279400ORgjN9SM8MU6C0WxdMKiJ1akGYGIJvlacuVZedftOEOXSOFDTL5a7u
 tHO0Ilr1GUApCCdUIDeUJwNcbwop1LHVOqrjyJUOp820pORizpxe9UHcHc+6uQ/tyiwxadUyE
 mKQL2vNuKTQ51EA56B6+E/5nL2PTR5YhiJmNcF71g+9PHrNkFAj7Uuk6NLnqlPlIJlWPtGBXL
 xQ9M5PuqO4g5Q0XFO9f7CAUkvbVo4R970wXpXnew0bx8wyNkx4mZmgTr8qUtNHu1f62n0SjE3
 UkkNNNfJE9soOC5rQK/A8XTqawJ94Xo3LxD++GnM8cfBmjpE3cX82xXeNZzJ95j8Zoem11bgZ
 tg7rKGd1IzmN2xZjOS+PWSS6Nsm/bx
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 > I see no problems with this patch.  Even better would be if Martin agrees
 > to modify 'display-buffer-use-some-window' to accept a window in
 > '(some-window . WINDOW)'.

He obviously agrees (provided WINDOW is a live window).

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 4 Dec 2024 07:42:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 04 02:42:18 2024
Received: from localhost ([127.0.0.1]:33973 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tIk1Z-00016r-Op
	for submit <at> debbugs.gnu.org; Wed, 04 Dec 2024 02:42:18 -0500
Received: from relay1-d.mail.gandi.net ([217.70.183.193]:37667)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1tIk1Y-00016d-2G
 for 74361 <at> debbugs.gnu.org; Wed, 04 Dec 2024 02:42:16 -0500
Received: by mail.gandi.net (Postfix) with ESMTPSA id C74CC240003;
 Wed,  4 Dec 2024 07:41:47 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Dmitry Gutov <dmitry@HIDDEN>
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
In-Reply-To: <19124901-e749-4daa-bf47-27e12ea619aa@HIDDEN> (Dmitry Gutov's
 message of "Thu, 28 Nov 2024 22:27:32 +0200")
Organization: LINKOV.NET
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <871pzbj8mq.fsf@HIDDEN>
 <c05a2b89-cc0b-4489-9011-7449f306cb19@HIDDEN>
 <87sernhxoa.fsf@HIDDEN>
 <fd3fe857-b1fb-41f6-ab4b-72223948b814@HIDDEN>
 <1d08c589-2d0e-4f10-8c2e-e21c206ac118@HIDDEN>
 <f6fbc018-84e0-4137-8c83-0477ee47beff@HIDDEN>
 <e740a50f-ab57-4155-a011-053c3f203841@HIDDEN>
 <78a96965-31c1-4688-b808-2de09d1832c4@HIDDEN>
 <878qt9pz4w.fsf@HIDDEN>
 <05452bef-dd2e-4e93-abdd-6eb391027197@HIDDEN>
 <87y118cyyk.fsf@HIDDEN>
 <f2702b3a-36cc-49d7-a7e5-8833d1f95a3e@HIDDEN>
 <871pyzp6br.fsf@HIDDEN>
 <25443bb1-788a-4f06-9350-5d2c666f6795@HIDDEN>
 <32b8cc56-afa1-40f6-933f-6de0df2b9f63@HIDDEN>
 <c258e801-846a-4408-a913-4f986a483a33@HIDDEN>
 <dcf518ec-4dc5-4dc0-a491-b45f6968a9ae@HIDDEN>
 <688d5119-0900-46a4-86c7-32a9b06cc349@HIDDEN>
 <87ed2v1aec.fsf@HIDDEN>
 <19124901-e749-4daa-bf47-27e12ea619aa@HIDDEN>
Date: Wed, 04 Dec 2024 09:35:27 +0200
Message-ID: <87mshbj4lk.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: martin rudalics <rudalics@HIDDEN>, 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> The replacement for xref--display-buffer-in-window seems easier to do, 
> IIUC this keeps all the current behavior (but it's also Emacs 31+ only):
>
> @@ -690,9 +690,9 @@ xref--show-pos-in-buf
>                     (window-live-p xref--original-window)
>                     (or (not (window-dedicated-p xref--original-window))
>                         (eq (window-buffer xref--original-window) buf)))
> -                 `((xref--display-buffer-in-window)
> +                 `((display-buffer-use-some-window)
>                      (category . xref-jump)
> -                   (window . ,xref--original-window)))
> +                   (some-window . ,(cl-constantly xref--original-window))))

I see no problems with this patch.  Even better would be if Martin agrees
to modify 'display-buffer-use-some-window' to accept a window in
'(some-window . WINDOW)'.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 4 Dec 2024 07:42:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 04 02:42:01 2024
Received: from localhost ([127.0.0.1]:33969 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tIk1J-00015w-DC
	for submit <at> debbugs.gnu.org; Wed, 04 Dec 2024 02:42:01 -0500
Received: from relay9-d.mail.gandi.net ([217.70.183.199]:53895)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1tIk1I-00015g-34
 for 74361 <at> debbugs.gnu.org; Wed, 04 Dec 2024 02:42:00 -0500
Received: by mail.gandi.net (Postfix) with ESMTPSA id CDD0FFF803;
 Wed,  4 Dec 2024 07:41:51 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
In-Reply-To: <87ldx73h7t.fsf@HIDDEN> (Juri Linkov's message of "Mon, 
 25 Nov 2024 09:28:22 +0200")
Organization: LINKOV.NET
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <b0b96c86-d22a-4569-938a-d15a527ced84@HIDDEN>
 <86ikskvie0.fsf@HIDDEN>
 <97e7ec85-7e5c-4aa4-a85f-b5f40adc8de6@HIDDEN>
 <8634jov5ir.fsf@HIDDEN>
 <c5265c5b-b48a-4e48-a52d-79cd956a4082@HIDDEN>
 <86serntf0h.fsf@HIDDEN> <86h680rhxr.fsf@HIDDEN>
 <87h680fotv.fsf@HIDDEN> <864j40pfbw.fsf@HIDDEN>
 <87bjy8e5qc.fsf@HIDDEN> <86y11cnyws.fsf@HIDDEN>
 <87iksfpwlr.fsf@HIDDEN> <86jzcvof10.fsf@HIDDEN>
 <87h67xren9.fsf@HIDDEN> <864j3xlr2r.fsf@HIDDEN>
 <87r071oj96.fsf@HIDDEN> <8634jhlp3p.fsf@HIDDEN>
 <87o725f5p4.fsf@HIDDEN> <86frnhj7cc.fsf@HIDDEN>
 <87ldx73h7t.fsf@HIDDEN>
Date: Wed, 04 Dec 2024 09:41:20 +0200
Message-ID: <87h67jj3of.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: dmitry@HIDDEN, 74361 <at> debbugs.gnu.org, rudalics@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>>> Do you mean that the users might want to shoot themselves in the foot
>>> and remove '(category . comint)' from the default value of
>>> display-comint-buffer-action?
>>
>> Yes, that's the scenario that bothers me.  Users could do that without
>> understanding the subtleties of the issue.
>>
>>> Then indeed we need to move '(category . comint)' directly
>>> to every display-buffer call that currently uses
>>> display-comint-buffer-action.
>>
>> I think we should do that for Emacs 31, yes.
>
> Ok, here is the patch for Emacs 31:
>
> diff --git a/etc/NEWS b/etc/NEWS
> +*** The user option 'display-comint-buffer-action' has been removed.
> +It has been obsolete since Emacs 30.1.  Use '(category . comint)' instead.
> +Another user option 'display-tex-shell-buffer-action' has been removed too
> +for which you can use '(category . tex-shell)'.

This patch is now pushed to master.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 28 Nov 2024 20:27:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 28 15:27:45 2024
Received: from localhost ([127.0.0.1]:39899 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tGl72-0007WT-VH
	for submit <at> debbugs.gnu.org; Thu, 28 Nov 2024 15:27:45 -0500
Received: from fout-b6-smtp.messagingengine.com ([202.12.124.149]:46073)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1tGl70-0007W9-PQ
 for 74361 <at> debbugs.gnu.org; Thu, 28 Nov 2024 15:27:43 -0500
Received: from phl-compute-04.internal (phl-compute-04.phl.internal
 [10.202.2.44])
 by mailfout.stl.internal (Postfix) with ESMTP id 9F909114015F;
 Thu, 28 Nov 2024 15:27:36 -0500 (EST)
Received: from phl-mailfrontend-02 ([10.202.2.163])
 by phl-compute-04.internal (MEProxy); Thu, 28 Nov 2024 15:27:36 -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=fm3; t=1732825656;
 x=1732912056; bh=LibQFs6ccyLB0x6cWTaL+6jFvbp8WHeDeK4OZ7dD0uE=; b=
 RVL8UY6D4JBKutEF6gE6HKiQTB1yZE+8l4qS9GjeCYOkiwFPpb+ELVrYxmi0bSOe
 jFVesAgke1Blm1qLYqpk1FPX/Blus9WL2RJukrLtXfhxSC2iXOOmHNbO0vBZA732
 uwQSsiTVafor33eoO/I4a2URX+SWzIco1dBoqfFMyv9DDkQaekXnLC+R/CO5F1yY
 pI00q/2xQj2SHcCMdL0T9VXaL3wamu706nL9BVsYAndeYO4e15cWxHAgw3PSJ6Fe
 45QGOeZBQq6Nd1KI3l+pjYLiQbtJ/m79FFmhs0/zDiBmiaj3mv6ZC6c2LyLmjgxZ
 3pN8HnBQI1Ck6mTr0Z9ehA==
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=1732825656; x=
 1732912056; bh=LibQFs6ccyLB0x6cWTaL+6jFvbp8WHeDeK4OZ7dD0uE=; b=z
 zZiajZQkQ4q/Pxi9qwNahkzXdAYBft/eFQEmmy9QjmAuzy8jxtInmugIDzVL09ui
 KyEfia0dXmBVu6mA6iiOotEVc0Prh7qBoW+A/lj4aYYWuMIZRTavOqqdiGz1XXft
 Ql7e28MNVqlupLyZgy7pkacgc4qApulDeSOARDTK31l1JVG3lbRV0TCDtjamUkzc
 IA4aFdDFPQ3MoYcRNmR6GDsEqQ07ouZBCGQR7ALCm3+HSBOm55mtc4AExUtQhSSU
 xeN5sT+tnVoIgMWaSqpnuHi40DHSRfAT5ZrpQU2zKWfyqH0RkN3zV1c/vSb07UaP
 jFzypw7rsqt16T5JBBlxw==
X-ME-Sender: <xms:ONJIZ5Wv4sVv6_fQDdGWDbJErf3y2KOUhAIz5ZTS9u07D_ci9wA0Qw>
 <xme:ONJIZ5m8lkaVwTGfDeVSC7jPSfrei1GCP8kr-K81ul8VgBqgZJl2YfZgT3MybzRZM
 izsmG75irsNgovNl6U>
X-ME-Received: <xmr:ONJIZ1YbDP4uVsGHczI4dkeVC25OL3RboJHoWKrSvMMtTengYqeym9AtxwVYqD3yjFzL>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrhedugddufeegucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu
 rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh
 htshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdej
 necuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdrug
 gvvheqnecuggftrfgrthhtvghrnhepteduleejgeehtefgheegjeekueehvdevieekueef
 tddvtdevfefhvdevgedujeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe
 hmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghvpdhnsggprhgtphhtthho
 peefpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehjuhhriheslhhinhhkohhvrd
 hnvghtpdhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthdprhgtphhtthhopeej
 geefieduseguvggssghughhsrdhgnhhurdhorhhg
X-ME-Proxy: <xmx:ONJIZ8VT4heCI_dAepwnMuheW1xpYNgNA5VnGZw9S8jbKm3DYgorGw>
 <xmx:ONJIZzltgM4lJlp8Sdiry9NCkaaXV3pdcktvMDqixqLKRwV6nNzLBA>
 <xmx:ONJIZ5dTQu6lHrvq6CNCjYv0F_NcPzFljQKUhDUS0SCDBoT0_FW6dw>
 <xmx:ONJIZ9HSKH2lNW8TrqrWWZI17uKvL7Cz5PthiPMX4sPrRiqce0Ur9Q>
 <xmx:ONJIZxj18quTc0ZIKy7yuZrLWg_PKtPfWhBSQAKgOgmrJQZpy8cmTsaT>
Feedback-ID: i07de48aa:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu,
 28 Nov 2024 15:27:34 -0500 (EST)
Message-ID: <19124901-e749-4daa-bf47-27e12ea619aa@HIDDEN>
Date: Thu, 28 Nov 2024 22:27:32 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
To: Juri Linkov <juri@HIDDEN>, martin rudalics <rudalics@HIDDEN>
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <87msi1ueb0.fsf@HIDDEN>
 <4256f446-e11b-450c-b455-131cb75acab0@HIDDEN>
 <871pzbj8mq.fsf@HIDDEN>
 <c05a2b89-cc0b-4489-9011-7449f306cb19@HIDDEN>
 <87sernhxoa.fsf@HIDDEN>
 <fd3fe857-b1fb-41f6-ab4b-72223948b814@HIDDEN>
 <1d08c589-2d0e-4f10-8c2e-e21c206ac118@HIDDEN>
 <f6fbc018-84e0-4137-8c83-0477ee47beff@HIDDEN>
 <e740a50f-ab57-4155-a011-053c3f203841@HIDDEN>
 <78a96965-31c1-4688-b808-2de09d1832c4@HIDDEN>
 <878qt9pz4w.fsf@HIDDEN>
 <05452bef-dd2e-4e93-abdd-6eb391027197@HIDDEN>
 <87y118cyyk.fsf@HIDDEN>
 <f2702b3a-36cc-49d7-a7e5-8833d1f95a3e@HIDDEN>
 <871pyzp6br.fsf@HIDDEN>
 <25443bb1-788a-4f06-9350-5d2c666f6795@HIDDEN>
 <32b8cc56-afa1-40f6-933f-6de0df2b9f63@HIDDEN>
 <c258e801-846a-4408-a913-4f986a483a33@HIDDEN>
 <dcf518ec-4dc5-4dc0-a491-b45f6968a9ae@HIDDEN>
 <688d5119-0900-46a4-86c7-32a9b06cc349@HIDDEN>
 <87ed2v1aec.fsf@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <87ed2v1aec.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 74361
Cc: 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 28/11/2024 20:32, Juri Linkov wrote:
>>> We want to select the new window in relation the "original" window
>>> (with a file-visiting buffer), while avoiding touching the "results
>>> list" window as well. E.g. when the original command was
>>> xref-find-definitions-other-window.
>> Let's see what Juri thinks of an
>>
>> (unsuitable . window-or-list-of-windows)
>>
>> alist entry.
> This can be achieved by an appropriate function in (some-window . (lambda ...))

What would than lambda do, though?

Currently xref--display-buffer-in-other-window is user to display the 
buffer in some "other" window compared to the original window, excluding 
the current one.

Would the proposed lambda call window-list, iterate through it, filter 
out the entries (dedicated and such), and check for equality with two 
given windows? The result might be longer than the current implementation.

The replacement for xref--display-buffer-in-window seems easier to do, 
IIUC this keeps all the current behavior (but it's also Emacs 31+ only):

diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index e6f029f3fa8..c38b3e9f5f7 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -690,9 +690,9 @@ xref--show-pos-in-buf
                    (window-live-p xref--original-window)
                    (or (not (window-dedicated-p xref--original-window))
                        (eq (window-buffer xref--original-window) buf)))
-                 `((xref--display-buffer-in-window)
+                 `((display-buffer-use-some-window)
                     (category . xref-jump)
-                   (window . ,xref--original-window)))
+                   (some-window . ,(cl-constantly xref--original-window))))
                  (t
                   '(nil (category . xref-jump))))))
      (with-selected-window (display-buffer buf action)
@@ -707,12 +707,6 @@ xref--display-buffer-in-other-window
       (with-selected-window window
         (display-buffer buffer t)))))

-(defun xref--display-buffer-in-window (buffer alist)
-  (let ((window (assoc-default 'window alist)))
-    (cl-assert window)
-    (with-selected-window window
-      (display-buffer buffer '(display-buffer-same-window)))))
-
  (defun xref--show-location (location &optional select)
    "Help `xref-show-xref' and `xref-goto-xref' do their job.
  Go to LOCATION and if SELECT is non-nil select its window.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 28 Nov 2024 18:37:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 28 13:37:18 2024
Received: from localhost ([127.0.0.1]:39702 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tGjOA-0001iz-Hm
	for submit <at> debbugs.gnu.org; Thu, 28 Nov 2024 13:37:18 -0500
Received: from relay7-d.mail.gandi.net ([217.70.183.200]:45693)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1tGjO8-0001iZ-6r
 for 74361 <at> debbugs.gnu.org; Thu, 28 Nov 2024 13:37:16 -0500
Received: by mail.gandi.net (Postfix) with ESMTPSA id 00AAC20003;
 Thu, 28 Nov 2024 18:37:07 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
In-Reply-To: <688d5119-0900-46a4-86c7-32a9b06cc349@HIDDEN> (martin rudalics's
 message of "Thu, 28 Nov 2024 10:27:11 +0100")
Organization: LINKOV.NET
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <87msi1ueb0.fsf@HIDDEN>
 <4256f446-e11b-450c-b455-131cb75acab0@HIDDEN>
 <871pzbj8mq.fsf@HIDDEN>
 <c05a2b89-cc0b-4489-9011-7449f306cb19@HIDDEN>
 <87sernhxoa.fsf@HIDDEN>
 <fd3fe857-b1fb-41f6-ab4b-72223948b814@HIDDEN>
 <1d08c589-2d0e-4f10-8c2e-e21c206ac118@HIDDEN>
 <f6fbc018-84e0-4137-8c83-0477ee47beff@HIDDEN>
 <e740a50f-ab57-4155-a011-053c3f203841@HIDDEN>
 <78a96965-31c1-4688-b808-2de09d1832c4@HIDDEN>
 <878qt9pz4w.fsf@HIDDEN>
 <05452bef-dd2e-4e93-abdd-6eb391027197@HIDDEN>
 <87y118cyyk.fsf@HIDDEN>
 <f2702b3a-36cc-49d7-a7e5-8833d1f95a3e@HIDDEN>
 <871pyzp6br.fsf@HIDDEN>
 <25443bb1-788a-4f06-9350-5d2c666f6795@HIDDEN>
 <32b8cc56-afa1-40f6-933f-6de0df2b9f63@HIDDEN>
 <c258e801-846a-4408-a913-4f986a483a33@HIDDEN>
 <dcf518ec-4dc5-4dc0-a491-b45f6968a9ae@HIDDEN>
 <688d5119-0900-46a4-86c7-32a9b06cc349@HIDDEN>
Date: Thu, 28 Nov 2024 20:32:39 +0200
Message-ID: <87ed2v1aec.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: Dmitry Gutov <dmitry@HIDDEN>, 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> We want to select the new window in relation the "original" window
>> (with a file-visiting buffer), while avoiding touching the "results
>> list" window as well. E.g. when the original command was
>> xref-find-definitions-other-window.
>
> Let's see what Juri thinks of an
>
> (unsuitable . window-or-list-of-windows)
>
> alist entry.

This can be achieved by an appropriate function in (some-window . (lambda ...))




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 28 Nov 2024 17:15:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 28 12:15:30 2024
Received: from localhost ([127.0.0.1]:39527 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tGi70-0005ro-8O
	for submit <at> debbugs.gnu.org; Thu, 28 Nov 2024 12:15:30 -0500
Received: from fout-b4-smtp.messagingengine.com ([202.12.124.147]:43545)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1tGi6x-0005rT-4g
 for 74361 <at> debbugs.gnu.org; Thu, 28 Nov 2024 12:15:29 -0500
Received: from phl-compute-11.internal (phl-compute-11.phl.internal
 [10.202.2.51])
 by mailfout.stl.internal (Postfix) with ESMTP id 496041140192;
 Thu, 28 Nov 2024 12:15:21 -0500 (EST)
Received: from phl-mailfrontend-02 ([10.202.2.163])
 by phl-compute-11.internal (MEProxy); Thu, 28 Nov 2024 12:15:21 -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=fm3; t=1732814121;
 x=1732900521; bh=H3nfUPDwsYtysEAdTwGdVMkzG5Lid154Pzg4EdoKXW0=; b=
 AwK7D755q2eEVF6Waz6wENbOUcLC16xFcmdurposCecrmaY7f2Tmxe5ORP5fpOPu
 aWrtRdRQVgvfv3m2MNZ/pTwpgRLe9pm3Itwi+zz65bnkvPFcachvVoZgMooTTQlT
 lWcvgIWMwaPPb7ioMm3fKUDOBMaozqHC1Ebz+eQf6Pg1wvbC8kq6iyGcGPLmJ0eI
 1hB64bGnQyLIJVrT8yT+9oeKICn+sFizVSGwJC45wv8yLxZEobTj3k/THk1mcAZd
 hiU7E2pnBIRys4pF44OhZ3Thh78bPFvTH764pH/PD9+whZknThDumZB29rZjoS/O
 OWoe6c+Ajjx7ANR1gj4zDg==
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=1732814121; x=
 1732900521; bh=H3nfUPDwsYtysEAdTwGdVMkzG5Lid154Pzg4EdoKXW0=; b=X
 5g9N4A6ustWdef/FtKRlZP5XmG1BuOGd9OxDtyxxOTXPbGApVFmnNS6e41dakpiT
 YCiRjWpB2eBH3zomBopy0MZ/zlFAyK0w+GlNm/bR3bPw0Q3FKhUnybAeUSz2of0d
 yzFj5iMzKJEMfg6Pu5c9NSwcNmryV3+ZH/hrCKarcCTINBhKYPBLY/UibzLoHO4L
 ND7ub2si3Ne3XTHogwVjiU5D7afdMuokSvzi2kJbL8+oC5DVM7tAZQx4TzPyqWGK
 FpQG3o+XKK6piMqvlSJ5gxCcSbsYAy30MEkyInloJY1EV1/EM5m8h4RDxLr13R5R
 NaPisKgojD6rO78T3tW6Q==
X-ME-Sender: <xms:KKVIZxFaXM5VrhV6qTtaewhPGIuVN8LHoygTVHx5WsxH9ga4DbDAiw>
 <xme:KKVIZ2W73-OCBg4avxdqr048Tg9qeh9xPo4shbfeqvEwtKEUb8yxO8Cih1PljWLn-
 6X9HYllyRo0IQ0fbRM>
X-ME-Received: <xmr:KKVIZzLgG1fuoNZn3sgpihM-deQAvNEy54EOxOzXHxKnRvE-70HAMB9PO2aikntJnIfs>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrhedugdeliecutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr
 tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth
 hsucdlqddutddtmdenucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeen
 ucfhrhhomhepffhmihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvg
 hvqeenucggtffrrghtthgvrhhnpeetudeljeegheetgfehgeejkeeuhedvveeikeeufedt
 vddtveefhfdvveegudejheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh
 grihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvhdpnhgspghrtghpthhtohep
 fedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheprhhuuggrlhhitghssehgmhigrd
 grthdprhgtphhtthhopehjuhhriheslhhinhhkohhvrdhnvghtpdhrtghpthhtohepjeeg
 feeiudesuggvsggsuhhgshdrghhnuhdrohhrgh
X-ME-Proxy: <xmx:KKVIZ3HNRnHciwfj-oUJ6yFZSOYXVIYEHp3SHTVBhdVeJD10JGLBJA>
 <xmx:KKVIZ3XDKHYNVYlbt0Gt-Zzo5s4puSm3spEM9wOqMhw9Ga9dCC-z_w>
 <xmx:KKVIZyPzuBUbMzClsvTUdZ0NEpCYw1pi4FJQyTW30W9pjexHXS8z2Q>
 <xmx:KKVIZ22JElubcIzOs60UPEcGmEj0PcUWKqxbsDR8A1lhEJ2NFjIs1Q>
 <xmx:KaVIZyR6kXIcS_JQwB0kqC4hbVFHFj87oMoVhUGRkbKJt9wqEpKKcSGs>
Feedback-ID: i07de48aa:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu,
 28 Nov 2024 12:15:19 -0500 (EST)
Message-ID: <fa39cd33-bdaa-4ef7-96c0-e816f474ab63@HIDDEN>
Date: Thu, 28 Nov 2024 19:15:17 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
To: martin rudalics <rudalics@HIDDEN>, Juri Linkov <juri@HIDDEN>
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <87msi1ueb0.fsf@HIDDEN>
 <4256f446-e11b-450c-b455-131cb75acab0@HIDDEN>
 <871pzbj8mq.fsf@HIDDEN>
 <c05a2b89-cc0b-4489-9011-7449f306cb19@HIDDEN>
 <87sernhxoa.fsf@HIDDEN>
 <fd3fe857-b1fb-41f6-ab4b-72223948b814@HIDDEN>
 <1d08c589-2d0e-4f10-8c2e-e21c206ac118@HIDDEN>
 <f6fbc018-84e0-4137-8c83-0477ee47beff@HIDDEN>
 <e740a50f-ab57-4155-a011-053c3f203841@HIDDEN>
 <78a96965-31c1-4688-b808-2de09d1832c4@HIDDEN>
 <878qt9pz4w.fsf@HIDDEN>
 <05452bef-dd2e-4e93-abdd-6eb391027197@HIDDEN>
 <87y118cyyk.fsf@HIDDEN>
 <f2702b3a-36cc-49d7-a7e5-8833d1f95a3e@HIDDEN>
 <871pyzp6br.fsf@HIDDEN>
 <25443bb1-788a-4f06-9350-5d2c666f6795@HIDDEN>
 <32b8cc56-afa1-40f6-933f-6de0df2b9f63@HIDDEN>
 <c258e801-846a-4408-a913-4f986a483a33@HIDDEN>
 <dcf518ec-4dc5-4dc0-a491-b45f6968a9ae@HIDDEN>
 <688d5119-0900-46a4-86c7-32a9b06cc349@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <688d5119-0900-46a4-86c7-32a9b06cc349@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 74361
Cc: 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 28/11/2024 11:27, martin rudalics wrote:

>  >> Is there any other 'display-buffer' call in xref.el that would set up a
>  >> category and prefer any other but the selected window?
>  >
>  > By default, you mean?
> 
> If default stands for using the ACTION argument of 'display-buffer',
> then "yes".

There are only two functions in xref.el that specify 'category' for 
'display-buffer', so no.

>  > We want to select the new window in relation the "original" window
>  > (with a file-visiting buffer), while avoiding touching the "results
>  > list" window as well. E.g. when the original command was
>  > xref-find-definitions-other-window.
> 
> Let's see what Juri thinks of an
> 
> (unsuitable . window-or-list-of-windows)
> 
> alist entry.

Could be helpful - keeping in mind having to use a compatibility shim 
for older Emacs.

>  > It's probably not an ideal solution, but one settled on over several 
> tries.
> 
> It is a pain for the caller.

Indeed.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 28 Nov 2024 09:27:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 28 04:27:25 2024
Received: from localhost ([127.0.0.1]:36661 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tGao0-00063g-SQ
	for submit <at> debbugs.gnu.org; Thu, 28 Nov 2024 04:27:25 -0500
Received: from mout.gmx.net ([212.227.15.18]:42255)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1tGany-00063S-7F
 for 74361 <at> debbugs.gnu.org; Thu, 28 Nov 2024 04:27:23 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at;
 s=s31663417; t=1732786033; x=1733390833; i=rudalics@HIDDEN;
 bh=959UeqEAEzWSQfktBk5D1VR9YTzGusSDBbTpNlObr80=;
 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=H+PAhFO9uffDCOmzt200+S2gJ3Dlvrc8MjX51W7ArXiLMzExLbvu3rA1vtLHbGYR
 FeOGIZmdznBWh5BOw9ZDtLPM+FJ7cvg+WLvmLmJ6dF9lynyWlIGSKyoH0kelO8lDE
 Z1MRuv5xC/ClWuBj9dGpG6MDORJehzFDPakJh5lZpmZ3ZySjiv8Ccxzr93lam3V8B
 o+I+WXh1MhVlZ4OnvI6WSC1apXJiLpr1fVWPL9PjGdnAr1xtsfptUIo5eEDZKhYZB
 YZVNn30sYI/ak/Sw1L1oKTEiQdvzJggP9dJympr15BSInHKxhJV+/u/k6IoBlbDA4
 zJH4xRT9ljAhkgsKtw==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.31.113] ([212.95.5.21]) by mail.gmx.net (mrgmx004
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MTRMs-1t6jPw3udo-00JuRA; Thu, 28
 Nov 2024 10:27:13 +0100
Message-ID: <688d5119-0900-46a4-86c7-32a9b06cc349@HIDDEN>
Date: Thu, 28 Nov 2024 10:27:11 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
To: Dmitry Gutov <dmitry@HIDDEN>, Juri Linkov <juri@HIDDEN>
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <87msi1ueb0.fsf@HIDDEN>
 <4256f446-e11b-450c-b455-131cb75acab0@HIDDEN>
 <871pzbj8mq.fsf@HIDDEN>
 <c05a2b89-cc0b-4489-9011-7449f306cb19@HIDDEN>
 <87sernhxoa.fsf@HIDDEN>
 <fd3fe857-b1fb-41f6-ab4b-72223948b814@HIDDEN>
 <1d08c589-2d0e-4f10-8c2e-e21c206ac118@HIDDEN>
 <f6fbc018-84e0-4137-8c83-0477ee47beff@HIDDEN>
 <e740a50f-ab57-4155-a011-053c3f203841@HIDDEN>
 <78a96965-31c1-4688-b808-2de09d1832c4@HIDDEN>
 <878qt9pz4w.fsf@HIDDEN>
 <05452bef-dd2e-4e93-abdd-6eb391027197@HIDDEN>
 <87y118cyyk.fsf@HIDDEN>
 <f2702b3a-36cc-49d7-a7e5-8833d1f95a3e@HIDDEN>
 <871pyzp6br.fsf@HIDDEN>
 <25443bb1-788a-4f06-9350-5d2c666f6795@HIDDEN>
 <32b8cc56-afa1-40f6-933f-6de0df2b9f63@HIDDEN>
 <c258e801-846a-4408-a913-4f986a483a33@HIDDEN>
 <dcf518ec-4dc5-4dc0-a491-b45f6968a9ae@HIDDEN>
Content-Language: en-US
From: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <dcf518ec-4dc5-4dc0-a491-b45f6968a9ae@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:+RMUSKKy18eHZ9ReEbQ58puKWsXf05LyxBQztemkkgoQzhgy74F
 rcEX5/JD7iVTLqLS5b7BdR0VwsbDOBifEFZQv4cBfaho9f3C1mfH7vm0BafhAoyKRejU9Kb
 HvFk++JutVcY5geNpnRDEYGgPg3Q3abtc/1yZHC/0jKVmeQNmSHkolysR0NWKFz5iSfMR2J
 AfcCN1JPAcGQRo9JRLH9A==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:7W9yZri4AjI=;lvc5wdDbV8ZEk5i+HwNNUTbBPo1
 KWiEgBYyrwdckyPknxQiRVEYFDyBo2iiFT2hhrFP0/Z3ijbcgO4n2zgnWZwZYg7FM3pZFXZM7
 l2b9R235ONYHaWGfPuwJPg4WFsr7S+u4WkMUantFNgwKvbbfyiv6MI7V7dwIg3nZ+iYXoel/Z
 5j4qzV9hIj5IE1bwtsguvrfhtDJp1su4k35DIwt3jqQ1ceXPCcoPOUY2b+gVo5yRz3HH/ZkcD
 HkO9mMJmVrObtaBpjUWSfTGSApgEPX9HOasNDT3czSmy7bLXvNzBWmVTBfoib0erHKuPygixe
 7IeRoFi6FpTNOVmjcOGKrDVM0I5u+bcE5dk5cwMuD2k2M1s7lkO8DjS8CrsU+VGgncQTuyoiy
 XQf7U3g0P1DYhwB0tbJdPzGousFstigZQ51jllUVQFyENqBpG2ypqPZIw8fQ47jjIP0R56BTh
 E+uKs8NTRGl4ujfvqwmGYylMfa2WIS6QyajSDp+8ft+2Kj15cKQ9AvzQChrWOgdM7FvqglN0T
 vKx58qSqbJN8bxAdquoZjLC5EE6YFjdXxjn5N8rSWhkzCGNWYUuO7CAF6+61UQXmiY9HJWrLx
 YoZps64ViW5EYrqzW6FLglLENiqZjdCvOtq2KO5dvm4QQZs/9RoRVebuZPaYtIBtB+mRPNLJj
 aeGBoj3SmuyR7dlpCb/fP+OibvqPVeplc0feRAwIjD0Rc5RnsKmT2N5dLiCxpZ5o3DSc9pzSq
 HQBDrPEmAxuc9warIucnbHlHIMpe9xx3+zh6sJvp1Ql1b7IQhU40jX/qYTtd8GDfITVfl0DV4
 mYDnUw7P20u27dIDFZyHWrBkKrZ+MSWCtLYQxnck7J4OeyM2rklzslZueU6Pr5GYGk3gfUZ/o
 uoHFz7h4NO4v1LZS/cGpsahErKKFzogDSSPh6eLqnCskV4DlvJfbaYs6M7wD2ySo1lpFl5aQ0
 bK/QS0dkmrD/ioAXZ3gE/SCmppYFVt2n68ERbBtNh8NmGPt+o344l6h0V5+lce8tWxLoYwX9/
 ORr9Oh2qopv9Fnyv6DDnqtWpJki+RFyhw5kuHa7TzA09MutcRyz8Wr5Bckg9RY4bXEA8A1EWO
 zcFn0xc9tq3S7i8E24jlXPKGHi5TGv
X-Spam-Score: 2.9 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: > It does seem like it will switch to the "mru" kind of
 placement
 > though: as soon as "some" other window is used for xref-jump once, all
 > the following similar calls will follow it. "mru" is a user option, the
 default is "lru". Once "mru" was chosen for a specific category, it will be
 chosen again until the user changes it. But it is true that the default "lru", 
 once overridden b [...] 
 Content analysis details:   (2.9 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE:
 The query to Validity was blocked.  See
 https://knowledge.validity.com/hc/en-us/articles/20961730681243
 for more information.
 [212.227.15.18 listed in sa-trusted.bondedsender.org]
 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The
 query to Validity was blocked.  See
 https://knowledge.validity.com/hc/en-us/articles/20961730681243
 for more information.
 [212.227.15.18 listed in bl.score.senderscore.com]
 3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
 [212.95.5.21 listed in zen.spamhaus.org]
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (rudalics[at]gmx.at)
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
 low trust [212.227.15.18 listed in list.dnswl.org]
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 SPF_PASS               SPF: sender matches SPF record
 0.0 RCVD_IN_MSPIKE_H3      RBL: Good reputation (+3)
 [212.227.15.18 listed in wl.mailspike.net]
 0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders
X-Debbugs-Envelope-To: 74361
Cc: 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.9 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  > It does seem like it will switch to the "mru" kind of placement
    > though: as soon as "some" other window is used for xref-jump once, all
   > the following similar calls will follow it. "mru" is a user option, the
   default is "lru". Once "mru" was chosen for a specific category, it will be
    chosen again until the user changes it. But it is true that the default "lru",
    once overridden b [...] 
 
 Content analysis details:   (1.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE:
                             The query to Validity was blocked.  See
                             https://knowledge.validity.com/hc/en-us/articles/20961730681243
                              for more information.
                             [212.227.15.18 listed in sa-accredit.habeas.com]
  3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
                             [212.95.5.21 listed in zen.spamhaus.org]
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
                             low trust
                             [212.227.15.18 listed in list.dnswl.org]
  0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The
                             query to Validity was blocked.  See
                             https://knowledge.validity.com/hc/en-us/articles/20961730681243
                              for more information.
                             [212.227.15.18 listed in bl.score.senderscore.com]
  0.0 RCVD_IN_MSPIKE_H3      RBL: Good reputation (+3)
                             [212.227.15.18 listed in wl.mailspike.net]
  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
                             provider (rudalics[at]gmx.at)
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 SPF_PASS               SPF: sender matches SPF record
  0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

 > It does seem like it will switch to the "mru" kind of placement
 > though: as soon as "some" other window is used for xref-jump once, all
 > the following similar calls will follow it.

"mru" is a user option, the default is "lru".  Once "mru" was chosen for
a specific category, it will be chosen again until the user changes it.
But it is true that the default "lru", once overridden by a category,
will be overridden again - for 'xref-jump' iff the same window is not
suitable.  Still ...

 > Might be an improvement, but definitely an incompatible change.

... this is true.

 >> Is there any other 'display-buffer' call in xref.el that would set up a
 >> category and prefer any other but the selected window?
 >
 > By default, you mean?

If default stands for using the ACTION argument of 'display-buffer',
then "yes".

 > We want to select the new window in relation the "original" window
 > (with a file-visiting buffer), while avoiding touching the "results
 > list" window as well. E.g. when the original command was
 > xref-find-definitions-other-window.

Let's see what Juri thinks of an

(unsuitable . window-or-list-of-windows)

alist entry.

 > It's probably not an ideal solution, but one settled on over several tries.

It is a pain for the caller.

 > Either seems reasonable to me, just as long as the choices can be
 > anticipated in advance by the user.

Agreed.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 27 Nov 2024 13:07:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 27 08:07:59 2024
Received: from localhost ([127.0.0.1]:60939 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tGHlu-00051U-Ju
	for submit <at> debbugs.gnu.org; Wed, 27 Nov 2024 08:07:59 -0500
Received: from fout-b3-smtp.messagingengine.com ([202.12.124.146]:40753)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1tGHlr-00051C-Tq
 for 74361 <at> debbugs.gnu.org; Wed, 27 Nov 2024 08:07:56 -0500
Received: from phl-compute-08.internal (phl-compute-08.phl.internal
 [10.202.2.48])
 by mailfout.stl.internal (Postfix) with ESMTP id 3EC5711400FC;
 Wed, 27 Nov 2024 08:07:50 -0500 (EST)
Received: from phl-mailfrontend-01 ([10.202.2.162])
 by phl-compute-08.internal (MEProxy); Wed, 27 Nov 2024 08:07:50 -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=1732712870;
 x=1732799270; bh=NRjLsR5+39rfQrx/j3l3RrjVntwBMWbN4n9kipDKjhs=; b=
 knpWjhIwlOOL/YFL1J1gRpWRhoXNunbA7nyQSj7ZJIQsCKAw72eMU/Q4krjlNLne
 aOUt3cdBmMjVAFZcmvqRTUxjT8GLU526PWs+rtRcSg2UxwHpC2ovafp8q8gRDITO
 fvXXZP2uX01rXRhk/qGMt0Tjq73wpyuPS6NTPt1wSVmi4Dt/ZsTm9cZgasWYWNC+
 ydt5IKOSe6CTj6Je8BCxri/20xK1WMJQfu/f4yHxxxObGnelYO6isMGYxHe9U76k
 2wkVEXm79IU3AKHu9PfyVIyZ4pT3AkqYxpQhy4G5h5bwprAgPXYrmR5CoGYNOEu8
 vqTlQKFUSDioAtrg6rh9TQ==
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=1732712870; x=
 1732799270; bh=NRjLsR5+39rfQrx/j3l3RrjVntwBMWbN4n9kipDKjhs=; b=G
 kfo3tKpurbgULkgwomBSN5BQAWyMZTLoWpiOmJEnOBq5nt0MUhNRHAd8Wuc6VDn/
 AiVC42Hqg6Vxw//5tR/8N6/gBvTiMjRKKNgB7FC47hKhxzvKhf/Q4bidGQLPvNTe
 pCjuu4XgG0rtNLT91Plc6m6NHFAR5hMIOTH8MDOa3SQ0NF2vVDxwEF4GNhaSILlp
 KN/dd4t3HwFEUU6m15CUOmr5YjcsPf+kPH/PcQU35Ry/ngnvLoPOtqlDwQPMpgsq
 wemBjT3QRDl/LvUhoaSEIbgTgtgkKIaAmPjx2xu6MwljpsVsTOAo8GrDu5SA6Bdu
 PGj2MiB3pZH9FcujCSlwg==
X-ME-Sender: <xms:pRlHZ_Gl6k8k4wjnaNEY6bWYbDlGCI99VXhTBmd7DWTtdwYm3a6NFA>
 <xme:pRlHZ8VJIRgaPBSySynnDN8ezEl73cFhb47AilVTzYZ3tRnQpWWPyV_8WfWSiEcZ7
 9A0JQz6JI9087GEJ1c>
X-ME-Received: <xmr:pRlHZxK_b_2O4SvQ4n_ABl6olMaUiYn-a178DaRNX9WXY13IUb0o_6JnJL6dLv1n6Oob>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrgeelgdeggecutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr
 tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth
 hsucdlqddutddtmdenucfjughrpefkffggfgfuvfevfhfhjggtgfesthekredttddvjeen
 ucfhrhhomhepffhmihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvg
 hvqeenucggtffrrghtthgvrhhnpeegleefteekgffhvdfhtdegveevveetteegteevgeet
 tdehhfdukeetheffueekkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh
 grihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvhdpnhgspghrtghpthhtohep
 fedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheprhhuuggrlhhitghssehgmhigrd
 grthdprhgtphhtthhopehjuhhriheslhhinhhkohhvrdhnvghtpdhrtghpthhtohepjeeg
 feeiudesuggvsggsuhhgshdrghhnuhdrohhrgh
X-ME-Proxy: <xmx:pRlHZ9HyuVPpBAeD8XRImVPBdsNH3IEyMQFpALqMxYj3kuytEETsVg>
 <xmx:pRlHZ1XtQwmtFYmLyplMsFoz4QUso0NkWzIT1LfWy0grjAriSMH-qw>
 <xmx:pRlHZ4MHafrI7PZw3Le_LnwebhNfDxG6JO79lmxoSrgX1mnSnwtqKA>
 <xmx:pRlHZ0122fTi6WCvhKbClUKORtBkA8VtyDnu4obss4lOR4AJwSARVw>
 <xmx:phlHZ4S6y9srfjPSvRSvQCf8btmsRetkMjZ8QXOZJj9EL8dlRqxwYx9g>
Feedback-ID: i07de48aa:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
 27 Nov 2024 08:07:48 -0500 (EST)
Message-ID: <dcf518ec-4dc5-4dc0-a491-b45f6968a9ae@HIDDEN>
Date: Wed, 27 Nov 2024 15:07:46 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
To: martin rudalics <rudalics@HIDDEN>, Juri Linkov <juri@HIDDEN>
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <87msi1ueb0.fsf@HIDDEN>
 <4256f446-e11b-450c-b455-131cb75acab0@HIDDEN>
 <871pzbj8mq.fsf@HIDDEN>
 <c05a2b89-cc0b-4489-9011-7449f306cb19@HIDDEN>
 <87sernhxoa.fsf@HIDDEN>
 <fd3fe857-b1fb-41f6-ab4b-72223948b814@HIDDEN>
 <1d08c589-2d0e-4f10-8c2e-e21c206ac118@HIDDEN>
 <f6fbc018-84e0-4137-8c83-0477ee47beff@HIDDEN>
 <e740a50f-ab57-4155-a011-053c3f203841@HIDDEN>
 <78a96965-31c1-4688-b808-2de09d1832c4@HIDDEN>
 <878qt9pz4w.fsf@HIDDEN>
 <05452bef-dd2e-4e93-abdd-6eb391027197@HIDDEN>
 <87y118cyyk.fsf@HIDDEN>
 <f2702b3a-36cc-49d7-a7e5-8833d1f95a3e@HIDDEN>
 <871pyzp6br.fsf@HIDDEN>
 <25443bb1-788a-4f06-9350-5d2c666f6795@HIDDEN>
 <32b8cc56-afa1-40f6-933f-6de0df2b9f63@HIDDEN>
 <c258e801-846a-4408-a913-4f986a483a33@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <c258e801-846a-4408-a913-4f986a483a33@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 74361
Cc: 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 27/11/2024 10:58, martin rudalics wrote:
>  > Just to note - in the patch that I've just pushed for Xref the
>  > category ('xref-jump') doesn't describe the destination buffer but
>  > only the command that is currently being executed. The destination
>  > buffers are regular file buffers, usually not distinct from the other
>  > file buffers belonging to the same project.
> 
> As I understand it, both 'xref--switch-to-buffer' and
> 'xref--display-buffer-in-window' prefer the selected window.  Only if
> the selected window is not suitable, 'display-buffer-use-some-window'
> could prefer a window with a 'xref-jump' 'category' parameter instead of
> using the 'lru' window.  I don't think anyone would even notice the
> difference.

It does seem like it will switch to the "mru" kind of placement though: 
as soon as "some" other window is used for xref-jump once, all the 
following similar calls will follow it.

Might be an improvement, but definitely an incompatible change.

> If a user does
> 
> +  (setq display-buffer-alist '(((category . xref)
> +                                (display-buffer-reuse-window
> +                                 display-buffer-use-some-window)
> +                                (some-window . mru))))
> 
> the 'some-window' entry on the last line would override any automagic in
> 'display-buffer-use-some-window' as I envision it anyway.

Sure.

> Is there any other 'display-buffer' call in xref.el that would set up a
> category and prefer any other but the selected window?

By default, you mean?

> IIUC
> 'xref--display-buffer-in-other-window' doesn't.  How would a user
> customize its behavior?  Note that I'm completely ignorant of the
> 'xref--with-dedicated-window' trick - is there any reason why
> 'inhibit-same-window' is not sufficient here?

We want to select the new window in relation the "original" window (with 
a file-visiting buffer), while avoiding touching the "results list" 
window as well. E.g. when the original command was 
xref-find-definitions-other-window.

It's probably not an ideal solution, but one settled on over several tries.

> Personally, I think that a window parameter based choice could be even
> better than 'mru' but Juri who uses 'mru' on a regular basis seems to be
> fine with it.  For some users 'mru' might not DTRT when they temporarily
> pop up a third window they use for showing some other, unrelated buffer
> in between jumping to a sequence of references.

Either seems reasonable to me, just as long as the choices can be 
anticipated in advance by the user.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 27 Nov 2024 09:00:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 27 04:00:31 2024
Received: from localhost ([127.0.0.1]:58514 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tGDuQ-0001Ys-Rt
	for submit <at> debbugs.gnu.org; Wed, 27 Nov 2024 04:00:31 -0500
Received: from mout.gmx.net ([212.227.17.21]:55885)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1tGDuP-0001Ye-Jt
 for 74361 <at> debbugs.gnu.org; Wed, 27 Nov 2024 04:00:30 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at;
 s=s31663417; t=1732698021; x=1733302821; i=rudalics@HIDDEN;
 bh=fhxzOpN+rIVeUHISEeV7tIqLwbLkESsU1HM27B9mmIM=;
 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=SV42cesRDdxxvAxUAGBMkdq/lLUAqkLWfMMWhV69c/drgqUXL/0Jn9xpqKl7VN5Q
 fBszzsZlpzEbir08rqGTFpEuFJowyBxKifwgR6ivUgMJk3dl0BR2EEBXKf6jwH+IK
 MBbEhd+VopyV+IHP6e9tJxDvY1BE21uTz/fLZb3QPVjmTpfxMo8V3xLUxlRt/3P04
 MmMCHpVoFbKK8Lv73HHLXTkBqxrbzpALdzTHO4HF4nj7JXoeLz8AJxLhgT2mar4NU
 aJiB6Br4i/kZlxcpM99qMQd97ld8RK+Q1E0mBl3wm4+Gen2c6eaAmKC09JC8SCOEg
 GwYKDqPnSQHHpYO5vg==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.31.113] ([212.95.5.209]) by mail.gmx.net (mrgmx105
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mof57-1u4xrR1uSP-00ppxv; Wed, 27
 Nov 2024 10:00:20 +0100
Message-ID: <f1464f2b-93a1-451b-a8dc-751d81e112b9@HIDDEN>
Date: Wed, 27 Nov 2024 10:00:19 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
To: Juri Linkov <juri@HIDDEN>
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <87msi1ueb0.fsf@HIDDEN>
 <4256f446-e11b-450c-b455-131cb75acab0@HIDDEN>
 <871pzbj8mq.fsf@HIDDEN>
 <c05a2b89-cc0b-4489-9011-7449f306cb19@HIDDEN>
 <87sernhxoa.fsf@HIDDEN>
 <fd3fe857-b1fb-41f6-ab4b-72223948b814@HIDDEN>
 <1d08c589-2d0e-4f10-8c2e-e21c206ac118@HIDDEN>
 <f6fbc018-84e0-4137-8c83-0477ee47beff@HIDDEN>
 <e740a50f-ab57-4155-a011-053c3f203841@HIDDEN>
 <78a96965-31c1-4688-b808-2de09d1832c4@HIDDEN>
 <878qt9pz4w.fsf@HIDDEN>
 <05452bef-dd2e-4e93-abdd-6eb391027197@HIDDEN>
 <87y118cyyk.fsf@HIDDEN>
 <f2702b3a-36cc-49d7-a7e5-8833d1f95a3e@HIDDEN>
 <871pyzp6br.fsf@HIDDEN>
 <25443bb1-788a-4f06-9350-5d2c666f6795@HIDDEN>
 <87frnd6t30.fsf@HIDDEN>
Content-Language: en-US
From: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <87frnd6t30.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: base64
X-Provags-ID: V03:K1:yWd/QmexU1pgAozVYAI6z+w4USIx77LtrcruMFe0qkJph/aksMu
 /eGdkbryyflMK0MkDzmaJkp50XKfVlJhhpZxZgCH/fbyGiKSsWz3+YCV+2ntLAp+xaz/mpw
 SBDhfGDmg6ZhK1uTUfvCpxzaPixNpsfTIibhxkqyHnNlLKUU6Aet9BYjfuvwmBO3BlMXQxx
 evTSPGaurCwwnEswYUpBA==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:QPV1hLpWKUU=;lIjhcYbxZXi8FEG2xDPoydFj+m2
 qR3JfPDXoVLtuLO7tHXiMCSZ9c2EdnKb/v7kjd4e+9wJTMMLm6Wv8VNF0ywIz4B8X8g9mpjJM
 eTcgwlRns8CqouMAB1vmAu4VsPYx1TbnKlez4/Me0VUU/qM8+ye+9lnZwz91C3Z8sluEkr9zd
 esaRQsVmRupBD6CJOIiTJAUwB45mgU8a9A5e+BDA2FQyThSHAs0SfrPtMY2LHBHao/SZBVgN+
 nI9jR423P7POgxh83nA5Svvn+cLmJzbqrALPbs52uKOY2tkyPhU0L9bMR6vvLsoFFpjjg6mj3
 QMU0d5nA+ZoWl/oXGMhMvFw+A+E61YJDh8aMXBR7bVe1J48mMU0YBNwdJkyjyCJrRBX+UqAlK
 283zTkrfobziA3tGXwgfeOGrCkenn/hi7ARm3+lGwAshCWv6QxJF6VHmQZH87zBi/B4RCFdxQ
 cPtbecrBQlI2hRUH4wHPM45nBhs8KCRKpgaH0GIRE56QJT/blp6qWk7WQBMJlftTo6goancXc
 Xx1NNDLIxvspdL/OcFlsXnUJBhSW3aVNtq1QrAljTVU/NGOwI57xXARZdiP1bQpPt2uw0Hz/r
 VwrWCVmC9ydHfKLZU8G3u+/gMQTYlgDqhb20XncCctChZKcWLc+QgPHgatmBmQT6f4lYYgNOB
 GCYIQmCS8jIs5pOdi1DfQseMAG/RCK4iYK+8A/jLmOWXtQlSaXvwVtmDiV+rxs15MFgng33KW
 WyNvuenl3AKf3Pp6s3NOB1fBx5sS/iPaz5bGM1UfAQO4P6Mr1IQk2qZFchqMOf5+cUoOLeBji
 APNtQV1aqkdPwyUrDM29AFiRezai+jzAitOcfPb51ZUbIn0ZReM3Y3/p2yz4D2yGTFQ8uCoGF
 YQk/5qnrNREnl5KJB9flreWTWCAFNaBom4HGI5UenWO5VYTNdOmdarjcq
X-Spam-Score: 2.9 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: > I welcome a change to get rid of the lru behavior in favor
 > of using the category. What I only suggested is to add a separate > action
 'display-buffer-reuse-category-window' with higher precedence [...] 
 Content analysis details:   (2.9 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
 low trust [212.227.17.21 listed in list.dnswl.org]
 0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE:
 The query to Validity was blocked.  See
 https://knowledge.validity.com/hc/en-us/articles/20961730681243
 for more information.
 [212.227.17.21 listed in sa-accredit.habeas.com]
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (rudalics[at]gmx.at)
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 SPF_PASS               SPF: sender matches SPF record
 3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
 [212.95.5.209 listed in zen.spamhaus.org]
 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The
 query to Validity was blocked.  See
 https://knowledge.validity.com/hc/en-us/articles/20961730681243
 for more information.
 [212.227.17.21 listed in bl.score.senderscore.com]
X-Debbugs-Envelope-To: 74361
Cc: Dmitry Gutov <dmitry@HIDDEN>, 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.9 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  > I welcome a change to get rid of the lru behavior in favor
    > of using the category. What I only suggested is to add a separate > action
    'display-buffer-reuse-category-window' with higher precedence [...] 
 
 Content analysis details:   (1.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE:
                             The query to Validity was blocked.  See
                             https://knowledge.validity.com/hc/en-us/articles/20961730681243
                              for more information.
                             [212.227.17.21 listed in sa-accredit.habeas.com]
  3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
                             [212.95.5.209 listed in zen.spamhaus.org]
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
                             low trust
                             [212.227.17.21 listed in list.dnswl.org]
  0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The
                             query to Validity was blocked.  See
                             https://knowledge.validity.com/hc/en-us/articles/20961730681243
                              for more information.
                             [212.227.17.21 listed in bl.score.senderscore.com]
  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
                             provider (rudalics[at]gmx.at)
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 SPF_PASS               SPF: sender matches SPF record
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

ID4gSSB3ZWxjb21lIGEgY2hhbmdlIHRvIGdldCByaWQgb2YgdGhlIGxydSBiZWhhdmlvciBp
biBmYXZvcg0KID4gb2YgdXNpbmcgdGhlIGNhdGVnb3J5LiAgV2hhdCBJIG9ubHkgc3VnZ2Vz
dGVkIGlzIHRvIGFkZCBhIHNlcGFyYXRlDQogPiBhY3Rpb24gJ2Rpc3BsYXktYnVmZmVyLXJl
dXNlLWNhdGVnb3J5LXdpbmRvdycgd2l0aCBoaWdoZXIgcHJlY2VkZW5jZQ0KID4gdGhhbiAn
ZGlzcGxheS1idWZmZXItdXNlLXNvbWUtd2luZG93Jy4gIEJ1dCB0aGlzIGlzIGp1c3QgYW4g
dGVjaG5pY2FsIGRldGFpbC4NCg0KSSB0aGluayBzbyB0b28uICBXaGF0ZXZlciBpdCBpcywg
SSB0aGluayB0aGF0ICdjYXRlZ29yeScgc2hvdWxkIGJlIG9ubHkNCmRldGVjdGVkIGJ5ICdi
dWZmZXItbWF0Y2gtcCcgYW5kIGJvdGggdXNlciBhbmQgJ2Rpc3BsYXktYnVmZmVyJyB3aGVu
DQp1c2luZyAic29tZSIgd2luZG93IHNob3VsZCBiZSBmcmVlIHRvIGludGVycHJldCBpdCBp
biB0aGVpciBvd24gd2F5cy4NClNpbmNlIOKAmHNvbWUtd2luZG934oCZIHdvdWxkIGJlIGFs
d2F5cyBnaXZlbiBwcmVjZWRlbmNlIG92ZXIgJ2NhdGVnb3J5JyBhcw0KZmFyIGFzICdkaXNw
bGF5LWJ1ZmZlcicgaXMgY29uY2VybmVkLCB0aGUgdXNlciB3b3VsZCBiZSBmcmVlIHRvIG92
ZXJyaWRlDQphbnkgYXV0b21hZ2ljIHRoZSBsYXR0ZXIgZG9lcy4NCg0KbWFydGluDQo=




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 27 Nov 2024 08:58:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 27 03:58:19 2024
Received: from localhost ([127.0.0.1]:58485 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tGDsJ-0001NM-AJ
	for submit <at> debbugs.gnu.org; Wed, 27 Nov 2024 03:58:19 -0500
Received: from mout.gmx.net ([212.227.17.21]:39475)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1tGDsG-0001N3-TF
 for 74361 <at> debbugs.gnu.org; Wed, 27 Nov 2024 03:58:18 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at;
 s=s31663417; t=1732697887; x=1733302687; i=rudalics@HIDDEN;
 bh=16Ghwb1IR4DYxlGQLfjemmkPheE7tCSCaVf9dWPpWqc=;
 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=sGtIzej2B65YddzxFk3ZkJsnR9bT2SS9NKthl8JvIQzBAUUDWG+tpXryJfy4u6BE
 dZibB76M3tJhItEJC7Lwo9XNhCTMuhMfyq+CjL8hEaGu0NlkBvRjp/0txUbqkE86m
 ULayjL1WOeOOaH96EP4eWJezHTocMe5b/uaErKHikAe/JSUYFWhi9OtbxHpFAO8Jb
 SC3wr5tTfrHdvVhyjrCD7SIGEphWSQ2NByimZDILJRMElG7YQjefJEGs3UCQseg0e
 P0dTTIdZtmjdKaZ++iRaKUUnQvlE9wnV7/V56c5HcZnO6bh+/FKzk13sQFMYto826
 oR8W+s6qF0rOnZLnVg==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.31.113] ([212.95.5.209]) by mail.gmx.net (mrgmx104
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MDysm-1tNx750zg4-003FLH; Wed, 27
 Nov 2024 09:58:07 +0100
Message-ID: <c258e801-846a-4408-a913-4f986a483a33@HIDDEN>
Date: Wed, 27 Nov 2024 09:58:03 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
To: Dmitry Gutov <dmitry@HIDDEN>, Juri Linkov <juri@HIDDEN>
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <87msi1ueb0.fsf@HIDDEN>
 <4256f446-e11b-450c-b455-131cb75acab0@HIDDEN>
 <871pzbj8mq.fsf@HIDDEN>
 <c05a2b89-cc0b-4489-9011-7449f306cb19@HIDDEN>
 <87sernhxoa.fsf@HIDDEN>
 <fd3fe857-b1fb-41f6-ab4b-72223948b814@HIDDEN>
 <1d08c589-2d0e-4f10-8c2e-e21c206ac118@HIDDEN>
 <f6fbc018-84e0-4137-8c83-0477ee47beff@HIDDEN>
 <e740a50f-ab57-4155-a011-053c3f203841@HIDDEN>
 <78a96965-31c1-4688-b808-2de09d1832c4@HIDDEN>
 <878qt9pz4w.fsf@HIDDEN>
 <05452bef-dd2e-4e93-abdd-6eb391027197@HIDDEN>
 <87y118cyyk.fsf@HIDDEN>
 <f2702b3a-36cc-49d7-a7e5-8833d1f95a3e@HIDDEN>
 <871pyzp6br.fsf@HIDDEN>
 <25443bb1-788a-4f06-9350-5d2c666f6795@HIDDEN>
 <32b8cc56-afa1-40f6-933f-6de0df2b9f63@HIDDEN>
Content-Language: en-US
From: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <32b8cc56-afa1-40f6-933f-6de0df2b9f63@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:0smA9YFAMtqtrZnMXpwQ/yOnKkD24l42lR0GtgMRt/s+3/j4uPr
 40f+CBGzuNgeS7k5HplbpiPknCEms783gLra9EIAxXCq/wqwaHnzhTd6VHlGeaQp0WvebXX
 W5H3l4P3Zl42k4MRiLCzBhPKoen/kWG9fBbLLJDQW5+GdyCQc552un3hEabIIW6RkOMhDw/
 z2Qz+prmrTcjJ46huzTQg==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:rm2aqjdECVk=;9sCDU/mCJa+mwGnYC17PWDlulpb
 WYbo5eYKKDxSAEIp6MGqy1VpStF1oycpLPP3eMR7+LECpIBRWa3R024HWeJGmob3Gg9JuBrpZ
 hjJf9agC1ZQp3x6AJ1VhiYlgooPd/z03NuLkSZXtYig3cvWR/OVvH0QiWkpgql4fOKqKRiHny
 FOZaoOslVGefu0XEXbFqVXtmcL+/yaQyHxSnl+PjaeNjQTrFksr4HhOg7DawUyLcqvGROa3Dm
 yajAzfSsZo13iXQB/Kbtg3uaqlV6m1S4Eq/5inleukj2+mD/bG8KA/V+TDj/I8F1kPG5RnXv5
 VAAt2q0BZ6hXfAGZUKY83QqPCK6MrvNcDCreVUaeq0xAc1IaxSnCF5gqAB66/LanqjVpKvWvg
 JLc02ZoF48zN1IRaOFx8QreRIOyC0WzP32aTy1phkB5YyAzaOGMrPIt3rrNjwAtuiYfX7IXTe
 uXj0KyDm45w4ANxyS9MtZBWTNolcqXqByWxF0S5APJPyPzQz4m8QNAjJMM+VY8VTu5jnvqDKz
 xIK9OfCmEHsZB80+18y3RwahPsBVl0OPnXg/ZzSLD0gn4DTjBs2K/uO5SQNDagjalbQEB7Xd3
 MZkqp/PR964iK7+xz/cQet1VhqFIUuiK2d44RRMHnVEev/Vb3fWKcI2KkkfPsv4KTSmedUEH7
 XtgYlRQ5iBCuhp9kuUtG+xfMkuWk6GRnPryc8gkeZ6wgpCt3tcrueCYgQthZ1AsrGXynlzSPO
 KmxckZNJ5Vx/p29xZesc17Z6QyvQzMikZ5KEt5LqNnhjgsIa6XXoQYyDtrYdIlTbZ7sDbCv5Z
 czyPcXGBgbZqdwMdFF5wrJHo14Zuhd9IGGB2+I/5SaOz86k3RlL/brAzvxClwRY1jDvL6UgBd
 x0RD3Ozdz0JOtRarssynIsOLd5h1kSAScsbVBGff0XhX1Qr7dRcKeJelJ
X-Spam-Score: 2.9 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: > Just to note - in the patch that I've just pushed for Xref
 the > category ('xref-jump') doesn't describe the destination buffer but
 > only the command that is currently being executed. The destinat [...] 
 Content analysis details:   (2.9 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The
 query to Validity was blocked.  See
 https://knowledge.validity.com/hc/en-us/articles/20961730681243
 for more information.
 [212.227.17.21 listed in bl.score.senderscore.com]
 0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE:
 The query to Validity was blocked.  See
 https://knowledge.validity.com/hc/en-us/articles/20961730681243
 for more information.
 [212.227.17.21 listed in sa-trusted.bondedsender.org]
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (rudalics[at]gmx.at)
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
 low trust [212.227.17.21 listed in list.dnswl.org]
 3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
 [212.95.5.209 listed in zen.spamhaus.org]
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 SPF_PASS               SPF: sender matches SPF record
X-Debbugs-Envelope-To: 74361
Cc: 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.9 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  > Just to note - in the patch that I've just pushed for Xref
    the > category ('xref-jump') doesn't describe the destination buffer but
   > only the command that is currently being executed. The destinat [...] 
 
 Content analysis details:   (1.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE:
                             The query to Validity was blocked.  See
                             https://knowledge.validity.com/hc/en-us/articles/20961730681243
                              for more information.
                             [212.227.17.21 listed in sa-accredit.habeas.com]
  3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
                             [212.95.5.209 listed in zen.spamhaus.org]
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
                             low trust
                             [212.227.17.21 listed in list.dnswl.org]
  0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The
                             query to Validity was blocked.  See
                             https://knowledge.validity.com/hc/en-us/articles/20961730681243
                              for more information.
                             [212.227.17.21 listed in bl.score.senderscore.com]
  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
                             provider (rudalics[at]gmx.at)
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 SPF_PASS               SPF: sender matches SPF record
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

 > Just to note - in the patch that I've just pushed for Xref the
 > category ('xref-jump') doesn't describe the destination buffer but
 > only the command that is currently being executed. The destination
 > buffers are regular file buffers, usually not distinct from the other
 > file buffers belonging to the same project.

As I understand it, both 'xref--switch-to-buffer' and
'xref--display-buffer-in-window' prefer the selected window.  Only if
the selected window is not suitable, 'display-buffer-use-some-window'
could prefer a window with a 'xref-jump' 'category' parameter instead of
using the 'lru' window.  I don't think anyone would even notice the
difference.

If a user does

+  (setq display-buffer-alist '(((category . xref)
+                                (display-buffer-reuse-window
+                                 display-buffer-use-some-window)
+                                (some-window . mru))))

the 'some-window' entry on the last line would override any automagic in
'display-buffer-use-some-window' as I envision it anyway.

Is there any other 'display-buffer' call in xref.el that would set up a
category and prefer any other but the selected window?  IIUC
'xref--display-buffer-in-other-window' doesn't.  How would a user
customize its behavior?  Note that I'm completely ignorant of the
'xref--with-dedicated-window' trick - is there any reason why
'inhibit-same-window' is not sufficient here?

Personally, I think that a window parameter based choice could be even
better than 'mru' but Juri who uses 'mru' on a regular basis seems to be
fine with it.  For some users 'mru' might not DTRT when they temporarily
pop up a third window they use for showing some other, unrelated buffer
in between jumping to a sequence of references.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 27 Nov 2024 07:37:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 27 02:37:17 2024
Received: from localhost ([127.0.0.1]:58136 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tGCbt-00069P-4T
	for submit <at> debbugs.gnu.org; Wed, 27 Nov 2024 02:37:17 -0500
Received: from relay4-d.mail.gandi.net ([217.70.183.196]:34725)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1tGCbr-000697-PG
 for 74361 <at> debbugs.gnu.org; Wed, 27 Nov 2024 02:37:16 -0500
Received: by mail.gandi.net (Postfix) with ESMTPSA id 6EE88E0007;
 Wed, 27 Nov 2024 07:37:08 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
In-Reply-To: <25443bb1-788a-4f06-9350-5d2c666f6795@HIDDEN> (martin rudalics's
 message of "Tue, 26 Nov 2024 10:15:11 +0100")
Organization: LINKOV.NET
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <87msi1ueb0.fsf@HIDDEN>
 <4256f446-e11b-450c-b455-131cb75acab0@HIDDEN>
 <871pzbj8mq.fsf@HIDDEN>
 <c05a2b89-cc0b-4489-9011-7449f306cb19@HIDDEN>
 <87sernhxoa.fsf@HIDDEN>
 <fd3fe857-b1fb-41f6-ab4b-72223948b814@HIDDEN>
 <1d08c589-2d0e-4f10-8c2e-e21c206ac118@HIDDEN>
 <f6fbc018-84e0-4137-8c83-0477ee47beff@HIDDEN>
 <e740a50f-ab57-4155-a011-053c3f203841@HIDDEN>
 <78a96965-31c1-4688-b808-2de09d1832c4@HIDDEN>
 <878qt9pz4w.fsf@HIDDEN>
 <05452bef-dd2e-4e93-abdd-6eb391027197@HIDDEN>
 <87y118cyyk.fsf@HIDDEN>
 <f2702b3a-36cc-49d7-a7e5-8833d1f95a3e@HIDDEN>
 <871pyzp6br.fsf@HIDDEN>
 <25443bb1-788a-4f06-9350-5d2c666f6795@HIDDEN>
Date: Wed, 27 Nov 2024 09:30:35 +0200
Message-ID: <87frnd6t30.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: Dmitry Gutov <dmitry@HIDDEN>, 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> What I want is to get rid of the lru behavior in the context of say
> Bug#74246 for users who do _not want_ to tinker with
> 'display-buffer-alist'.  Most Emacs users know how to split windows.
> Few of them may want to have ‘display-buffer’ use them up piecemeal by
> eventually displaying images in all of them.

I welcome a change to get rid of the lru behavior in favor
of using the category.  What I only suggested is to add a separate
action 'display-buffer-reuse-category-window' with higher precedence
than 'display-buffer-use-some-window'.  But this is just an technical detail.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 27 Nov 2024 01:52:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 26 20:52:32 2024
Received: from localhost ([127.0.0.1]:55696 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tG7EG-00068H-87
	for submit <at> debbugs.gnu.org; Tue, 26 Nov 2024 20:52:32 -0500
Received: from fout-b4-smtp.messagingengine.com ([202.12.124.147]:57677)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1tG7EB-00067y-KA
 for 74361 <at> debbugs.gnu.org; Tue, 26 Nov 2024 20:52:29 -0500
Received: from phl-compute-05.internal (phl-compute-05.phl.internal
 [10.202.2.45])
 by mailfout.stl.internal (Postfix) with ESMTP id D302D1140125;
 Tue, 26 Nov 2024 20:52:21 -0500 (EST)
Received: from phl-mailfrontend-02 ([10.202.2.163])
 by phl-compute-05.internal (MEProxy); Tue, 26 Nov 2024 20:52:21 -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=1732672341;
 x=1732758741; bh=G5LOhxbRytI+ojGDOxy4hDngc+qgBtEHaYzR5cc9vjY=; b=
 xU2PjYLGIbfczd8Zlv0YCb/HgJ14O4vC3AMsg3Ia/0pb2uECiEx3ram17gKOAjtY
 4h8vBvBqFib3dp4xpOisvKvgz9ujQcXyMQoIDxJonjUAFTGd80Gpl3WmbRQWfNpZ
 fmfoamt8wnlbgYgP/JfVJn6/kNJIlwkVeznO4T2RrxDlvfz5jziLDDgfSxCLKnQ1
 fi6vS/bxIj2SsbclaOSOQdfhAILmC6CEcADzat6nrPZGgbnwJMhPH2tARrtDR5Fm
 mtFgBSkG7fPKtkkabJVfte500aPucpv4CZakHDUXaOM70yyqhAFrfcnbyIIgator
 xBis4DrQxrGgywQLrAoAjw==
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=1732672341; x=
 1732758741; bh=G5LOhxbRytI+ojGDOxy4hDngc+qgBtEHaYzR5cc9vjY=; b=q
 CsXdAxfVBrn70lMAiohHGllkPAl2edQOnoz8WYocc/fQzpYFRaY6dPHVgjI4c/mY
 Yv2mrYASb9lttOIHwFlLmRRBavKrV2Ewq3pzu0wkWq8RBJOxdZ9zG4kZ1DQrbee7
 AzsVzhhNeev+kNE9pXs9NtiabgDzn6IU5f8Y+6BYwmzCljZMq/MN9DgLHnJ20bJX
 a9OpTsxDXHJd//s/wU2fuDKyrqpUeILWAvy0Lfzhu30EIUFCNSioGOn7tsZp4MnZ
 4P+jzTJXzfY6wfkFwIqvNflucCZlRFOcX4aTRnUGYyw+tnNP9U4SlYs94enujytN
 Zz+2+5A83DXGGdPKjn5Eg==
X-ME-Sender: <xms:VXtGZ5ENdMCbAlYMd3_lF6-FOFMIrvKxPfH46gMru0JPzMCFwkAS7g>
 <xme:VXtGZ-UoPL0Qd_vd4YSYoCJWrrPHAbBj8fNhSS80-ssaBsaSKXCT63DwdtWaQr6ov
 suLFuhF-0-fe3en1lU>
X-ME-Received: <xmr:VXtGZ7J_19_yv_PxyHWUD1U9jUFNQycw2oRIzIZgcpWdJRi2-mb0_CSDNOjPMI8RBfK0>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrgeekgdeflecutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr
 tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth
 hsucdlqddutddtmdenucfjughrpefkffggfgfuvfevfhfhjggtgfesthekredttddvjeen
 ucfhrhhomhepffhmihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvg
 hvqeenucggtffrrghtthgvrhhnpeegleefteekgffhvdfhtdegveevveetteegteevgeet
 tdehhfdukeetheffueekkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh
 grihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvhdpnhgspghrtghpthhtohep
 fedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheprhhuuggrlhhitghssehgmhigrd
 grthdprhgtphhtthhopehjuhhriheslhhinhhkohhvrdhnvghtpdhrtghpthhtohepjeeg
 feeiudesuggvsggsuhhgshdrghhnuhdrohhrgh
X-ME-Proxy: <xmx:VXtGZ_G2dkSSJYTNt9MaGUe4TpPmeuG_8SM6xwUFEmEu8JjcC9z2qQ>
 <xmx:VXtGZ_UuWK-e4keS1VzgfyIslTlQ6CEgvDZ_2fQ2l0xJbvcykkyniA>
 <xmx:VXtGZ6O4fiPRAvFUrbWg1SUeUSfOIzZkoVF7oiyNeQn-LTKZA_vc4w>
 <xmx:VXtGZ-2guPk49YO3xa7XcVR-t3LTJbQjOk__M9LBlU15QdqwwsP-bw>
 <xmx:VXtGZ6RvOho5F8iqQJGvEyK6wZ_bgv6EO1W6mdUOj5bPoaeoSAz-FqKM>
Feedback-ID: i07de48aa:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue,
 26 Nov 2024 20:52:20 -0500 (EST)
Message-ID: <32b8cc56-afa1-40f6-933f-6de0df2b9f63@HIDDEN>
Date: Wed, 27 Nov 2024 03:52:18 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
To: martin rudalics <rudalics@HIDDEN>, Juri Linkov <juri@HIDDEN>
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <87msi1ueb0.fsf@HIDDEN>
 <4256f446-e11b-450c-b455-131cb75acab0@HIDDEN>
 <871pzbj8mq.fsf@HIDDEN>
 <c05a2b89-cc0b-4489-9011-7449f306cb19@HIDDEN>
 <87sernhxoa.fsf@HIDDEN>
 <fd3fe857-b1fb-41f6-ab4b-72223948b814@HIDDEN>
 <1d08c589-2d0e-4f10-8c2e-e21c206ac118@HIDDEN>
 <f6fbc018-84e0-4137-8c83-0477ee47beff@HIDDEN>
 <e740a50f-ab57-4155-a011-053c3f203841@HIDDEN>
 <78a96965-31c1-4688-b808-2de09d1832c4@HIDDEN>
 <878qt9pz4w.fsf@HIDDEN>
 <05452bef-dd2e-4e93-abdd-6eb391027197@HIDDEN>
 <87y118cyyk.fsf@HIDDEN>
 <f2702b3a-36cc-49d7-a7e5-8833d1f95a3e@HIDDEN>
 <871pyzp6br.fsf@HIDDEN>
 <25443bb1-788a-4f06-9350-5d2c666f6795@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <25443bb1-788a-4f06-9350-5d2c666f6795@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 74361
Cc: 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 26/11/2024 11:15, martin rudalics wrote:
>  > This is why I suggest to create a separate action.  If you are sure
>  > it should be used by default, then it could be inserted
>  > before display-buffer-use-some-window here:
>  >
>  >    (defconst display-buffer-fallback-action
>  >      '((display-buffer--maybe-same-window
>  >         display-buffer-reuse-window
>  >         display-buffer--maybe-pop-up-frame-or-window
>  >         display-buffer-in-previous-window
>  >         display-buffer-reuse-category-window ;; <-- NEW!
>  >         display-buffer-use-some-window
>  >         display-buffer-pop-up-frame))
>  >
>  > Otherwise, users will be able to use the new action
>  > display-buffer-reuse-category-window in their customizations
>  > of display-buffer-alist.
> 
> What I want is to get rid of the lru behavior in the context of say
> Bug#74246 for users who do _not want_ to tinker with
> 'display-buffer-alist'.  Most Emacs users know how to split windows.
> Few of them may want to have ‘display-buffer’ use them up piecemeal by
> eventually displaying images in all of them.

That's a nice idea.

Just to note - in the patch that I've just pushed for Xref the category 
('xref-jump') doesn't describe the destination buffer but only the 
command that is currently being executed. The destination buffers are 
regular file buffers, usually not distinct from the other file buffers 
belonging to the same project.

So choosing the window by matching the category might not be so natural 
in that case as reusing a window already showing an image. Probably 
won't hurt, though.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 27 Nov 2024 01:45:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 26 20:45:19 2024
Received: from localhost ([127.0.0.1]:55658 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tG77H-0005pd-Aa
	for submit <at> debbugs.gnu.org; Tue, 26 Nov 2024 20:45:19 -0500
Received: from fhigh-b5-smtp.messagingengine.com ([202.12.124.156]:49303)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1tG77E-0005ok-FP
 for 74361 <at> debbugs.gnu.org; Tue, 26 Nov 2024 20:45:17 -0500
Received: from phl-compute-01.internal (phl-compute-01.phl.internal
 [10.202.2.41])
 by mailfhigh.stl.internal (Postfix) with ESMTP id B44DA254013D;
 Tue, 26 Nov 2024 20:45:10 -0500 (EST)
Received: from phl-mailfrontend-02 ([10.202.2.163])
 by phl-compute-01.internal (MEProxy); Tue, 26 Nov 2024 20:45:10 -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=1732671910;
 x=1732758310; bh=M9i6Drs0N2+WCBoaqU1Ii66JGjCBjJkiXiAgftdP6V4=; b=
 EwYPjFWJVmJ3YDdEk9QWG7j+Tq1mXI1DpHM+1Ka3leBWTSmRZMIoET3XjzoJHedt
 bbtuWz5gPiLCzfR77/sHBmYLkzC36oOd0e2kcZMqsavrklwtuuCKGmoViENGr/qq
 1knpx9uMOl493HVl193CM7li1Qg+SkQcHT9QapKKDXB/xW9jkq36gq0qkYOVNBBb
 +11w9o2sDJJA1z0Ew2zD7qJJJpoow9glzqVjFsrlM1MKJZKu6LC9PT2yRU+hDKAQ
 slBU49DujzJoaRwj/MauVTQ8QJYYyDCRL2VjKLPQ6XYar7S/bXOgTruZLiNO1OsG
 aZPAT6wfY5Y8vlV2dX0klg==
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=1732671910; x=
 1732758310; bh=M9i6Drs0N2+WCBoaqU1Ii66JGjCBjJkiXiAgftdP6V4=; b=g
 s/A6JBhEtul1SbqabWUuaBGu8qzVpTY9IM8Lh1eeAwRLlQ5NMVd7d86BIEZD04f3
 oTivSbNhnG19cDx64tE4wfyg7Fms5g7gvPmTH5nRP3qZbVAPXnLWzvk4rKvGCXwl
 3EP4jJBDDlBLCOY5JIZ57CXzrK9Jcykd3kSsvWEeE68BEYCyudxrqHtEkjMrcFEP
 dYhrS/cw3YRg8g+h1iNlnePbFdCcg+R2R3vhWVGtBybsYYxKyCyFegb6WZa8MsJ8
 dhXPnloSOn0SVQSKEdZQ4Ixdb3bghF0cAkgA60RpI0wIz9IG2htvmHE/gm2ZgtzR
 y8m8x9Yjg3JmoEM76CBHg==
X-ME-Sender: <xms:pnlGZ8kUvYNSiJVQ9gPAvBC-K5SRUAnIpJaYy4VUu9Mil-3clxdwsg>
 <xme:pnlGZ72LcLd19cfYdZ8bgERHZ1mYU11V0AxvRSWOLL6G2KlPWQp7DLIukhMh33pzn
 u_H4bVDtSFVTI_EJzQ>
X-ME-Received: <xmr:pnlGZ6qlE-juOo9axtyAfmLSMSKqXdKG9EXVQVSDWklSMCsa_KlRD03e-rHSNRRgewh0>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrgeekgdefkecutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr
 tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth
 hsucdlqddutddtmdenucfjughrpefkffggfgfuhffvvehfjggtgfesthekredttddvjeen
 ucfhrhhomhepffhmihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvg
 hvqeenucggtffrrghtthgvrhhnpedvleeijeevkeejleffgeduiedujeffhfevudduffdv
 veetkeegveffjefgffelueenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh
 grihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvhdpnhgspghrtghpthhtohep
 fedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepjhhurhhisehlihhnkhhovhdrnh
 gvthdprhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtpdhrtghpthhtohepjeeg
 feeiudesuggvsggsuhhgshdrghhnuhdrohhrgh
X-ME-Proxy: <xmx:pnlGZ4mxz-DuNc3KmfT6cyMV1FOVNq9eleS1SQmeAMw8tvhM3_64KA>
 <xmx:pnlGZ61xfwZMHweZcN4wBacoRsppOvn3btWcNFsjHn2hJPIFvKepog>
 <xmx:pnlGZ_twx5Yg65wXKSGVOy5oKEBXcac8vxGDJ_XnrKfT6EsJnv0h8w>
 <xmx:pnlGZ2UubqZ6781OMOmZtosCIquFUtgURRlgE68w1vunSrIKDMwaWQ>
 <xmx:pnlGZ_za0G0ixG1EROk0n3SdCE0P1E91CBHu3aSTCIjW-BVX_NnOUcYP>
Feedback-ID: i07de48aa:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue,
 26 Nov 2024 20:45:08 -0500 (EST)
Message-ID: <6e9f5784-21ae-483b-9996-5af6dedf43d0@HIDDEN>
Date: Wed, 27 Nov 2024 03:45:05 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
From: Dmitry Gutov <dmitry@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <87msi1ueb0.fsf@HIDDEN>
 <4256f446-e11b-450c-b455-131cb75acab0@HIDDEN>
 <871pzbj8mq.fsf@HIDDEN>
 <c05a2b89-cc0b-4489-9011-7449f306cb19@HIDDEN>
 <87sernhxoa.fsf@HIDDEN>
 <fd3fe857-b1fb-41f6-ab4b-72223948b814@HIDDEN>
 <875xoi4cei.fsf@HIDDEN>
 <2ef677aa-1433-4aaa-92a5-c600774dd457@HIDDEN>
 <87frnl9h0w.fsf@HIDDEN>
 <4df18965-61f5-41a6-a5ee-67f18b02b1b5@HIDDEN>
Content-Language: en-US
In-Reply-To: <4df18965-61f5-41a6-a5ee-67f18b02b1b5@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 74361
Cc: martin rudalics <rudalics@HIDDEN>, 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 25/11/2024 03:58, Dmitry Gutov wrote:
>> Debugger entered--Lisp error: (wrong-type-argument listp xref)
>>    append(nil nil nil (category . xref) nil nil ...)
>>    display-buffer(#<buffer xref.el> ((category . xref)))
>>    xref--show-pos-in-buf(...)
>>    xref--show-location(...)
>>    command-execute(xref-goto-xref)
>>
>> This is not reproducible in `emacs -Q`.  If you want,
>> I could try to find minimal customization.
>> But the main thing is that with my customization
>> (window-live-p xref--original-window) is nil,
>> so 'xref--show-pos-in-buf' uses the last branch of 'cond'.
> 
> No it's okay - I guess if this makes some customizations easier (not 
> erroring out), that's also a win.

Now pushed to patch to master in commit 0624fe6f849, thanks for the 
comments. I'll wait for the rest of the discussion to settle before 
closing the bug.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 26 Nov 2024 09:15:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 26 04:15:24 2024
Received: from localhost ([127.0.0.1]:45697 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tFrfI-0007Is-3D
	for submit <at> debbugs.gnu.org; Tue, 26 Nov 2024 04:15:24 -0500
Received: from mout.gmx.net ([212.227.15.15]:54433)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1tFrfF-0007Gt-Av
 for 74361 <at> debbugs.gnu.org; Tue, 26 Nov 2024 04:15:22 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at;
 s=s31663417; t=1732612512; x=1733217312; i=rudalics@HIDDEN;
 bh=8hgQlN1cJdupFEqo+O4KpPBxTrqeCUldeIGYD+dbqJU=;
 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=BXwfFlUItOLI/aPP9cf1XKSVBUgpcyH9SrHAm+WOhzMQTuGk5/Ik4syB3tJcQO99
 pKzud5kwDEy0NEBXql4qgNdO9ZC3t/mNXrrtrJy/Cpg075gmzaw9ykV3mHHzbbxVm
 3yzWrYdw8O+s7dot52/1i+bTvNddlh+3lDRjOOo9qGtN3ZxmweCRbhoqAx8vsAAAF
 Ng1IlkFOlDiVVhy/IfRgkBSJp4+mzktTjwIHnYweHMZE7AvRxiPfhENRfEAgzDGFi
 cMjIKTprdBWx1tXvqe7LjmaT8yxEbQXby0P34hjRQih/PW6xRGVjefzcg95I1diG/
 qtrrAgK7DdEKONMKCQ==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.31.113] ([213.142.96.122]) by mail.gmx.net (mrgmx004
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N2V4P-1thcJb1He3-00u4Ks; Tue, 26
 Nov 2024 10:15:12 +0100
Message-ID: <25443bb1-788a-4f06-9350-5d2c666f6795@HIDDEN>
Date: Tue, 26 Nov 2024 10:15:11 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
To: Juri Linkov <juri@HIDDEN>
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <87msi1ueb0.fsf@HIDDEN>
 <4256f446-e11b-450c-b455-131cb75acab0@HIDDEN>
 <871pzbj8mq.fsf@HIDDEN>
 <c05a2b89-cc0b-4489-9011-7449f306cb19@HIDDEN>
 <87sernhxoa.fsf@HIDDEN>
 <fd3fe857-b1fb-41f6-ab4b-72223948b814@HIDDEN>
 <1d08c589-2d0e-4f10-8c2e-e21c206ac118@HIDDEN>
 <f6fbc018-84e0-4137-8c83-0477ee47beff@HIDDEN>
 <e740a50f-ab57-4155-a011-053c3f203841@HIDDEN>
 <78a96965-31c1-4688-b808-2de09d1832c4@HIDDEN>
 <878qt9pz4w.fsf@HIDDEN>
 <05452bef-dd2e-4e93-abdd-6eb391027197@HIDDEN>
 <87y118cyyk.fsf@HIDDEN>
 <f2702b3a-36cc-49d7-a7e5-8833d1f95a3e@HIDDEN>
 <871pyzp6br.fsf@HIDDEN>
Content-Language: en-US
From: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <871pyzp6br.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: base64
X-Provags-ID: V03:K1:j8W08LBGMdlz2pr5D9wqAl6aPlpYCp4uxzwIO7Gx+1dDvSsAQON
 Uei8HvM3eQqHO40enbMjhVk06pjTzOpO+BE9rk1JtTxAmObYHmIzdOd9MNTqKU0nGyjCCde
 kPC+mXDewxWjv0LGYzH+0ZIQYY+YHjedNHA3ijWsWfO3P1n8s3sEg+SW2C0xFNbFKILjw3B
 /6/EgC3m90KBjx/oLcmzQ==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:ysvXFS1k23Q=;LTkjjQhRA67k9vvTan9+01wEF+q
 7g+xCwzTUPWU5WLz3GgLPr1KSoEqo7pHjlufuHqbbKd32svs9rkqcmzsE//06ARpSO1iRWBqU
 nZYAn5vyeILdvZcy27e/5oOq6e7qeV1iGm2CxO2hB2u3JJbGvGw9HPIPqDvsXofUm5XOx42Jr
 esAn22c+EiAeR2GcDPaCTMeGsYBkqVcg0rmvhsEZbn1NGDx99TYgjHg8xuHceAiKts1UKCh/k
 ehvPZIQxsl3fP2otnzAiX2UlSj6NJKjVW/liYcMe1XQPnh+XRvy/HKdYiDupHJwj9Ljt2dMDo
 LzAp1qLFPERTTNz3kxB5aLUIU76K8wM7QnmUQRFB6fqzSltQlQ5r2pAKS6qcoMlml5Ft5J4J6
 VVkOuKejH7ieT3F3fYhqckVnPSoSxA2W7uHPQ/KtspPZw3lw5OHV9ha/UI6pYmIMvP+Azu2uY
 xVz1knTYPMZbj/Jbtl/5yWbR/jpVdigoXRIHRBxpijw4XQ6zMQjNuSkTcL7a5PTD0S4y3F8J8
 jZsRb8UM1cVe3SJY+0B2kJ4veC3BRBfdWTLXS0c7rMig7vdCEakhnGdLSTRH4u9hjDkMSYfqA
 cwzwB8Yml6dfWsYiDra5foTc7kq29gO/8IUh6igUIhs/Py2c4BvvdtSC9rLQokIdH+5SZCvrq
 F7tTbR+7YR+wye+bO4obQsBb7g/rZXV+nBQ5JMEOKxvbCWovqSXWQY5VcNCTYsGI11cSACwHY
 2rtD2cTgoBgE9+OB9XxqtS8yeOsHZDo3xfdO/iBvp3ljKBsLxJEXCau2BCXid7WjSn4Y6dcqN
 3/ZXIIWfnec9tdun5qMjUkPDlLAlHjhDpJE8WqIoYo1Hm9qFtqMqb48mdd3p1DzmsS0y6Iq5S
 Ay0H5/q0HtUDIVSFz6SwS67RLeGd8Z/0MW3ho1/xiZzE46k23onBwa5Ti
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: Dmitry Gutov <dmitry@HIDDEN>, 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

ID4gQmV0dGVyIHRvIHVzZSBzb21ldGhpbmcgZWxzZS4gIFRoZSAnY2F0ZWdvcnknIGFsaXN0
IGVudHJ5DQogPiBpcyBpbnRlbmRlZCB0byBiZSB1c2VkIG9ubHkgaW4gZGlzcGxheS1idWZm
ZXIgY2FsbHMgbGlrZSB0aGlzOg0KID4NCiA+ICAgIChkaXNwbGF5LWJ1ZmZlciAoZ2V0LWJ1
ZmZlci1jcmVhdGUgIippbmZvKiIpDQogPiAgICAgICAgICAgICAgICAgICAgJyhuaWwgKGNh
dGVnb3J5IC4gSW5mby1tb2RlKSkpDQogPg0KID4gdG8gYWxsb3cgdXNpbmcgJ2NhdGVnb3J5
JyBpbiB0aGUgY29uZGl0aW9uIHBhcnQgb2YgZGlzcGxheS1idWZmZXItYWxpc3QNCiA+IHRv
IG1hdGNoIHRoZSBkaXNwbGF5LWJ1ZmZlciBjYWxsOg0KID4NCiA+ICAgIChhZGQtdG8tbGlz
dCAnZGlzcGxheS1idWZmZXItYWxpc3QNCiA+ICAgICAgICAgICAgICAgICAnKChjYXRlZ29y
eSAuIEluZm8tbW9kZSkNCiA+ICAgICAgICAgICAgICAgICAgIChkaXNwbGF5LWJ1ZmZlci1z
YW1lLXdpbmRvdykpKQ0KDQpXaGF0IEkgbWVhbnQgd2FzIHRvIHVzZSBwcmVjaXNlbHkgdGhh
dCBhcw0KDQogICAgIChhZGQtdG8tbGlzdCAnZGlzcGxheS1idWZmZXItYWxpc3QNCiAgICAg
ICAgICAgICAgICAgICcoKGNhdGVnb3J5IC4gZm9vKQ0KICAgICAgICAgICAgICAgICAgICAo
ZGlzcGxheS1idWZmZXItc2FtZS13aW5kb3cpKSkNCg0KSW5mby1tb2RlIE9UT0ggaXMgY29u
ZnVzaW5nIGhlcmU6IEl0IHNob3VsZCBJTU8gYmUgbWF0Y2hlZCBieQ0KDQogICAgICAgICAg
KGJ1ZmZlci1tb2RlICh3aXRoLWN1cnJlbnQtYnVmZmVyIGJ1ZmZlciBtYWpvci1tb2RlKSkN
Cg0KaW4gJ2Rpc3BsYXktYnVmZmVyLXJldXNlLW1vZGUtd2luZG93JyBzaW5jZSBJbmZvLW1v
ZGUgaXMgdGhlDQpidWZmZXItbG9jYWwgdmFsdWUgb2YgJ21ham9yLW1vZGUnIGluIEluZm8g
YnVmZmVycy4gIFNldHRpbmcgaXQgdXAgYXMgYQ0KY2F0ZWdvcnkgbWFrZXMgaGFyZGx5IHNl
bnNlIHRvIG1lLg0KDQonZm9vJyB3b3VsZCBiZSBtdWNoIG1vcmUgZ2VuZXJpYyAoeW91IGRv
bid0IHNheSAnY29taW50LW1vZGUnIGVpdGhlciBpbg0KeW91ciBwcm9wb3NlZCBjaGFuZ2Up
IGFuZCBjb21wbGV0ZWx5IGRldGFjaGVkIGZyb20gdGhlIHNwZWNpZmljIGJ1ZmZlcg0KeW91
IGludGVuZCB0byBzaG93IChpbiBnZW5lcmFsIHlvdSBjYW4ndCBndWVzcyAnY29taW50JyBm
cm9tIHRoZSBtYWpvcg0KbW9kZSBvZiB0aGUgYnVmZmVyIHRvIHNob3cpLiAgSGVuY2UgYSBj
YXRlZ29yeSBjYWxsZWQgJ2Zvbycgd291bGQgaW4gbXkNCmNvbmNlcHQgYmUgbWF0Y2hlZCBi
eSAnYnVmZmVyLW1hdGNoLXAnIHZpYSAnY2F0ZWdvcnknIHBhc3NlZCBhcyBjYXIgb2YNCkNP
TkRJVElPTiBhbmQgYSAnY2F0ZWdvcnknIGVudHJ5IHBhc3NlZCB2aWEgdGhlIGFjdGlvbiBh
bGlzdCBieSB0aGUNCmNhbGxlciBvZiAnZGlzcGxheS1idWZmZXInLg0KDQogPiBXaGF0IHlv
dSBwcm9wb3NlZCBpcyBhIGRpZmZlcmVudCB1c2FnZSBvZiAnY2F0ZWdvcnknDQogPiB0aGF0
IG1ha2VzIHNlbnNlIGluIHRoZSBhY3Rpb24gcGFydCBvZiBkaXNwbGF5LWJ1ZmZlci1hbGlz
dDoNCiA+DQogPiAgICAoYWRkLXRvLWxpc3QgJ2Rpc3BsYXktYnVmZmVyLWFsaXN0DQogPiAg
ICAgICAgICAgICAgICAgJygiXCpIZWxwXCoiDQogPiAgICAgICAgICAgICAgICAgICAoZGlz
cGxheS1idWZmZXItc2FtZS13aW5kb3cpDQogPiAgICAgICAgICAgICAgICAgICAoY2F0ZWdv
cnkgLiBJbmZvLW1vZGUpKSkNCg0KTm8uICBBIHVzZXIgd291bGQgaGF2ZSBubyBpZGVhIG9m
IHRoZSBuYW1lIG9mIHRoZSBidWZmZXIuDQoNCiA+IEl0IHdvdWxkIGJlIGNsZWFuZXIgdG8g
dXNlIGEgZGlmZmVyZW50IGFjdGlvbiBmb3IgdGhpcyBmZWF0dXJlLCBlLmcuOg0KID4NCiA+
ICAgIChhZGQtdG8tbGlzdCAnZGlzcGxheS1idWZmZXItYWxpc3QNCiA+ICAgICAgICAgICAg
ICAgICAnKCJcKkhlbHBcKiINCiA+ICAgICAgICAgICAgICAgICAgIChkaXNwbGF5LWJ1ZmZl
ci1yZXVzZS1jYXRlZ29yeS13aW5kb3cpDQogPiAgICAgICAgICAgICAgICAgICAoY2F0ZWdv
cnkgLiBJbmZvLW1vZGUpKSkNCiA+DQogPiBvciB3aXRob3V0IGFuIGFsaXN0IGVudHJ5Og0K
ID4NCiA+ICAgIChhZGQtdG8tbGlzdCAnZGlzcGxheS1idWZmZXItYWxpc3QNCiA+ICAgICAg
ICAgICAgICAgICAnKCJcKkhlbHBcKiINCiA+ICAgICAgICAgICAgICAgICAgIChkaXNwbGF5
LWJ1ZmZlci1yZXVzZS1jYXRlZ29yeS13aW5kb3cpKSkNCg0KID4gVGhlIG9ubHkgcHJvYmxl
bSBpcyB0aGF0IGl0IHdpbGwgY2hhbmdlIHRoZSBjdXJyZW50IGRlZmF1bHQgYmVoYXZpb3Is
DQogPiBzbyBpbnN0ZWFkIG9mIHVzaW5nIHRoZSBscnUgd2luZG93IGl0IHdpbGwgcHJlZmVy
IHRvIHVzZSB0aGUgd2luZG93DQogPiB3aXRoIHRoZSBzYW1lIGNhdGVnb3J5Lg0KDQpSaWdo
dC4gIEl0IHdvdWxkICgxKSBhZGRyZXNzIHRoZSBwcm9ibGVtIHJhaXNlZCBpbiBidWdzIGxp
a2UgQnVnIzc0MjQ2DQphbmQgd291bGQgKDIpIHN0aWxsIGFsbG93IHVzZXJzIHRvIGhhbmRs
ZSAnZGlzcGxheS1jb21pbnQtYnVmZmVyLWFjdGlvbicNCmFuZCAnZGlzcGxheS10ZXgtc2hl
bGwtYnVmZmVyLWFjdGlvbicgaW4geW91ciBzZW5zZS4gIElmIGFuZCB3aGVuIGZvcg0KdGhl
IGxhdHRlciAnZGlzcGxheS1idWZmZXItdXNlLXNvbWUtd2luZG93JyBpcyBjYWxsZWQsIHRo
ZSBvcmlnaW5hbA0Kc3VnZ2VzdGlvbiBvZiB0aGUgY2FsbGVyIG9mICdkaXNwbGF5LWJ1ZmZl
cicgaGFzIGJlZW4gbGV2ZXJlZCBvdXQNCmFscmVhZHkuDQoNCk9idmlvdXNseSwgdGhlIGNh
bGxlciBoYXMgdG8gYmUgYXdhcmUgb2YgdGhlIGZhY3QgdGhhdCBwcm92aWRpbmcNCihjYXRl
Z29yeSAuIGZvbykgd2l0aG91dCBhbiBhY3Rpb24gZnVuY3Rpb24gd2lsbCBldmVudHVhbGx5
IGdpdmUNCidkaXNwbGF5LWJ1ZmZlci11c2Utc29tZS13aW5kb3cnIHRoZSBvcHBvcnR1bml0
eSB0byBvdmVycmlkZSB0aGUgbHJ1DQp3aXRoIHVzaW5nIGEgd2luZG93IHRoYXQgcHJldmlv
dXNseSBkaXNwbGF5ZWQgYSBidWZmZXIgdGhhdCB3YXMgc3VwcGxpZWQNCndpdGggdGhlIHNh
bWUgY2F0ZWdvcnkgYXJndW1lbnQuICBDYW4geW91IHRoaW5rIG9mIGFueSBoYXJtIHRoaXMg
Y291bGQNCmRvPyAgSSB0aGluayB0aGUgYmVuZWZpdCBvZiBnZXR0aW5nIHJpZCBvZiB0aGUg
bHJ1IGJlaGF2aW9yIGluIHRoZXNlDQpjYXNlcyBieSBmYXIgb3V0d2VpZ2hzIGFueSBzdWNo
IGhhcm1zLg0KDQogPiBJIGN1c3RvbWl6ZWQgJ2Rpc3BsYXktYnVmZmVyLWJhc2UtYWN0aW9u
Jw0KID4gdG8gdXNlICdnZXQtbXJ1LXdpbmRvdycsIHNvIEkgd29uJ3QgYmUgYWZmZWN0ZWQg
YnkgdGhpcyBjaGFuZ2UsDQogPiBidXQgSSBjYXJlIGFib3V0IG90aGVyIHVzZXJzLiAgQXJl
IHlvdSBzdXJlIGl0IHdvdWxkIGJlIGV4cGVjdGFibGUNCiA+IGZvciB1c2VycyB0byBkaXNw
bGF5IGJ1ZmZlcnMgd2l0aCB0aGUgc2FtZSBjYXRlZ29yeSBpbiBvbmUgd2luZG93Pw0KID4g
SG93IHRoZXkgY291bGQgcmV2ZXJ0IHRoaXMgYmVoYXZpb3IgYmFjayB0byB0aGUgcHJldmlv
dXMgZGVmYXVsdD8NCg0KQnkgYWRkaW5nIGEgKHNvbWUtd2luZG93IC4gbmlsKSBvciAoc29t
ZS13aW5kb3cgLiBscnUpIGVudHJ5IHdoaWNoIHdvdWxkDQpvdmVycmlkZSB0aGUgJ2NhdGVn
b3J5JyBlbnRyeS4NCg0KID4gVGhpcyBpcyB3aHkgSSBzdWdnZXN0IHRvIGNyZWF0ZSBhIHNl
cGFyYXRlIGFjdGlvbi4gIElmIHlvdSBhcmUgc3VyZQ0KID4gaXQgc2hvdWxkIGJlIHVzZWQg
YnkgZGVmYXVsdCwgdGhlbiBpdCBjb3VsZCBiZSBpbnNlcnRlZA0KID4gYmVmb3JlIGRpc3Bs
YXktYnVmZmVyLXVzZS1zb21lLXdpbmRvdyBoZXJlOg0KID4NCiA+ICAgIChkZWZjb25zdCBk
aXNwbGF5LWJ1ZmZlci1mYWxsYmFjay1hY3Rpb24NCiA+ICAgICAgJygoZGlzcGxheS1idWZm
ZXItLW1heWJlLXNhbWUtd2luZG93DQogPiAgICAgICAgIGRpc3BsYXktYnVmZmVyLXJldXNl
LXdpbmRvdw0KID4gICAgICAgICBkaXNwbGF5LWJ1ZmZlci0tbWF5YmUtcG9wLXVwLWZyYW1l
LW9yLXdpbmRvdw0KID4gICAgICAgICBkaXNwbGF5LWJ1ZmZlci1pbi1wcmV2aW91cy13aW5k
b3cNCiA+ICAgICAgICAgZGlzcGxheS1idWZmZXItcmV1c2UtY2F0ZWdvcnktd2luZG93IDs7
IDwtLSBORVchDQogPiAgICAgICAgIGRpc3BsYXktYnVmZmVyLXVzZS1zb21lLXdpbmRvdw0K
ID4gICAgICAgICBkaXNwbGF5LWJ1ZmZlci1wb3AtdXAtZnJhbWUpKQ0KID4NCiA+IE90aGVy
d2lzZSwgdXNlcnMgd2lsbCBiZSBhYmxlIHRvIHVzZSB0aGUgbmV3IGFjdGlvbg0KID4gZGlz
cGxheS1idWZmZXItcmV1c2UtY2F0ZWdvcnktd2luZG93IGluIHRoZWlyIGN1c3RvbWl6YXRp
b25zDQogPiBvZiBkaXNwbGF5LWJ1ZmZlci1hbGlzdC4NCg0KV2hhdCBJIHdhbnQgaXMgdG8g
Z2V0IHJpZCBvZiB0aGUgbHJ1IGJlaGF2aW9yIGluIHRoZSBjb250ZXh0IG9mIHNheQ0KQnVn
Izc0MjQ2IGZvciB1c2VycyB3aG8gZG8gX25vdCB3YW50XyB0byB0aW5rZXIgd2l0aA0KJ2Rp
c3BsYXktYnVmZmVyLWFsaXN0Jy4gIE1vc3QgRW1hY3MgdXNlcnMga25vdyBob3cgdG8gc3Bs
aXQgd2luZG93cy4NCkZldyBvZiB0aGVtIG1heSB3YW50IHRvIGhhdmUg4oCYZGlzcGxheS1i
dWZmZXLigJkgdXNlIHRoZW0gdXAgcGllY2VtZWFsIGJ5DQpldmVudHVhbGx5IGRpc3BsYXlp
bmcgaW1hZ2VzIGluIGFsbCBvZiB0aGVtLg0KDQptYXJ0aW4NCg==




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 25 Nov 2024 17:52:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 25 12:52:39 2024
Received: from localhost ([127.0.0.1]:40316 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tFdGI-0003pX-Tn
	for submit <at> debbugs.gnu.org; Mon, 25 Nov 2024 12:52:39 -0500
Received: from relay2-d.mail.gandi.net ([217.70.183.194]:60137)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1tFdGG-0003p9-OL
 for 74361 <at> debbugs.gnu.org; Mon, 25 Nov 2024 12:52:37 -0500
Received: by mail.gandi.net (Postfix) with ESMTPSA id 8E93440002;
 Mon, 25 Nov 2024 17:52:08 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
In-Reply-To: <f2702b3a-36cc-49d7-a7e5-8833d1f95a3e@HIDDEN> (martin rudalics's
 message of "Mon, 25 Nov 2024 10:18:34 +0100")
Organization: LINKOV.NET
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <87msi1ueb0.fsf@HIDDEN>
 <4256f446-e11b-450c-b455-131cb75acab0@HIDDEN>
 <871pzbj8mq.fsf@HIDDEN>
 <c05a2b89-cc0b-4489-9011-7449f306cb19@HIDDEN>
 <87sernhxoa.fsf@HIDDEN>
 <fd3fe857-b1fb-41f6-ab4b-72223948b814@HIDDEN>
 <1d08c589-2d0e-4f10-8c2e-e21c206ac118@HIDDEN>
 <f6fbc018-84e0-4137-8c83-0477ee47beff@HIDDEN>
 <e740a50f-ab57-4155-a011-053c3f203841@HIDDEN>
 <78a96965-31c1-4688-b808-2de09d1832c4@HIDDEN>
 <878qt9pz4w.fsf@HIDDEN>
 <05452bef-dd2e-4e93-abdd-6eb391027197@HIDDEN>
 <87y118cyyk.fsf@HIDDEN>
 <f2702b3a-36cc-49d7-a7e5-8833d1f95a3e@HIDDEN>
Date: Mon, 25 Nov 2024 19:49:40 +0200
Message-ID: <871pyzp6br.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: Dmitry Gutov <dmitry@HIDDEN>, 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> We can't reasonably expect packages to set up yet another alist entry
> type like 'group'.  package writers just would not understand it.  So it
> simply _has_ to be 'category' (or something else but still only one
> thing).

Better to use something else.  The 'category' alist entry
is intended to be used only in display-buffer calls like this:

  (display-buffer (get-buffer-create "*info*")
                  '(nil (category . Info-mode)))

to allow using 'category' in the condition part of display-buffer-alist
to match the display-buffer call:

  (add-to-list 'display-buffer-alist
               '((category . Info-mode)
                 (display-buffer-same-window)))

What you proposed is a different usage of 'category'
that makes sense in the action part of display-buffer-alist:

  (add-to-list 'display-buffer-alist
               '("\*Help\*"
                 (display-buffer-same-window)
                 (category . Info-mode)))

It would be cleaner to use a different action for this feature, e.g.:

  (add-to-list 'display-buffer-alist
               '("\*Help\*"
                 (display-buffer-reuse-category-window)
                 (category . Info-mode)))

or without an alist entry:

  (add-to-list 'display-buffer-alist
               '("\*Help\*"
                 (display-buffer-reuse-category-window)))

> Hence any magic users might not want would have to be implemented within
> 'display-buffer'.  If say 'run-scheme' wants the same window, then we
> already have a problem since a *scheme* window might already exist from
> a previous run and it should try 'display-buffer-reuse-window' first.
> But this is something for people setting up the default.
>
> Now if no 'inhibit-same-window' alist entry is found and the selected
> window is not dedicated to another buffer, 'display-buffer' would use
> the selected window as requested.  No automagic here.  Otherwise, it
> would look for a window with a 'category' window parameter equaling
> 'comint' which could, let's assume the worst, mean to use an existing
> *shell* window with a running process the user might be attentively
> following at that moment.  But the same could happen with your proposal
> as well.  So any automagic here should not harm either.
>
> The automagic would come into play when neither caller nor user specify
> a particular preference for a window or all other preferences have been
> exhausted and 'display-buffer' invokes 'display-buffer-use-some-window'
> (not 'display-buffer-reuse-window') in which case that function would
> look for a window with a matching 'category' parameter.  Which problems
> do you see here?

The only problem is that it will change the current default behavior,
so instead of using the lru window it will prefer to use the window
with the same category.  I customized 'display-buffer-base-action'
to use 'get-mru-window', so I won't be affected by this change,
but I care about other users.  Are you sure it would be expectable
for users to display buffers with the same category in one window?
How they could revert this behavior back to the previous default?

This is why I suggest to create a separate action.  If you are sure
it should be used by default, then it could be inserted
before display-buffer-use-some-window here:

  (defconst display-buffer-fallback-action
    '((display-buffer--maybe-same-window
       display-buffer-reuse-window
       display-buffer--maybe-pop-up-frame-or-window
       display-buffer-in-previous-window
       display-buffer-reuse-category-window ;; <-- NEW!
       display-buffer-use-some-window
       display-buffer-pop-up-frame))

Otherwise, users will be able to use the new action
display-buffer-reuse-category-window in their customizations
of display-buffer-alist.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 25 Nov 2024 09:18:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 25 04:18:50 2024
Received: from localhost ([127.0.0.1]:37872 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tFVF4-0004nj-4G
	for submit <at> debbugs.gnu.org; Mon, 25 Nov 2024 04:18:50 -0500
Received: from mout.gmx.net ([212.227.15.19]:34185)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1tFVF1-0004nW-Jj
 for 74361 <at> debbugs.gnu.org; Mon, 25 Nov 2024 04:18:48 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at;
 s=s31663417; t=1732526318; x=1733131118; i=rudalics@HIDDEN;
 bh=3c0lYVWKAyuhBEo5J4l3iakt3JCkK9NIwFSJAjCvNRM=;
 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=lckm1ub1+z1vMPizeoRnffLv+hyoMD3zxv8Z+2GSx5zwrJeLIMZhNfmw4XZ0Bmur
 Mfr7+xlWayCXKntUkuRtF0H8Gic/2qSmYBGokB4wi+bmIwC9tRgOR+MYfkJJyh1y9
 hc5LnobFAuVhfUysTO+nmF+5dEF80PQl8pTBDQaAaIFM33yoSp/MHwDQkH16KLsZT
 ay5/VwYmFLg60/SvVGyimr63JVKkkzIN8GDHgkktVaPttS+ICP+yeP18AFX3rmpQ3
 XCIQFBu6H5YDdGXBeQTDYCupugL9nGcm3woVEaxSnQcvOfo++5eKbeKzHODAuyErD
 Si3LVe3e7ADhPxIdBw==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.31.113] ([213.142.96.218]) by mail.gmx.net (mrgmx004
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MpDNl-1u41rt2FEl-00gonZ; Mon, 25
 Nov 2024 10:18:38 +0100
Message-ID: <f2702b3a-36cc-49d7-a7e5-8833d1f95a3e@HIDDEN>
Date: Mon, 25 Nov 2024 10:18:34 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
To: Juri Linkov <juri@HIDDEN>
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <87msi1ueb0.fsf@HIDDEN>
 <4256f446-e11b-450c-b455-131cb75acab0@HIDDEN>
 <871pzbj8mq.fsf@HIDDEN>
 <c05a2b89-cc0b-4489-9011-7449f306cb19@HIDDEN>
 <87sernhxoa.fsf@HIDDEN>
 <fd3fe857-b1fb-41f6-ab4b-72223948b814@HIDDEN>
 <1d08c589-2d0e-4f10-8c2e-e21c206ac118@HIDDEN>
 <f6fbc018-84e0-4137-8c83-0477ee47beff@HIDDEN>
 <e740a50f-ab57-4155-a011-053c3f203841@HIDDEN>
 <78a96965-31c1-4688-b808-2de09d1832c4@HIDDEN>
 <878qt9pz4w.fsf@HIDDEN>
 <05452bef-dd2e-4e93-abdd-6eb391027197@HIDDEN>
 <87y118cyyk.fsf@HIDDEN>
Content-Language: en-US
From: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <87y118cyyk.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:3pdOP6qkvfGw6BLq8seaoBabyhAoFk6SDXG78SYCxD1duuw9AfU
 8ztMZtwGLOq7UPjv2VLa43cR4tF+aC1pbFe1Xe4JHeDYpkM93x/DzcDvrP6gcOlc9mQctu0
 VIs+t5/PrmS/4p9UcKBOC61aAHaOAn3y1JkWBn2vsfqBUPqQcRbJSA7+XCV0wudkxDgo2nm
 FszxMfl+RRN8Lb/5BeUUQ==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:n/PQhcVmhLg=;dhevydTwbWuM8gSmyLz7F+Ul+9W
 OLNHl5oHDr8AVX2CZNeoRjZchdtxaUl3MsogyjATP9A6qE+yqRBTspIaR5JPpV2D3+oZVeSfP
 6K2K3TcXFkVnX9a8vNjLH2uQudbU5V+762SEnmiEDRXQEkHGyEGbF2Rd/8e/uyXJGfigFCbRE
 TsTk3w/GPCDDZgPsMqx/pyWzbnd8F2D2DnD6g0qsxEZSQtL4zTzprCXuX3Bp2v9aOjyFSJ/be
 hTDbwczhfK7XBn4YgPbZ/L+uclI0rmkx4JviJvYwjmwimszebMk1Wn0YkQP0dIr1ei935iDM+
 LhwYbWdK1g0KsSTRttljREq/VAF6tnC1dhyS4DD4CpPgDEvUVKj2djlQIWPdyGE1zCvjLwrWZ
 MzdptWwXGpeiMH9t5Glb+AiiiclClyK4gbif4DnMFJ1qvR7A/u3oLFvRDNcjKL8Lj6q8QqElo
 cG6Ix5ADScInAKyp++QCZ6tq8DUBtgb6HUvVrrvqd5YOKppwA7luR/ArvW6DT3+8FNzKwSmlg
 Cc7ZbBkoIgUd0mqHDxD9ou7OQXim9CifUG6/3mVo4oAjFLn6vFhLxrezpVvGTQPUb+NznPEeb
 xvcOlnKQa982WF6MsERBxU7qWNGWLVLr/F5LWfDkZyZNV0PHdtAMfznoKqB56kRL5UOEMog9e
 LiVbHuojfXT/E1BMRsTTAbDvLVt+oXfBt+uP+P6RP1AhtklGr2zQ6xUiPUH/kecegb9g3cnFU
 vySnAtIMeOYvH7X1z2GaQ7Rf3TtvPDlzOmT1NzJhShwSi22i4vS3w1QNgaTA+9QNNzKKH5qNI
 P1Ogy9aUqEMmK7u3Jw6Jre6aF1veRtXbuB8YK/ncEWJNBlTkton/oAWSShD9ybbHMbMpGklFL
 HoQuPpdV1BsIi07Ok6Mz2HrYpyPIKF0GfjKbKooWlY/k4SktCGs3rwg55
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: Dmitry Gutov <dmitry@HIDDEN>, 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 > The key word is "automagically".  Only this is a problem.
 > Many users might not want such magic.
[...]
 > But the category should be the same to match:
 >
 >    (add-to-list 'display-buffer-alist
 >                 '((category . Info-mode)
 >                   (display-buffer-same-window)))
 >
 >    (display-buffer (get-buffer-create "*info*")
 >                    '(nil (category . Info-mode)))
 >
 > So for a similar function like 'display-buffer-reuse-category-window'
 > we need another alist element, not 'category'.
 > Maybe 'display-buffer-reuse-group-window' with 'group' list element
 > for a group of buffers in the same window.

We can't reasonably expect packages to set up yet another alist entry
type like 'group'.  package writers just would not understand it.  So it
simply _has_ to be 'category' (or something else but still only one
thing).

Hence any magic users might not want would have to be implemented within
'display-buffer'.  If say 'run-scheme' wants the same window, then we
already have a problem since a *scheme* window might already exist from
a previous run and it should try 'display-buffer-reuse-window' first.
But this is something for people setting up the default.

Now if no 'inhibit-same-window' alist entry is found and the selected
window is not dedicated to another buffer, 'display-buffer' would use
the selected window as requested.  No automagic here.  Otherwise, it
would look for a window with a 'category' window parameter equaling
'comint' which could, let's assume the worst, mean to use an existing
*shell* window with a running process the user might be attentively
following at that moment.  But the same could happen with your proposal
as well.  So any automagic here should not harm either.

The automagic would come into play when neither caller nor user specify
a particular preference for a window or all other preferences have been
exhausted and 'display-buffer' invokes 'display-buffer-use-some-window'
(not 'display-buffer-reuse-window') in which case that function would
look for a window with a matching 'category' parameter.  Which problems
do you see here?

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 25 Nov 2024 07:32:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 25 02:32:32 2024
Received: from localhost ([127.0.0.1]:37674 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tFTaB-0008LN-Ja
	for submit <at> debbugs.gnu.org; Mon, 25 Nov 2024 02:32:32 -0500
Received: from relay4-d.mail.gandi.net ([217.70.183.196]:59295)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1tFTa8-0008L7-EM
 for 74361 <at> debbugs.gnu.org; Mon, 25 Nov 2024 02:32:30 -0500
Received: by mail.gandi.net (Postfix) with ESMTPSA id 8E4F9E0007;
 Mon, 25 Nov 2024 07:31:58 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
In-Reply-To: <86frnhj7cc.fsf@HIDDEN> (Eli Zaretskii's message of "Sun, 24 Nov
 2024 11:42:43 +0200")
Organization: LINKOV.NET
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <8634jrin5v.fsf@HIDDEN>
 <b0b96c86-d22a-4569-938a-d15a527ced84@HIDDEN>
 <86ikskvie0.fsf@HIDDEN>
 <97e7ec85-7e5c-4aa4-a85f-b5f40adc8de6@HIDDEN>
 <8634jov5ir.fsf@HIDDEN>
 <c5265c5b-b48a-4e48-a52d-79cd956a4082@HIDDEN>
 <86serntf0h.fsf@HIDDEN> <86h680rhxr.fsf@HIDDEN>
 <87h680fotv.fsf@HIDDEN> <864j40pfbw.fsf@HIDDEN>
 <87bjy8e5qc.fsf@HIDDEN> <86y11cnyws.fsf@HIDDEN>
 <87iksfpwlr.fsf@HIDDEN> <86jzcvof10.fsf@HIDDEN>
 <87h67xren9.fsf@HIDDEN> <864j3xlr2r.fsf@HIDDEN>
 <87r071oj96.fsf@HIDDEN> <8634jhlp3p.fsf@HIDDEN>
 <87o725f5p4.fsf@HIDDEN> <86frnhj7cc.fsf@HIDDEN>
Date: Mon, 25 Nov 2024 09:28:22 +0200
Message-ID: <87ldx73h7t.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: dmitry@HIDDEN, 74361 <at> debbugs.gnu.org, rudalics@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain

>> Do you mean that the users might want to shoot themselves in the foot
>> and remove '(category . comint)' from the default value of
>> display-comint-buffer-action?
>
> Yes, that's the scenario that bothers me.  Users could do that without
> understanding the subtleties of the issue.
>
>> Then indeed we need to move '(category . comint)' directly
>> to every display-buffer call that currently uses
>> display-comint-buffer-action.
>
> I think we should do that for Emacs 31, yes.

Ok, here is the patch for Emacs 31:


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline;
 filename=remove-display-comint-buffer-action.patch

diff --git a/etc/NEWS b/etc/NEWS
index d7047d0923f..9c5b2db203e 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -154,6 +154,12 @@ that the actual killing or burying of the buffer is done by the caller.
 With this option set, 'quit-restore-window' will delete its window more
 aggressively rather than switching to some other buffer in it.
 
+---
+*** The user option 'display-comint-buffer-action' has been removed.
+It has been obsolete since Emacs 30.1.  Use '(category . comint)' instead.
+Another user option 'display-tex-shell-buffer-action' has been removed too
+for which you can use '(category . tex-shell)'.
+
 ** Frames
 
 +++
diff --git a/lisp/cmuscheme.el b/lisp/cmuscheme.el
index d4316fb1175..b03cf1f1840 100644
--- a/lisp/cmuscheme.el
+++ b/lisp/cmuscheme.el
@@ -238,8 +238,8 @@ run-scheme
 	(inferior-scheme-mode)))
   (setq scheme-program-name cmd)
   (setq scheme-buffer "*scheme*")
-  (with-suppressed-warnings ((obsolete display-comint-buffer-action))
-    (pop-to-buffer "*scheme*" display-comint-buffer-action)))
+  (pop-to-buffer "*scheme*" (append display-buffer--same-window-action
+                                    '((category . comint)))))
 
 (defun scheme-start-file (prog)
   "Return the name of the start file corresponding to PROG.
@@ -359,8 +359,8 @@ switch-to-scheme
   (interactive "P")
   (if (or (and scheme-buffer (get-buffer scheme-buffer))
           (scheme-interactively-start-process))
-      (with-suppressed-warnings ((obsolete display-comint-buffer-action))
-        (pop-to-buffer scheme-buffer display-comint-buffer-action))
+      (pop-to-buffer scheme-buffer (append display-buffer--same-window-action
+                                           '((category . comint))))
     (error "No current process buffer.  See variable `scheme-buffer'"))
   (when eob-p
     (push-mark)
diff --git a/lisp/shell.el b/lisp/shell.el
index 6cfae470cd7..33d80061ada 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -953,8 +953,8 @@ shell
                  (current-buffer)))
   ;; The buffer's window must be correctly set when we call comint
   ;; (so that comint sets the COLUMNS env var properly).
-  (with-suppressed-warnings ((obsolete display-comint-buffer-action))
-    (pop-to-buffer buffer display-comint-buffer-action))
+  (pop-to-buffer buffer (append display-buffer--same-window-action
+                                '((category . comint))))
 
   (with-connection-local-variables
    (when file-name
diff --git a/lisp/window.el b/lisp/window.el
index c790118c5e0..e9d57652ec6 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -9115,35 +9115,6 @@ pop-to-buffer-same-window
 another window."
   (pop-to-buffer buffer display-buffer--same-window-action norecord))
 
-(defcustom display-comint-buffer-action
-  (append display-buffer--same-window-action '((category . comint)))
-  "`display-buffer' action for displaying comint buffers."
-  :type display-buffer--action-custom-type
-  :risky t
-  :version "29.1"
-  :group 'windows
-  :group 'comint)
-
-(make-obsolete-variable
- 'display-comint-buffer-action
- "use a `(category . comint)' condition in `display-buffer-alist'."
- "30.1")
-
-(defcustom display-tex-shell-buffer-action '(display-buffer-in-previous-window
-                                             (inhibit-same-window . t)
-                                             (category . tex-shell))
-  "`display-buffer' action for displaying TeX shell buffers."
-  :type display-buffer--action-custom-type
-  :risky t
-  :version "29.1"
-  :group 'windows
-  :group 'tex-run)
-
-(make-obsolete-variable
- 'display-tex-shell-buffer-action
- "use a `(category . tex-shell)' condition in `display-buffer-alist'."
- "30.1")
-
 (defun read-buffer-to-switch (prompt)
   "Read the name of a buffer to switch to, prompting with PROMPT.
 Return the name of the buffer as a string.
diff --git a/lisp/eshell/eshell.el b/lisp/eshell/eshell.el
index fc08734d5f3..3def918bdd1 100644
--- a/lisp/eshell/eshell.el
+++ b/lisp/eshell/eshell.el
@@ -278,8 +278,8 @@ eshell
 		   (t
 		    (get-buffer-create eshell-buffer-name)))))
     (cl-assert (and buf (buffer-live-p buf)))
-    (with-suppressed-warnings ((obsolete display-comint-buffer-action))
-      (pop-to-buffer buf display-comint-buffer-action))
+    (pop-to-buffer buf (append display-buffer--same-window-action
+                               '((category . comint))))
     (unless (derived-mode-p 'eshell-mode)
       (eshell-mode))
     buf))
diff --git a/lisp/org/ol-eshell.el b/lisp/org/ol-eshell.el
index 595dd0ee0f8..e364a38c17d 100644
--- a/lisp/org/ol-eshell.el
+++ b/lisp/org/ol-eshell.el
@@ -51,9 +51,9 @@ org-eshell-open
     (if (get-buffer eshell-buffer-name)
         (pop-to-buffer
          eshell-buffer-name
-         (if (boundp 'display-comint-buffer-action) ; Emacs >= 29
+         (if (boundp 'display-comint-buffer-action) ; Emacs >= 29, <= 30
              display-comint-buffer-action
-           '(display-buffer-same-window (inhibit-same-window))))
+           '(display-buffer-same-window (inhibit-same-window) (category . comint))))
       (eshell))
     (goto-char (point-max))
     (eshell-kill-input)
diff --git a/lisp/progmodes/inf-lisp.el b/lisp/progmodes/inf-lisp.el
index 85fc6b930f5..b092b3b679c 100644
--- a/lisp/progmodes/inf-lisp.el
+++ b/lisp/progmodes/inf-lisp.el
@@ -308,8 +308,8 @@ inferior-lisp
 			   "inferior-lisp" (car cmdlist) nil (cdr cmdlist)))
 	(inferior-lisp-mode)))
   (setq inferior-lisp-buffer "*inferior-lisp*")
-  (with-suppressed-warnings ((obsolete display-comint-buffer-action))
-    (pop-to-buffer "*inferior-lisp*" display-comint-buffer-action)))
+  (pop-to-buffer "*inferior-lisp*" (append display-buffer--same-window-action
+                                           '((category . comint)))))
 
 ;;;###autoload
 (defalias 'run-lisp 'inferior-lisp)
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index cf1c94a6d20..94f70c9a854 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -1376,7 +1376,8 @@ project-shell
          (shell-buffer (get-buffer default-project-shell-name)))
     (if (and shell-buffer (not current-prefix-arg))
         (if (comint-check-proc shell-buffer)
-            (pop-to-buffer shell-buffer (bound-and-true-p display-comint-buffer-action))
+            (pop-to-buffer shell-buffer (append display-buffer--same-window-action
+                                                '((category . comint))))
           (shell shell-buffer))
       (shell (generate-new-buffer-name default-project-shell-name)))))
 
@@ -1393,7 +1394,8 @@ project-eshell
          (eshell-buffer-name (project-prefixed-buffer-name "eshell"))
          (eshell-buffer (get-buffer eshell-buffer-name)))
     (if (and eshell-buffer (not current-prefix-arg))
-        (pop-to-buffer eshell-buffer (bound-and-true-p display-comint-buffer-action))
+        (pop-to-buffer eshell-buffer (append display-buffer--same-window-action
+                                             '((category . comint))))
       (eshell t))))
 
 ;;;###autoload
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index 8ba64100203..397a66582fa 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -1435,8 +1435,9 @@ sh-shell-process
 (defun sh-show-shell ()
   "Pop the shell interaction buffer."
   (interactive)
-  (with-suppressed-warnings ((obsolete display-comint-buffer-action))
-    (pop-to-buffer (process-buffer (sh-shell-process t)) display-comint-buffer-action)))
+  (pop-to-buffer (process-buffer (sh-shell-process t))
+                 (append display-buffer--same-window-action
+                         '((category . comint)))))
 
 (defun sh-send-text (text)
   "Send TEXT to `sh-shell-process'."
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index 9cb95f59da4..06a45112719 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -2092,8 +2092,9 @@ tex-feed-input
 
 (defun tex-display-shell ()
   "Make the TeX shell buffer visible in a window."
-  (with-suppressed-warnings ((obsolete display-tex-shell-buffer-action))
-    (display-buffer (tex-shell-buf) display-tex-shell-buffer-action))
+  (display-buffer (tex-shell-buf) '(display-buffer-in-previous-window
+                                    (inhibit-same-window . t)
+                                    (category . tex-shell)))
   (tex-recenter-output-buffer nil))
 
 (defun tex-shell-sentinel (proc _msg)
@@ -2753,8 +2754,9 @@ tex-recenter-output-buffer
     (if (null tex-shell)
 	(message "No TeX output buffer")
       (when-let* ((window
-                   (with-suppressed-warnings ((obsolete display-tex-shell-buffer-action))
-                     (display-buffer tex-shell display-tex-shell-buffer-action))))
+                   (display-buffer tex-shell '(display-buffer-in-previous-window
+                                               (inhibit-same-window . t)
+                                               (category . tex-shell)))))
         (with-selected-window window
 	  (bury-buffer tex-shell)
 	  (goto-char (point-max))

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 25 Nov 2024 01:58:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 24 20:58:23 2024
Received: from localhost ([127.0.0.1]:36668 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tFOMo-00008w-FO
	for submit <at> debbugs.gnu.org; Sun, 24 Nov 2024 20:58:23 -0500
Received: from fout-b7-smtp.messagingengine.com ([202.12.124.150]:41953)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1tFOMh-00008P-2k
 for 74361 <at> debbugs.gnu.org; Sun, 24 Nov 2024 20:58:20 -0500
Received: from phl-compute-11.internal (phl-compute-11.phl.internal
 [10.202.2.51])
 by mailfout.stl.internal (Postfix) with ESMTP id 3F029114015C;
 Sun, 24 Nov 2024 20:58:09 -0500 (EST)
Received: from phl-mailfrontend-02 ([10.202.2.163])
 by phl-compute-11.internal (MEProxy); Sun, 24 Nov 2024 20:58:09 -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=1732499889;
 x=1732586289; bh=SJCgn7aqigKc+Eu7TfeMAlZqE5glv1oJTDIixr9mmSA=; b=
 pJZaRiRidF6Puzx59UowrcFNV1+soZDv6+m5VY3+MalfPRRl5wkUetCQgK4Lf7kF
 hlBywzhZJEQhCtd1kcPxH2VRYPa0qskqga/2T2sWaT+Iesz25cT/aL1L0/Z1ybqf
 wqM8HbaNm6WPs6FhMpbFBuvvdG/h0jxTqt+Y5CWXYwbNcaUcoTHQ8pSJK9ftt2nS
 P/43cIi6+CQt9yeedSjPoHP8xcOuA84i0QpStH3BxJ5mcuRtDVtOEHyzIyieX84J
 gRfJR95meFKdleB6w/u2pkkiXbZx33o8ejqC3e0D2l1I6U5O0ba/fz3TYfTFWT4G
 wa6h3xIFwdDWE1Gaxa7jHA==
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=1732499889; x=
 1732586289; bh=SJCgn7aqigKc+Eu7TfeMAlZqE5glv1oJTDIixr9mmSA=; b=g
 afn+KQbDT+17EC7+VPxBW0ce+4P6Reh8cHFkQy/wyqUeKk+fP2Xk9Sp8AJB7ulFc
 1tr7K2CECwN7uKEfevh9HQoQySZXmAxjB5xuYQ6zq/hPAr6BoQSiecZf1CA6fYgH
 ZHAqWSdkncthBV0iy6MfH+1vyE4nzLc9x2aOmjaJHxzjXUibkZ0f9r5+4nsOw33v
 q3t5NBJu4cB1DLE4zhv+XoGD15EOzPAJUN5ZjmmLIWrtUThjMOwxxYHhvN+4+EkS
 6MHy0fDuq0zEyfG/EkkL0bmkqjn7Bdh9O9E8CwfV8bOl3i/mecW9RMiuiweHRpyh
 nIndUGcWGYi5TSCW5YbWw==
X-ME-Sender: <xms:sNlDZx9xV7-eHEvaaxBmroB69nawN_uQ-jDOWfCYW_BFy_ktc2wHDA>
 <xme:sNlDZ1sgZ3qIk_NpbZChtmAOaKk9qQcagJxjD7oKIhEV81F3vTbvK5U8m0JYG_loV
 pqKcBbYfIEO2nECIKY>
X-ME-Received: <xmr:sNlDZ_DgPnpJ-n6fc7_M5VX9whFd7OXFHlbbqscG0iTVL3ovJSgnWVMsTP3PD3cP_aaM>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrgeeggdegtdcutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr
 tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth
 hsucdlqddutddtmdenucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeen
 ucfhrhhomhepffhmihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvg
 hvqeenucggtffrrghtthgvrhhnpeetudeljeegheetgfehgeejkeeuhedvveeikeeufedt
 vddtveefhfdvveegudejheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh
 grihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvhdpnhgspghrtghpthhtohep
 fedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepjhhurhhisehlihhnkhhovhdrnh
 gvthdprhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtpdhrtghpthhtohepjeeg
 feeiudesuggvsggsuhhgshdrghhnuhdrohhrgh
X-ME-Proxy: <xmx:sNlDZ1fSAE3RBApuWfmL0xpImjj4UKZ7NCT4lxlDQbbfNzOYnPS1OQ>
 <xmx:sNlDZ2N9yxxSD7swUfUhikOjihAfTzUHvH5FfrENGwLIh3gYgkzNdQ>
 <xmx:sNlDZ3nxdQcBXyVR1RA9aSX7sT_v0Cp80ETDMsdzT3e8tLt4HPHlfA>
 <xmx:sNlDZwsYVCBqFg3_WzuYmS8nkmEso9Tw_1l_L3tqqFfUkWmkvJ7-9Q>
 <xmx:sdlDZzqtUyrjQUc4A42pJvGAQ937xiY2x9dRiS6IC3N16QkudBgvlu6M>
Feedback-ID: i07de48aa:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun,
 24 Nov 2024 20:58:07 -0500 (EST)
Message-ID: <4df18965-61f5-41a6-a5ee-67f18b02b1b5@HIDDEN>
Date: Mon, 25 Nov 2024 03:58:05 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
To: Juri Linkov <juri@HIDDEN>
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <87msi1ueb0.fsf@HIDDEN>
 <4256f446-e11b-450c-b455-131cb75acab0@HIDDEN>
 <871pzbj8mq.fsf@HIDDEN>
 <c05a2b89-cc0b-4489-9011-7449f306cb19@HIDDEN>
 <87sernhxoa.fsf@HIDDEN>
 <fd3fe857-b1fb-41f6-ab4b-72223948b814@HIDDEN>
 <875xoi4cei.fsf@HIDDEN>
 <2ef677aa-1433-4aaa-92a5-c600774dd457@HIDDEN>
 <87frnl9h0w.fsf@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <87frnl9h0w.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 74361
Cc: martin rudalics <rudalics@HIDDEN>, 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 21/11/2024 09:34, Juri Linkov wrote:
>>> 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.
> While using your patch I got this error caused by missing nil:
> 
> Debugger entered--Lisp error: (wrong-type-argument listp xref)
>    append(nil nil nil (category . xref) nil nil ...)
>    display-buffer(#<buffer xref.el> ((category . xref)))
>    xref--show-pos-in-buf(...)
>    xref--show-location(...)
>    command-execute(xref-goto-xref)
> 
> This is not reproducible in `emacs -Q`.  If you want,
> I could try to find minimal customization.
> But the main thing is that with my customization
> (window-live-p xref--original-window) is nil,
> so 'xref--show-pos-in-buf' uses the last branch of 'cond'.

No it's okay - I guess if this makes some customizations easier (not 
erroring out), that's also a win.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 24 Nov 2024 17:46:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 24 12:46:56 2024
Received: from localhost ([127.0.0.1]:35940 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tFGhE-0001xz-Hx
	for submit <at> debbugs.gnu.org; Sun, 24 Nov 2024 12:46:56 -0500
Received: from relay2-d.mail.gandi.net ([217.70.183.194]:50687)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1tFGhC-0001xl-48
 for 74361 <at> debbugs.gnu.org; Sun, 24 Nov 2024 12:46:54 -0500
Received: by mail.gandi.net (Postfix) with ESMTPSA id 33F3C40002;
 Sun, 24 Nov 2024 17:46:26 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
In-Reply-To: <05452bef-dd2e-4e93-abdd-6eb391027197@HIDDEN> (martin rudalics's
 message of "Sun, 24 Nov 2024 09:59:03 +0100")
Organization: LINKOV.NET
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <87msi1ueb0.fsf@HIDDEN>
 <4256f446-e11b-450c-b455-131cb75acab0@HIDDEN>
 <871pzbj8mq.fsf@HIDDEN>
 <c05a2b89-cc0b-4489-9011-7449f306cb19@HIDDEN>
 <87sernhxoa.fsf@HIDDEN>
 <fd3fe857-b1fb-41f6-ab4b-72223948b814@HIDDEN>
 <1d08c589-2d0e-4f10-8c2e-e21c206ac118@HIDDEN>
 <f6fbc018-84e0-4137-8c83-0477ee47beff@HIDDEN>
 <e740a50f-ab57-4155-a011-053c3f203841@HIDDEN>
 <78a96965-31c1-4688-b808-2de09d1832c4@HIDDEN>
 <878qt9pz4w.fsf@HIDDEN>
 <05452bef-dd2e-4e93-abdd-6eb391027197@HIDDEN>
Date: Sun, 24 Nov 2024 19:40:19 +0200
Message-ID: <87y118cyyk.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: Dmitry Gutov <dmitry@HIDDEN>, 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> 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.
>
> This is over my head: How can a (category . foo) entry make sense if it
> is not initially set up by the 'foo' package?  As a user I might not
> have the slightest idea of categories.  I'd proceed as follows:
>
> - Package 'foo' designates a 'display-buffer' call as something
>   pertaining to 'foo-some' by adding a (category . foo-some) alist entry
>   and facultatively providing one or a couple of suitable action
>   functions.
>
> - A knowledgeable user can override the suggestion of 'foo' by putting
>   into 'display-buffer-alist' a (category . foo-some) condition (so
>   'buffer-match-p' will handle it) with an appropriate ACTION.
>
> - 'display-buffer' has to
>
>   - respect the user customization if there is one (and it's not
>     overridden by the caller),
>
>   - tries any action function provided by the caller,
>
>   - automagically tries to do something reasonable by finding a window
>     that already has an association with 'foo-some'.
>
> Am I wrong about this concept?

The key word is "automagically".  Only this is a problem.
Many users might not want such magic.

Compare this with 'display-buffer-reuse-mode-window'.
Its alist entry `mode' is not the same as `major-mode' in condition:

  (add-to-list 'display-buffer-alist
               '((major-mode . Info-mode)
                 (display-buffer-reuse-mode-window)
                 (mode . help-mode)))

But the category should be the same to match:

  (add-to-list 'display-buffer-alist
               '((category . Info-mode)
                 (display-buffer-same-window)))

  (display-buffer (get-buffer-create "*info*")
                  '(nil (category . Info-mode)))

So for a similar function like 'display-buffer-reuse-category-window'
we need another alist element, not 'category'.
Maybe 'display-buffer-reuse-group-window' with 'group' list element
for a group of buffers in the same window.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 24 Nov 2024 09:42:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 24 04:42:54 2024
Received: from localhost ([127.0.0.1]:32880 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tF98o-0001JD-4o
	for submit <at> debbugs.gnu.org; Sun, 24 Nov 2024 04:42:54 -0500
Received: from eggs.gnu.org ([209.51.188.92]:35550)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1tF98m-0001Iz-6y
 for 74361 <at> debbugs.gnu.org; Sun, 24 Nov 2024 04:42:53 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tF98g-0004sT-C4; Sun, 24 Nov 2024 04:42:46 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=H8bGtVBJzNIw+aFX7JkuC3KPULyPfA/rN8r6xNgLiys=; b=MaTBxD0cn9/K
 Ua9gasQ67cchyIueqoWacOB9Ah6H76U9pHst1YiWdPWG8BzuZ9DLjc7+wZcKAu+/82zEdZp1P2Gjs
 MCvgwGLIvmjNZVUR0hG+05ghzXVOlbVdp3xXWA6ZRdIMh5NrDmGMhGrRN6CVzq2HBX9Vk84ynHQ6/
 5alRIhojIj+bIAzdnn5t/Jx9ozlpf+lt2UW5UqpTHeJE3fkSVhR4/MkqeNjmwRIL8NlAvlkebE90P
 X7Hv4zIYIcl6r2flrxO8Asksn4MD8QxJ6kReSeNrvmqLlqX7ZubGQH1WQ86KClVVXgIloJRwiQurE
 0d5eNuf0SE0nXunWgTAtlw==;
Date: Sun, 24 Nov 2024 11:42:43 +0200
Message-Id: <86frnhj7cc.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
In-Reply-To: <87o725f5p4.fsf@HIDDEN> (message from Juri Linkov on
 Sun, 24 Nov 2024 09:34:51 +0200)
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <86ldxkitjn.fsf@HIDDEN>
 <5a2abf5e-011b-43d0-b34a-e06e354badc5@HIDDEN>
 <8634jrin5v.fsf@HIDDEN>
 <b0b96c86-d22a-4569-938a-d15a527ced84@HIDDEN>
 <86ikskvie0.fsf@HIDDEN>
 <97e7ec85-7e5c-4aa4-a85f-b5f40adc8de6@HIDDEN>
 <8634jov5ir.fsf@HIDDEN>
 <c5265c5b-b48a-4e48-a52d-79cd956a4082@HIDDEN>
 <86serntf0h.fsf@HIDDEN> <86h680rhxr.fsf@HIDDEN>
 <87h680fotv.fsf@HIDDEN> <864j40pfbw.fsf@HIDDEN>
 <87bjy8e5qc.fsf@HIDDEN> <86y11cnyws.fsf@HIDDEN>
 <87iksfpwlr.fsf@HIDDEN> <86jzcvof10.fsf@HIDDEN>
 <87h67xren9.fsf@HIDDEN> <864j3xlr2r.fsf@HIDDEN>
 <87r071oj96.fsf@HIDDEN> <8634jhlp3p.fsf@HIDDEN>
 <87o725f5p4.fsf@HIDDEN>
X-Spam-Score: -1.6 (-)
X-Debbugs-Envelope-To: 74361
Cc: dmitry@HIDDEN, 74361 <at> debbugs.gnu.org, rudalics@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.6 (--)

> From: Juri Linkov <juri@HIDDEN>
> Cc: dmitry@HIDDEN,  rudalics@HIDDEN,  74361 <at> debbugs.gnu.org
> Date: Sun, 24 Nov 2024 09:34:51 +0200
> 
> >> Adapting config files means replacing such settings
> >> 
> >>   (setopt display-comint-buffer-action
> >>           '((display-buffer-same-window)
> >>             (inhibit-same-window . nil)))
> >> 
> >> with
> >> 
> >>   (add-to-list 'display-buffer-alist
> >>                '((category . comint)
> >>                  (display-buffer-same-window)
> >>                  (inhibit-same-window . nil)))
> >> 
> >> This already works since all corresponding display-buffer calls
> >> already provide the 'comint' category.
> >
> > They do?  I thought they use display-comint-buffer-action instead?
> 
> Indeed, they do this via display-comint-buffer-action.
> 
> > I just searched the entire Lisp tree, and didn't find even a single
> > match for "(category . comint)" except in the default value of
> > display-comint-buffer-action.  So if that user option's value is
> > changed, the replacement above will stop working, no?
> 
> Do you mean that the users might want to shoot themselves in the foot
> and remove '(category . comint)' from the default value of
> display-comint-buffer-action?

Yes, that's the scenario that bothers me.  Users could do that without
understanding the subtleties of the issue.

> Then indeed we need to move '(category . comint)' directly
> to every display-buffer call that currently uses
> display-comint-buffer-action.

I think we should do that for Emacs 31, yes.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 24 Nov 2024 08:59:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 24 03:59:15 2024
Received: from localhost ([127.0.0.1]:32813 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tF8SZ-0007iS-0r
	for submit <at> debbugs.gnu.org; Sun, 24 Nov 2024 03:59:15 -0500
Received: from mout.gmx.net ([212.227.15.18]:55335)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1tF8SX-0007iC-Bz
 for 74361 <at> debbugs.gnu.org; Sun, 24 Nov 2024 03:59:14 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at;
 s=s31663417; t=1732438744; x=1733043544; i=rudalics@HIDDEN;
 bh=IEgDsxKkBEh/NsuLjEPaGs6t0XBRazn7PS/lAO6FAUM=;
 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=McAzoqLOLQNGbnwlfAvJvb2zTsYKHSnsyDDE5VGq+vxmtaqxk9sAyfwoTS++fjtF
 Q+Zlm/TJaZ4g+wKOt10AARN2LekfkWX0ofcra4eHv8yoRCWI6sTcixuUz89E8t1rH
 TqXyfx8jUXo4P2aPsiInIfMVIYjdE79tkNZLaCGfG77UAfiuG0B+zokDmt4qqkuO6
 s5xqpCfmg7Jc8YSavOVcaHKv2mpXVEN1wwhkWZQCzOgj7ZHFZ1htNtcFMLq6fzrS+
 eyK+W7kep8s4zlcgNGioAij3AXIZLogUb5zThWn21vHlw3BhBIXsUklzq9ILMTnV9
 GaCQPrrVz+nu9Og2Gg==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.31.113] ([212.95.5.173]) by mail.gmx.net (mrgmx004
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MzhnH-1tbDi51Ucj-015bt6; Sun, 24
 Nov 2024 09:59:04 +0100
Message-ID: <05452bef-dd2e-4e93-abdd-6eb391027197@HIDDEN>
Date: Sun, 24 Nov 2024 09:59:03 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
To: Juri Linkov <juri@HIDDEN>
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <87msi1ueb0.fsf@HIDDEN>
 <4256f446-e11b-450c-b455-131cb75acab0@HIDDEN>
 <871pzbj8mq.fsf@HIDDEN>
 <c05a2b89-cc0b-4489-9011-7449f306cb19@HIDDEN>
 <87sernhxoa.fsf@HIDDEN>
 <fd3fe857-b1fb-41f6-ab4b-72223948b814@HIDDEN>
 <1d08c589-2d0e-4f10-8c2e-e21c206ac118@HIDDEN>
 <f6fbc018-84e0-4137-8c83-0477ee47beff@HIDDEN>
 <e740a50f-ab57-4155-a011-053c3f203841@HIDDEN>
 <78a96965-31c1-4688-b808-2de09d1832c4@HIDDEN>
 <878qt9pz4w.fsf@HIDDEN>
Content-Language: en-US
From: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <878qt9pz4w.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:FCbB3+3l28vErZ2I3cM60LHqX1zMHj5UE9sj5x4MlrLcjcsl0jN
 uAlSI6wUNORieEL86gMMlcU2sZDl/e6ISKMj7NId64766R4sEZPNO2gQnkqOCJZsyUXjclT
 QJgLxr0/t1hm3ibBvOI09fn5vgI+eKkd7/g62zu6OpYLqre3oXrdgjSoas8Cym9+q8YLfOR
 SQQznfYxXleCS6lNQaScA==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:GvOTk28o7e0=;/RtaLVgZoT459XJa5dsv//HJxFi
 CE4dyZAHKwvga5VDHD7kVz2xuEmmPg/KpqCKPg+yXQyIqvbI0x2q3litUticy1BWWZ41xyKNS
 1uuEhb5VJFLBlJRbipdgksDAO4B1x20mjo6DkNvoYlF/3Zo6a1OfUNnXBiKFY48LYl+8nlb0N
 FnTcO7mBPslbvE0fthw/anOHJPH/YkSe3xE7BZ8G4xER96gERCB3Wk2z5cR/RyFgD++o4oOC6
 +fvg/LCc93Txf16p4ajflZVMcJqafgSwklnJLAofuUA/eYtTuAHkWsHMF460IMw7GyYkYHI3A
 arFwQIRMUX4AdLajhYtdF7pUxxdrffF8sEmNXpkXgQkkB2TjWrWbfngBMP1DlJCnTPg+QdGXP
 U+Cku9YxXsHxIzUn+dLXhj15+efsgJlrgTh9fFnaYmlhHLChbXhFJ0skikiRSmthPj3U6tNH7
 RD8MWpnQt6Xt8UA51fkDgLEikCM45J39a6OlrEh70VfEL/geEusfQSfGv/OG5FgZfHukGQjdn
 Nu2L28FgKXi0G62OsSjomXpFrPdAhc0VEQc1QJLaxjf4Y8o6r0wc+lCr2JAVTcD4/k962vmGV
 xFbPcOEnysbT1Szvtcb5bY0Y8dPbqUXA7U2tc5KY3ii7QgYJrHMnD4lDh7UNfSM25vD4ABL66
 Ia/Cg314UYUBoeGXVM/d2bYHkAd9E+uB+nYlp1fugCDBdf3KG0BIdncxPuOqA6IHkK0RKZIs7
 4EDnbFzbg9LhbfzisgTTJ/T0pmUcy55fbWKp3HCpXFmAR6GWKrxHHhqF6S1lsBzTnCdywAMRu
 ewp3Fhd2kcAZecrGjsrhbtubzRqTmuVaGa9cBV/Vm/RZQ8Mam+KdyZhud3sMhgnQnmm69YL7D
 Wnw7WPxIAobGcLLnCYvJUaPJQr2FmY0YOzyboEHqQfBjQlijceBphnOl/KzqqI2Vl/qnvqAjg
 drA6MMkgVKUF7CQG2z+Ja0y6pkgztvDzWx65XAaIIkvyeCa0zyD0EHbr0Oju748w/1gqxxJtx
 OSDHiojRIzIhZC8xT6wnYJET4kGPXaub7K1VIFMOMgZNlAjTTXBOmlMgQsS2sEYKDNYFIgvKl
 bZ30TBGQl18CRZqb1tkdH2lYC0aFxe
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: Dmitry Gutov <dmitry@HIDDEN>, 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 > 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.

This is over my head: How can a (category . foo) entry make sense if it
is not initially set up by the 'foo' package?  As a user I might not
have the slightest idea of categories.  I'd proceed as follows:

- Package 'foo' designates a 'display-buffer' call as something
   pertaining to 'foo-some' by adding a (category . foo-some) alist entry
   and facultatively providing one or a couple of suitable action
   functions.

- A knowledgeable user can override the suggestion of 'foo' by putting
   into 'display-buffer-alist' a (category . foo-some) condition (so
   'buffer-match-p' will handle it) with an appropriate ACTION.

- 'display-buffer' has to

   - respect the user customization if there is one (and it's not
     overridden by the caller),

   - tries any action function provided by the caller,

   - automagically tries to do something reasonable by finding a window
     that already has an association with 'foo-some'.

Am I wrong about this concept?

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 24 Nov 2024 07:37:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 24 02:37:12 2024
Received: from localhost ([127.0.0.1]:60576 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tF7B9-0003aD-UN
	for submit <at> debbugs.gnu.org; Sun, 24 Nov 2024 02:37:12 -0500
Received: from relay1-d.mail.gandi.net ([217.70.183.193]:49169)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1tF7B8-0003Zx-3M
 for 74361 <at> debbugs.gnu.org; Sun, 24 Nov 2024 02:37:10 -0500
Received: by mail.gandi.net (Postfix) with ESMTPSA id 40BCA240002;
 Sun, 24 Nov 2024 07:36:41 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
In-Reply-To: <8634jhlp3p.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 23 Nov
 2024 21:36:10 +0200")
Organization: LINKOV.NET
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <86ldxkitjn.fsf@HIDDEN>
 <5a2abf5e-011b-43d0-b34a-e06e354badc5@HIDDEN>
 <8634jrin5v.fsf@HIDDEN>
 <b0b96c86-d22a-4569-938a-d15a527ced84@HIDDEN>
 <86ikskvie0.fsf@HIDDEN>
 <97e7ec85-7e5c-4aa4-a85f-b5f40adc8de6@HIDDEN>
 <8634jov5ir.fsf@HIDDEN>
 <c5265c5b-b48a-4e48-a52d-79cd956a4082@HIDDEN>
 <86serntf0h.fsf@HIDDEN> <86h680rhxr.fsf@HIDDEN>
 <87h680fotv.fsf@HIDDEN> <864j40pfbw.fsf@HIDDEN>
 <87bjy8e5qc.fsf@HIDDEN> <86y11cnyws.fsf@HIDDEN>
 <87iksfpwlr.fsf@HIDDEN> <86jzcvof10.fsf@HIDDEN>
 <87h67xren9.fsf@HIDDEN> <864j3xlr2r.fsf@HIDDEN>
 <87r071oj96.fsf@HIDDEN> <8634jhlp3p.fsf@HIDDEN>
Date: Sun, 24 Nov 2024 09:34:51 +0200
Message-ID: <87o725f5p4.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: dmitry@HIDDEN, 74361 <at> debbugs.gnu.org, rudalics@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> Adapting config files means replacing such settings
>> 
>>   (setopt display-comint-buffer-action
>>           '((display-buffer-same-window)
>>             (inhibit-same-window . nil)))
>> 
>> with
>> 
>>   (add-to-list 'display-buffer-alist
>>                '((category . comint)
>>                  (display-buffer-same-window)
>>                  (inhibit-same-window . nil)))
>> 
>> This already works since all corresponding display-buffer calls
>> already provide the 'comint' category.
>
> They do?  I thought they use display-comint-buffer-action instead?

Indeed, they do this via display-comint-buffer-action.

> I just searched the entire Lisp tree, and didn't find even a single
> match for "(category . comint)" except in the default value of
> display-comint-buffer-action.  So if that user option's value is
> changed, the replacement above will stop working, no?

Do you mean that the users might want to shoot themselves in the foot
and remove '(category . comint)' from the default value of
display-comint-buffer-action?

Then indeed we need to move '(category . comint)' directly
to every display-buffer call that currently uses
display-comint-buffer-action.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 23 Nov 2024 19:38:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 23 14:38:33 2024
Received: from localhost ([127.0.0.1]:59201 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tEvxg-0001gi-TA
	for submit <at> debbugs.gnu.org; Sat, 23 Nov 2024 14:38:33 -0500
Received: from eggs.gnu.org ([209.51.188.92]:48924)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1tEvxe-0001gP-GR
 for 74361 <at> debbugs.gnu.org; Sat, 23 Nov 2024 14:38:31 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tEvvS-0006lv-Ck; Sat, 23 Nov 2024 14:36:14 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=n47nYCElnmjcnuZKNeWaripvxigRA2rBnSearBmTvqI=; b=bB53U5Jdhw5+
 WeJ60O2ZU+THmLwZKP56IyM9dA8xR543uOpvVvfkkdbU6yplAX/nFsyp8clrsF6VOTE0ji1FlyFAk
 0hmOlMmulRlA13HSaoURGOkuu9Yg21rQ64Y+rcB081cVdxX+c6EDjYSv97nJFSrKKm6UDkmeQTxD+
 9Mcg0Pdc17B5NrCb2izO5NwQe8qUYZHqKUmBklAq55rd7xRJG8ipWAvUqy+3CpdUpmEBFVyUx8kF3
 RIKkiDzT42likG//+V3FEafLMR9MT9a8yeKWCpJUcn+ekcD28Hm5tZCmpJOEJhlcJQtW+NhBGM1sc
 JextQK6ZMLezzNZI8QCk2A==;
Date: Sat, 23 Nov 2024 21:36:10 +0200
Message-Id: <8634jhlp3p.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
In-Reply-To: <87r071oj96.fsf@HIDDEN> (message from Juri Linkov on
 Sat, 23 Nov 2024 21:14:13 +0200)
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <86ldxkitjn.fsf@HIDDEN>
 <5a2abf5e-011b-43d0-b34a-e06e354badc5@HIDDEN>
 <8634jrin5v.fsf@HIDDEN>
 <b0b96c86-d22a-4569-938a-d15a527ced84@HIDDEN>
 <86ikskvie0.fsf@HIDDEN>
 <97e7ec85-7e5c-4aa4-a85f-b5f40adc8de6@HIDDEN>
 <8634jov5ir.fsf@HIDDEN>
 <c5265c5b-b48a-4e48-a52d-79cd956a4082@HIDDEN>
 <86serntf0h.fsf@HIDDEN> <86h680rhxr.fsf@HIDDEN>
 <87h680fotv.fsf@HIDDEN> <864j40pfbw.fsf@HIDDEN>
 <87bjy8e5qc.fsf@HIDDEN> <86y11cnyws.fsf@HIDDEN>
 <87iksfpwlr.fsf@HIDDEN> <86jzcvof10.fsf@HIDDEN>
 <87h67xren9.fsf@HIDDEN> <864j3xlr2r.fsf@HIDDEN>
 <87r071oj96.fsf@HIDDEN>
X-Spam-Score: -1.6 (-)
X-Debbugs-Envelope-To: 74361
Cc: dmitry@HIDDEN, 74361 <at> debbugs.gnu.org, rudalics@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.6 (--)

> From: Juri Linkov <juri@HIDDEN>
> Cc: dmitry@HIDDEN,  rudalics@HIDDEN,  74361 <at> debbugs.gnu.org
> Date: Sat, 23 Nov 2024 21:14:13 +0200
> 
> >> >> 1. Demote these options to variables not intended for customization.
> >> >> 2. Move their current default values to display-buffer calls.
> >> >
> >> > I expected to see us do #2 at the same time we deprecated the user
> >> > options.  I don't understand why we didn't do that.  The deprecation
> >> > message clearly tells users not to use these variables, so it's
> >> > reasonable to expect them to be deleted.  Moreover, their presence in
> >> > our sources is a potential cause for byte-compilation warnings.
> >> 
> >> Immediate #2 will break customization for many users.
> >> We have to give enough time between two releases
> >> to allow the users to see a warning and adapt their
> >> config files to upcoming deletion of these options.
> >
> > But isn't it true that if users adapt their config files, the
> > customization will stop working for them because category is not used
> > by comint?
> 
> Adapting config files means replacing such settings
> 
>   (setopt display-comint-buffer-action
>           '((display-buffer-same-window)
>             (inhibit-same-window . nil)))
> 
> with
> 
>   (add-to-list 'display-buffer-alist
>                '((category . comint)
>                  (display-buffer-same-window)
>                  (inhibit-same-window . nil)))
> 
> This already works since all corresponding display-buffer calls
> already provide the 'comint' category.

They do?  I thought they use display-comint-buffer-action instead?

I just searched the entire Lisp tree, and didn't find even a single
match for "(category . comint)" except in the default value of
display-comint-buffer-action.  So if that user option's value is
changed, the replacement above will stop working, no?

But I already said that, and it doesn't seem to worry you.  So what am
I missing here?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 23 Nov 2024 19:18:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 23 14:18:31 2024
Received: from localhost ([127.0.0.1]:59170 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tEveJ-0000U1-IT
	for submit <at> debbugs.gnu.org; Sat, 23 Nov 2024 14:18:31 -0500
Received: from relay3-d.mail.gandi.net ([217.70.183.195]:48745)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1tEveH-0000TW-KQ
 for 74361 <at> debbugs.gnu.org; Sat, 23 Nov 2024 14:18:30 -0500
Received: by mail.gandi.net (Postfix) with ESMTPSA id 9BB1860002;
 Sat, 23 Nov 2024 19:18:01 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
In-Reply-To: <878qt9pz4w.fsf@HIDDEN> (Juri Linkov's message of "Sat, 
 23 Nov 2024 20:45:51 +0200")
Organization: LINKOV.NET
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <87msi1ueb0.fsf@HIDDEN>
 <4256f446-e11b-450c-b455-131cb75acab0@HIDDEN>
 <871pzbj8mq.fsf@HIDDEN>
 <c05a2b89-cc0b-4489-9011-7449f306cb19@HIDDEN>
 <87sernhxoa.fsf@HIDDEN>
 <fd3fe857-b1fb-41f6-ab4b-72223948b814@HIDDEN>
 <1d08c589-2d0e-4f10-8c2e-e21c206ac118@HIDDEN>
 <f6fbc018-84e0-4137-8c83-0477ee47beff@HIDDEN>
 <e740a50f-ab57-4155-a011-053c3f203841@HIDDEN>
 <78a96965-31c1-4688-b808-2de09d1832c4@HIDDEN>
 <878qt9pz4w.fsf@HIDDEN>
Date: Sat, 23 Nov 2024 21:16:43 +0200
Message-ID: <87ed31oj50.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: Dmitry Gutov <dmitry@HIDDEN>, 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>>> 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.

And maybe it makes more sense to implement this feature in
'display-buffer-reuse-window' instead of
'display-buffer-use-some-window'?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 23 Nov 2024 19:18:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 23 14:18:07 2024
Received: from localhost ([127.0.0.1]:59167 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tEvdv-0000Sw-7L
	for submit <at> debbugs.gnu.org; Sat, 23 Nov 2024 14:18:07 -0500
Received: from relay2-d.mail.gandi.net ([217.70.183.194]:55809)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1tEvdt-0000SE-1S
 for 74361 <at> debbugs.gnu.org; Sat, 23 Nov 2024 14:18:05 -0500
Received: by mail.gandi.net (Postfix) with ESMTPSA id 4D05640002;
 Sat, 23 Nov 2024 19:17:56 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
In-Reply-To: <864j3xlr2r.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 23 Nov
 2024 20:53:32 +0200")
Organization: LINKOV.NET
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <86ldxkitjn.fsf@HIDDEN>
 <5a2abf5e-011b-43d0-b34a-e06e354badc5@HIDDEN>
 <8634jrin5v.fsf@HIDDEN>
 <b0b96c86-d22a-4569-938a-d15a527ced84@HIDDEN>
 <86ikskvie0.fsf@HIDDEN>
 <97e7ec85-7e5c-4aa4-a85f-b5f40adc8de6@HIDDEN>
 <8634jov5ir.fsf@HIDDEN>
 <c5265c5b-b48a-4e48-a52d-79cd956a4082@HIDDEN>
 <86serntf0h.fsf@HIDDEN> <86h680rhxr.fsf@HIDDEN>
 <87h680fotv.fsf@HIDDEN> <864j40pfbw.fsf@HIDDEN>
 <87bjy8e5qc.fsf@HIDDEN> <86y11cnyws.fsf@HIDDEN>
 <87iksfpwlr.fsf@HIDDEN> <86jzcvof10.fsf@HIDDEN>
 <87h67xren9.fsf@HIDDEN> <864j3xlr2r.fsf@HIDDEN>
Date: Sat, 23 Nov 2024 21:14:13 +0200
Message-ID: <87r071oj96.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: dmitry@HIDDEN, 74361 <at> debbugs.gnu.org, rudalics@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> >> 1. Demote these options to variables not intended for customization.
>> >> 2. Move their current default values to display-buffer calls.
>> >
>> > I expected to see us do #2 at the same time we deprecated the user
>> > options.  I don't understand why we didn't do that.  The deprecation
>> > message clearly tells users not to use these variables, so it's
>> > reasonable to expect them to be deleted.  Moreover, their presence in
>> > our sources is a potential cause for byte-compilation warnings.
>> 
>> Immediate #2 will break customization for many users.
>> We have to give enough time between two releases
>> to allow the users to see a warning and adapt their
>> config files to upcoming deletion of these options.
>
> But isn't it true that if users adapt their config files, the
> customization will stop working for them because category is not used
> by comint?

Adapting config files means replacing such settings

  (setopt display-comint-buffer-action
          '((display-buffer-same-window)
            (inhibit-same-window . nil)))

with

  (add-to-list 'display-buffer-alist
               '((category . comint)
                 (display-buffer-same-window)
                 (inhibit-same-window . nil)))

This already works since all corresponding display-buffer calls
already provide the 'comint' category.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 23 Nov 2024 18:53:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 23 13:53:56 2024
Received: from localhost ([127.0.0.1]:59143 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tEvGV-0007WY-TD
	for submit <at> debbugs.gnu.org; Sat, 23 Nov 2024 13:53:56 -0500
Received: from eggs.gnu.org ([209.51.188.92]:53788)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1tEvGT-0007WF-1N
 for 74361 <at> debbugs.gnu.org; Sat, 23 Nov 2024 13:53:54 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tEvGM-0001AJ-ON; Sat, 23 Nov 2024 13:53:46 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=/POdM9A4DlkQfKZ2HCayPxVQH3mKfu7Q4lzk3SOcyA0=; b=gAWHUVTjjgtL
 hjeaOOCYW5zpx+XmS5Z3lTP7OE8/iUSV+o5mHY0WpGZgmjxTB+sKy4q20BtO66Sc44Dh6JUAcIIT/
 QbmHcGEvIOc+YXlpdyNjG8Oz77PLLd474+LSmEGUDH19B4KQcEHF65ehWvHrO0PvqnK2HetM8/SwB
 coEnWdu+Vh+bQVQUNKfzNRScLJavEszYZh89JrpzgMLpIBRy3fp7ArfZBsCzSgomAsHo/vMJuzMtu
 vGozIsoTXHLZyqIzrSulB35zZxSdeXfzStH65gnPAkdXM+VWMnkKRFfBM0ET17mBh0T3ZTMLavays
 vihZNq5k8CBoeu05HEnbeg==;
Date: Sat, 23 Nov 2024 20:53:32 +0200
Message-Id: <864j3xlr2r.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
In-Reply-To: <87h67xren9.fsf@HIDDEN> (message from Juri Linkov on
 Sat, 23 Nov 2024 20:25:30 +0200)
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <86ldxkitjn.fsf@HIDDEN>
 <5a2abf5e-011b-43d0-b34a-e06e354badc5@HIDDEN>
 <8634jrin5v.fsf@HIDDEN>
 <b0b96c86-d22a-4569-938a-d15a527ced84@HIDDEN>
 <86ikskvie0.fsf@HIDDEN>
 <97e7ec85-7e5c-4aa4-a85f-b5f40adc8de6@HIDDEN>
 <8634jov5ir.fsf@HIDDEN>
 <c5265c5b-b48a-4e48-a52d-79cd956a4082@HIDDEN>
 <86serntf0h.fsf@HIDDEN> <86h680rhxr.fsf@HIDDEN>
 <87h680fotv.fsf@HIDDEN> <864j40pfbw.fsf@HIDDEN>
 <87bjy8e5qc.fsf@HIDDEN> <86y11cnyws.fsf@HIDDEN>
 <87iksfpwlr.fsf@HIDDEN> <86jzcvof10.fsf@HIDDEN>
 <87h67xren9.fsf@HIDDEN>
X-Spam-Score: -1.6 (-)
X-Debbugs-Envelope-To: 74361
Cc: dmitry@HIDDEN, 74361 <at> debbugs.gnu.org, rudalics@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.6 (--)

> From: Juri Linkov <juri@HIDDEN>
> Cc: dmitry@HIDDEN,  rudalics@HIDDEN,  74361 <at> debbugs.gnu.org
> Date: Sat, 23 Nov 2024 20:25:30 +0200
> 
> >> 1. Demote these options to variables not intended for customization.
> >> 2. Move their current default values to display-buffer calls.
> >
> > I expected to see us do #2 at the same time we deprecated the user
> > options.  I don't understand why we didn't do that.  The deprecation
> > message clearly tells users not to use these variables, so it's
> > reasonable to expect them to be deleted.  Moreover, their presence in
> > our sources is a potential cause for byte-compilation warnings.
> 
> Immediate #2 will break customization for many users.
> We have to give enough time between two releases
> to allow the users to see a warning and adapt their
> config files to upcoming deletion of these options.

But isn't it true that if users adapt their config files, the
customization will stop working for them because category is not used
by comint?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 23 Nov 2024 18:47:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 23 13:47:13 2024
Received: from localhost ([127.0.0.1]:59134 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tEvA1-0007B0-1d
	for submit <at> debbugs.gnu.org; Sat, 23 Nov 2024 13:47:13 -0500
Received: from relay2-d.mail.gandi.net ([217.70.183.194]:37509)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1tEv9z-0007AZ-AS
 for 74361 <at> debbugs.gnu.org; Sat, 23 Nov 2024 13:47:12 -0500
Received: by mail.gandi.net (Postfix) with ESMTPSA id 1DE3B40003;
 Sat, 23 Nov 2024 18:47:03 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
In-Reply-To: <78a96965-31c1-4688-b808-2de09d1832c4@HIDDEN> (martin rudalics's
 message of "Sat, 23 Nov 2024 10:35:43 +0100")
Organization: LINKOV.NET
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <87msi1ueb0.fsf@HIDDEN>
 <4256f446-e11b-450c-b455-131cb75acab0@HIDDEN>
 <871pzbj8mq.fsf@HIDDEN>
 <c05a2b89-cc0b-4489-9011-7449f306cb19@HIDDEN>
 <87sernhxoa.fsf@HIDDEN>
 <fd3fe857-b1fb-41f6-ab4b-72223948b814@HIDDEN>
 <1d08c589-2d0e-4f10-8c2e-e21c206ac118@HIDDEN>
 <f6fbc018-84e0-4137-8c83-0477ee47beff@HIDDEN>
 <e740a50f-ab57-4155-a011-053c3f203841@HIDDEN>
 <78a96965-31c1-4688-b808-2de09d1832c4@HIDDEN>
Date: Sat, 23 Nov 2024 20:45:51 +0200
Message-ID: <878qt9pz4w.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: Dmitry Gutov <dmitry@HIDDEN>, 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 23 Nov 2024 18:31:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 23 13:31:11 2024
Received: from localhost ([127.0.0.1]:59110 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tEuuV-0006JD-7Q
	for submit <at> debbugs.gnu.org; Sat, 23 Nov 2024 13:31:11 -0500
Received: from relay8-d.mail.gandi.net ([217.70.183.201]:52469)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1tEuuU-0006Hc-6t
 for 74361 <at> debbugs.gnu.org; Sat, 23 Nov 2024 13:31:10 -0500
Received: by mail.gandi.net (Postfix) with ESMTPSA id 4C5421BF203;
 Sat, 23 Nov 2024 18:30:42 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
In-Reply-To: <86jzcvof10.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 22 Nov
 2024 10:20:59 +0200")
Organization: LINKOV.NET
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <86ldxkitjn.fsf@HIDDEN>
 <5a2abf5e-011b-43d0-b34a-e06e354badc5@HIDDEN>
 <8634jrin5v.fsf@HIDDEN>
 <b0b96c86-d22a-4569-938a-d15a527ced84@HIDDEN>
 <86ikskvie0.fsf@HIDDEN>
 <97e7ec85-7e5c-4aa4-a85f-b5f40adc8de6@HIDDEN>
 <8634jov5ir.fsf@HIDDEN>
 <c5265c5b-b48a-4e48-a52d-79cd956a4082@HIDDEN>
 <86serntf0h.fsf@HIDDEN> <86h680rhxr.fsf@HIDDEN>
 <87h680fotv.fsf@HIDDEN> <864j40pfbw.fsf@HIDDEN>
 <87bjy8e5qc.fsf@HIDDEN> <86y11cnyws.fsf@HIDDEN>
 <87iksfpwlr.fsf@HIDDEN> <86jzcvof10.fsf@HIDDEN>
Date: Sat, 23 Nov 2024 20:25:30 +0200
Message-ID: <87h67xren9.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: dmitry@HIDDEN, 74361 <at> debbugs.gnu.org, rudalics@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> >   (make-obsolete-variable
>> >    'display-comint-buffer-action
>> >    "use a `(category . comint)' condition in `display-buffer-alist'."
>> >    "30.1")
>> 
>> The categories are a replacement only for customization.
>> But all display-buffer calls should still contain
>> `(category . comint)' that currently presented
>> in these variables.  IOW, the variables currently
>> are used in two ways:
>> 1. as the default values for display-buffer calls
>> 2. as user options
>> 
>> But now customization is supposed to be only with
>> the help of `(category . comint)' in `display-buffer-alist'.
>> So these variable will be used only in display-buffer calls.
>> 
>> > So if some user wants to take our advice and modernize his/her
>> > customizations to use '(category . comint)' instead of
>> > display-comint-buffer-action, the customization will stop working for
>> > him/her when we remove those obsolete options in some future Emacs
>> > version.  Right?  Or what am I missing?
>> 
>> These are two possible solutions:
>> 1. Demote these options to variables not intended for customization.
>> 2. Move their current default values to display-buffer calls.
>
> I expected to see us do #2 at the same time we deprecated the user
> options.  I don't understand why we didn't do that.  The deprecation
> message clearly tells users not to use these variables, so it's
> reasonable to expect them to be deleted.  Moreover, their presence in
> our sources is a potential cause for byte-compilation warnings.

Immediate #2 will break customization for many users.
We have to give enough time between two releases
to allow the users to see a warning and adapt their
config files to upcoming deletion of these options.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 23 Nov 2024 09:36:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 23 04:36:00 2024
Received: from localhost ([127.0.0.1]:56707 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tEmYa-0004b4-8g
	for submit <at> debbugs.gnu.org; Sat, 23 Nov 2024 04:36:00 -0500
Received: from mout.gmx.net ([212.227.15.18]:58605)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1tEmYX-0004ak-8w
 for 74361 <at> debbugs.gnu.org; Sat, 23 Nov 2024 04:35:58 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at;
 s=s31663417; t=1732354545; x=1732959345; i=rudalics@HIDDEN;
 bh=06R+lDOm5Ip/Zz12hhPoii2HO4kXIJJ/tWd0ibFIvkY=;
 h=X-UI-Sender-Class:Content-Type:Message-ID:Date:MIME-Version:
 Subject:From:To:Cc:References:In-Reply-To:cc:
 content-transfer-encoding:content-type:date:from:message-id:
 mime-version:reply-to:subject:to;
 b=inH9A0pD3TUisFEDkJ6hTg5YHTDV4lc6k+YgSyVvb5T212OcyfuaTgFR9DV4vRYR
 6bWFVJbwVHCmsGtg6XBDeThgp7LMkcJ0kXOfGmapGoWQzrICPPE5uq0ZklV+BWPWf
 S7jutbg6VziQTl2jtU8m5cNzSPNqYnV/xZshkJPwwXc+1uxgE76i4hpksXCqA9ZkJ
 tDufXaF8ruqIiGvEQd6Lo0/8A/LhrgJBOX2rVG77Ylg7D/lBgSCBBiYlGm6zRwizw
 ozucCMeXLv+X6qUNkDFXn1ceci2259N1gSq21ZXJqPuYM4aGdCzqY5893OJflxPul
 6TZ/fxkIEMH/TsT26A==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.31.113] ([46.125.249.76]) by mail.gmx.net (mrgmx005
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mr9Fs-1u2gDf162g-00aLoE; Sat, 23
 Nov 2024 10:35:45 +0100
Content-Type: multipart/mixed; boundary="------------cp8SuNB8oOP5TB47C5byGXRT"
Message-ID: <78a96965-31c1-4688-b808-2de09d1832c4@HIDDEN>
Date: Sat, 23 Nov 2024 10:35:43 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
From: martin rudalics <rudalics@HIDDEN>
To: Dmitry Gutov <dmitry@HIDDEN>, Juri Linkov <juri@HIDDEN>
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <87msi1ueb0.fsf@HIDDEN>
 <4256f446-e11b-450c-b455-131cb75acab0@HIDDEN>
 <871pzbj8mq.fsf@HIDDEN>
 <c05a2b89-cc0b-4489-9011-7449f306cb19@HIDDEN>
 <87sernhxoa.fsf@HIDDEN>
 <fd3fe857-b1fb-41f6-ab4b-72223948b814@HIDDEN>
 <1d08c589-2d0e-4f10-8c2e-e21c206ac118@HIDDEN>
 <f6fbc018-84e0-4137-8c83-0477ee47beff@HIDDEN>
 <e740a50f-ab57-4155-a011-053c3f203841@HIDDEN>
Content-Language: en-US
In-Reply-To: <e740a50f-ab57-4155-a011-053c3f203841@HIDDEN>
X-Provags-ID: V03:K1:twNgRJNY/qKkZsjsUiV4SGgOTPt4+mGyF4Hx1DPesbAOh4elOpc
 QsHKl4AbgT+X1iRc/Xnno0EMM6gerrwA6OeUtdi+ha9/RkDZ1PAKKabPCml/xSke18hjBAC
 TiIe1QixvTNwAzoILnKb+4bi/DIW9aJdqCwAcH431CFSwKxl9znE4Lnqgu2MSV6nL8ugrN6
 USdN3H0GB50Ij2PJHJvYQ==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:b6n2lHVjQRQ=;jWs8emID1McGf4Y884/No/lYE/I
 k39s56GcO8jv2kbt28tWxS+o06e5Pf3noXSuBRP2n1JB4QJvCuLd5cWXVe4JrVc3JZ33B1eM6
 7cNKAKpu80ONinZXtrEZvI3WkzwitNmR/laHW4KyyxNb6oImlyFXTmsGo1evKBzvqj+BXNiG6
 QIgmc6w9HHcsOgKrY9w31NLzrrjKLa48UUOhpZslFOpL+Zoj2d8UdZzs8T4MU3PjN+o49vAI1
 fjb9JQMWLlZs1DyRhgqpQC4FCDWr7AhOTqc7HOYlU4NxkaAlh0hwUD1CyDTzHZYXbpL18Uymz
 aBkbhGPfQSt9lpkVAh26vW1PrTJD+dZjr+5C+Bf8eLtW/z2N9PjRgDR+ynPMif7EJd1lbTpAq
 I93ZncVbTVom4rNwIDoC+FNff8viK9xVe7vo6dsJUq8kxvf0wo9BBPKJ23BTayOiLsV1+/XlT
 Ar+MkDmLoc0UZL1eb8MVHf3HbTd70jQC6sRvYFSvD1HOCOeqEFoCyNZSDcadGjF9mOyTzbT+k
 WADLSUD+jwXydwfqrH+5F3jKX3A3cP1MRnW2v2z8kqAkuGC135WfzM7o5+YbioCMx/ek3tx6Z
 m/DfugLLRI/ERzctzAPCO8Tvo7LVgcqN0RrgEbe91A9lQXxpYETzM0x+RAKUJ/jPbkkzV6ioV
 hChyIIxilOzqpHjh99SuE2qAwSS6qgfJ+5kg/xmODEzBtaIaH/oC+TeBjFNATwcUVbiy1ifpa
 0tdGb0HoSW/mqtOQqox2j9TFCsEZl1U177UryXNvI94HrMWy9ssubahOjp8Qc6RuMdSXek0NI
 BPIeHfXa3Wc9lLWR5H+oLk6Du1ZkskaFzoEKlSNDInXU7NxOq6NWjLUufCpvXwoGtcTa3Y6t3
 my+v2DjkVXhOCOEWXbyyuXaE8+HGoPf8Uz9zbzoBeJnt8xKbNhA74PqDqnNu/KyVSfmzpnXr1
 4p8nfXJ+5MBZGfdrp1h8XO0IEZz1F9IjGpjKxc6NzHs271PlJ7T/1f+5Iwz5tGTyw3CAsgsYl
 EF8cBlPhFnGN2bBjlUvu+/jg81x7zodUa9TvR8cjz5+jysumrofKR8Mzffjqq0Tq6eg4hnUSw
 3MudCrZa6/YH2Xj5/MLtfqrU0Eypkx
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

This is a multi-part message in MIME format.
--------------cp8SuNB8oOP5TB47C5byGXRT
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

 > 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)))

martin
--------------cp8SuNB8oOP5TB47C5byGXRT
Content-Type: text/x-patch; charset=UTF-8; name="category.diff"
Content-Disposition: attachment; filename="category.diff"
Content-Transfer-Encoding: base64

ZGlmZiAtLWdpdCBhL2xpc3Avd2luZG93LmVsIGIvbGlzcC93aW5kb3cuZWwKaW5kZXggYjUw
NzcwY2JkN2UuLmJhNzljNmU2NGFmIDEwMDY0NAotLS0gYS9saXNwL3dpbmRvdy5lbAorKysg
Yi9saXNwL3dpbmRvdy5lbApAQCAtMjY1Miw2ICsyNjUyLDI0IEBAIGdldC1idWZmZXItd2lu
ZG93LWxpc3QKIAkoc2V0cSB3aW5kb3dzIChjb25zIHdpbmRvdyB3aW5kb3dzKSkpKQogICAg
IChucmV2ZXJzZSB3aW5kb3dzKSkpCiAKKyhkZWZ1biBnZXQtd2luZG93LXdpdGgtY2F0ZWdv
cnkgKGNhdGVnb3J5ICZvcHRpb25hbCBmcmFtZXMgZGVkaWNhdGVkIG5vdC1zZWxlY3RlZCBu
by1vdGhlcikKKyAgIlJldHVybiB3aW5kb3cgbWF0Y2hpbmcgQ0FURUdPUlkgb24gc3BlY2lm
aWVkIEZSQU1FUy4KK1JldHVybiBmaXJzdCB3aW5kb3cgd2hvc2UgYGNhdGVnb3J5JyBwYXJh
bWV0ZXIgY29udGFpbnMgQ0FURUdPUlkuCitUaGUgYXJndW1lbnQgRlJBTUVTIGhhcyB0aGUg
c2FtZSBtZWFuaW5nIGFzIGZvciBgd2luZG93LWxpc3QnLgorCitBIG1pbmlidWZmZXIgd2lu
ZG93IGlzIG5ldmVyIGEgY2FuZGlkYXRlLiAgQSBkZWRpY2F0ZWQgd2luZG93IGlzIG5ldmVy
IGEKK2NhbmRpZGF0ZSB1bmxlc3MgREVESUNBVEVEIGlzIG5vbi1uaWwsIHNvIGlmIGFsbCB3
aW5kb3dzIGFyZSBkZWRpY2F0ZWQsCit0aGUgdmFsdWUgaXMgbmlsLiAgT3B0aW9uYWwgYXJn
dW1lbnQgTk9ULVNFTEVDVEVEIG5vbi1uaWwgbWVhbnMgbmV2ZXIKK3JldHVybiB0aGUgc2Vs
ZWN0ZWQgd2luZG93LiAgT3B0aW9uYWwgYXJndW1lbnQgTk8tT1RIRVIgbm9uLW5pbCBtZWFu
cyB0bworbmV2ZXIgcmV0dXJuIGEgd2luZG93IGZvciB3aGljaCBgd2luZG93LW5vLW90aGVy
LXAnIHJldHVybnMgbm9uLW5pbC4iCisgIChjYXRjaCAnZm91bmQKKyAgICAoZG9saXN0ICh3
aW5kb3cgKHdpbmRvdy1saXN0LTEgbmlsICdub21pbmkgZnJhbWVzKSkKKyAgICAgICh3aGVu
IChhbmQgKG1lbXEgY2F0ZWdvcnkgKHdpbmRvdy1wYXJhbWV0ZXIgd2luZG93ICdjYXRlZ29y
eSkpCisJCSAob3IgZGVkaWNhdGVkIChub3QgKHdpbmRvdy1kZWRpY2F0ZWQtcCB3aW5kb3cp
KSkKKwkJIChvciAobm90IG5vdC1zZWxlY3RlZCkgKG5vdCAoZXEgd2luZG93IChzZWxlY3Rl
ZC13aW5kb3cpKSkpCisJCSAob3IgKG5vdCBuby1vdGhlcikgKHdpbmRvdy1uby1vdGhlci1w
IHdpbmRvdykpKQorCSh0aHJvdyAnZm91bmQgd2luZG93KSkpKSkKKwogKGRlZnVuIG1pbmli
dWZmZXItd2luZG93LWFjdGl2ZS1wICh3aW5kb3cpCiAgICJSZXR1cm4gdCBpZiBXSU5ET1cg
aXMgdGhlIGN1cnJlbnRseSBhY3RpdmUgbWluaWJ1ZmZlciB3aW5kb3cuIgogICAoYW5kICh3
aW5kb3ctbGl2ZS1wIHdpbmRvdykgKGVxIHdpbmRvdyAoYWN0aXZlLW1pbmlidWZmZXItd2lu
ZG93KSkpKQpAQCAtNzY2NSw2ICs3NzI1LDEzIEBAIHdpbmRvdy0tZGlzcGxheS1idWZmZXIK
IAkgICh3aW5kb3ctcHJlc2VydmUtc2l6ZSB3aW5kb3cgdCAoY2FyIHByZXNlcnZlLXNpemUp
KQogCSAgKHdpbmRvdy1wcmVzZXJ2ZS1zaXplIHdpbmRvdyBuaWwgKGNkciBwcmVzZXJ2ZS1z
aXplKSkpKSkKIAorICAgICAgKGxldCAoKGNhdGVnb3J5IChjZHIgKGFzc3EgJ2NhdGVnb3J5
IGFsaXN0KSkpKQorCSh3aGVuIGNhdGVnb3J5CisJICAobGV0ICgocGFyYW1ldGVyICh3aW5k
b3ctcGFyYW1ldGVyIHdpbmRvdyAnY2F0ZWdvcnkpKSkKKwkgICAgKHVubGVzcyAobWVtcSBj
YXRlZ29yeSBwYXJhbWV0ZXIpCisJICAgICAgKHNldC13aW5kb3ctcGFyYW1ldGVyCisJICAg
ICAgIHdpbmRvdyAnY2F0ZWdvcnkgKGNvbnMgY2F0ZWdvcnkgcGFyYW1ldGVyKSkpKSkpCisK
ICAgICAgIDs7IEFzc2lnbiBhbnkgd2luZG93IHBhcmFtZXRlcnMgc3BlY2lmaWVkLgogICAg
ICAgKGxldCAoKHBhcmFtZXRlcnMgKGNkciAoYXNzcSAnd2luZG93LXBhcmFtZXRlcnMgYWxp
c3QpKSkpCiAgICAgICAgIChkb2xpc3QgKHBhcmFtZXRlciBwYXJhbWV0ZXJzKQpAQCAtODky
MSwxMiArODk4OCwxNyBAQCBkaXNwbGF5LWJ1ZmZlci11c2Utc29tZS13aW5kb3cKIGNhbGxl
ZCBvbmx5IGJ5IGBkaXNwbGF5LWJ1ZmZlcicgb3IgYSBmdW5jdGlvbiBkaXJlY3RseSBvcgog
aW5kaXJlY3RseSBjYWxsZWQgYnkgdGhlIGxhdHRlci4iCiAgIChsZXQqICgobm90LXRoaXMt
d2luZG93IChjZHIgKGFzc3EgJ2luaGliaXQtc2FtZS13aW5kb3cgYWxpc3QpKSkKLQkgKHNv
bWUtd2luZG93LW1ldGhvZCAoY2RyIChhc3NxICdzb21lLXdpbmRvdyBhbGlzdCkpKQorCSAo
Y2F0ZWdvcnkgKGNkciAoYXNzcSAnY2F0ZWdvcnkgYWxpc3QpKSkKKwkgKHNvbWUtd2luZG93
IChhc3NxICdzb21lLXdpbmRvdyBhbGlzdCkpCisJIChzb21lLXdpbmRvdy1tZXRob2QgKGNk
ciBzb21lLXdpbmRvdykpCiAJIChmcmFtZSAob3IgKHdpbmRvdy0tZnJhbWUtdXNhYmxlLXAg
KHNlbGVjdGVkLWZyYW1lKSkKIAkJICAgICh3aW5kb3ctLWZyYW1lLXVzYWJsZS1wIChsYXN0
LW5vbm1pbmlidWZmZXItZnJhbWUpKSkpCiAJICh3aW5kb3cKIAkgIDs7IFJldXNlIGFuIGV4
aXN0aW5nIHdpbmRvdy4KLQkgIChvciAoY29uZAorCSAgKG9yIChhbmQgY2F0ZWdvcnkgKG5v
dCBzb21lLXdpbmRvdykKKwkJICAgKGdldC13aW5kb3ctd2l0aC1jYXRlZ29yeQorCQkgICAg
Y2F0ZWdvcnkgJ3Zpc2libGUgIG5pbCBub3QtdGhpcy13aW5kb3cpKQorCSAgICAgIChjb25k
CiAJICAgICAgICgobWVtcSBzb21lLXdpbmRvdy1tZXRob2QgJyhuaWwgbHJ1KSkKIAkJKGRp
c3BsYXktYnVmZmVyLS1scnUtd2luZG93CiAJCSA7OyBJZiBBTElTVCBzcGVjaWZpZXMgJ2xy
dS1mcmFtZXMnIG9yICd3aW5kb3ctbWluLXdpZHRoJwpAQCAtODkzNyw2ICs5MDA5LDkgQEAg
ZGlzcGxheS1idWZmZXItdXNlLXNvbWUtd2luZG93CiAJCShnZXQtbXJ1LXdpbmRvdyBuaWwg
bmlsIHQpKQogCSAgICAgICAoKGZ1bmN0aW9ucCBzb21lLXdpbmRvdy1tZXRob2QpCiAJCShm
dW5jYWxsIHNvbWUtd2luZG93LW1ldGhvZCBidWZmZXIgYWxpc3QpKSkKKwkgICAgICAoYW5k
IGNhdGVnb3J5CisJCSAgIChnZXQtd2luZG93LXdpdGgtY2F0ZWdvcnkKKwkJICAgIGNhdGVn
b3J5ICd2aXNpYmxlICBuaWwgbm90LXRoaXMtd2luZG93KSkKIAkgICAgICAobGV0ICgod2lu
ZG93IChnZXQtYnVmZmVyLXdpbmRvdyBidWZmZXIgJ3Zpc2libGUpKSkKIAkJKHVubGVzcyAo
YW5kIG5vdC10aGlzLXdpbmRvdwogCQkJICAgICAoZXEgd2luZG93IChzZWxlY3RlZC13aW5k
b3cpKSkK

--------------cp8SuNB8oOP5TB47C5byGXRT--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 22 Nov 2024 09:22:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 22 04:22:18 2024
Received: from localhost ([127.0.0.1]:53043 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tEPrm-0007lr-Hj
	for submit <at> debbugs.gnu.org; Fri, 22 Nov 2024 04:22:18 -0500
Received: from mout.gmx.net ([212.227.17.22]:60939)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1tEPrj-0007la-Vi
 for 74361 <at> debbugs.gnu.org; Fri, 22 Nov 2024 04:22:16 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at;
 s=s31663417; t=1732267327; x=1732872127; i=rudalics@HIDDEN;
 bh=ZxkSocxilXf/1HtQsXefu8mp58TsIHp4tDHr8pfmc2Q=;
 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=KbeWteqAYh5wqBZaIUD94v4aKCTHm9q/oodHVA6mIFjdZLjR2z+DxClsdsPFh8xB
 gVeZpDj4aSXPyCKEEm2uxeIk3KHunsF0Z6VqFawZl/ExwVWzLlXGjuyEqz9Cgl4Av
 U9n/0Wm0muyDKwvkJzMXqNCweRs3ThHJIc9A2ed55kdFhfNW1g3n2k9ESUf9qWAI6
 O4ma8P3/TErxNLAjCcNSTJXnM1qU3MuI1UENvr2bXVquAQxAJt9Bi1R6jzWaQf6je
 WInVUK3Vxk9+hcUKpimQAc+Z27b5YeNTf1XOefhbjTranenaH+PC94T8htu6ADiHQ
 HEhcqs6+zU8t3wQGGw==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.31.113] ([212.95.5.70]) by mail.gmx.net (mrgmx104
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MpDNf-1u57D73xKJ-00dgY0; Fri, 22
 Nov 2024 10:22:07 +0100
Message-ID: <e740a50f-ab57-4155-a011-053c3f203841@HIDDEN>
Date: Fri, 22 Nov 2024 10:22:05 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
To: Dmitry Gutov <dmitry@HIDDEN>, Juri Linkov <juri@HIDDEN>
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <87msi1ueb0.fsf@HIDDEN>
 <4256f446-e11b-450c-b455-131cb75acab0@HIDDEN>
 <871pzbj8mq.fsf@HIDDEN>
 <c05a2b89-cc0b-4489-9011-7449f306cb19@HIDDEN>
 <87sernhxoa.fsf@HIDDEN>
 <fd3fe857-b1fb-41f6-ab4b-72223948b814@HIDDEN>
 <1d08c589-2d0e-4f10-8c2e-e21c206ac118@HIDDEN>
 <f6fbc018-84e0-4137-8c83-0477ee47beff@HIDDEN>
Content-Language: en-US
From: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <f6fbc018-84e0-4137-8c83-0477ee47beff@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:winrgJRrfAgeQk8nuQY0ExWFg/7/5jXfKlFPHhaixWGmw9gGGqh
 2fqEEBkCxjXXzqisnnbEVcwlmbUgRgReXx+lKzphgLpZP62IuVx+TnM+Ch/eBw0Bsp2bkYP
 V1cn/ASiN3KpHeZLCqg+zecUOG2Ef+d0JXXUAWyQmrgvP7it3tLoS0DXLy75wvm3hlqe2U7
 +Uo289B75RK73l6cj0OtQ==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:VHS0sSxNHdc=;YmAZgx1ppOjVGyfIpm3BCLxcvWM
 1r5uj8TPNQMwy4nXWvRSIJxfWD3fNzOBisQQLh37izknElJaPDOXX1XE7M883y44yCFArs1fc
 wJAI8KsV32qaCJpaaSkrJ6DkFgTLJrt5d/0tBS3Il6VyXfVOjPYhL8P50AfTja8RQowi9XzrL
 gdGljc6hlgfJ4sQGXGMfK+zInrXdlcXuPJmBSMPwTDETgbsDTr/wmMW1ZPwsu3PFQw4+KtdBr
 1tqEbJT9lh9IvSF5t9pEsaM89bb7TlHH0weGeC2cAsIqCYqxL5d2pw+wGi1kK30lOqin+fAQc
 d2OnLN3RxZHwot046xDT8NKnxncxvvYEgpV7zfCmoQ1aLofRvNV4Npd0QDzoLuJrrwrdIzUFC
 hfNSpJ7GunoRQ7+rDP9tIlyC3gdaVgJ+oB1NpRLqfSEEoev/jfHoRxMMX/cjQtswZJSIj/c7p
 95eI7fpkvQVaVU3EA5VnhwyOAtduYqcQRPDtOK9QAVkvcIgoM9P92ddYXRveS7TJYNAZHrcl+
 HQjJ5iy5SyCXwwneJJhBe1WdzijDUZEaXNUAdmnc/0ipxZwucHsci6Nx0F1ZRO2jXByUlrw9W
 vcHlZP7rdc7it6zV2AJzlry0ZpMZpR7P9cMrG/zUal9i99jY3Kw1DM9YHXXVk3JnbcxWjdmZ8
 v9RHcmm4GxYIu+xiKUooDmXQLPKeTaTy+p2MPLLJ3AG3SwixM/d3kEq7lsqP2r9e5yZajQDxq
 D2q17yTowDytT95YMDtM/f77+JfYvXzApByH9N6ifTkZi+eW2SCYqS+7KNiF1CwBGnoNUhGCP
 1UlEE24BmIjFr/WVGW+Io3Gng2bdUH/2CETWMTqtJIJ39TtZdTqVrOAulO79QaQ/36qHhLoNn
 jzeHOB4hfhhe1BilkoYzL03crUnEAXkkcSwwOln2thWSMPk6Te0wURjki
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 >> I think that the most important improvement of "category" should be to
 >> override "lru".
 >
 > The customization capability, you mean? Nice to have indeed.

What I meant was the following: Calling 'get-lru-window' in
'display-buffer-use-some-window' is a heritage from the times when
'display-buffer' was implemented in C.  It was hard-coded there and
could not be customized.  And it conceptually made sense with multiple
windows because the lru window should be the one whose contents a user
could most likely dispense with.  And it can even work when multiple
'display-buffer' calls are invoked in one and the same command.

The idea misfires in one case: When a user wants one and the same window
display several buffers in sequence.  These buffers could represent
images resulting from browsing an image directory or files containing
grep or xref hits or sources of compile errors.  Anything a user might
want to browse sequentially or, with other words, things a user might
not want to look at at the same time.

In these cases, the lru window will change continuously when multiple
windows are present.  Now if these related buffers were made subject of
a common category and that category were passed as argument to
'display-buffer-use-some-window', the latter could decide - if a window
showing a buffer belonging to the same category existed already - to use
that window instead of the lru one.

Obviously, someone has to decide on setting up the name of the category.
This is the task of the caller of 'display-buffer' - 'image', 'xref',
'grep', 'compile', 'comint' or 'tex' - and would have to be done in a
coordinated fashion so the same category is used twice iff that's really
intended.

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.

An orthogonal issue is whether an initial command expresses the desire
to show the buffer in "another" window or on "another" frame.  My
suggestion would be to have these suppress any 'category' argument and
have 'display-buffer' proceed as usual, that is use the lru window on
the specified frame , pop up a new frame ...

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 22 Nov 2024 08:21:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 22 03:21:15 2024
Received: from localhost ([127.0.0.1]:52946 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tEOuh-0004v9-Cm
	for submit <at> debbugs.gnu.org; Fri, 22 Nov 2024 03:21:15 -0500
Received: from eggs.gnu.org ([209.51.188.92]:44496)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1tEOud-0004us-9E
 for 74361 <at> debbugs.gnu.org; Fri, 22 Nov 2024 03:21:14 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tEOuV-0008FJ-VF; Fri, 22 Nov 2024 03:21:03 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=a8slCnskuqqwx/yJBSHEn/g8KehTLWbZss0kCjyxFYA=; b=Ou1wSuMAcBgF
 CRcfAxah7/PDPhD6Iw/uU/b//3J7SKdzUN4QUxjvidBsjjlPZCRZAyxKPcjfNeC+6mZFLGGnvK0hQ
 IodAXLcJ5LJ1y1TrEOy47TLO4svk+8xRACDurBmcVyrJCspStdyvZvZfsTsN1cKQOReI6k+t6XWDd
 BlZ73dGzkOzq1jj07a0i2ODGOHFMOnA+tXz/P51XQP9wj8vOHfCSGARaN8Z6UVCdI5qb/NGei8u8C
 8M/boF2/XDYs088Cgb3AIQLvohvdP/c/0LQOFWyyPMQ9lie7PU1C/0NoQpyXmK+20dIKrwcBdFu/z
 PqL/+MzAw7bXctqOolvKNQ==;
Date: Fri, 22 Nov 2024 10:20:59 +0200
Message-Id: <86jzcvof10.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
In-Reply-To: <87iksfpwlr.fsf@HIDDEN> (message from Juri Linkov on
 Fri, 22 Nov 2024 09:29:00 +0200)
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <86ldxkitjn.fsf@HIDDEN>
 <5a2abf5e-011b-43d0-b34a-e06e354badc5@HIDDEN>
 <8634jrin5v.fsf@HIDDEN>
 <b0b96c86-d22a-4569-938a-d15a527ced84@HIDDEN>
 <86ikskvie0.fsf@HIDDEN>
 <97e7ec85-7e5c-4aa4-a85f-b5f40adc8de6@HIDDEN>
 <8634jov5ir.fsf@HIDDEN>
 <c5265c5b-b48a-4e48-a52d-79cd956a4082@HIDDEN>
 <86serntf0h.fsf@HIDDEN> <86h680rhxr.fsf@HIDDEN>
 <87h680fotv.fsf@HIDDEN> <864j40pfbw.fsf@HIDDEN>
 <87bjy8e5qc.fsf@HIDDEN> <86y11cnyws.fsf@HIDDEN>
 <87iksfpwlr.fsf@HIDDEN>
X-Spam-Score: -1.6 (-)
X-Debbugs-Envelope-To: 74361
Cc: dmitry@HIDDEN, 74361 <at> debbugs.gnu.org, rudalics@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.6 (--)

> From: Juri Linkov <juri@HIDDEN>
> Cc: dmitry@HIDDEN,  rudalics@HIDDEN,  74361 <at> debbugs.gnu.org
> Date: Fri, 22 Nov 2024 09:29:00 +0200
> 
> >> cmuscheme.el:
> >>   (define-derived-mode inferior-scheme-mode comint-mode "Inferior Scheme"
> >>    ...
> >>     (pop-to-buffer "*scheme*" display-comint-buffer-action)
> >> 
> >> inf-lisp.el:
> >>   (define-derived-mode inferior-lisp-mode comint-mode "Inferior Lisp"
> >>    ...
> >>     (pop-to-buffer "*inferior-lisp*" display-comint-buffer-action)
> >> 
> >> shell.el:
> >>   (define-derived-mode shell-mode comint-mode "Shell"
> >>    ...
> >>     (pop-to-buffer buffer display-comint-buffer-action)
> >
> > Those are not the categories, those are the deprecated user options
> > for which the categories are supposed to be a replacement we
> > recommend:
> >
> >   (make-obsolete-variable
> >    'display-comint-buffer-action
> >    "use a `(category . comint)' condition in `display-buffer-alist'."
> >    "30.1")
> 
> The categories are a replacement only for customization.
> But all display-buffer calls should still contain
> `(category . comint)' that currently presented
> in these variables.  IOW, the variables currently
> are used in two ways:
> 1. as the default values for display-buffer calls
> 2. as user options
> 
> But now customization is supposed to be only with
> the help of `(category . comint)' in `display-buffer-alist'.
> So these variable will be used only in display-buffer calls.
> 
> > So if some user wants to take our advice and modernize his/her
> > customizations to use '(category . comint)' instead of
> > display-comint-buffer-action, the customization will stop working for
> > him/her when we remove those obsolete options in some future Emacs
> > version.  Right?  Or what am I missing?
> 
> These are two possible solutions:
> 1. Demote these options to variables not intended for customization.
> 2. Move their current default values to display-buffer calls.

I expected to see us do #2 at the same time we deprecated the user
options.  I don't understand why we didn't do that.  The deprecation
message clearly tells users not to use these variables, so it's
reasonable to expect them to be deleted.  Moreover, their presence in
our sources is a potential cause for byte-compilation warnings.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 22 Nov 2024 07:50:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 22 02:50:00 2024
Received: from localhost ([127.0.0.1]:52893 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tEOQR-0003Q3-Sb
	for submit <at> debbugs.gnu.org; Fri, 22 Nov 2024 02:50:00 -0500
Received: from relay3-d.mail.gandi.net ([217.70.183.195]:53141)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1tEOQP-0003Pg-8l
 for 74361 <at> debbugs.gnu.org; Fri, 22 Nov 2024 02:49:57 -0500
Received: by mail.gandi.net (Postfix) with ESMTPSA id E8FAC60002;
 Fri, 22 Nov 2024 07:49:47 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
In-Reply-To: <86y11cnyws.fsf@HIDDEN> (Eli Zaretskii's message of "Thu, 21 Nov
 2024 21:56:51 +0200")
Organization: LINKOV.NET
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <86ldxkitjn.fsf@HIDDEN>
 <5a2abf5e-011b-43d0-b34a-e06e354badc5@HIDDEN>
 <8634jrin5v.fsf@HIDDEN>
 <b0b96c86-d22a-4569-938a-d15a527ced84@HIDDEN>
 <86ikskvie0.fsf@HIDDEN>
 <97e7ec85-7e5c-4aa4-a85f-b5f40adc8de6@HIDDEN>
 <8634jov5ir.fsf@HIDDEN>
 <c5265c5b-b48a-4e48-a52d-79cd956a4082@HIDDEN>
 <86serntf0h.fsf@HIDDEN> <86h680rhxr.fsf@HIDDEN>
 <87h680fotv.fsf@HIDDEN> <864j40pfbw.fsf@HIDDEN>
 <87bjy8e5qc.fsf@HIDDEN> <86y11cnyws.fsf@HIDDEN>
Date: Fri, 22 Nov 2024 09:29:00 +0200
Message-ID: <87iksfpwlr.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: dmitry@HIDDEN, 74361 <at> debbugs.gnu.org, rudalics@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> cmuscheme.el:
>>   (define-derived-mode inferior-scheme-mode comint-mode "Inferior Scheme"
>>    ...
>>     (pop-to-buffer "*scheme*" display-comint-buffer-action)
>> 
>> inf-lisp.el:
>>   (define-derived-mode inferior-lisp-mode comint-mode "Inferior Lisp"
>>    ...
>>     (pop-to-buffer "*inferior-lisp*" display-comint-buffer-action)
>> 
>> shell.el:
>>   (define-derived-mode shell-mode comint-mode "Shell"
>>    ...
>>     (pop-to-buffer buffer display-comint-buffer-action)
>
> Those are not the categories, those are the deprecated user options
> for which the categories are supposed to be a replacement we
> recommend:
>
>   (make-obsolete-variable
>    'display-comint-buffer-action
>    "use a `(category . comint)' condition in `display-buffer-alist'."
>    "30.1")

The categories are a replacement only for customization.
But all display-buffer calls should still contain
`(category . comint)' that currently presented
in these variables.  IOW, the variables currently
are used in two ways:
1. as the default values for display-buffer calls
2. as user options

But now customization is supposed to be only with
the help of `(category . comint)' in `display-buffer-alist'.
So these variable will be used only in display-buffer calls.

> So if some user wants to take our advice and modernize his/her
> customizations to use '(category . comint)' instead of
> display-comint-buffer-action, the customization will stop working for
> him/her when we remove those obsolete options in some future Emacs
> version.  Right?  Or what am I missing?

These are two possible solutions:
1. Demote these options to variables not intended for customization.
2. Move their current default values to display-buffer calls.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 21 Nov 2024 19:57:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 21 14:57:04 2024
Received: from localhost ([127.0.0.1]:51838 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tEDIV-00044G-Ny
	for submit <at> debbugs.gnu.org; Thu, 21 Nov 2024 14:57:04 -0500
Received: from eggs.gnu.org ([209.51.188.92]:54902)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1tEDIT-00043k-IQ
 for 74361 <at> debbugs.gnu.org; Thu, 21 Nov 2024 14:57:02 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tEDIM-0000KP-ME; Thu, 21 Nov 2024 14:56:54 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=q65bvYe64pvNBOEzkRGO92wWvEwI7R6uuQdxBui5Gvk=; b=nKZzTtTlxuck
 nHjvgvHgLrjaaHzPUJx484jrPbcyaXHVC6gN3GOhChsDMhCemq9lz0kwjSrSz/qEJPtMSqvHonY7B
 c98yAeeq/TXn+xpnn7uJJZCerillEFntc9QY36mh+cFh/NkiOxsjUL0E8gEYz5Fn+5nbwY/6F7bNQ
 +9qdxt43FIOAcfVWT5swFbJwYexk8Qm9rAHODcAZT4CjF2pTtTdeowoFwNIKu2ZWY9OwBd/YGlMcp
 5dHXDh9Cc17vRsqiyh7Gl0iG4ouiZsSEs0r1L3TCatK/D/K9vZ7g/2kUF7k5wzEXKcJ+1nWh5scs0
 Eq9GFFX8ga+8o7gQzpYBig==;
Date: Thu, 21 Nov 2024 21:56:51 +0200
Message-Id: <86y11cnyws.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
In-Reply-To: <87bjy8e5qc.fsf@HIDDEN> (message from Juri Linkov on
 Thu, 21 Nov 2024 21:39:39 +0200)
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <86ldxkitjn.fsf@HIDDEN>
 <5a2abf5e-011b-43d0-b34a-e06e354badc5@HIDDEN>
 <8634jrin5v.fsf@HIDDEN>
 <b0b96c86-d22a-4569-938a-d15a527ced84@HIDDEN>
 <86ikskvie0.fsf@HIDDEN>
 <97e7ec85-7e5c-4aa4-a85f-b5f40adc8de6@HIDDEN>
 <8634jov5ir.fsf@HIDDEN>
 <c5265c5b-b48a-4e48-a52d-79cd956a4082@HIDDEN>
 <86serntf0h.fsf@HIDDEN> <86h680rhxr.fsf@HIDDEN>
 <87h680fotv.fsf@HIDDEN> <864j40pfbw.fsf@HIDDEN>
 <87bjy8e5qc.fsf@HIDDEN>
X-Spam-Score: -1.6 (-)
X-Debbugs-Envelope-To: 74361
Cc: dmitry@HIDDEN, 74361 <at> debbugs.gnu.org, rudalics@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.6 (--)

> From: Juri Linkov <juri@HIDDEN>
> Cc: dmitry@HIDDEN,  rudalics@HIDDEN,  74361 <at> debbugs.gnu.org
> Date: Thu, 21 Nov 2024 21:39:39 +0200
> 
> >> > If someone explains to me in small words how this works in comint (and
> >> > other modes which provide a similar category symbol), I will see about
> >> > improving and clarifying the docs.
> >> 
> >> '(category . comint)' is used in 'display-comint-buffer-action'
> >> that is marked obsolete.  So for Emacs 31 its defcustom could be
> >> downgraded to a simple defvar, and moved to comint.el, and maybe
> >> also autoloaded when it's used by modes independent from comint.el.
> >
> > But nothing in comint.el uses this category when calling
> > display-buffer, AFAICS.  So how can users use this category to
> > customize the way comint buffers are displayed?
> 
> This category is used by modes that inherit from comint-mode, e.g.:
> 
> cmuscheme.el:
>   (define-derived-mode inferior-scheme-mode comint-mode "Inferior Scheme"
>    ...
>     (pop-to-buffer "*scheme*" display-comint-buffer-action)
> 
> inf-lisp.el:
>   (define-derived-mode inferior-lisp-mode comint-mode "Inferior Lisp"
>    ...
>     (pop-to-buffer "*inferior-lisp*" display-comint-buffer-action)
> 
> shell.el:
>   (define-derived-mode shell-mode comint-mode "Shell"
>    ...
>     (pop-to-buffer buffer display-comint-buffer-action)

Those are not the categories, those are the deprecated user options
for which the categories are supposed to be a replacement we
recommend:

  (make-obsolete-variable
   'display-comint-buffer-action
   "use a `(category . comint)' condition in `display-buffer-alist'."
   "30.1")

So if some user wants to take our advice and modernize his/her
customizations to use '(category . comint)' instead of
display-comint-buffer-action, the customization will stop working for
him/her when we remove those obsolete options in some future Emacs
version.  Right?  Or what am I missing?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 21 Nov 2024 19:40:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 21 14:40:52 2024
Received: from localhost ([127.0.0.1]:51782 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tED2i-0003Kr-Md
	for submit <at> debbugs.gnu.org; Thu, 21 Nov 2024 14:40:52 -0500
Received: from relay7-d.mail.gandi.net ([217.70.183.200]:60341)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1tED2g-0003KY-LX
 for 74361 <at> debbugs.gnu.org; Thu, 21 Nov 2024 14:40:43 -0500
Received: by mail.gandi.net (Postfix) with ESMTPSA id D2D8220007;
 Thu, 21 Nov 2024 19:40:34 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
In-Reply-To: <864j40pfbw.fsf@HIDDEN> (Eli Zaretskii's message of "Thu, 21 Nov
 2024 21:16:51 +0200")
Organization: LINKOV.NET
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <86ldxkitjn.fsf@HIDDEN>
 <5a2abf5e-011b-43d0-b34a-e06e354badc5@HIDDEN>
 <8634jrin5v.fsf@HIDDEN>
 <b0b96c86-d22a-4569-938a-d15a527ced84@HIDDEN>
 <86ikskvie0.fsf@HIDDEN>
 <97e7ec85-7e5c-4aa4-a85f-b5f40adc8de6@HIDDEN>
 <8634jov5ir.fsf@HIDDEN>
 <c5265c5b-b48a-4e48-a52d-79cd956a4082@HIDDEN>
 <86serntf0h.fsf@HIDDEN> <86h680rhxr.fsf@HIDDEN>
 <87h680fotv.fsf@HIDDEN> <864j40pfbw.fsf@HIDDEN>
Date: Thu, 21 Nov 2024 21:39:39 +0200
Message-ID: <87bjy8e5qc.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: dmitry@HIDDEN, 74361 <at> debbugs.gnu.org, rudalics@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> > If someone explains to me in small words how this works in comint (and
>> > other modes which provide a similar category symbol), I will see about
>> > improving and clarifying the docs.
>> 
>> '(category . comint)' is used in 'display-comint-buffer-action'
>> that is marked obsolete.  So for Emacs 31 its defcustom could be
>> downgraded to a simple defvar, and moved to comint.el, and maybe
>> also autoloaded when it's used by modes independent from comint.el.
>
> But nothing in comint.el uses this category when calling
> display-buffer, AFAICS.  So how can users use this category to
> customize the way comint buffers are displayed?

This category is used by modes that inherit from comint-mode, e.g.:

cmuscheme.el:
  (define-derived-mode inferior-scheme-mode comint-mode "Inferior Scheme"
   ...
    (pop-to-buffer "*scheme*" display-comint-buffer-action)

inf-lisp.el:
  (define-derived-mode inferior-lisp-mode comint-mode "Inferior Lisp"
   ...
    (pop-to-buffer "*inferior-lisp*" display-comint-buffer-action)

shell.el:
  (define-derived-mode shell-mode comint-mode "Shell"
   ...
    (pop-to-buffer buffer display-comint-buffer-action)




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 21 Nov 2024 19:17:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 21 14:17:03 2024
Received: from localhost ([127.0.0.1]:51748 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tECfm-0002Fg-Nb
	for submit <at> debbugs.gnu.org; Thu, 21 Nov 2024 14:17:03 -0500
Received: from eggs.gnu.org ([209.51.188.92]:37122)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1tECfl-0002F9-1t
 for 74361 <at> debbugs.gnu.org; Thu, 21 Nov 2024 14:17:02 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tECfd-0001r3-FY; Thu, 21 Nov 2024 14:16:54 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=wwkEjVKSH3MUrAZN+VSLxR1p5oM21baFveYkWDnQ9FM=; b=PVUBzDCsk5DT
 EoXjbfN6Rk+0Yn43FU7IKQ5Fc9M/lDVeqADa/r6YlnZYUiQX+wyCnvtlf4vZQpRE8KJ5glIifmnAa
 cnf03ZKAOZfYvudjNGWXUPzJC5KRncwkxDqqMzn4SUZLWySSbFoyAUMCFT9XqFqP2lInfg2KzoAw6
 lpY9fvP7qqrllUn2xsTohCioqbpaNI42OXh+qx5S7wEphlnzDtcsFisOHHWFh21LDJVOJZLaH2xaQ
 PeINduce7qyrXL8t5H8Tc/8uOgCOm3vPlhvfv+WTLcO98w8bEa7/6nwFJXBCLeHiA6y9ZmachJxnD
 HJUJua5MG03mtw56tEQYfQ==;
Date: Thu, 21 Nov 2024 21:16:51 +0200
Message-Id: <864j40pfbw.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
In-Reply-To: <87h680fotv.fsf@HIDDEN> (message from Juri Linkov on
 Thu, 21 Nov 2024 20:01:48 +0200)
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <86ldxkitjn.fsf@HIDDEN>
 <5a2abf5e-011b-43d0-b34a-e06e354badc5@HIDDEN>
 <8634jrin5v.fsf@HIDDEN>
 <b0b96c86-d22a-4569-938a-d15a527ced84@HIDDEN>
 <86ikskvie0.fsf@HIDDEN>
 <97e7ec85-7e5c-4aa4-a85f-b5f40adc8de6@HIDDEN>
 <8634jov5ir.fsf@HIDDEN>
 <c5265c5b-b48a-4e48-a52d-79cd956a4082@HIDDEN>
 <86serntf0h.fsf@HIDDEN> <86h680rhxr.fsf@HIDDEN>
 <87h680fotv.fsf@HIDDEN>
X-Spam-Score: -1.6 (-)
X-Debbugs-Envelope-To: 74361
Cc: dmitry@HIDDEN, 74361 <at> debbugs.gnu.org, rudalics@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.6 (--)

> From: Juri Linkov <juri@HIDDEN>
> Cc: dmitry@HIDDEN,  rudalics@HIDDEN,  74361 <at> debbugs.gnu.org
> Date: Thu, 21 Nov 2024 20:01:48 +0200
> 
> > If someone explains to me in small words how this works in comint (and
> > other modes which provide a similar category symbol), I will see about
> > improving and clarifying the docs.
> 
> '(category . comint)' is used in 'display-comint-buffer-action'
> that is marked obsolete.  So for Emacs 31 its defcustom could be
> downgraded to a simple defvar, and moved to comint.el, and maybe
> also autoloaded when it's used by modes independent from comint.el.

But nothing in comint.el uses this category when calling
display-buffer, AFAICS.  So how can users use this category to
customize the way comint buffers are displayed?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 21 Nov 2024 18:14:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 21 13:14:10 2024
Received: from localhost ([127.0.0.1]:51622 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tEBgw-0007h4-7F
	for submit <at> debbugs.gnu.org; Thu, 21 Nov 2024 13:14:10 -0500
Received: from relay9-d.mail.gandi.net ([217.70.183.199]:47681)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1tEBgu-0007gn-KA
 for 74361 <at> debbugs.gnu.org; Thu, 21 Nov 2024 13:14:09 -0500
Received: by mail.gandi.net (Postfix) with ESMTPSA id 2851CFF802;
 Thu, 21 Nov 2024 18:14:00 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
In-Reply-To: <86h680rhxr.fsf@HIDDEN> (Eli Zaretskii's message of "Thu, 21 Nov
 2024 12:37:36 +0200")
Organization: LINKOV.NET
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <86ldxkitjn.fsf@HIDDEN>
 <5a2abf5e-011b-43d0-b34a-e06e354badc5@HIDDEN>
 <8634jrin5v.fsf@HIDDEN>
 <b0b96c86-d22a-4569-938a-d15a527ced84@HIDDEN>
 <86ikskvie0.fsf@HIDDEN>
 <97e7ec85-7e5c-4aa4-a85f-b5f40adc8de6@HIDDEN>
 <8634jov5ir.fsf@HIDDEN>
 <c5265c5b-b48a-4e48-a52d-79cd956a4082@HIDDEN>
 <86serntf0h.fsf@HIDDEN> <86h680rhxr.fsf@HIDDEN>
Date: Thu, 21 Nov 2024 20:01:48 +0200
Message-ID: <87h680fotv.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: dmitry@HIDDEN, 74361 <at> debbugs.gnu.org, rudalics@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> If someone explains to me in small words how this works in comint (and
> other modes which provide a similar category symbol), I will see about
> improving and clarifying the docs.

'(category . comint)' is used in 'display-comint-buffer-action'
that is marked obsolete.  So for Emacs 31 its defcustom could be
downgraded to a simple defvar, and moved to comint.el, and maybe
also autoloaded when it's used by modes independent from comint.el.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 21 Nov 2024 10:37:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 21 05:37:48 2024
Received: from localhost ([127.0.0.1]:49188 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tE4ZH-000381-MS
	for submit <at> debbugs.gnu.org; Thu, 21 Nov 2024 05:37:48 -0500
Received: from eggs.gnu.org ([209.51.188.92]:56844)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1tE4ZF-00037p-IC
 for 74361 <at> debbugs.gnu.org; Thu, 21 Nov 2024 05:37:46 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tE4Z9-0004ez-37; Thu, 21 Nov 2024 05:37:39 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=s2qk1+fGDDJdsrF2HbPxmJhUo7PJL4ph5XtnPwzMoQA=; b=jpQYgwMIJDhg
 8sv15bkeDBueJN99QbodwLmAGDJxPjLGBkagqhvoXJv/sN6rnlK4i7pQs4jA+TLQY0NWCUEyky1nR
 +XIZuARqefW/so85A0V28HliSre9u+Xws2cHHan0XyMeliJztGCr4tSTKIwO6oBkjFK0uX0mYrKdi
 JKpg8bVXRBcTkVgddvxmly9P85SngbHsWS9/BGCLvHEaroT8zKLDNuMORRNVGRoVgZqvrEU/k3Io6
 XbpnVqHPCBcsIpBxEP00+/2AINqePbMK4fdJr2GliJgmqhNJSUdtMx4xbhuUlDoBdLwpFbVrOv+8m
 abDDaouw13LhGSbNAgdilw==;
Date: Thu, 21 Nov 2024 12:37:36 +0200
Message-Id: <86h680rhxr.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: dmitry@HIDDEN, rudalics@HIDDEN
In-Reply-To: <86serntf0h.fsf@HIDDEN> (message from Eli Zaretskii on Tue, 19
 Nov 2024 17:33:18 +0200)
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <86ldxkitjn.fsf@HIDDEN> <5a2abf5e-011b-43d0-b34a-e06e354badc5@HIDDEN>
 <8634jrin5v.fsf@HIDDEN> <b0b96c86-d22a-4569-938a-d15a527ced84@HIDDEN>
 <86ikskvie0.fsf@HIDDEN> <97e7ec85-7e5c-4aa4-a85f-b5f40adc8de6@HIDDEN>
 <8634jov5ir.fsf@HIDDEN> <c5265c5b-b48a-4e48-a52d-79cd956a4082@HIDDEN>
 <86serntf0h.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 74361
Cc: 74361 <at> debbugs.gnu.org, juri@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: rudalics@HIDDEN, 74361 <at> debbugs.gnu.org, juri@HIDDEN
> Date: Tue, 19 Nov 2024 17:33:18 +0200
> From: Eli Zaretskii <eliz@HIDDEN>
> 
> > Speaking of the reference that we used for this solution, it seems that
> > 
> >    (category . comint)
> > 
> > is only mentioned in NEWS and in the obsoletion message for 
> > 'display-comint-buffer-action'. There is also a hit for it in the 
> > manual, but only in the form "If the caller display-buffer passes a 
> > category as a symbol ...", not saying exactly that comint modes do or 
> > should do that. Maybe that's something to be fixed as well.
> 
> I will see about documenting it properly, if no one beats me to it.

I've added some minor improvements to the documentation of 'category',
but I don't really see what, if anything, needs to be said about
'comint' in particular.  AFAIU, there's no significance to the
'comint' symbol itself, it's just a convenience feature to allow users
of comint buffers to customize how those buffers are displayed.  (And
I'm not sure I understand how that works, since comint.el doesn't use
that category, AFAICT.)  Which reminds me that I was quite unhappy
about the way this feature was documented, and its current state is
not much better, sadly.

So I don't see what I could add more to the documentation at this
time.

If someone explains to me in small words how this works in comint (and
other modes which provide a similar category symbol), I will see about
improving and clarifying the docs.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 21 Nov 2024 07:45:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 21 02:45:23 2024
Received: from localhost ([127.0.0.1]:48930 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tE1sQ-0003hq-UV
	for submit <at> debbugs.gnu.org; Thu, 21 Nov 2024 02:45:23 -0500
Received: from relay5-d.mail.gandi.net ([217.70.183.197]:43309)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1tE1sP-0003hd-MF
 for 74361 <at> debbugs.gnu.org; Thu, 21 Nov 2024 02:45:22 -0500
Received: by mail.gandi.net (Postfix) with ESMTPSA id 6577C1C0003;
 Thu, 21 Nov 2024 07:44:53 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Dmitry Gutov <dmitry@HIDDEN>
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
In-Reply-To: <2ef677aa-1433-4aaa-92a5-c600774dd457@HIDDEN> (Dmitry Gutov's
 message of "Wed, 20 Nov 2024 21:12:36 +0200")
Organization: LINKOV.NET
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <87msi1ueb0.fsf@HIDDEN>
 <4256f446-e11b-450c-b455-131cb75acab0@HIDDEN>
 <871pzbj8mq.fsf@HIDDEN>
 <c05a2b89-cc0b-4489-9011-7449f306cb19@HIDDEN>
 <87sernhxoa.fsf@HIDDEN>
 <fd3fe857-b1fb-41f6-ab4b-72223948b814@HIDDEN>
 <875xoi4cei.fsf@HIDDEN>
 <2ef677aa-1433-4aaa-92a5-c600774dd457@HIDDEN>
Date: Thu, 21 Nov 2024 09:34:39 +0200
Message-ID: <87frnl9h0w.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: martin rudalics <rudalics@HIDDEN>, 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> 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.

While using your patch I got this error caused by missing nil:

Debugger entered--Lisp error: (wrong-type-argument listp xref)
  append(nil nil nil (category . xref) nil nil ...)
  display-buffer(#<buffer xref.el> ((category . xref)))
  xref--show-pos-in-buf(...)
  xref--show-location(...)
  command-execute(xref-goto-xref)

This is not reproducible in `emacs -Q`.  If you want,
I could try to find minimal customization.
But the main thing is that with my customization
(window-live-p xref--original-window) is nil,
so 'xref--show-pos-in-buf' uses the last branch of 'cond'.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 21 Nov 2024 07:44:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 21 02:44:59 2024
Received: from localhost ([127.0.0.1]:48922 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tE1s3-0003am-JG
	for submit <at> debbugs.gnu.org; Thu, 21 Nov 2024 02:44:59 -0500
Received: from relay1-d.mail.gandi.net ([217.70.183.193]:46807)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1tE1s1-0003aV-G7
 for 74361 <at> debbugs.gnu.org; Thu, 21 Nov 2024 02:44:58 -0500
Received: by mail.gandi.net (Postfix) with ESMTPSA id A6111240014;
 Thu, 21 Nov 2024 07:44:49 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Dmitry Gutov <dmitry@HIDDEN>
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
In-Reply-To: <b8c0cd1a-6ab2-4d96-8665-3d406fb8fa83@HIDDEN> (Dmitry Gutov's
 message of "Wed, 20 Nov 2024 21:10:24 +0200")
Organization: LINKOV.NET
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <87msi1ueb0.fsf@HIDDEN>
 <4256f446-e11b-450c-b455-131cb75acab0@HIDDEN>
 <871pzbj8mq.fsf@HIDDEN>
 <c05a2b89-cc0b-4489-9011-7449f306cb19@HIDDEN>
 <87sernhxoa.fsf@HIDDEN>
 <fd3fe857-b1fb-41f6-ab4b-72223948b814@HIDDEN>
 <1d08c589-2d0e-4f10-8c2e-e21c206ac118@HIDDEN>
 <87serlyfq1.fsf@HIDDEN>
 <b8c0cd1a-6ab2-4d96-8665-3d406fb8fa83@HIDDEN>
Date: Thu, 21 Nov 2024 09:29:35 +0200
Message-ID: <87y11d9h9c.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: martin rudalics <rudalics@HIDDEN>, 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> A sub-category could be represented by the same prefix, e.g.
>> for different calls of display-buffer in xref.el:
>> 'xref-results' for displaying the result buffer (or simply
>> 'xref' since it's the main buffer of the xref package),
>> 'xref-other-window', 'xref-other-frame' for display-buffer
>> from the respective commands, etc.
>
> Maybe we'll call the current addition's category 'xref-jump', for extra
> clarity.

'xref-jump' is a nice descriptive name.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 20 Nov 2024 19:12:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 20 14:12:46 2024
Received: from localhost ([127.0.0.1]:47799 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tDq86-0003UW-Iy
	for submit <at> debbugs.gnu.org; Wed, 20 Nov 2024 14:12:46 -0500
Received: from fout-b7-smtp.messagingengine.com ([202.12.124.150]:39147)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1tDq84-0003UJ-IW
 for 74361 <at> debbugs.gnu.org; Wed, 20 Nov 2024 14:12:45 -0500
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)
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: <xms:pjQ-Z_9IqJBi9-MjrhmumysRD3JD8SchjRB5ZAoINFOeTu246IbPRw>
 <xme:pjQ-Z7tKRn6mUC1E5OFWGjMH0mhdTmbbizkqAiklaMdWaIDfcrLDQhxqiCVl-sHv2
 EVg3n04kbXq598M49k>
X-ME-Received: <xmr:pjQ-Z9Ar1vBTKeY47ZcqjmdlMkC1AnG7eOuB2OX7X09jaup9sQkh_uXqjnutuiKdfFpX>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrfeeggdduvddtucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu
 rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh
 htshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdej
 necuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdrug
 gvvheqnecuggftrfgrthhtvghrnhepteduleejgeehtefgheegjeekueehvdevieekueef
 tddvtdevfefhvdevgedujeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe
 hmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghvpdhnsggprhgtphhtthho
 peefpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehjuhhriheslhhinhhkohhvrd
 hnvghtpdhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthdprhgtphhtthhopeej
 geefieduseguvggssghughhsrdhgnhhurdhorhhg
X-ME-Proxy: <xmx:pzQ-Z7fzMP82vlODkC0IoIUroo2niO4HUvDcDWP6OVxVwyoFgE5q-w>
 <xmx:pzQ-Z0PzxT2cuvA-QeV8jDmf9w0gWi8qd2GOd0fGjSIjWFU8xJYkYg>
 <xmx:pzQ-Z9lhgQJodDIke4eFPqc82pCIZKhJPV3Nb3_WfJMUkiBLVFYV5A>
 <xmx:pzQ-Z-swqSPThe1gCbmQ4Lyg9VlbaNuzvBcBQH5j-k0yUrpLN0zY5A>
 <xmx:pzQ-Z5rJeH8hQhhn57_DKHk0fQnomWEn3sw1ucXklGMH6dixRiu4yGm_>
Feedback-ID: i07de48aa:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
 20 Nov 2024 14:12:37 -0500 (EST)
Message-ID: <2ef677aa-1433-4aaa-92a5-c600774dd457@HIDDEN>
Date: Wed, 20 Nov 2024 21:12:36 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
To: Juri Linkov <juri@HIDDEN>
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <87msi1ueb0.fsf@HIDDEN>
 <4256f446-e11b-450c-b455-131cb75acab0@HIDDEN>
 <871pzbj8mq.fsf@HIDDEN>
 <c05a2b89-cc0b-4489-9011-7449f306cb19@HIDDEN>
 <87sernhxoa.fsf@HIDDEN>
 <fd3fe857-b1fb-41f6-ab4b-72223948b814@HIDDEN>
 <875xoi4cei.fsf@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <875xoi4cei.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 74361
Cc: martin rudalics <rudalics@HIDDEN>, 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 20 Nov 2024 19:10:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 20 14:10:34 2024
Received: from localhost ([127.0.0.1]:47789 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tDq5y-0003R2-Jy
	for submit <at> debbugs.gnu.org; Wed, 20 Nov 2024 14:10:34 -0500
Received: from fhigh-b1-smtp.messagingengine.com ([202.12.124.152]:41087)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1tDq5w-0003Qo-U2
 for 74361 <at> debbugs.gnu.org; Wed, 20 Nov 2024 14:10:33 -0500
Received: from phl-compute-01.internal (phl-compute-01.phl.internal
 [10.202.2.41])
 by mailfhigh.stl.internal (Postfix) with ESMTP id 8FD03254012F;
 Wed, 20 Nov 2024 14:10:27 -0500 (EST)
Received: from phl-mailfrontend-01 ([10.202.2.162])
 by phl-compute-01.internal (MEProxy); Wed, 20 Nov 2024 14:10:27 -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=1732129827;
 x=1732216227; bh=20YMteyJpH+4UWJ7xIl/hrNecZsVpv42eEbh3Oe4JfQ=; b=
 ok/g4xZJvIegeW+4fWBMIoV49z8ZYdZwgBMfqrA1aS7sLG+Dreqq2tDqk9RDs/Y9
 LqsY+9jsNpXLSdwwSk070UAtoSRzEMQ/QclbOkccwarSL7EUorlMoydmuAp1MNi2
 yq8Y7LJFJKPZN9Hxb72uzhF/dhtjF+y9LnZ7nDxLUCo8f0kVnRWdKB888Zq0q+iK
 eNqdyLu1g/4tySh5mSEsMVcDSFCHw+DoAppdf10fHA/j77sOkP4h7UgFnNRXy7Ra
 ZifGIWKi7rffG5sWtp7hvFccxDL2ZXuoTNBjzgU0vV0O8KyVfS8abwj4W+PeLrwq
 PIyA6i9j8sOlLHVTERjYWA==
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=1732129827; x=
 1732216227; bh=20YMteyJpH+4UWJ7xIl/hrNecZsVpv42eEbh3Oe4JfQ=; b=Q
 1KuDpGB7OGtsRcakV4aUuG5txgs8Dbeq1kFaLWozzuR4pOMH9tAPDY2F62A0i4Te
 iAbn57ekjL5VMzE615TxDK1Z0TYgIW6uoLj3CbvKjsiomXWtTxKio9qcBsXWNgX5
 5QrxjxAiRSy84+NDi3B2sB7trK88Jf6Nltl7uqcz+HzAYvY9aJPxpp/rO1NErxTA
 jfVnDFxVTWJgt3biA9+Kf3iOjK3m66wz+B2x2yD/dNiro8H62WuJVT2QRgGD6Tmw
 eCPuQrz94oyg+Rr1LeKEBcqGwvT7PVe8ca8rPAqaTaFzWH1e88suSxehlrSwggPk
 e4LDTZaS2iBjnS6j0t8Ug==
X-ME-Sender: <xms:IzQ-ZwrXyHfH0XpDNAlomr9H2bso0YXmlpcQBTUls-PgDQLciY4z5A>
 <xme:IzQ-Z2qn5KJorRk9UmqHrAO1zFI63ayJL3SMENA7ElIw4x5oNvTIqR4xC98uNaGPn
 SXTRgYmw1vYuPmPx4M>
X-ME-Received: <xmr:IzQ-Z1Pc3AJ7FI7St77r1Ph5N9LiSzIM80XP7lKH3UBgrqt8TluOp5g8dhia_nmDzPB2>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrfeeggdduvdduucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu
 rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh
 htshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdej
 necuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdrug
 gvvheqnecuggftrfgrthhtvghrnhepteduleejgeehtefgheegjeekueehvdevieekueef
 tddvtdevfefhvdevgedujeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe
 hmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghvpdhnsggprhgtphhtthho
 peefpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehjuhhriheslhhinhhkohhvrd
 hnvghtpdhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthdprhgtphhtthhopeej
 geefieduseguvggssghughhsrdhgnhhurdhorhhg
X-ME-Proxy: <xmx:IzQ-Z37NYwFEtJO8QkBbywxReVOOoy3KGautpeGhbbQqThKVCucucw>
 <xmx:IzQ-Z_52iTLnl7Bp0fcueS-HxWLaYv_4ZglsTWh5ToMcNKyPQdLLqQ>
 <xmx:IzQ-Z3h6fnyonicpYU2pZB2kR4A4hOjDGIV7kV1dEsVgJfdGmeD3tQ>
 <xmx:IzQ-Z56GHw2I1jMOFNapC-ZpZ0KpIIN0GRO2TTf6hSDRTy-gyH1ZYw>
 <xmx:IzQ-Zxm3XrtFHW1I8lZZ7yD2t20iWUJ_Vfhh21F09tHs_xf-KWXdpNgV>
Feedback-ID: i07de48aa:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
 20 Nov 2024 14:10:26 -0500 (EST)
Message-ID: <b8c0cd1a-6ab2-4d96-8665-3d406fb8fa83@HIDDEN>
Date: Wed, 20 Nov 2024 21:10:24 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
To: Juri Linkov <juri@HIDDEN>, martin rudalics <rudalics@HIDDEN>
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <87msi1ueb0.fsf@HIDDEN>
 <4256f446-e11b-450c-b455-131cb75acab0@HIDDEN>
 <871pzbj8mq.fsf@HIDDEN>
 <c05a2b89-cc0b-4489-9011-7449f306cb19@HIDDEN>
 <87sernhxoa.fsf@HIDDEN>
 <fd3fe857-b1fb-41f6-ab4b-72223948b814@HIDDEN>
 <1d08c589-2d0e-4f10-8c2e-e21c206ac118@HIDDEN>
 <87serlyfq1.fsf@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <87serlyfq1.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 74361
Cc: 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 20/11/2024 19:31, Juri Linkov wrote:
>> And there should be a convention for setting it up maybe with the help
>> of some sort of sub-categories.  IIUC 'comint', 'xref' and 'image' might
>> not be distinctive enough for all purposes.  I cannot suggest much here
>> because I do not use either of these.
> A sub-category could be represented by the same prefix, e.g.
> for different calls of display-buffer in xref.el:
> 'xref-results' for displaying the result buffer (or simply
> 'xref' since it's the main buffer of the xref package),
> 'xref-other-window', 'xref-other-frame' for display-buffer
> from the respective commands, etc.

Maybe we'll call the current addition's category 'xref-jump', for extra 
clarity. Later, 'xref-results' could be added as well.

'xref-other-*' are possible too, but seem less likely to actually get 
used in customizations. Why not, though.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 20 Nov 2024 19:08:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 20 14:08:46 2024
Received: from localhost ([127.0.0.1]:47780 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tDq4E-0003I6-0P
	for submit <at> debbugs.gnu.org; Wed, 20 Nov 2024 14:08:46 -0500
Received: from fout-b7-smtp.messagingengine.com ([202.12.124.150]:53947)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1tDq4A-0003Hr-CX
 for 74361 <at> debbugs.gnu.org; Wed, 20 Nov 2024 14:08:44 -0500
Received: from phl-compute-11.internal (phl-compute-11.phl.internal
 [10.202.2.51])
 by mailfout.stl.internal (Postfix) with ESMTP id BBCEC1140191;
 Wed, 20 Nov 2024 14:08:36 -0500 (EST)
Received: from phl-mailfrontend-01 ([10.202.2.162])
 by phl-compute-11.internal (MEProxy); Wed, 20 Nov 2024 14:08:36 -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=1732129716;
 x=1732216116; bh=dTPgBgCIqKkWzizGOBnBh8vqT8SZOpicP9nm3LkNJ34=; b=
 uF5N3w7ajhwhBwqnVCJmG7sLtI4ajFXa3tkSeETeimU2nU7g6hLO23GraiiPfkSD
 vAmU/BqmQgceBkCMDhi3deOlncISunOrw8aMOhH2JV3igkJCUcK/JBlpqNfEY/Kr
 FQ2GOLny/2ZkVyXNQuL/WRQ4+G7K7oeKw2LA4Er9MEPGEycDoIv1B/amw0wFYzbd
 grXfjx5PlTHg+hwF9LsLC6yeXfBlwsbWBQm3pt78aqAqEeg10nXqKedPNLp0Hu4a
 tnds2FY6D13Tw0eINsWa4hGTyctEIlclhCJqgn/rZd08cqk74T0N52D3PoJYOptS
 KA23A8R7qmARoP/i2dPBiQ==
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=1732129716; x=
 1732216116; bh=dTPgBgCIqKkWzizGOBnBh8vqT8SZOpicP9nm3LkNJ34=; b=4
 KgAm+uk0SuqssgEZVHZ7+/Cufm5p/W4rvXrV0PpXXSoXpiisIwpHcvLRYb/M5VlJ
 ijjGppO2zqtU+wD2h02ABOiPU7XwOUiDURNNiRBANxdihMIFB4IC0xMwyiosPdik
 wccef3tRDL9qpJcY/PKdI/1oHT8Sfc/dpgtDVpYatGxh2lYRpkJObmIUp1/rcBG8
 u/dzM6QFzQAkTCrBlPzCUXAKBqCzTB83zFGgO7sB8PMYyReMwjgGYqVv4/UuwxgV
 HvvQMCkKWsep8hdn243iGPrBKrb2RaHGO134vTyq4t8XOF3qdNBM6NxQXjSjwmtF
 feVHAQDpr1Pn5BIMTFqDA==
X-ME-Sender: <xms:tDM-Z8zAVWZVZBL3A7uHEiKwQjSDbS1LszFxWHCxABoTjAIPZ7WWUQ>
 <xme:tDM-ZwR7wImqZYslUgVgaNGk1ODig8pjWhi2h4cDgYeC9P-Bh2Tbe6jf1XgJc-PLv
 TpjrR2S2JaiULUwxkk>
X-ME-Received: <xmr:tDM-Z-VQimwLXY36pzHs0A88MI45K7QCnbi4n2b9QkGhbi0QP0mBZARMQAW_aAz3mUWn>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrfeeggdduvddtucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu
 rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh
 htshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtvdej
 necuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdrug
 gvvheqnecuggftrfgrthhtvghrnhepgeelfeetkefghfdvhfdtgeevveevteetgeetveeg
 tedthefhudekteehffeukeeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe
 hmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghvpdhnsggprhgtphhtthho
 peefpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehruhgurghlihgtshesghhmgi
 drrghtpdhrtghpthhtohepjhhurhhisehlihhnkhhovhdrnhgvthdprhgtphhtthhopeej
 geefieduseguvggssghughhsrdhgnhhurdhorhhg
X-ME-Proxy: <xmx:tDM-Z6ibkem4unr5oFlemEcbN2jyBqKsEYYgQCnJR-AGuVf19PyPxg>
 <xmx:tDM-Z-D6-6-YDtoX_uZfEmJi5oKZTGuc-pq0TSPB4M4JybGCT01GqA>
 <xmx:tDM-Z7KtFVm_90RKK4Ix51TacSQLrfusuIrmd02j1AK2SaVn-jehsQ>
 <xmx:tDM-Z1By_lZZJeYxBBR-QHd1jsQrZgEXlO5ZeL3xrcE55UmrQN2H3A>
 <xmx:tDM-Z5NXD4GFKq_Qp7N--ivP0yXYHpXBAFq4zX3s_YeW1PA-jzcQUZOl>
Feedback-ID: i07de48aa:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
 20 Nov 2024 14:08:35 -0500 (EST)
Message-ID: <f6fbc018-84e0-4137-8c83-0477ee47beff@HIDDEN>
Date: Wed, 20 Nov 2024 21:08:33 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
To: martin rudalics <rudalics@HIDDEN>, Juri Linkov <juri@HIDDEN>
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <87msi1ueb0.fsf@HIDDEN>
 <4256f446-e11b-450c-b455-131cb75acab0@HIDDEN>
 <871pzbj8mq.fsf@HIDDEN>
 <c05a2b89-cc0b-4489-9011-7449f306cb19@HIDDEN>
 <87sernhxoa.fsf@HIDDEN>
 <fd3fe857-b1fb-41f6-ab4b-72223948b814@HIDDEN>
 <1d08c589-2d0e-4f10-8c2e-e21c206ac118@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <1d08c589-2d0e-4f10-8c2e-e21c206ac118@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 74361
Cc: 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 20/11/2024 10:37, martin rudalics wrote:
> 
> The function ultimately used by both is 'set-window-buffer'.  One basic
> feature of 'switch-to-buffer' not shared by 'display-buffer-same-window'
> is 'switch-to-buffer-preserve-window-point'.  And obviously
> 'switch-to-buffer-obey-display-actions' gives the user the opportunity
> to override the behavior of 'switch-to-buffer' in an arbitrary way while
> 'display-buffer-reuse-window' per se cannot be overridden.  OTOH the
> behavior of the latter can be controlled via alist entries.

I guess the main possible concern is somebody's display-buffer-alist 
customizations that don't use a category, but are just non-specific 
enough to trigger by the new code.

There's not much that could be done, though.

>  > 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).
> 
> I think that the most important improvement of "category" should be to
> override "lru".

The customization capability, you mean? Nice to have indeed.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 20 Nov 2024 17:33:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 20 12:33:08 2024
Received: from localhost ([127.0.0.1]:47652 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tDoZg-0007Y8-0d
	for submit <at> debbugs.gnu.org; Wed, 20 Nov 2024 12:33:08 -0500
Received: from relay1-d.mail.gandi.net ([217.70.183.193]:35893)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1tDoZe-0007Xf-JL
 for 74361 <at> debbugs.gnu.org; Wed, 20 Nov 2024 12:33:07 -0500
Received: by mail.gandi.net (Postfix) with ESMTPSA id 880A0240006;
 Wed, 20 Nov 2024 17:32:38 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
In-Reply-To: <1d08c589-2d0e-4f10-8c2e-e21c206ac118@HIDDEN> (martin rudalics's
 message of "Wed, 20 Nov 2024 09:37:52 +0100")
Organization: LINKOV.NET
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <87msi1ueb0.fsf@HIDDEN>
 <4256f446-e11b-450c-b455-131cb75acab0@HIDDEN>
 <871pzbj8mq.fsf@HIDDEN>
 <c05a2b89-cc0b-4489-9011-7449f306cb19@HIDDEN>
 <87sernhxoa.fsf@HIDDEN>
 <fd3fe857-b1fb-41f6-ab4b-72223948b814@HIDDEN>
 <1d08c589-2d0e-4f10-8c2e-e21c206ac118@HIDDEN>
Date: Wed, 20 Nov 2024 19:31:18 +0200
Message-ID: <87serlyfq1.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: Dmitry Gutov <dmitry@HIDDEN>, 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> 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).
>
> I think that the most important improvement of "category" should be to
> override "lru".  It might also help with 'image-dired' for Bug#74246.

Agreed.

> And there should be a convention for setting it up maybe with the help
> of some sort of sub-categories.  IIUC 'comint', 'xref' and 'image' might
> not be distinctive enough for all purposes.  I cannot suggest much here
> because I do not use either of these.

A sub-category could be represented by the same prefix, e.g.
for different calls of display-buffer in xref.el:
'xref-results' for displaying the result buffer (or simply
'xref' since it's the main buffer of the xref package),
'xref-other-window', 'xref-other-frame' for display-buffer
from the respective commands, etc.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 20 Nov 2024 12:54:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 20 07:54:24 2024
Received: from localhost ([127.0.0.1]:45748 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tDkDw-0002fU-FY
	for submit <at> debbugs.gnu.org; Wed, 20 Nov 2024 07:54:24 -0500
Received: from eggs.gnu.org ([209.51.188.92]:38290)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1tDkDt-0002fE-TM
 for 74361 <at> debbugs.gnu.org; Wed, 20 Nov 2024 07:54:22 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tDkDm-0000kh-TG; Wed, 20 Nov 2024 07:54:14 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=Zcc6CBOKVrAClriOLGgW/iD/1afdCxPek3qNrthemhs=; b=OOOgTi5vyn0N
 QLHE9hJpfYL6KD7VcYmebfCCDLJlBY6hDvYXMScpASKJt0IAX2jGh2wADq068ruW+o630nHXuc1rO
 AmLM0R/7pk+0j8Yt3mtAAUvVVQUYJ5bTiCu7ogOafeSbh/U4d4jE+1oez6qkBH7Qu7lA/e+PcJehE
 3tbCO3WvN9gQD31gv9c54kMSeuyHlFaFiO1rd6S93yLv4GTqaQ0W/O3PPR7hDM0IL/4uDCrSgn+BL
 ANIQpijwMNuIQSA7Ds4k7BtqwT215AqGpj1fiecFsMM7lK9eBj+c2eZQJlT5mHYpj34afyudoao7q
 oEZRgRsBvy35pSBT0pG+sQ==;
Date: Wed, 20 Nov 2024 14:54:10 +0200
Message-Id: <86v7wirrpp.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <05def9dc-c6bb-4b26-9f7e-8c26b25178c2@HIDDEN> (message from
 Dmitry Gutov on Tue, 19 Nov 2024 21:51:32 +0200)
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <86ldxkitjn.fsf@HIDDEN> <5a2abf5e-011b-43d0-b34a-e06e354badc5@HIDDEN>
 <8634jrin5v.fsf@HIDDEN> <b0b96c86-d22a-4569-938a-d15a527ced84@HIDDEN>
 <86ikskvie0.fsf@HIDDEN> <97e7ec85-7e5c-4aa4-a85f-b5f40adc8de6@HIDDEN>
 <8634jov5ir.fsf@HIDDEN> <c5265c5b-b48a-4e48-a52d-79cd956a4082@HIDDEN>
 <86serntf0h.fsf@HIDDEN> <05def9dc-c6bb-4b26-9f7e-8c26b25178c2@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 74361
Cc: rudalics@HIDDEN, 74361 <at> debbugs.gnu.org, juri@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Tue, 19 Nov 2024 21:51:32 +0200
> Cc: rudalics@HIDDEN, 74361 <at> debbugs.gnu.org, juri@HIDDEN
> From: Dmitry Gutov <dmitry@HIDDEN>
> 
> On 19/11/2024 17:33, Eli Zaretskii wrote:
> >> Date: Tue, 19 Nov 2024 03:21:26 +0200
> >> Cc: rudalics@HIDDEN, 74361 <at> debbugs.gnu.org, juri@HIDDEN
> >> From: Dmitry Gutov <dmitry@HIDDEN>
> >>
> >> Next step is to find the appropriate place for it. Maybe not a docstring
> >> if the user option to customize will be the global one
> >> (display-buffer-alist), but either in Commentary or somewhere in the manual.
> > 
> > Maybe just mention in the doc string that the commands use
> > display-buffer to select the window?
> 
> The important part is using a specific category, not just display-buffer.

The doc string could mention the category as well.

> And there doesn't seem to be a single docstring, or even a main 
> docstring to mention this in. There are at least 3 of them: 
> xref-find-definitions, xref-go-back and xref-go-forward, and these are 
> not the only ones affected.

We have this situation elsewhere, and I personally simply copy/paste
the same text into the doc strings.  If the text is short enough, it
works well IME.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 20 Nov 2024 08:38:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 20 03:38:04 2024
Received: from localhost ([127.0.0.1]:45166 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tDgDs-0007im-CW
	for submit <at> debbugs.gnu.org; Wed, 20 Nov 2024 03:38:04 -0500
Received: from mout.gmx.net ([212.227.15.15]:44697)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1tDgDp-0007iG-Hk
 for 74361 <at> debbugs.gnu.org; Wed, 20 Nov 2024 03:38:02 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at;
 s=s31663417; t=1732091873; x=1732696673; i=rudalics@HIDDEN;
 bh=LSPvcwT14iSykjvT5SihaYDwMl70Q+s+4DVaYSQgAB0=;
 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=M4e64rFMq2HH6o+gwd3Gf4fLG9ewPXaGYCqsmHvy5A6C4C5mWIBCczlSGWvEQjKK
 n1U4AbJiIR7e6htU3cibCIR2sPmmJ5/f92OXjSuPj0nAvZsCc0MfKyykywpimy6bi
 IH/DQIaOS+ojlQegVEHknW7CWs4nSkUHNee7KGS9mUKYoihzZZCg7V4q9UtFfRctM
 flWavDQbTwI0IMfqf60L7/9bC4Dnf7GJjcZD+/3WnVrWhIqrYv2gITDL7T2DGXKMt
 lkEccfDfv2jHuB1/juDT3isDzjwEMt6F/tOSCSVyvpDWxEHF+25kNZ+bshU0J5KkN
 WYDiwHBPBjUQePsiwQ==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.31.113] ([212.95.5.223]) by mail.gmx.net (mrgmx004
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Msq2E-1u2CNM3KAa-0137MM; Wed, 20
 Nov 2024 09:37:52 +0100
Message-ID: <1d08c589-2d0e-4f10-8c2e-e21c206ac118@HIDDEN>
Date: Wed, 20 Nov 2024 09:37:52 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
To: Dmitry Gutov <dmitry@HIDDEN>, Juri Linkov <juri@HIDDEN>
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <87msi1ueb0.fsf@HIDDEN>
 <4256f446-e11b-450c-b455-131cb75acab0@HIDDEN>
 <871pzbj8mq.fsf@HIDDEN>
 <c05a2b89-cc0b-4489-9011-7449f306cb19@HIDDEN>
 <87sernhxoa.fsf@HIDDEN>
 <fd3fe857-b1fb-41f6-ab4b-72223948b814@HIDDEN>
Content-Language: en-US
From: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <fd3fe857-b1fb-41f6-ab4b-72223948b814@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:QKHA6bewlvelYQMzc1N6o8+Zvpt/06hxcveLd2cLbwnGGeITT71
 jKfmiQlSlQfpbNW/8k/xo5ZjHFl1TJqOeTkax6ua/3JF8oxmdVRN9AaLTGcmDqmyZm9n/v1
 Ue9AwQUJcU4Wh0Je02v3TumaHWzDtqAYtHb32lP356M2GqaXRQw++gO19Sf741BxH+WwNLN
 8LdKkQumnEwYAcBzzC0/w==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:qztIRQCmr3Q=;3Am5G9bsWoC8ot4h+1YuUmbbl5e
 YFigFdgfpfGcLanB+SA6XBNsHsuSj7960igDWdouhEE7v1ydy74pRu+gFT6sjxkAzgrss+bbj
 MTUrWj09BkMg+QrpU3MWubuQIx0Q8DTEvW+f8IA4YK+d8CE8UdLd1YkXK0mZPsCMhqVRfWCGf
 xPkkUse1xqKiWCW6rfD0VeaJMoEdyw0NQEXcP0QN1o2p1mftlTzzgXN0NN4G0TkDFslr3vmCT
 4SeEgnQzPS0U0AU3gXdJ7ZByu0iutFAbpwG8DA0VnO+xqT1/1/2qhHwKSKQML5PjfAs+JtLJ/
 fs7RWWb1QRA2fJ5MCQ4ber72YRDDv9bh9CrbPKTirz5T/SRNScmkscL64ifzETNpUEWNVwBDu
 zO63zRNSGTFOCsGCfM6Lhoqt2Bq9skDySBTEik6zgLiIMRDT+1tyBr9XtYHEmc84PDyWO0Qz1
 W8csXEDO2po77lEHl30pWu48INMt3aTA2lzzQV2p1Sv7nHByepKYgaEBtzsgvaUuIt6fFp4Mo
 3UNYTOcr6bYE349Set22clzIaDLn33rm89J+7aK7yC941LvYgknOox3xlqa4Y0M1SgC7/qtnf
 CGHO6xbQo+p5pjyD4hNwpXXxuFY430GXFAmpLTM8wYteT48oEM9kEg5WsagFHFsjE54CP1IWG
 bjUh/X4GP13FP6pH0C0glKveMtBQY/ArGXDfqreKYXr7+6MB8IPkbdMhMGvxJWGAB5y63ep3Z
 41XizKWav8MjtGx8OWiEfomhDC1X22Nzf8BOHDE8l+lBkRa1a4zmWdxY4PHAYG5uTNmsxuu/H
 DbGv6spj3iizWK9DS4zbeNihziSDrcjWIbTl6VOUrwlEhohH39TjPXGa/NNgBifbMNAhWEDTt
 uFIxFJoh5TIcuoJPb6FsnifY+HgkcB8G7k2NW0wFq7/jltWmE1bex84hA
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 > display-buffer-same-window *is* the function that's ultimately used by
 > switch-to-buffer. This does bring some incompatibilities, though, such
 > as forcung switch-to-buffer-in-dedicated-window to nil, or the use of
 > display-buffer-alist in the first place (normally configured by
 > switch-to-buffer-obey-display-actions).

The function ultimately used by both is 'set-window-buffer'.  One basic
feature of 'switch-to-buffer' not shared by 'display-buffer-same-window'
is 'switch-to-buffer-preserve-window-point'.  And obviously
'switch-to-buffer-obey-display-actions' gives the user the opportunity
to override the behavior of 'switch-to-buffer' in an arbitrary way while
'display-buffer-reuse-window' per se cannot be overridden.  OTOH the
behavior of the latter can be controlled via alist entries.

 > 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).

I think that the most important improvement of "category" should be to
override "lru".  It might also help with 'image-dired' for Bug#74246.

And there should be a convention for setting it up maybe with the help
of some sort of sub-categories.  IIUC 'comint', 'xref' and 'image' might
not be distinctive enough for all purposes.  I cannot suggest much here
because I do not use either of these.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 20 Nov 2024 08:36:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 20 03:36:42 2024
Received: from localhost ([127.0.0.1]:45162 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tDgCX-0007fn-Tz
	for submit <at> debbugs.gnu.org; Wed, 20 Nov 2024 03:36:42 -0500
Received: from mout.gmx.net ([212.227.15.15]:49561)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1tDgCV-0007fU-2x
 for 74361 <at> debbugs.gnu.org; Wed, 20 Nov 2024 03:36:40 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at;
 s=s31663417; t=1732091789; x=1732696589; i=rudalics@HIDDEN;
 bh=hkYjvhMv7QE5xzHZc+NmVnQSFpnqrU8AvXB/nOnR44o=;
 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=ByYnktOmurClQlLvupzVGz+YtALKi9Fxs8xtvPDkSfXw8QCliroOeo9FgEiDBfXA
 +lc0WQ5JMiBZwOyEaeDcj6I0knz9aNfCKZR9Yp4kyMySIcezHY0kvmNXlMNKvmSLn
 /fT55nKqMkptiX1iAnb71hNp+iPrjQOeSuNS+qrMD4PRT+BjpGUvamd4IFE3ldZHC
 gYhFwOOO0i75spbQLkDG8eVsclM3DscaGdbf5vnkPk/FCLVCO6tv92EQLCXz0k165
 Cbp6QUazAv7MIAkDdK2kjufJJ6u5CHl6ekWJcJKmfye+/vIhnrkC807caCOrFkLrl
 mBc4SWCW1Uma6xYVAg==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.31.113] ([212.95.5.223]) by mail.gmx.net (mrgmx005
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N6siz-1toBV42Ylb-00uVXX; Wed, 20
 Nov 2024 09:36:29 +0100
Message-ID: <0239bab9-cb1c-4396-9c9f-0e2ab951b49f@HIDDEN>
Date: Wed, 20 Nov 2024 09:36:25 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
To: Juri Linkov <juri@HIDDEN>, Dmitry Gutov <dmitry@HIDDEN>
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <87msi1ueb0.fsf@HIDDEN>
 <4256f446-e11b-450c-b455-131cb75acab0@HIDDEN>
 <871pzbj8mq.fsf@HIDDEN>
 <c05a2b89-cc0b-4489-9011-7449f306cb19@HIDDEN>
 <87sernhxoa.fsf@HIDDEN>
Content-Language: en-US
From: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <87sernhxoa.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:KWuFiCiWylCYwtEntuZBa3GkJ2MbmvECC2FYUoAQEKj/v1D7FrO
 eDF+Vy+SJpvEGUIpZ8ebFKPMmXtdMI7wAE5X8oyOU2IsvpcAE/qado/NKkddVF2OTsC6XsU
 a+ezmPmBN0LZyUCAj6h9O+bH1dy5w1fymLT3W4s/Dxjugqt0a4ZBD9w4JNc2KVEBjPlQLZa
 P7b3pVFdwliTLFg5rVkgQ==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:Pz8cEZhamLc=;xyMNH6gg3Pn+cw36l3HNffTZvDL
 yi93HMrZ4Avlx9VutwdlsVdn8NppxFsZV5KsRUGFX/pFfSWBc/PeDWmRrUmlXk1HdHMJeCUzO
 78jT23vvyjuwdj2A0b/Gbj1HmbdWzFLJPyy7iwGB6piTozl1qDXccinlMMBwQ3hZAQIfYUbc2
 eAt2LADfXuqw26XPCqdvZYudBIGBnEQm3f6m/rwI0n31DtULWO9yLCV+xxbPjxAmT2xRQpMxC
 6CbyNZsiXtsfLBBAbDIpYHNpYcNK3Z8t2Wc6hqs+RvZ84ABKK6QfI/j/5XA+Mr1fQXVlpRWJN
 e70SGj4qsrM8437NNazlytsogme8K8JrDBGZdRTR2xrEbPxBur/UaLURovwFAb2ULapPGdgVx
 rbn8613XkC3Qn52CTtejU6b6+9q82qNCvrSTFr3fb9tofLvoXJq4JoHdtuNPUWXqlhls3A8ik
 iEAhgBnojOpVV58oJiysYMEKqzwKit+D4ZgqOA+viI0z0BIJ1Q3i6esuMPQlVBUDI+cjoQ31s
 uvjHWqnsjUUvsyk0533oPihLUGiFloOh809AcYwwFotrfN+2qtlOh2PR+W+2O1I/hMVPIehAM
 HXixp0NNP0XUflHdXzuJUIYcpejnkT6Npwg5kGb89tNRBfGsl15WnvTMMqNPFB2ZoRzIrE+eh
 TwlQLVH7cvlRqqfUxCEC3ohgHYF+cL9PBJj0nd6mWUAprRBHOFw08g1yq6DRhJcepVbxjGEVc
 5opIzsP7cUD7wn1FrwPR+RaQ15L48A3kpUEm+B5J/ifdGq0zyz/EifviroZtFVFdcsLmCxONo
 gnh/1sDKMMCW8+DlTMj+1R+ZL3yhAKsML8O3ks2qx5/HsKvaMx/2/Zqi0BPkozlOftdjudoir
 Fin1DNQeHLfIiFRuYebKeYK5qdkkbT0jtEABT5xsgvTl+ivYiHxOjXS7k
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 >> Thanks! That covers the code path which uses 'display-buffer', and we also
 >> need to handle xref-pop-to-location, which calls switch-to-buffer now. Does
 >>
 >>    (pop-to-buffer buf '((display-buffer-same-window) (category . xref)))
 >>
 >> look compatible enough?
 >
 > Maybe Martin could confirm whether this is equivalent to switch-to-buffer.

I doubt anyone can confirm that even for an uncustomized session.

The more important question for me is rather whether we really want to
"handle xref-pop-to-location".  It's currently used in
'xref-show-definitions-buffer', 'xref-show-definitions-buffer-at-bottom'
and 'xref-show-definitions-completing-read'.  Why should "show" select
the target window rather than just display it?  And the first line of
the doc-string says "Go to the location of ITEM and display the buffer"
which doesn't say anything about selecting the buffer's window either.
BTW what is SELECT in that function's doc-string?

So I think the first thing to do is to agree on what
'xref-pop-to-location' should conceptually do, then decide on who should
call it and finally decide on how to implement it possibly with the help
of a category.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 20 Nov 2024 07:18:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 20 02:18:47 2024
Received: from localhost ([127.0.0.1]:45027 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tDez9-000418-LK
	for submit <at> debbugs.gnu.org; Wed, 20 Nov 2024 02:18:47 -0500
Received: from relay6-d.mail.gandi.net ([217.70.183.198]:35699)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1tDez7-00040p-CM
 for 74361 <at> debbugs.gnu.org; Wed, 20 Nov 2024 02:18:46 -0500
Received: by mail.gandi.net (Postfix) with ESMTPSA id D5911C0006;
 Wed, 20 Nov 2024 07:18:17 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Dmitry Gutov <dmitry@HIDDEN>
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
In-Reply-To: <fd3fe857-b1fb-41f6-ab4b-72223948b814@HIDDEN> (Dmitry Gutov's
 message of "Tue, 19 Nov 2024 21:43:21 +0200")
Organization: LINKOV.NET
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <87msi1ueb0.fsf@HIDDEN>
 <4256f446-e11b-450c-b455-131cb75acab0@HIDDEN>
 <871pzbj8mq.fsf@HIDDEN>
 <c05a2b89-cc0b-4489-9011-7449f306cb19@HIDDEN>
 <87sernhxoa.fsf@HIDDEN>
 <fd3fe857-b1fb-41f6-ab4b-72223948b814@HIDDEN>
Date: Wed, 20 Nov 2024 09:11:09 +0200
Message-ID: <875xoi4cei.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: martin rudalics <rudalics@HIDDEN>, 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> I tried your patch, and it works even with 'mru':
>> (setq display-buffer-alist '(((category . xref)
>>                                (display-buffer-reuse-window
>>                                 display-buffer-use-some-window)
>>                                (some-window . mru))))
>
> 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))))))

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))))))




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 19 Nov 2024 19:51:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 19 14:51:43 2024
Received: from localhost ([127.0.0.1]:44111 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tDUGF-0006sj-7y
	for submit <at> debbugs.gnu.org; Tue, 19 Nov 2024 14:51:43 -0500
Received: from fhigh-a7-smtp.messagingengine.com ([103.168.172.158]:57695)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1tDUGC-0006sW-I6
 for 74361 <at> debbugs.gnu.org; Tue, 19 Nov 2024 14:51:41 -0500
Received: from phl-compute-06.internal (phl-compute-06.phl.internal
 [10.202.2.46])
 by mailfhigh.phl.internal (Postfix) with ESMTP id 7C8AD1140114;
 Tue, 19 Nov 2024 14:51:35 -0500 (EST)
Received: from phl-mailfrontend-01 ([10.202.2.162])
 by phl-compute-06.internal (MEProxy); Tue, 19 Nov 2024 14:51:35 -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=1732045895;
 x=1732132295; bh=1nnBlGqp0NwiWJ6//xUTUrY8MIR2vleqGyjNJhfeYgc=; b=
 W3FqblKfY3zSLUwI/w3+Es5Z4NLE3AyASOHEOiOSqqVDxym90oVOj1dlKcWhdS/Q
 Ir+asVzLfEW1ZpdtqJnMkY2/bcEKyvo7DTbrnnxCaC9aHkF1hkOgqGTvzMag6bnG
 LROSg/eyvnF74ffyAZvMAOMXEvVdGg3F2AP7n/tVzxsMcT5mcjS2SkFVuoJdYIb1
 k4pna0vcx12Vhw6XeSJlqXeGBPfHE2ac35pr+D3o+gTwzXveLqFszHwzbh7We6y+
 vFy1H5aN6RLwjEHDdyZki2KtEHjyQ6+kdlvwuTOWBWNLrccHY6HHjVD2ZvCRX6Cn
 VirYRw0sh7o436r2IA6KvQ==
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=fm3; t=1732045895; x=
 1732132295; bh=1nnBlGqp0NwiWJ6//xUTUrY8MIR2vleqGyjNJhfeYgc=; b=I
 irQE0rq1WlTQtphnrb+Jn0+LDmqICAY+wNW6HxywcSVYtO+G5yHd5U3GzRrASj10
 eskYyTQKoWnG4fvpkXo0PMuX1kAyCb4K+tbzTB6S2XNh9yCgtWegtrKL1yThnT3B
 BCgBoXHgvFBFNWYK6WW81Ea0RqGZ+QCXyL1Nhzb7s1Wq8H1A98ehC30KJwGJiEyN
 u6U7Oo2fhUh8UBByBcTWWeyqHMCCxgSw4SCvH/xFOvqD2QmPbLrV6vX1HutmVosO
 faefYWIG47OmxtDHNHswxEyhCUIP45VkhZM7PnmuQ8giAptgm7ZmD1zwF1/SLUBm
 haVydR2lBp3NUZDcjktTA==
X-ME-Sender: <xms:R-w8Z3Wa64A1TXNKGdaa2eYmZZKtBVTvF3KDi2lDvFNMIY2ycgmI5A>
 <xme:R-w8Z_n957LPuK2A58rt3HM4dXy7cWKQ9NyJRjv3CIERqEulB7vMIriPLe4n_bCnB
 k7SoO0i_zhZw14cFXk>
X-ME-Received: <xmr:R-w8ZzYx4aHPMCuOoynaViPEdoL9Gyw1PY7LzocG8WWEsGXB2jXuVR-SlccUcRiYFleD>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrfedvgdduvdekucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu
 rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh
 htshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdej
 necuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdrug
 gvvheqnecuggftrfgrthhtvghrnhepteduleejgeehtefgheegjeekueehvdevieekueef
 tddvtdevfefhvdevgedujeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe
 hmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghvpdhnsggprhgtphhtthho
 peegpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegvlhhiiiesghhnuhdrohhrgh
 dprhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtpdhrtghpthhtohepjeegfeei
 udesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopehjuhhriheslhhinhhkoh
 hvrdhnvght
X-ME-Proxy: <xmx:R-w8ZyXkw7X7T47fCXprILnYKZFLreTdWu3UQBsX91nGqW9uy4mvsA>
 <xmx:R-w8ZxkmwQddWG35Dwp8LjodYxHrtngcCmPCs04rXvjUNgFsPLUKlQ>
 <xmx:R-w8Z_dKaiMJLwKvxG6-q2O2byMiqdsi0d-VRwznqmJLAWPYoKWZzw>
 <xmx:R-w8Z7Fm7VPj83Lm6zgrvdbi-l8GgvZ4QAFUWGmlTowbDYxlMRYupA>
 <xmx:R-w8Z6C66F-GNcnkLGHQbC3K35IyJsTzK3UVjfZ-wRe_XXJKuZIwccDR>
Feedback-ID: i07de48aa:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue,
 19 Nov 2024 14:51:33 -0500 (EST)
Message-ID: <05def9dc-c6bb-4b26-9f7e-8c26b25178c2@HIDDEN>
Date: Tue, 19 Nov 2024 21:51:32 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
To: Eli Zaretskii <eliz@HIDDEN>
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <86ldxkitjn.fsf@HIDDEN> <5a2abf5e-011b-43d0-b34a-e06e354badc5@HIDDEN>
 <8634jrin5v.fsf@HIDDEN> <b0b96c86-d22a-4569-938a-d15a527ced84@HIDDEN>
 <86ikskvie0.fsf@HIDDEN> <97e7ec85-7e5c-4aa4-a85f-b5f40adc8de6@HIDDEN>
 <8634jov5ir.fsf@HIDDEN> <c5265c5b-b48a-4e48-a52d-79cd956a4082@HIDDEN>
 <86serntf0h.fsf@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <86serntf0h.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: rudalics@HIDDEN, 74361 <at> debbugs.gnu.org, juri@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On 19/11/2024 17:33, Eli Zaretskii wrote:
>> Date: Tue, 19 Nov 2024 03:21:26 +0200
>> Cc: rudalics@HIDDEN, 74361 <at> debbugs.gnu.org, juri@HIDDEN
>> From: Dmitry Gutov <dmitry@HIDDEN>
>>
>> Next step is to find the appropriate place for it. Maybe not a docstring
>> if the user option to customize will be the global one
>> (display-buffer-alist), but either in Commentary or somewhere in the manual.
> 
> Maybe just mention in the doc string that the commands use
> display-buffer to select the window?

The important part is using a specific category, not just display-buffer.

And there doesn't seem to be a single docstring, or even a main 
docstring to mention this in. There are at least 3 of them: 
xref-find-definitions, xref-go-back and xref-go-forward, and these are 
not the only ones affected.

>> Speaking of the reference that we used for this solution, it seems that
>>
>>     (category . comint)
>>
>> is only mentioned in NEWS and in the obsoletion message for
>> 'display-comint-buffer-action'. There is also a hit for it in the
>> manual, but only in the form "If the caller display-buffer passes a
>> category as a symbol ...", not saying exactly that comint modes do or
>> should do that. Maybe that's something to be fixed as well.
> 
> I will see about documenting it properly, if no one beats me to it.

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 19 Nov 2024 19:43:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 19 14:43:33 2024
Received: from localhost ([127.0.0.1]:44091 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tDU8K-0006UI-JG
	for submit <at> debbugs.gnu.org; Tue, 19 Nov 2024 14:43:32 -0500
Received: from fout-a4-smtp.messagingengine.com ([103.168.172.147]:34111)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1tDU8I-0006U3-2V
 for 74361 <at> debbugs.gnu.org; Tue, 19 Nov 2024 14:43:30 -0500
Received: from phl-compute-11.internal (phl-compute-11.phl.internal
 [10.202.2.51])
 by mailfout.phl.internal (Postfix) with ESMTP id 6AC951380627;
 Tue, 19 Nov 2024 14:43:24 -0500 (EST)
Received: from phl-mailfrontend-01 ([10.202.2.162])
 by phl-compute-11.internal (MEProxy); Tue, 19 Nov 2024 14:43:24 -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=1732045404;
 x=1732131804; bh=gTwMO1n6eB+AEql3tKIUBjEuJD1pE1ZJ/2Lnyl1sbH4=; b=
 gshTCbL7HeTbNeAFzuJqMHWdPBSIy7le46zSEFVv6bW5zAIeOGYtaj1Fy0NWzOa+
 pEfe30smsgbNFoAQfzFKBZot0UDMnzHMOj3M+nF18VfMRDluzMT9rdiHg6vcq5Ck
 NOWSGFnKKu9k94BWu9vPBVUVBOOZCMvt1388o7g6x5qeJ7JRfWukzW1yaBPaSsMa
 YsX8nQqF6msXsKHEfiTqsa/rNvsO2/qXiMdi9qn7B1QA14cLRLpUFCetyhGeRIca
 LirFWKuSe/2H+3oJjV/lPBFhX8J+nCzxgoGa74pjW7W+cflXKUEisXVUO5tG2GkE
 LrULSziCv+ji/ICLQV6G/A==
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=fm3; t=1732045404; x=
 1732131804; bh=gTwMO1n6eB+AEql3tKIUBjEuJD1pE1ZJ/2Lnyl1sbH4=; b=T
 J4gndrdialabss0gtwde08UePvirGIECmUnILtqmvnQDDZJBh5Lmh/cnFZFH/Tws
 0GcNPpYje0GsyCDcj5faM334v8soQHSiO4GvAPlUgejf5vVHK8lbHg9IVsObzPuN
 tNKTjRw1Q6/S+vVbHn4i97Rl3O42qodOM2mZ8QXymzYK4Z8qaJXZLrU6cY78swkM
 Q3Ac/Y/F9lWx1l2/257MGCVUka/liOjhCDHJCEG4Q6anPm7Y7/5ITkFpv0tcbc5r
 F/6vL2GHa24Afn0DI0Lb1aNLZzN7pNkxNexNV22pZxNXYNxNEfyxrexe/ghVEbix
 rbqHlHBcqSWCu5jD9NPKw==
X-ME-Sender: <xms:XOo8Z43ff5R8r2kh2BAeR6XMTzAl-xXciUhrTC5EvYoskxBMgI96xg>
 <xme:XOo8ZzH5PMHMWYaJBby1Q4_SZd1pETLQFyztDT8px_cZBLZSZVhafUJz8NSb6LMdG
 9Mg5VqpNtekjLB69FU>
X-ME-Received: <xmr:XOo8Zw54ZD38aw2-XhMEnLQGqfjgha-eGuAY0DR54eZSqCDGaMlnSfhjQPF9uDVoroVg>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrfedvgdduvdeiucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu
 rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh
 htshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdej
 necuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdrug
 gvvheqnecuggftrfgrthhtvghrnhepteduleejgeehtefgheegjeekueehvdevieekueef
 tddvtdevfefhvdevgedujeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe
 hmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghvpdhnsggprhgtphhtthho
 peefpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehjuhhriheslhhinhhkohhvrd
 hnvghtpdhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthdprhgtphhtthhopeej
 geefieduseguvggssghughhsrdhgnhhurdhorhhg
X-ME-Proxy: <xmx:XOo8Zx0eb33q85NVajcKl6izwc_u9rx4YAn5gals6HfBb12liRWIXg>
 <xmx:XOo8Z7GkXWIGqqO2AOCr8V-nozlLUWTuK0dtsIL4tuqLNNKfVK9x1A>
 <xmx:XOo8Z6_B6NW6VtN7VJ2y_ffmOrA9p2OXsF5e7U37RpwY7MgJEFC_IA>
 <xmx:XOo8ZwlDD_Rzv6ArPuWApAfRAildcBgEMrq8HnWeDyQITDu6uXSGpw>
 <xmx:XOo8ZzAOQLias1A8yFpwiCW46YZadKqFlmjc9MkF2J2hVsWebHCDqXp8>
Feedback-ID: i07de48aa:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue,
 19 Nov 2024 14:43:23 -0500 (EST)
Message-ID: <fd3fe857-b1fb-41f6-ab4b-72223948b814@HIDDEN>
Date: Tue, 19 Nov 2024 21:43:21 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
To: Juri Linkov <juri@HIDDEN>
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <87msi1ueb0.fsf@HIDDEN>
 <4256f446-e11b-450c-b455-131cb75acab0@HIDDEN>
 <871pzbj8mq.fsf@HIDDEN>
 <c05a2b89-cc0b-4489-9011-7449f306cb19@HIDDEN>
 <87sernhxoa.fsf@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <87sernhxoa.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: martin rudalics <rudalics@HIDDEN>, 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On 19/11/2024 20:33, Juri Linkov wrote:
>> Thanks! That covers the code path which uses 'display-buffer', and we also
>> need to handle xref-pop-to-location, which calls switch-to-buffer now. Does
>>
>>    (pop-to-buffer buf '((display-buffer-same-window) (category . xref)))
>>
>> look compatible enough?
> 
> Maybe Martin could confirm whether this is equivalent to switch-to-buffer.

display-buffer-same-window *is* the function that's ultimately used by 
switch-to-buffer. This does bring some incompatibilities, though, such 
as forcung switch-to-buffer-in-dedicated-window to nil, or the use of 
display-buffer-alist in the first place (normally configured by 
switch-to-buffer-obey-display-actions).

>> Also, when using the suggested change in xref--show-pos-in-buf, if we
>> simply annotate it with 'category' in the display-buffer call, this also
>> extends to the scenarios where xref--original-window-intent is non-nil.
>>
>> See the attached patch where we make sure to exclude those cases. I suppose
>> that loses the semantic consistency, though:
>> xref-find-definitions-other-window and xref-find-definitions-other-frame
>> are "xref" commands but they will call 'display-buffer' without 'category'.
> 
> I agree the category should not override the window when used
> from a command that specifies a window/frame.

Okay then.

>> The corresponding customization (described in the first message) can be:
>>
>>    (setq display-buffer-alist '(((category . xref)
>>                                  (display-buffer-reuse-window
>>                                   display-buffer-use-some-window))))
> 
> I tried your patch, and it works even with 'mru':
> 
> (setq display-buffer-alist '(((category . xref)
>                                (display-buffer-reuse-window
>                                 display-buffer-use-some-window)
>                                (some-window . mru))))

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).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 19 Nov 2024 18:51:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 19 13:51:24 2024
Received: from localhost ([127.0.0.1]:44011 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tDTJs-0004Df-64
	for submit <at> debbugs.gnu.org; Tue, 19 Nov 2024 13:51:24 -0500
Received: from relay2-d.mail.gandi.net ([217.70.183.194]:53385)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1tDTJq-0004DG-JV
 for 74361 <at> debbugs.gnu.org; Tue, 19 Nov 2024 13:51:22 -0500
Received: by mail.gandi.net (Postfix) with ESMTPSA id 00F5840005;
 Tue, 19 Nov 2024 18:50:52 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Dmitry Gutov <dmitry@HIDDEN>
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
In-Reply-To: <b0b96c86-d22a-4569-938a-d15a527ced84@HIDDEN> (Dmitry Gutov's
 message of "Mon, 18 Nov 2024 03:42:34 +0200")
Organization: LINKOV.NET
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <86ldxkitjn.fsf@HIDDEN>
 <5a2abf5e-011b-43d0-b34a-e06e354badc5@HIDDEN>
 <8634jrin5v.fsf@HIDDEN>
 <b0b96c86-d22a-4569-938a-d15a527ced84@HIDDEN>
Date: Tue, 19 Nov 2024 20:36:08 +0200
Message-ID: <87ldxfhxjj.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: rudalics@HIDDEN, Eli Zaretskii <eliz@HIDDEN>, 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> Also, there is a nuance: when the Xref buffer itself is shown (i.e. when
> there are multiple locations matching a xref-find-definitions search),
> we're not going to pass (category . xref) to display-buffer either - it is
> reserved for displaying the buffers of destination locations.

For displaying the buffers of destination locations
we could add another category like e.g. 'xref-goto' or 'xref-file'.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 19 Nov 2024 18:51:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 19 13:51:19 2024
Received: from localhost ([127.0.0.1]:44008 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tDTJm-0004DO-Qu
	for submit <at> debbugs.gnu.org; Tue, 19 Nov 2024 13:51:19 -0500
Received: from relay5-d.mail.gandi.net ([217.70.183.197]:35813)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1tDTJl-0004D7-4v
 for 74361 <at> debbugs.gnu.org; Tue, 19 Nov 2024 13:51:17 -0500
Received: by mail.gandi.net (Postfix) with ESMTPSA id A01B01C0002;
 Tue, 19 Nov 2024 18:50:49 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Dmitry Gutov <dmitry@HIDDEN>
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
In-Reply-To: <c05a2b89-cc0b-4489-9011-7449f306cb19@HIDDEN> (Dmitry Gutov's
 message of "Mon, 18 Nov 2024 03:28:49 +0200")
Organization: LINKOV.NET
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <87msi1ueb0.fsf@HIDDEN>
 <4256f446-e11b-450c-b455-131cb75acab0@HIDDEN>
 <871pzbj8mq.fsf@HIDDEN>
 <c05a2b89-cc0b-4489-9011-7449f306cb19@HIDDEN>
Date: Tue, 19 Nov 2024 20:33:17 +0200
Message-ID: <87sernhxoa.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: martin rudalics <rudalics@HIDDEN>, 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> Thanks! That covers the code path which uses 'display-buffer', and we also
> need to handle xref-pop-to-location, which calls switch-to-buffer now. Does
>
>   (pop-to-buffer buf '((display-buffer-same-window) (category . xref)))
>
> look compatible enough?

Maybe Martin could confirm whether this is equivalent to switch-to-buffer.

> Also, when using the suggested change in xref--show-pos-in-buf, if we
> simply annotate it with 'category' in the display-buffer call, this also
> extends to the scenarios where xref--original-window-intent is non-nil.
>
> See the attached patch where we make sure to exclude those cases. I suppose
> that loses the semantic consistency, though:
> xref-find-definitions-other-window and xref-find-definitions-other-frame
> are "xref" commands but they will call 'display-buffer' without 'category'.

I agree the category should not override the window when used
from a command that specifies a window/frame.

> The corresponding customization (described in the first message) can be:
>
>   (setq display-buffer-alist '(((category . xref)
>                                 (display-buffer-reuse-window
>                                  display-buffer-use-some-window))))

I tried your patch, and it works even with 'mru':

(setq display-buffer-alist '(((category . xref)
                              (display-buffer-reuse-window
                               display-buffer-use-some-window)
                              (some-window . mru))))




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 19 Nov 2024 15:33:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 19 10:33:30 2024
Received: from localhost ([127.0.0.1]:43683 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tDQEM-0003o7-DM
	for submit <at> debbugs.gnu.org; Tue, 19 Nov 2024 10:33:30 -0500
Received: from eggs.gnu.org ([209.51.188.92]:49002)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1tDQEK-0003nt-Jo
 for 74361 <at> debbugs.gnu.org; Tue, 19 Nov 2024 10:33:29 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tDQED-0008Ii-Jj; Tue, 19 Nov 2024 10:33:21 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=Cp0S3nt6cCjbGh+flLIY/H/mPXX2p3ajOpyqNAPQWBI=; b=PJIukYNzjfdZ
 GY8gdQgumQNCyGnk4OCEepx65266D396RwmzKNVFtBkwU7sGxDeX/vWiW0A3NGiAVVGWuS1fDrDA7
 ciNEs4WnThACW3V8PDsBSmbBeC+vOFDELUkaECB7y/qhDEYWRwB2K9KZ2xG7zga3qXiF/ZvOkKIAl
 yjmV505e+qM5cWUiJWa4RGlUU6Em4QRQuXPp6KzQ6B0a2kK0DtgivTaUWQzr/HE9lpZLfgpfozafS
 QQ+H/igyzBk/XFhhDrHqW4mICMdMLEE8k37DsgsuaHUSTap1YWe8QUHEv6zjITxf1SfTTwwQJEtSN
 2yU2yMENBHN9hwgfzM33Cg==;
Date: Tue, 19 Nov 2024 17:33:18 +0200
Message-Id: <86serntf0h.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <c5265c5b-b48a-4e48-a52d-79cd956a4082@HIDDEN> (message from
 Dmitry Gutov on Tue, 19 Nov 2024 03:21:26 +0200)
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <86ldxkitjn.fsf@HIDDEN> <5a2abf5e-011b-43d0-b34a-e06e354badc5@HIDDEN>
 <8634jrin5v.fsf@HIDDEN> <b0b96c86-d22a-4569-938a-d15a527ced84@HIDDEN>
 <86ikskvie0.fsf@HIDDEN> <97e7ec85-7e5c-4aa4-a85f-b5f40adc8de6@HIDDEN>
 <8634jov5ir.fsf@HIDDEN> <c5265c5b-b48a-4e48-a52d-79cd956a4082@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 74361
Cc: rudalics@HIDDEN, 74361 <at> debbugs.gnu.org, juri@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Tue, 19 Nov 2024 03:21:26 +0200
> Cc: rudalics@HIDDEN, 74361 <at> debbugs.gnu.org, juri@HIDDEN
> From: Dmitry Gutov <dmitry@HIDDEN>
> 
> Next step is to find the appropriate place for it. Maybe not a docstring 
> if the user option to customize will be the global one 
> (display-buffer-alist), but either in Commentary or somewhere in the manual.

Maybe just mention in the doc string that the commands use
display-buffer to select the window?

> Speaking of the reference that we used for this solution, it seems that
> 
>    (category . comint)
> 
> is only mentioned in NEWS and in the obsoletion message for 
> 'display-comint-buffer-action'. There is also a hit for it in the 
> manual, but only in the form "If the caller display-buffer passes a 
> category as a symbol ...", not saying exactly that comint modes do or 
> should do that. Maybe that's something to be fixed as well.

I will see about documenting it properly, if no one beats me to it.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 19 Nov 2024 01:21:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 18 20:21:40 2024
Received: from localhost ([127.0.0.1]:39846 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tDCvz-00062w-GQ
	for submit <at> debbugs.gnu.org; Mon, 18 Nov 2024 20:21:40 -0500
Received: from fhigh-a4-smtp.messagingengine.com ([103.168.172.155]:40897)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1tDCvw-00062e-7Y
 for 74361 <at> debbugs.gnu.org; Mon, 18 Nov 2024 20:21:38 -0500
Received: from phl-compute-09.internal (phl-compute-09.phl.internal
 [10.202.2.49])
 by mailfhigh.phl.internal (Postfix) with ESMTP id DF1331140108;
 Mon, 18 Nov 2024 20:21:30 -0500 (EST)
Received: from phl-mailfrontend-01 ([10.202.2.162])
 by phl-compute-09.internal (MEProxy); Mon, 18 Nov 2024 20:21:30 -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=1731979290;
 x=1732065690; bh=7Mt/g4oiMdFokg0Dj+arR89jgZAgwGaQQa/htXwWyyk=; b=
 f/HRxm1RbXF7o4tMw2oBXoMIGgVmVroLbhTLHXiX+/4p3MLoOJ0UvU41XYQ0CrhL
 9AQQ16cNkOAwWaRmCZl2+hf8EAZjJDrZjzqJquDpbEsKs7jPvMV09P2hXtFL51+6
 i2HvzAUgW5JLNR0tyizDp6Gi93q1mcXcUWNunrAa6BHUKeeKyCM5tUGjHDBunPQh
 ddTaWG0Eo66YgZnwIX4U8zYvexbXUfcWaAEethCEk+zefUxr3R8aUisIAbazSB5Y
 syLby3AOwZ76+iRV+EkbqlRqwEAVEtuCf75qxLFmgNmhrjxBpWl8OGhoqH2ei87Z
 jFrLLuP/5tO2HV74xJ4eGQ==
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=fm3; t=1731979290; x=
 1732065690; bh=7Mt/g4oiMdFokg0Dj+arR89jgZAgwGaQQa/htXwWyyk=; b=a
 FOy5El8LnnmAfpLyhiV3azuwlUwL3vaZ5pzS6NdFb9qQ7OYvEvTWH28KMiTI1Wd8
 zLynf3KWbtm6aEi9b8RkJCfgMVJrR6HwpkeciwtKIgKlZMbhvapsI8u8WOQFbDD1
 djZ7JaSrQuynf3snrSSJdFdynCa+m3hS9QulWE9P9IIRa4mhZNyUpFwmRZuXpIiY
 OsoP6Ei6rXEqpv2+rsfVrvadYwfw5FSsrrreC9dfBWP379Gq0FKY5HW2/GeX5GlZ
 I9eIdcj5hNKuVTGy+m9szDdeXq1C2cPxT5VwCGk0WHzq4JZ/dvGj+5HlGdBphREv
 fejC3E9RmdLpRq1nAaZqg==
X-ME-Sender: <xms:Gug7Z3iW1sfuMhn3_NwucWrkZlpJjuQrr-UyMl5hX_8a_Xxmstfrdw>
 <xme:Gug7Z0D9I_CIoWK5kI7MBvhkqqS0_9SynaHD5Wx9Fs970klTRmwIjf-jXXOT1K1B-
 2pUPKvpl0dMBPVXnjE>
X-ME-Received: <xmr:Gug7Z3GsOoM5jUl4bU9pnrZkeRCqsvTkSgRaokr6wTNlnVg0xQuUtCznysuXTVa8yiaz>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrfedugdefgecutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr
 tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth
 hsucdlqddutddtmdenucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeen
 ucfhrhhomhepffhmihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvg
 hvqeenucggtffrrghtthgvrhhnpeetudeljeegheetgfehgeejkeeuhedvveeikeeufedt
 vddtveefhfdvveegudejheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh
 grihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvhdpnhgspghrtghpthhtohep
 gedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepvghlihiisehgnhhurdhorhhgpd
 hrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthdprhgtphhtthhopeejgeefiedu
 seguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtohepjhhurhhisehlihhnkhhovh
 drnhgvth
X-ME-Proxy: <xmx:Gug7Z0Re-NF9JMVIreIygWwHkuWtHCof7LKGA7btq8c-Q2PQQkxpTA>
 <xmx:Gug7Z0z_ZKa3ylyjwtLserP1OkEXXzvgrgG-ykMTZfWxNvqwp_uFww>
 <xmx:Gug7Z66XVVme8AkjI4cGapRw4-G4i2p2jioGT2meh_8Bg2mnLnuRGQ>
 <xmx:Gug7Z5x6vRrIH1PQoISpShe1o-m9ZOBTRBj8_Dd9qxS8gsw4GopIeg>
 <xmx:Gug7Z-tAERPwx9J1jz8Cw65M0mdktVxjtMfaLUcKl0oGI9K1zyOkDHMh>
Feedback-ID: i07de48aa:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon,
 18 Nov 2024 20:21:29 -0500 (EST)
Message-ID: <c5265c5b-b48a-4e48-a52d-79cd956a4082@HIDDEN>
Date: Tue, 19 Nov 2024 03:21:26 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
To: Eli Zaretskii <eliz@HIDDEN>
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <86ldxkitjn.fsf@HIDDEN> <5a2abf5e-011b-43d0-b34a-e06e354badc5@HIDDEN>
 <8634jrin5v.fsf@HIDDEN> <b0b96c86-d22a-4569-938a-d15a527ced84@HIDDEN>
 <86ikskvie0.fsf@HIDDEN> <97e7ec85-7e5c-4aa4-a85f-b5f40adc8de6@HIDDEN>
 <8634jov5ir.fsf@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <8634jov5ir.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 74361
Cc: rudalics@HIDDEN, 74361 <at> debbugs.gnu.org, juri@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On 18/11/2024 19:03, Eli Zaretskii wrote:

>> IIUC your suggestion was:
>>
>>     If non-nil, the `display-buffer' action for showing results of Xref
>> commands.
>>
>> And those are commands belonging to the package (for the moment), and as
>> such fitting the description.
> 
> Not in my book (they are replacement commands), but feel free to find
> better text.

Okay, if the phrasing still makes sense to you with the above details, 
let's use this version.

>>>> Also, there is a nuance: when the Xref buffer itself is shown (i.e. when
>>>> there are multiple locations matching a xref-find-definitions search),
>>>> we're not going to pass (category . xref) to display-buffer either - it
>>>> is reserved for displaying the buffers of destination locations.
>>>
>>> And this is a separate issue, not related to the doc string?
>>
>> Still about the doc string.
> 
> But not important enough to affect the first line of it.
> 
>> If we say "showing results of Xref
>> commands", then the Xref buffer with the list of locations also matches
>> that description, doesn't it? Or rather it might be the first thing a
>> user would think of - but our customization wouldn't apply to it
>> immediately.
> 
> The rest of the doc string could explain this subtlety.

Fair point, thanks.

Next step is to find the appropriate place for it. Maybe not a docstring 
if the user option to customize will be the global one 
(display-buffer-alist), but either in Commentary or somewhere in the manual.

Speaking of the reference that we used for this solution, it seems that

   (category . comint)

is only mentioned in NEWS and in the obsoletion message for 
'display-comint-buffer-action'. There is also a hit for it in the 
manual, but only in the form "If the caller display-buffer passes a 
category as a symbol ...", not saying exactly that comint modes do or 
should do that. Maybe that's something to be fixed as well.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 18 Nov 2024 17:03:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 18 12:03:23 2024
Received: from localhost ([127.0.0.1]:34997 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tD59m-0004So-I9
	for submit <at> debbugs.gnu.org; Mon, 18 Nov 2024 12:03:22 -0500
Received: from eggs.gnu.org ([209.51.188.92]:60062)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1tD59i-0004SY-Gr
 for 74361 <at> debbugs.gnu.org; Mon, 18 Nov 2024 12:03:20 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tD59c-0000Nu-7e; Mon, 18 Nov 2024 12:03:12 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=11YGAbpUTyEW4SB9GGnbZTcxAZF+UHiVvm2B7b8wJ90=; b=MKQYs2l35Yuz
 vB1IHj2sh/ZDTGUbYebiW+ino798zYK/5VuX9JlFqFPJN2XXgoGM4OMOMILDbB5uMLyxhdVZVveTi
 5PmztqgrMfVdVEz/xSboYbwGN7PnD3YlsPj5mvnVIXZe6CZAvuAZHUwMSTrloll8w8fzbaDifxVHD
 0/rD2pkTwLGQ3GqaghMqtNLPD/Es6RUfZhuPHhWVeHTM6OvNX6U3Jy8YMoaNxwEu8EKoA4amoGyIh
 JG6AYg6CuFnpkqDSVp0h1Hfiu33t/kzgPOrDK9PnMoIFtq8qJvoM1k1SQMBrsBFBUKpokRiwF3jYp
 IRQ11SxxdvS/9+MvxFXZ3A==;
Date: Mon, 18 Nov 2024 19:03:08 +0200
Message-Id: <8634jov5ir.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <97e7ec85-7e5c-4aa4-a85f-b5f40adc8de6@HIDDEN> (message from
 Dmitry Gutov on Mon, 18 Nov 2024 18:10:02 +0200)
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <86ldxkitjn.fsf@HIDDEN> <5a2abf5e-011b-43d0-b34a-e06e354badc5@HIDDEN>
 <8634jrin5v.fsf@HIDDEN> <b0b96c86-d22a-4569-938a-d15a527ced84@HIDDEN>
 <86ikskvie0.fsf@HIDDEN> <97e7ec85-7e5c-4aa4-a85f-b5f40adc8de6@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 74361
Cc: rudalics@HIDDEN, 74361 <at> debbugs.gnu.org, juri@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Mon, 18 Nov 2024 18:10:02 +0200
> Cc: rudalics@HIDDEN, 74361 <at> debbugs.gnu.org, juri@HIDDEN
> From: Dmitry Gutov <dmitry@HIDDEN>
> 
> >> xref-query-replace-in-results will not (or its twin
> >> xref-find-references-and-replace). I suppose not many people would
> >> expect them to.
> > 
> > This seems to indicate that my proposal is actually okay, since the
> > above two commands do not "show results of Xref commands"?
> 
> IIUC your suggestion was:
> 
>    If non-nil, the `display-buffer' action for showing results of Xref 
> commands.
> 
> And those are commands belonging to the package (for the moment), and as 
> such fitting the description.

Not in my book (they are replacement commands), but feel free to find
better text.

> >> Also, there is a nuance: when the Xref buffer itself is shown (i.e. when
> >> there are multiple locations matching a xref-find-definitions search),
> >> we're not going to pass (category . xref) to display-buffer either - it
> >> is reserved for displaying the buffers of destination locations.
> > 
> > And this is a separate issue, not related to the doc string?
> 
> Still about the doc string.

But not important enough to affect the first line of it.

> If we say "showing results of Xref 
> commands", then the Xref buffer with the list of locations also matches 
> that description, doesn't it? Or rather it might be the first thing a 
> user would think of - but our customization wouldn't apply to it 
> immediately.

The rest of the doc string could explain this subtlety.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 18 Nov 2024 16:10:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 18 11:10:16 2024
Received: from localhost ([127.0.0.1]:34908 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tD4KO-00022e-Cy
	for submit <at> debbugs.gnu.org; Mon, 18 Nov 2024 11:10:16 -0500
Received: from fout-a3-smtp.messagingengine.com ([103.168.172.146]:48015)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1tD4KJ-0001y8-ML
 for 74361 <at> debbugs.gnu.org; Mon, 18 Nov 2024 11:10:13 -0500
Received: from phl-compute-03.internal (phl-compute-03.phl.internal
 [10.202.2.43])
 by mailfout.phl.internal (Postfix) with ESMTP id ADC7913806D5;
 Mon, 18 Nov 2024 11:10:05 -0500 (EST)
Received: from phl-mailfrontend-01 ([10.202.2.162])
 by phl-compute-03.internal (MEProxy); Mon, 18 Nov 2024 11:10:05 -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=1731946205;
 x=1732032605; bh=vXSmgIi/v1IwbLQ///K57Kmw3/1C4Eb5m70+VFKnbak=; b=
 syGyMDn4eLtRpB3NX+f/EnzCvzBGfyTit31ZBM78tVI2d06TvRNxRRQO1dCImtIz
 HbwpPS/jkMU1JYIptedxq4cjQ77s3jLOSie4dZS5FA7ChhFPz1BU3/SrcMCBr+1m
 TYmu49SYT81HxOkUsRjOuwvqvO+V3GSY8fOl7+u8cwwP/0YHehFTijyOY+UGonTL
 U9yNFpaot7scgNFe2HQn4jr8IEZs+o742gvJQzDSmfgWSrRQAiChDoQR++rR8DnV
 X9RzIIixjwtBM7TCG1FoF8W9CFCJpz9Jf7naVYdcHNZYn0VUQ3+5cXdHSYuTujLm
 98OA/em9AEjtagAqCjnnSw==
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=fm3; t=1731946205; x=
 1732032605; bh=vXSmgIi/v1IwbLQ///K57Kmw3/1C4Eb5m70+VFKnbak=; b=g
 gkAep67YmA7jsm2zd5+LIREK9LQRfiS3I+rffhEdEsJ/F4Dq56ofrc1crgpppCYN
 9+Sd2NTl2luGTrVi8bY8hY2GVjNnR8TFpb7QhqdTkR9laRt0cGhoRoSSwVpeUGoM
 PcaqPe4mSp6QNgJJ1xmPZbzdQo6pytA5ZLuyF5KozeumGpst42QeGXEDH6ByyJeG
 ytR+yb/WQsij+HgTATl/5lRBsdOZ2M6oBgls+MYxmMIVN5byB2Bvjv0jcoh/btHO
 oyUgHHTq1d2RyqRwbZh5pY2xdYHuXnxBp+yTCNjQPqVoGAXwuSIFOy/50yv4evoC
 1nSYs3hhVekVHBEJzq74w==
X-ME-Sender: <xms:3WY7Z_CMgJqrDNUCZ1idLlMAvL7H23U7v5xOC7O4RAxzuGTWgUHvTA>
 <xme:3WY7Z1i-kZwB6TG-e_mh_ezC_OaC4clbF67aQK3J819bq9kZ-2QPT4U-PAzhpTCXZ
 VM_JrrGqTHYDlzcPJI>
X-ME-Received: <xmr:3WY7Z6lzkVuBk64geU2SB4Ehg_H6UM3UxClstqzlofQxY3tN1Uh-94FQUGBpxmIhijpK>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrfedtgdekfecutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr
 tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth
 hsucdlqddutddtmdenucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeen
 ucfhrhhomhepffhmihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvg
 hvqeenucggtffrrghtthgvrhhnpeetudeljeegheetgfehgeejkeeuhedvveeikeeufedt
 vddtveefhfdvveegudejheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh
 grihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvhdpnhgspghrtghpthhtohep
 gedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepvghlihiisehgnhhurdhorhhgpd
 hrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthdprhgtphhtthhopeejgeefiedu
 seguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtohepjhhurhhisehlihhnkhhovh
 drnhgvth
X-ME-Proxy: <xmx:3WY7ZxyBhx2i1aj0z6L9jFAkahVTgiIeGxFg6bt9Z754wQxuVP3DNw>
 <xmx:3WY7Z0TlxNobUcDqgIAGjy6Hd0h1dJNqSvQ736yqhv7I6fqAsRx8UA>
 <xmx:3WY7Z0ZSZ9-9S-GeBwvwWCOsYseQSwepmKQNIxg983pfeTnEVgo9pQ>
 <xmx:3WY7Z1R9DvIcU2Ffzk2HlqwO8RpzRoQLw0WJZqBbX-VVzW-MqjlRhw>
 <xmx:3WY7Z6PiytHp7s7rx5JcUOKJ5vIjHY08x6BqbB-C9Nhr_zB3jzK4nLL7>
Feedback-ID: i07de48aa:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon,
 18 Nov 2024 11:10:03 -0500 (EST)
Message-ID: <97e7ec85-7e5c-4aa4-a85f-b5f40adc8de6@HIDDEN>
Date: Mon, 18 Nov 2024 18:10:02 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
To: Eli Zaretskii <eliz@HIDDEN>
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <86ldxkitjn.fsf@HIDDEN> <5a2abf5e-011b-43d0-b34a-e06e354badc5@HIDDEN>
 <8634jrin5v.fsf@HIDDEN> <b0b96c86-d22a-4569-938a-d15a527ced84@HIDDEN>
 <86ikskvie0.fsf@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <86ikskvie0.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: rudalics@HIDDEN, 74361 <at> debbugs.gnu.org, juri@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On 18/11/2024 14:25, Eli Zaretskii wrote:
>> Date: Mon, 18 Nov 2024 03:42:34 +0200
>> Cc: rudalics@HIDDEN, 74361 <at> debbugs.gnu.org, juri@HIDDEN
>> From: Dmitry Gutov <dmitry@HIDDEN>
>>
>> On 16/11/2024 10:43, Eli Zaretskii wrote:
>>>> That's the term I would use both both, but maybe there could be better
>>>> wording. If xref-find-definition is not a navigation command, is it a
>>>> "search command"?
>>> Let me turn the table and ask: which Xref commands will NOT use this
>>> action, if we exclude commands like
>>> xref-find-definitions-other-window, which specify the window/frame to
>>> use?
>>
>> xref-query-replace-in-results will not (or its twin
>> xref-find-references-and-replace). I suppose not many people would
>> expect them to.
> 
> This seems to indicate that my proposal is actually okay, since the
> above two commands do not "show results of Xref commands"?

IIUC your suggestion was:

   If non-nil, the `display-buffer' action for showing results of Xref 
commands.

And those are commands belonging to the package (for the moment), and as 
such fitting the description.

>> Also, there is a nuance: when the Xref buffer itself is shown (i.e. when
>> there are multiple locations matching a xref-find-definitions search),
>> we're not going to pass (category . xref) to display-buffer either - it
>> is reserved for displaying the buffers of destination locations.
> 
> And this is a separate issue, not related to the doc string?

Still about the doc string. If we say "showing results of Xref 
commands", then the Xref buffer with the list of locations also matches 
that description, doesn't it? Or rather it might be the first thing a 
user would think of - but our customization wouldn't apply to it 
immediately.

Note that this subthread might seem moot if we don't introduce a new 
option anyway, but somewhere we'd probably want to enumerate the cases 
which the 'xref' category applies to, and those would be the same.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 18 Nov 2024 12:25:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 18 07:25:32 2024
Received: from localhost ([127.0.0.1]:60381 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tD0ot-0007XM-Rb
	for submit <at> debbugs.gnu.org; Mon, 18 Nov 2024 07:25:32 -0500
Received: from eggs.gnu.org ([209.51.188.92]:55158)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1tD0os-0007X7-0b
 for 74361 <at> debbugs.gnu.org; Mon, 18 Nov 2024 07:25:30 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tD0ok-0002fm-5z; Mon, 18 Nov 2024 07:25:22 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=Lk1wT59IRxz6MG66LLRtcZVdu2qn3p31rj0vhK1dH7s=; b=LCE9hbkrn6kf
 +wOV5oOFrdmiVucvPVSj16jFMo+V0oB89q3Aj13NgBsH/TOeUIspD3I5kasWE/COQJQ4+dY7yrs4W
 qKQQnMIVLAaC496Ib7DNZ+zM3zDGS/YVw9P8/dZGTPgDks1XkfNy6Ee2iLcFd/Mh3P0aoHbUkMcyg
 DSDr0i+5PfmyuiTvAKUnAHJq1/PGN0Pi63w6MMJ77cOw95NXL//o/ePj75ppENMkuHJY8cBtCRrTW
 xhBaudAm6+zFsyhS29NQUSBM1gY5ZDUbeMMh41JkM4n83ChcoBAxu9Jb3bnOyh3ay+YHJ9zDtG6cS
 1mZOK/AH8b/uiFc8SMc6CA==;
Date: Mon, 18 Nov 2024 14:25:11 +0200
Message-Id: <86ikskvie0.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <b0b96c86-d22a-4569-938a-d15a527ced84@HIDDEN> (message from
 Dmitry Gutov on Mon, 18 Nov 2024 03:42:34 +0200)
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <86ldxkitjn.fsf@HIDDEN> <5a2abf5e-011b-43d0-b34a-e06e354badc5@HIDDEN>
 <8634jrin5v.fsf@HIDDEN> <b0b96c86-d22a-4569-938a-d15a527ced84@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 74361
Cc: rudalics@HIDDEN, 74361 <at> debbugs.gnu.org, juri@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Mon, 18 Nov 2024 03:42:34 +0200
> Cc: rudalics@HIDDEN, 74361 <at> debbugs.gnu.org, juri@HIDDEN
> From: Dmitry Gutov <dmitry@HIDDEN>
> 
> On 16/11/2024 10:43, Eli Zaretskii wrote:
> >> That's the term I would use both both, but maybe there could be better
> >> wording. If xref-find-definition is not a navigation command, is it a
> >> "search command"?
> > Let me turn the table and ask: which Xref commands will NOT use this
> > action, if we exclude commands like
> > xref-find-definitions-other-window, which specify the window/frame to
> > use?
> 
> xref-query-replace-in-results will not (or its twin 
> xref-find-references-and-replace). I suppose not many people would 
> expect them to.

This seems to indicate that my proposal is actually okay, since the
above two commands do not "show results of Xref commands"?

> Also, there is a nuance: when the Xref buffer itself is shown (i.e. when 
> there are multiple locations matching a xref-find-definitions search), 
> we're not going to pass (category . xref) to display-buffer either - it 
> is reserved for displaying the buffers of destination locations.

And this is a separate issue, not related to the doc string?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 18 Nov 2024 01:42:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 17 20:42:45 2024
Received: from localhost ([127.0.0.1]:59264 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tCqmr-0002pi-G5
	for submit <at> debbugs.gnu.org; Sun, 17 Nov 2024 20:42:45 -0500
Received: from fout-a2-smtp.messagingengine.com ([103.168.172.145]:37211)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1tCqmp-0002pO-6J
 for 74361 <at> debbugs.gnu.org; Sun, 17 Nov 2024 20:42:43 -0500
Received: from phl-compute-02.internal (phl-compute-02.phl.internal
 [10.202.2.42])
 by mailfout.phl.internal (Postfix) with ESMTP id 1864713801EF;
 Sun, 17 Nov 2024 20:42:38 -0500 (EST)
Received: from phl-mailfrontend-02 ([10.202.2.163])
 by phl-compute-02.internal (MEProxy); Sun, 17 Nov 2024 20:42:38 -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=1731894158;
 x=1731980558; bh=13FeU88+AptSwqvQeQrrBpA6zf7vAl3q3TORcMA1GzQ=; b=
 pVKr6R0IvjwLMjyIf3SaOp5f46ks1GqjvQfJc0o8ARkeQHDTTKT/XCIohCmKNxHW
 AjpXwgNwuyZQe1+pyGY6Z6MuN5fo9xACq/c1h4p54kCpD1Ese+oBeJC+IDn9eF6k
 P+OHtSU91VSsC/kBF9bHH1Eo53YuNlw5/qkLDLM5EACSxYbcjG43wLKarI1Wy46e
 yvkFlH7x6+xJU+b08b5r6pUAEf0HLfIypkyhV8OKXcqT5FrjZzlQL7ytFWsDaI1V
 oS9oBF3gUflTepIv7PGMTTAm1DB0gB9tet86jjL2/b22N3dS5fa6wuOYpjXJaChO
 sZ6iad88ZUeaj4IrGeXydg==
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=fm3; t=1731894158; x=
 1731980558; bh=13FeU88+AptSwqvQeQrrBpA6zf7vAl3q3TORcMA1GzQ=; b=e
 mHE1xDb0d17pXGhqWVpDti3qZIfb7JKuVVpoaSQyMseUvH40Oi1payl6Zd+LojJO
 dmfu2lJYuunxvcm0JPVJjOcJM+Ho1DV2OXQiHIM6jgTNUU5uGJpLf8v1HLvEkk/G
 BrcsYEdnDLKZ6jJdSViAQR+bSIjWhJQsOu/4AXBd2QTZOdbU83wgO7WO+4Qp7oyg
 OkwlWSdgJg5mSJW327RxIg0gMWpdK3evxoJQp/JRttXDwUcMio+AcXNh1KIiI/tN
 Y2ob5A9OyVhzgwvBfupejP+iyxaXN7DF9ckDKSs1sJNDYPn/XfDNYtJchz2Ypv0R
 YkI0kScMJeLbOn86BvX/w==
X-ME-Sender: <xms:jZs6ZxVaIBtVblfA3FvlaieYH6-APEnb7NRVfMjG66-KP5tTikUv9w>
 <xme:jZs6ZxlVByfbv6VjLzhWYCCGorixx-82jxxaIDzBfA9copr7SMI6KdAl1jgRV4aFu
 8G9RVThZNl3mhNp2ms>
X-ME-Received: <xmr:jZs6Z9YJAE1A6ClOOUuR5SVgCL3hFypOog27BTnvBmxCAX6lKxeOYtcT9Xo_gIFiVFGT>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrvdelgdeflecutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr
 tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth
 hsucdlqddutddtmdenucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeen
 ucfhrhhomhepffhmihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvg
 hvqeenucggtffrrghtthgvrhhnpeetudeljeegheetgfehgeejkeeuhedvveeikeeufedt
 vddtveefhfdvveegudejheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh
 grihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvhdpnhgspghrtghpthhtohep
 gedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepvghlihiisehgnhhurdhorhhgpd
 hrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthdprhgtphhtthhopeejgeefiedu
 seguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtohepjhhurhhisehlihhnkhhovh
 drnhgvth
X-ME-Proxy: <xmx:jZs6Z0XgBby8NUvxHacI6MU1V7kfkf1SiDCnOVuON2RvsGm3m8IXJw>
 <xmx:jZs6Z7k_3idglKuPzQUR38K0IkseDn5WzRjG41e5V-HkxmfWosNREA>
 <xmx:jZs6Zxf0U1ReUSJNdKYk5IDH4AEHEwjqgv_nN2t6zF8EZRAtJHvTOg>
 <xmx:jZs6Z1Ep3b7m1klObd8gQx1gLCe2_ATTctbMaxDY1vbhMHBDpuqYTA>
 <xmx:jps6Z0Ax0pO17MmG9IugtbZX0o66n4SHkX3aPaukcR3M_WUx84kZK4Ci>
Feedback-ID: i07de48aa:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun,
 17 Nov 2024 20:42:36 -0500 (EST)
Message-ID: <b0b96c86-d22a-4569-938a-d15a527ced84@HIDDEN>
Date: Mon, 18 Nov 2024 03:42:34 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
To: Eli Zaretskii <eliz@HIDDEN>
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <86ldxkitjn.fsf@HIDDEN> <5a2abf5e-011b-43d0-b34a-e06e354badc5@HIDDEN>
 <8634jrin5v.fsf@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <8634jrin5v.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: rudalics@HIDDEN, 74361 <at> debbugs.gnu.org, juri@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On 16/11/2024 10:43, Eli Zaretskii wrote:
>> That's the term I would use both both, but maybe there could be better
>> wording. If xref-find-definition is not a navigation command, is it a
>> "search command"?
> Let me turn the table and ask: which Xref commands will NOT use this
> action, if we exclude commands like
> xref-find-definitions-other-window, which specify the window/frame to
> use?

xref-query-replace-in-results will not (or its twin 
xref-find-references-and-replace). I suppose not many people would 
expect them to.

Also, there is a nuance: when the Xref buffer itself is shown (i.e. when 
there are multiple locations matching a xref-find-definitions search), 
we're not going to pass (category . xref) to display-buffer either - it 
is reserved for displaying the buffers of destination locations.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 18 Nov 2024 01:29:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 17 20:29:03 2024
Received: from localhost ([127.0.0.1]:59232 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tCqZa-00028Z-5r
	for submit <at> debbugs.gnu.org; Sun, 17 Nov 2024 20:29:02 -0500
Received: from fhigh-a5-smtp.messagingengine.com ([103.168.172.156]:39959)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1tCqZW-00028C-Rn
 for 74361 <at> debbugs.gnu.org; Sun, 17 Nov 2024 20:29:00 -0500
Received: from phl-compute-04.internal (phl-compute-04.phl.internal
 [10.202.2.44])
 by mailfhigh.phl.internal (Postfix) with ESMTP id 7D95C11401B3;
 Sun, 17 Nov 2024 20:28:53 -0500 (EST)
Received: from phl-mailfrontend-02 ([10.202.2.163])
 by phl-compute-04.internal (MEProxy); Sun, 17 Nov 2024 20:28:53 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :cc: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=1731893333; x=1731979733; bh=Gc+Sfr7KwF
 uYXu6ECZ9gAhxr70fHHQxWSOkUsS4g/ms=; b=cUuDwHGLdTjP1RqB82x5NyevEx
 OTkw1X8XMZ3gQamWzIoMu1tCr6LDntxkuWVNsC6fK/yue6LDOK97gM+dy7nfJ4d3
 WYgS0ipWNbFTB3cXaG2asT18BkDyQZJV+aVo5s+3ctQcdFXHarypJSlGDFR/jNA1
 9uCbjopOMhNvsu3IqPdm7FkVgkAMEWOuHEtaOi82WkJF+NYajMt17Ib7azzGJYyE
 +EMAlGnlCRn5zW6gT0btgMgo8POr1vhnz8cUQy7cLjFCUtf0CkjkLi8T5mjr6/gK
 kz3c6XPneGEgGhev0uGDIuUiMxhvqr8GzFvZG+Gs00s1WMTo20G0024VP9+g==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc: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=fm3; t=
 1731893333; x=1731979733; bh=Gc+Sfr7KwFuYXu6ECZ9gAhxr70fHHQxWSOk
 UsS4g/ms=; b=XPLB/48jLFxxjkvo//UGHC9Cse8CT1Il0UfnDqLGIAzHSykxnDV
 JNdm/6I+XZVmLMDAjNLYUDXnasNEqsN+YCiOtzRp7fMs6CjphVuQ5uzOHAIJkcCX
 Kt4Kx8VlVt/kj7f3OTcAMWW9MWU4quhydGPotztxRcrz27wmFcSUtCMlDPdhk/+p
 7trsdnvSmixLPqgwB8YK5MLetiSsyW/r0ORBO5gNI/VO7qZznc+GnKphnaUO4eGb
 LU/oBlyttqIzHI+2b3yYFaGLV0DNrc/fs22fwBtBYx7lPfEfp9vuD9vqW6BzifTL
 qHQRGbnlHOeIsEfmeHiO726y+CEB+Opkhfw==
X-ME-Sender: <xms:VJg6ZwbvElIEU8ay6zaupzYRy2VBOjKG68LLj_wy9xxwb3UPP-pm_Q>
 <xme:VJg6Z7ZFTcqPw-3zurXaygoJrhYVKHFpPiz-z2o1x2x-sKTWna5q9qqUQDGzyDfeZ
 CoNw3Xm4QsEv8yhXSc>
X-ME-Received: <xmr:VJg6Z6-KsJ44syEciKJEbKgzHX93j2srHr4FK06s8YnCA2_vSV_t1t-OZMukf4v9-KqY>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrvdelgdefjecutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr
 tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth
 hsucdlqddutddtmdenucfjughrpegtkfffgggfuffvvehfhfgjsehmtderredtvdejnecu
 hfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvh
 eqnecuggftrfgrthhtvghrnhepheelfedukeduudevkeeilefgieffvdekhfekleejueej
 geeukeevffekjeejveehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg
 hilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghvpdhnsggprhgtphhtthhopedv
 pdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehjuhhriheslhhinhhkohhvrdhnvg
 htpdhrtghpthhtohepjeegfeeiudesuggvsggsuhhgshdrghhnuhdrohhrgh
X-ME-Proxy: <xmx:VJg6Z6qy-w31nECbFy9yyWHYvGsPzb7eZGZscPDWyu6d7N-zfT_UqQ>
 <xmx:VJg6Z7qSq3NBH6jThTIGdkZ8UhK0rHxcmPCH45r575wnO18nawbpng>
 <xmx:VJg6Z4QxP3br2IbTuUUBAety6akZ_kODD1jQAdRHAmRvJtNOtbmidw>
 <xmx:VJg6Z7o-sq-7AelYvBrN8a57oTPx2MYjk1KtZXBwK9R2skCiWY3vYA>
 <xmx:VZg6Zy197PBFaLgPu2YosQuXlZU9zdndtk-UcKULms7p4DAmepziZndN>
Feedback-ID: i07de48aa:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun,
 17 Nov 2024 20:28:51 -0500 (EST)
Content-Type: multipart/mixed; boundary="------------6aYs9h52ha8YAxIPmXVdVKBG"
Message-ID: <c05a2b89-cc0b-4489-9011-7449f306cb19@HIDDEN>
Date: Mon, 18 Nov 2024 03:28:49 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
To: Juri Linkov <juri@HIDDEN>
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <87msi1ueb0.fsf@HIDDEN>
 <4256f446-e11b-450c-b455-131cb75acab0@HIDDEN>
 <871pzbj8mq.fsf@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <871pzbj8mq.fsf@HIDDEN>
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

This is a multi-part message in MIME format.
--------------6aYs9h52ha8YAxIPmXVdVKBG
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

On 16/11/2024 21:12, Juri Linkov wrote:

> Instead of a new option and 'switch-to-buffer',
> a simpler way would be allow the users just to
> customize the category with 'display-buffer-same-window':
> 
>    (setq display-buffer-alist '(((category . xref)
>                                  (display-buffer-same-window))))
> 
> It works nicely when (category . xref) is added to the same place
> like in your patch in 'xref--show-pos-in-buf':
> 
> ```
> diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
> index cf061a18ee0..0193c2e35e0 100644
> --- a/lisp/progmodes/xref.el
> +++ b/lisp/progmodes/xref.el
> @@ -689,7 +689,7 @@ xref--show-pos-in-buf
>                         (eq (window-buffer xref--original-window) buf)))
>                    `((xref--display-buffer-in-window)
>                      (window . ,xref--original-window))))))
> -    (with-selected-window (display-buffer buf action)
> +    (with-selected-window (display-buffer buf (append action '((category . xref))))
>         (xref--goto-char pos)
>         (run-hooks 'xref-after-jump-hook)
>         (selected-window))))
> ```

Thanks! That covers the code path which uses 'display-buffer', and we 
also need to handle xref-pop-to-location, which calls switch-to-buffer 
now. Does

   (pop-to-buffer buf '((display-buffer-same-window) (category . xref)))

look compatible enough?

Also, when using the suggested change in xref--show-pos-in-buf, if we 
simply annotate it with 'category' in the display-buffer call, this also 
extends to the scenarios where xref--original-window-intent is non-nil.

See the attached patch where we make sure to exclude those cases. I 
suppose that loses the semantic consistency, though: 
xref-find-definitions-other-window and xref-find-definitions-other-frame 
are "xref" commands but they will call 'display-buffer' without 'category'.

The corresponding customization (described in the first message) can be:

   (setq display-buffer-alist '(((category . xref)
                                 (display-buffer-reuse-window
                                  display-buffer-use-some-window))))
--------------6aYs9h52ha8YAxIPmXVdVKBG
Content-Type: text/x-patch; charset=UTF-8;
 name="xref-display-buffer-with-category.diff"
Content-Disposition: attachment;
 filename="xref-display-buffer-with-category.diff"
Content-Transfer-Encoding: base64

ZGlmZiAtLWdpdCBhL2xpc3AvcHJvZ21vZGVzL3hyZWYuZWwgYi9saXNwL3Byb2dtb2Rlcy94
cmVmLmVsCmluZGV4IGNjMDZlMDZlZjc4Li41NmU0YjBjNzUxOCAxMDA2NDQKLS0tIGEvbGlz
cC9wcm9nbW9kZXMveHJlZi5lbAorKysgYi9saXNwL3Byb2dtb2Rlcy94cmVmLmVsCkBAIC01
MTMsNiArNTEzLDkgQEAgeHJlZi1wdXNoLW1hcmtlci1zdGFjawogOzs7IyMjYXV0b2xvYWQK
IChkZWZpbmUtb2Jzb2xldGUtZnVuY3Rpb24tYWxpYXMgJ3hyZWYtcG9wLW1hcmtlci1zdGFj
ayAjJ3hyZWYtZ28tYmFjayAiMjkuMSIpCiAKKyhkZWZ1biB4cmVmLS1zd2l0Y2gtdG8tYnVm
ZmVyIChidWYpCisgIChwb3AtdG8tYnVmZmVyIGJ1ZiAnKChkaXNwbGF5LWJ1ZmZlci1zYW1l
LXdpbmRvdykgKGNhdGVnb3J5IC4geHJlZikpKSkKKwogOzs7IyMjYXV0b2xvYWQKIChkZWZ1
biB4cmVmLWdvLWJhY2sgKCkKICAgIkdvIGJhY2sgdG8gdGhlIHByZXZpb3VzIHBvc2l0aW9u
IGluIHhyZWYgaGlzdG9yeS4KQEAgLTUyMyw4ICs1MjYsOCBAQCB4cmVmLWdvLWJhY2sKICAg
ICAgICAgKHVzZXItZXJyb3IgIkF0IHN0YXJ0IG9mIHhyZWYgaGlzdG9yeSIpCiAgICAgICAo
bGV0ICgobWFya2VyIChwb3AgKGNhciBoaXN0b3J5KSkpKQogICAgICAgICAoeHJlZi0tcHVz
aC1mb3J3YXJkIChwb2ludC1tYXJrZXIpKQotICAgICAgICAoc3dpdGNoLXRvLWJ1ZmZlciAo
b3IgKG1hcmtlci1idWZmZXIgbWFya2VyKQotICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgKHVzZXItZXJyb3IgIlRoZSBtYXJrZWQgYnVmZmVyIGhhcyBiZWVuIGRlbGV0ZWQiKSkp
CisgICAgICAgICh4cmVmLS1zd2l0Y2gtdG8tYnVmZmVyIChvciAobWFya2VyLWJ1ZmZlciBt
YXJrZXIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodXNlci1lcnJv
ciAiVGhlIG1hcmtlZCBidWZmZXIgaGFzIGJlZW4gZGVsZXRlZCIpKSkKICAgICAgICAgKGdv
dG8tY2hhciAobWFya2VyLXBvc2l0aW9uIG1hcmtlcikpCiAgICAgICAgIChzZXQtbWFya2Vy
IG1hcmtlciBuaWwgbmlsKQogICAgICAgICAocnVuLWhvb2tzICd4cmVmLWFmdGVyLXJldHVy
bi1ob29rKSkpKSkKQEAgLTUzOCw4ICs1NDEsOCBAQCB4cmVmLWdvLWZvcndhcmQKICAgICAg
ICAgKHVzZXItZXJyb3IgIkF0IGVuZCBvZiB4cmVmIGhpc3RvcnkiKQogICAgICAgKGxldCAo
KG1hcmtlciAocG9wIChjZHIgaGlzdG9yeSkpKSkKICAgICAgICAgKHhyZWYtLXB1c2gtYmFj
a3dhcmQgKHBvaW50LW1hcmtlcikpCi0gICAgICAgIChzd2l0Y2gtdG8tYnVmZmVyIChvciAo
bWFya2VyLWJ1ZmZlciBtYXJrZXIpCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAo
dXNlci1lcnJvciAiVGhlIG1hcmtlZCBidWZmZXIgaGFzIGJlZW4gZGVsZXRlZCIpKSkKKyAg
ICAgICAgKHhyZWYtLXN3aXRjaC10by1idWZmZXIgKG9yIChtYXJrZXItYnVmZmVyIG1hcmtl
cikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1c2VyLWVycm9yICJU
aGUgbWFya2VkIGJ1ZmZlciBoYXMgYmVlbiBkZWxldGVkIikpKQogICAgICAgICAoZ290by1j
aGFyIChtYXJrZXItcG9zaXRpb24gbWFya2VyKSkKICAgICAgICAgKHNldC1tYXJrZXIgbWFy
a2VyIG5pbCBuaWwpCiAgICAgICAgIChydW4taG9va3MgJ3hyZWYtYWZ0ZXItcmV0dXJuLWhv
b2spKSkpKQpAQCAtNjEyLDcgKzYxNSw3IEBAIHhyZWYtcG9wLXRvLWxvY2F0aW9uCiAgICAg
ICAgICAgICAgICAgICAgKHhyZWYtbG9jYXRpb24tbWFya2VyICh4cmVmLWl0ZW0tbG9jYXRp
b24gaXRlbSkpKSkKICAgICAgICAgIChidWYgKG1hcmtlci1idWZmZXIgbWFya2VyKSkpCiAg
ICAgKGNsLWVjYXNlIGFjdGlvbgotICAgICAgKChuaWwpICAoc3dpdGNoLXRvLWJ1ZmZlciBi
dWYpKQorICAgICAgKChuaWwpICAoeHJlZi0tc3dpdGNoLXRvLWJ1ZmZlciBidWYpKQogICAg
ICAgKHdpbmRvdyAocG9wLXRvLWJ1ZmZlciBidWYgdCkpCiAgICAgICAoZnJhbWUgIChsZXQg
KChwb3AtdXAtZnJhbWVzIHQpKSAocG9wLXRvLWJ1ZmZlciBidWYgdCkpKSkKICAgICAoeHJl
Zi0tZ290by1jaGFyIG1hcmtlcikpCkBAIC02ODgsNyArNjkxLDEwIEBAIHhyZWYtLXNob3ct
cG9zLWluLWJ1ZgogICAgICAgICAgICAgICAgICAgKG9yIChub3QgKHdpbmRvdy1kZWRpY2F0
ZWQtcCB4cmVmLS1vcmlnaW5hbC13aW5kb3cpKQogICAgICAgICAgICAgICAgICAgICAgIChl
cSAod2luZG93LWJ1ZmZlciB4cmVmLS1vcmlnaW5hbC13aW5kb3cpIGJ1ZikpKQogICAgICAg
ICAgICAgICAgICBgKCh4cmVmLS1kaXNwbGF5LWJ1ZmZlci1pbi13aW5kb3cpCi0gICAgICAg
ICAgICAgICAgICAgKHdpbmRvdyAuICx4cmVmLS1vcmlnaW5hbC13aW5kb3cpKSkpKSkKKyAg
ICAgICAgICAgICAgICAgICAoY2F0ZWdvcnkgLiB4cmVmKQorICAgICAgICAgICAgICAgICAg
ICh3aW5kb3cgLiAseHJlZi0tb3JpZ2luYWwtd2luZG93KSkpCisgICAgICAgICAgICAgICAg
KHQKKyAgICAgICAgICAgICAgICAgJygoY2F0ZWdvcnkgLiB4cmVmKSkpKSkpCiAgICAgKHdp
dGgtc2VsZWN0ZWQtd2luZG93IChkaXNwbGF5LWJ1ZmZlciBidWYgYWN0aW9uKQogICAgICAg
KHhyZWYtLWdvdG8tY2hhciBwb3MpCiAgICAgICAocnVuLWhvb2tzICd4cmVmLWFmdGVyLWp1
bXAtaG9vaykK

--------------6aYs9h52ha8YAxIPmXVdVKBG--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 16 Nov 2024 19:15:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 16 14:15:34 2024
Received: from localhost ([127.0.0.1]:54838 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tCOGb-0002Oq-U9
	for submit <at> debbugs.gnu.org; Sat, 16 Nov 2024 14:15:34 -0500
Received: from relay1-d.mail.gandi.net ([217.70.183.193]:37233)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1tCOGa-0002Oc-HP
 for 74361 <at> debbugs.gnu.org; Sat, 16 Nov 2024 14:15:33 -0500
Received: by mail.gandi.net (Postfix) with ESMTPSA id 3EDC7240004;
 Sat, 16 Nov 2024 19:15:23 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Dmitry Gutov <dmitry@HIDDEN>
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
In-Reply-To: <4256f446-e11b-450c-b455-131cb75acab0@HIDDEN> (Dmitry Gutov's
 message of "Fri, 15 Nov 2024 21:05:51 +0200")
Organization: LINKOV.NET
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <87msi1ueb0.fsf@HIDDEN>
 <4256f446-e11b-450c-b455-131cb75acab0@HIDDEN>
Date: Sat, 16 Nov 2024 21:12:13 +0200
Message-ID: <871pzbj8mq.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> This option looks similar to 'display-comint-buffer-action'
>> whose addition was deemed to be a mistake, so we needed to declare it
>> obsolete and replace it with '(category . comint)'.
>> So instead of adding 'xref-navigation-display-window-action',
>> could you just add a category 'xref' to xref display function calls?
>> Then users will be able to customize it with e.g.:
>>    (setq display-buffer-alist '(((category . xref)
>>                                  (display-buffer-reuse-window))))
>> Or maybe I misunderstand other requirements for this feature.
>
> Thanks for the comments. The other priority here (I think) seems to retain
> the current behavior by default:
>
> You can see this decision being made in
>
>   (defun xref--switch-to-buffer (buf)
>     (if xref-navigation-display-window-action
>         (pop-to-buffer buf xref-navigation-display-window-action)
>       (switch-to-buffer buf)))
>
> So... I suppose one way to do that would be to add an option in Xref which
> make it use 'pop-to-buffer' instead of 'switch-to-buffer' (similar to
> 'switch-to-buffer-obey-display-actions'). And then the user would customize
> 'display-buffer-alist' like in your example. Something like:
>
>   (setq xref-navigation-obey-display-actions t
>         display-buffer-alist '(((category . xref)
>                                 (display-buffer-reuse-window))))
>
> Is that not too complex, what do we think?

Instead of a new option and 'switch-to-buffer',
a simpler way would be allow the users just to
customize the category with 'display-buffer-same-window':

  (setq display-buffer-alist '(((category . xref)
                                (display-buffer-same-window))))

It works nicely when (category . xref) is added to the same place
like in your patch in 'xref--show-pos-in-buf':

```
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index cf061a18ee0..0193c2e35e0 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -689,7 +689,7 @@ xref--show-pos-in-buf
                       (eq (window-buffer xref--original-window) buf)))
                  `((xref--display-buffer-in-window)
                    (window . ,xref--original-window))))))
-    (with-selected-window (display-buffer buf action)
+    (with-selected-window (display-buffer buf (append action '((category . xref))))
       (xref--goto-char pos)
       (run-hooks 'xref-after-jump-hook)
       (selected-window))))
```




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 16 Nov 2024 08:44:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 16 03:44:02 2024
Received: from localhost ([127.0.0.1]:52040 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tCEPR-0006Ar-NI
	for submit <at> debbugs.gnu.org; Sat, 16 Nov 2024 03:44:02 -0500
Received: from eggs.gnu.org ([209.51.188.92]:35016)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1tCEPP-0006AN-6Z
 for 74361 <at> debbugs.gnu.org; Sat, 16 Nov 2024 03:43:59 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tCEPI-0006Be-2I; Sat, 16 Nov 2024 03:43:52 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=YPWdJ7mWuoRIAlm9Wtb5irOgWINbbtc79KO4tDL067c=; b=NAILXczT07L8
 sTQu2AsLsUHMKLVEfnzShOqHpJ7wt7Hw/nty2//VGh++KFKE7F39zyVpXX+G7tseL+5+VYXIE/2BC
 Dmfbj5rASGJ2J9nIj2Yhp6tewLdfcW8eGt0+udIlnUYVdZ8HsN9SfeypYIOFN97qQu2/HcxlOa0gb
 xJXS/vS3ZBipCXnKEHTdPpK6e/p9o18zZgQKWAQAc1Z4j1pzOC4tSg0NfmLBKVcr7lFWSCc1AdwKE
 OjSpiX028k8Ro2gW6/C8C7tIDL8r853pgIn3qvyPRyrhiIprhc2AMGNGVXqhmftA6jcsZ0WInsy1h
 U9zgyWPdbg08J8Gu3EHD6Q==;
Date: Sat, 16 Nov 2024 10:43:40 +0200
Message-Id: <8634jrin5v.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <5a2abf5e-011b-43d0-b34a-e06e354badc5@HIDDEN> (message from
 Dmitry Gutov on Fri, 15 Nov 2024 21:10:25 +0200)
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <86ldxkitjn.fsf@HIDDEN> <5a2abf5e-011b-43d0-b34a-e06e354badc5@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 74361
Cc: rudalics@HIDDEN, 74361 <at> debbugs.gnu.org, juri@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Fri, 15 Nov 2024 21:10:25 +0200
> Cc: 74361 <at> debbugs.gnu.org, juri@HIDDEN
> From: Dmitry Gutov <dmitry@HIDDEN>
> 
> >> +(defcustom xref-navigation-display-window-action nil
> >> +  "When non-nil, the display action to use for navigation commands.
> > 
> > This is too general, when taken alone (as in the apropos commands).  I
> > suggest something like
> > 
> >    If non-nil, the `display-buffer' action for showing results of Xref commands.
> > 
> > (The "navigation" part seems misleading, since xref-find-definitions
> > is not a navigation command.)
> 
> That's the term I would use both both, but maybe there could be better 
> wording. If xref-find-definition is not a navigation command, is it a 
> "search command"?

Let me turn the table and ask: which Xref commands will NOT use this
action, if we exclude commands like
xref-find-definitions-other-window, which specify the window/frame to
use?

> >> +This does not affect commands that specify the action explicitly,
> > 
> > I guess "...that specify the window to use explicitly" is more
> > accurate?
> 
> Or frame.

Yes, so "...specify the window/frame to use...".




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 15 Nov 2024 19:10:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 15 14:10:36 2024
Received: from localhost ([127.0.0.1]:50886 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tC1iF-0003Ki-Oq
	for submit <at> debbugs.gnu.org; Fri, 15 Nov 2024 14:10:36 -0500
Received: from fout-a8-smtp.messagingengine.com ([103.168.172.151]:60213)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1tC1iD-0003KU-Uc
 for 74361 <at> debbugs.gnu.org; Fri, 15 Nov 2024 14:10:34 -0500
Received: from phl-compute-07.internal (phl-compute-07.phl.internal
 [10.202.2.47])
 by mailfout.phl.internal (Postfix) with ESMTP id DB32F13805A1;
 Fri, 15 Nov 2024 14:10:28 -0500 (EST)
Received: from phl-mailfrontend-02 ([10.202.2.163])
 by phl-compute-07.internal (MEProxy); Fri, 15 Nov 2024 14:10:28 -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=1731697828;
 x=1731784228; bh=d5Vyvpj/uSHA8G41lTabirDkCNgiEocD8MsS364K7EI=; b=
 lgiMyf85VFxD1if0WXlk6qWVbUXO0gLHFifRJ7w1ogJOZrqA7B8DMyuktMAK+BKm
 qQTWLXMEW97le7UXXQ4RMWNHIdZ0t20YnBsn7gOkXKnffncdof40IQ5G1JK/aiZu
 d+1Tn/WXZpVS9vOyPDmYNi2GnNiU5LmwZxa0fsQBtO1ncvlmQQeNi6yAiR8fPdZ+
 KIsGqMFfRSAVdJNb+E6HEY/lIF2XIhwWjcES7ntTw4X3YofK66YRZjdU36IvsecB
 dWWsRoWPhbgsLYUWGx2EAhUJ6SF8Gw9NfdPUVoNjcBPZy1GBysYNKEP0sIP8hxKa
 dqxQ3rcbr1pqk4vPq69KJw==
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=fm3; t=1731697828; x=
 1731784228; bh=d5Vyvpj/uSHA8G41lTabirDkCNgiEocD8MsS364K7EI=; b=X
 rdkm5lXApTjqDomeqsNrUtf9KfyW1Wxc/P6QWJ+W8RnAi0mDlUa3QsyTJAHJ5+GB
 pfB5elGHJHLWAoP4j7ZqxwxHsog8YZuvp+GI1q6a6190NXbJstcv2Chg16nB6fdX
 BfBKXkTCnArNmwzGb7NDNnwYvXIhLTp1n18qNXR5d+9HqjErZEaFPIoBNy+qV9EP
 qtLN7WnwKrHiQ4kd5INshNPO5TRdkr6j8Xe4s8ytTL4VJHYI0Ikw3J6Fq7En5bnY
 BxfS4GDg3U8Lh+QdBNl75xPxFmB/AWNSCo1+KPX54r1FaHiVHCML9lqn2bvuY94C
 k+wOR8m04pMXOuzQSx7wg==
X-ME-Sender: <xms:pJw3Z0RqfBpsMldURXIfqwqhB1GyU4uyTF5jpjvtY0vYw8tqWHz1Tg>
 <xme:pJw3ZxxzGEVzF7lZL2ID33XO-9BgdNIndHZMFvxDTvj1R30xIyp1XIgAIJaSbNuOA
 t6KbS9vxlWdydyIH-M>
X-ME-Received: <xmr:pJw3Zx2DBMCjKv8XooxCySNwavrWJEwJLYcdQdKdCTTh1SfQL4eD2XNohO54ZVBXHFOx>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrvdeggdduudekucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu
 rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh
 htshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdej
 necuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdrug
 gvvheqnecuggftrfgrthhtvghrnhepteduleejgeehtefgheegjeekueehvdevieekueef
 tddvtdevfefhvdevgedujeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe
 hmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghvpdhnsggprhgtphhtthho
 peegpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegvlhhiiiesghhnuhdrohhrgh
 dprhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtpdhrtghpthhtohepjeegfeei
 udesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopehjuhhriheslhhinhhkoh
 hvrdhnvght
X-ME-Proxy: <xmx:pJw3Z4BNVxnSG-kEyVDi03SKOVp8BCNinxHtW0Xdaos-cE81yf-xJA>
 <xmx:pJw3Z9jDEOiXePATXlHWdEh7JbZc-exB6CDEj9MSlK_ePrb7k5Nj5A>
 <xmx:pJw3Z0oPHjsxxsmV9uWThnoj8UewgwcFpbxVu40sFVI3FHkBKCXGBQ>
 <xmx:pJw3ZwiQXuSBpSViIGMTz5uSKZDTn4sDLayu1hdsNCo9AviNUYYthA>
 <xmx:pJw3Z9cXv0mSICbLFSADkvHqndGTEuDuu-HznxUozl7P8iAyRgpO2xsx>
Feedback-ID: i07de48aa:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri,
 15 Nov 2024 14:10:27 -0500 (EST)
Message-ID: <5a2abf5e-011b-43d0-b34a-e06e354badc5@HIDDEN>
Date: Fri, 15 Nov 2024 21:10:25 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
To: Eli Zaretskii <eliz@HIDDEN>, martin rudalics <rudalics@HIDDEN>
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <86ldxkitjn.fsf@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <86ldxkitjn.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: 74361 <at> debbugs.gnu.org, juri@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Hi Eli,

On 15/11/2024 14:13, Eli Zaretskii wrote:

> I added Martin to the discussion, and have a few minor comments below.

Thanks.

>> +(defcustom xref-navigation-display-window-action nil
>> +  "When non-nil, the display action to use for navigation commands.
> 
> This is too general, when taken alone (as in the apropos commands).  I
> suggest something like
> 
>    If non-nil, the `display-buffer' action for showing results of Xref commands.
> 
> (The "navigation" part seems misleading, since xref-find-definitions
> is not a navigation command.)

That's the term I would use both both, but maybe there could be better 
wording. If xref-find-definition is not a navigation command, is it a 
"search command"?

>> +This does not affect commands that specify the action explicitly,
> 
> I guess "...that specify the window to use explicitly" is more
> accurate?

Or frame. We basically have two built-in commands like that: one 
specifies the window (kind of -- only that the "other" window should be 
used, but not a specific window), and another for "other frame".

>> +such as `xref-find-definitions-other-window'."
>> +  :type '(choice (const :tag "Use selected window" nil)
>> +                 (const :tag "Reuse window showing destination or use another"
> 
> I think "If possible, reuse window already showing destination" is
> better?

This is better, thanks.

>> +(defun xref--switch-to-buffer (buf)
>> +  (if xref-navigation-display-window-action
>> +      (pop-to-buffer buf xref-navigation-display-window-action)
> 
> Should we have some sanity checks for the value of
> xref-navigation-display-window-action?  It's a user option, so
> theoretically the user could use setq to set it to any value.

I think whatever sanity checks 'display-buffer' has for the ACTION 
argument would be used anyway. Also this might be moot given the 
"category" suggestion.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 15 Nov 2024 19:06:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 15 14:06:03 2024
Received: from localhost ([127.0.0.1]:50877 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tC1dr-00038P-0Y
	for submit <at> debbugs.gnu.org; Fri, 15 Nov 2024 14:06:03 -0500
Received: from fhigh-a4-smtp.messagingengine.com ([103.168.172.155]:34469)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1tC1dp-00037w-5N
 for 74361 <at> debbugs.gnu.org; Fri, 15 Nov 2024 14:06:02 -0500
Received: from phl-compute-04.internal (phl-compute-04.phl.internal
 [10.202.2.44])
 by mailfhigh.phl.internal (Postfix) with ESMTP id 1829211401A2;
 Fri, 15 Nov 2024 14:05:55 -0500 (EST)
Received: from phl-mailfrontend-02 ([10.202.2.163])
 by phl-compute-04.internal (MEProxy); Fri, 15 Nov 2024 14:05:55 -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=1731697555;
 x=1731783955; bh=Mn77J1eX9IoWNA5FUauphk6TZDYvUVjsWi/iqDKmKhQ=; b=
 sLiERVvul1K6N2m/eBD64AumMlLBp+bfgaWMJG4upQ/y3nJ50eLVu8yl207fz2JB
 SMd/NdpUxApOQ/A7F9Oh6O26tMtKPYyDDwPArfDsrYLjHcAnwhZK+HRfj6vUSmd3
 9jhd4+Hbwwca2uy2xyi/zZFsmXBhPxxqtsL3gqTEjDr00aI854SENw7GJMA+5t7q
 EtewcEll2lmWGMjIQPkpb9lvjU9HGiRWcf+44eHExVHoY77AlsX63ToR6pT5alky
 wHWgtxtCw9ixbuv+Y4QltlFg7aOaBFgKlPMBPaSD8TCTf1l2K3yZ1u5hF7PrBy+J
 ZL8jMPVfhqubS0XvnMs33w==
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=fm3; t=1731697555; x=
 1731783955; bh=Mn77J1eX9IoWNA5FUauphk6TZDYvUVjsWi/iqDKmKhQ=; b=k
 VW1GI3fHdoLlafo8LFgj4abV/BCqU/cBj7nzIUniMCRVrY9GbxxlX1vVJkZr5UWh
 I1q01Z9rEjCV1M1uobqX0YIauaT0oqFWDM6QDYNqvuTqvg1f0p7gsnCYDiauuzYC
 sy6rBUvTMUX6zhmExntxM+k6kbGdqdswVe36eIZFeps9XTQkHaopMB3wqBI2WaWA
 a3gNI9JG2PKOhYX8NRBv9mlaSQt+85iQamo83Aywt4tCBackJ+RcdYb1mhygTt/h
 O3wxe1jFTLyabUbvxcwC+yznxC4vD69WOZQeDkXrMkcRbYKSgJU/9EMPjPcI5W3t
 2RatZWFdNbwWNs43Wa8Ww==
X-ME-Sender: <xms:kps3Z7-6B-dBTTfa1kG-XtziB7rtgBqQXtvLD2d9L5hkgiprnfyMDA>
 <xme:kps3Z3s5HGKxwYbe597zMWReTIQ3NEbcvRQ6GbFbjRNn9cKPqZht7zW2VfOttCiOQ
 TGsDgPQc5zwlSZb8WA>
X-ME-Received: <xmr:kps3Z5BTbcBeA7cwdBTSVRSwM89X7vjaOrSmuiijuop9-rehwKuIC1n2DReWiIYYe0Ls>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrvdeggdduudejucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu
 rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh
 htshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdej
 necuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdrug
 gvvheqnecuggftrfgrthhtvghrnhepteduleejgeehtefgheegjeekueehvdevieekueef
 tddvtdevfefhvdevgedujeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe
 hmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghvpdhnsggprhgtphhtthho
 pedvpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehjuhhriheslhhinhhkohhvrd
 hnvghtpdhrtghpthhtohepjeegfeeiudesuggvsggsuhhgshdrghhnuhdrohhrgh
X-ME-Proxy: <xmx:kps3Z3dgQ1XxC4fLL5Hrs7jFFpEoeP0r1riplRwnbiozQAmd-N657g>
 <xmx:kps3ZwPBUjK1o3-j1NSC-gD70F-J0uoHSU1dL9XSv_cBi7gZFHYyrQ>
 <xmx:kps3Z5l8T9CFyX_wN0kyrOkvmWiTU3PIkMR7Wbp3Z_xBfUiI0gPP6Q>
 <xmx:kps3Z6sUcxknAsR9r5K_yAJ4EZpl-KiDgfwtxpa50p5iE5R-PZZHNQ>
 <xmx:k5s3Z5bLxWGB6GXPfnvscuru1p5Bzkxzf_iwO8BYH_59NJJQUG922xc3>
Feedback-ID: i07de48aa:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri,
 15 Nov 2024 14:05:53 -0500 (EST)
Message-ID: <4256f446-e11b-450c-b455-131cb75acab0@HIDDEN>
Date: Fri, 15 Nov 2024 21:05:51 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
To: Juri Linkov <juri@HIDDEN>
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <87msi1ueb0.fsf@HIDDEN>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <87msi1ueb0.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Hi Juri,

On 15/11/2024 09:49, Juri Linkov wrote:

> This option looks similar to 'display-comint-buffer-action'
> whose addition was deemed to be a mistake, so we needed to declare it
> obsolete and replace it with '(category . comint)'.
> 
> So instead of adding 'xref-navigation-display-window-action',
> could you just add a category 'xref' to xref display function calls?
> Then users will be able to customize it with e.g.:
> 
>    (setq display-buffer-alist '(((category . xref)
>                                  (display-buffer-reuse-window))))
> 
> Or maybe I misunderstand other requirements for this feature.

Thanks for the comments. The other priority here (I think) seems to 
retain the current behavior by default:

You can see this decision being made in

   (defun xref--switch-to-buffer (buf)
     (if xref-navigation-display-window-action
         (pop-to-buffer buf xref-navigation-display-window-action)
       (switch-to-buffer buf)))

So... I suppose one way to do that would be to add an option in Xref 
which make it use 'pop-to-buffer' instead of 'switch-to-buffer' (similar 
to 'switch-to-buffer-obey-display-actions'). And then the user would 
customize 'display-buffer-alist' like in your example. Something like:

   (setq xref-navigation-obey-display-actions t
         display-buffer-alist '(((category . xref)
                                 (display-buffer-reuse-window))))

Is that not too complex, what do we think?

> Ok, meanwhile I'll play more with your patch to see if 'category'
> could really help here.

Thank you.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 15 Nov 2024 17:21:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 15 12:21:12 2024
Received: from localhost ([127.0.0.1]:50733 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tC00O-00075K-1O
	for submit <at> debbugs.gnu.org; Fri, 15 Nov 2024 12:21:12 -0500
Received: from mout.gmx.net ([212.227.15.18]:59955)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1tC00L-000755-QZ
 for 74361 <at> debbugs.gnu.org; Fri, 15 Nov 2024 12:21:10 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at;
 s=s31663417; t=1731691261; x=1732296061; i=rudalics@HIDDEN;
 bh=IH25i9CV4gMJ2yagnzI62AQlxUiLtul/HLTluynWmKM=;
 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=U8qepD7sLpQZ+IIWTETYjcY3dUGOf7EdCIqMjiz7jOSHGLrWxskEoSAQp47COv+9
 /ohz7USACej6xbFVdmsTBLCFsI5qnqH2OX8cmFNHl8vu68pu9B9QD0CAfXVEbbtRI
 sN0x26pDNeioEB9HbG8zUYHwwzjirRR2Z3zwST2prbzItZCNkRNn5hCtbAsGUoiRA
 +soHmRwCClLcvUY14MaxINFhOWVkPWDVWX2lhSJuygHkVLdhIYIV3/EzzTntqHW4Q
 XL0earBBicS0aDfpqRp6tZkjLsmPz9gqVlGckEnKvIk5Y9Bo9HZ24aZQGUASge+qy
 8H9b5PDQZD4PitbqdQ==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.31.113] ([213.142.96.252]) by mail.gmx.net (mrgmx005
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mzhj9-1ty4NR3l0j-010VZ5; Fri, 15
 Nov 2024 18:21:01 +0100
Message-ID: <40e2c384-4e2d-4c56-8a69-b2e44d1104ea@HIDDEN>
Date: Fri, 15 Nov 2024 18:20:57 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
To: Eli Zaretskii <eliz@HIDDEN>, Dmitry Gutov <dmitry@HIDDEN>
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
 <86ldxkitjn.fsf@HIDDEN>
Content-Language: en-US
From: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <86ldxkitjn.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:wUqRX8NARN3dq9BNiVSJUanM5ZEmXvDwhlLjAZanBwI5whwcaf/
 THQqTqmunpdcvfBMDBZDySl6mu+6DzUV6D13FT7q7t1cTBBzfN1HniUaKlQkGckgt8KxQUj
 P1pco+6SXsKinIHqeK0ArGT0yES8atVQgp3VYLn8Xkm32JXGrrqDBr5HXEgnUbrz4/vpU7G
 Gdtowcu6Ag+IsoMtMog3A==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:+8bl+y3iBYU=;YtgNHqslPsxeQDf3kYkkt2zIhPM
 fuKTm+BuL9Go8Ocf0CvmjjytZf38O+amZpw6kZlXF+GEUh7FO/VhQtov9IhyQ2e/T7r+b1kpN
 FhSLBXtunAybylq6fzGyxrBIrv4dvzYgbFok5dOENNQUQkVHKBh6jFRzDSrdHIgn1B1C3QRd4
 uxrnhacPkbTl4nmgs827tNeivxoymRXb1cl56v5abFpZgTdmzQmpc0WDkfwsr1glXUnlTj90G
 +aM0EtmEZvhNnpNq8rFGs+47mQ4GqPHwS/Oi4mS63Wm86RDreyGyEUCd+PReQ9hQHP+MCr2l9
 lzhp56ogV33z1ddZ1qbPpZevMktC+ZlXuisr4ccQiqTNzy1a6op1/ysFa4/3F8rfTVDx7bxQL
 COewqUhy4oBRJrXHw+jHUuohItNiTbtbVkNXUZhQ3b5guxU7ME+obZ14iYQOmz45jx3sa85ys
 8qdi3wbfQm+nHnJPsZC8gRzbh/NI3GH/LYdsHrC1L52N3H0Tx6f/Qa+fF5MwCUrMdgoitPzo+
 I/89YZ1F+QXOMfJvx+5f4RzukvthPm9j/46r2ND3XKHbI6Gl6LFp7RJmiI5ao+ySiuQesDkJZ
 xl8zmncDunQMbRIiMAXkLigl+VornMjxQwhRA0u8lrLLcYuvIPLvRgU+/hLXZRrNiOShyPL8l
 7YGWW0OGKew91Pc3WVgQ81qXObU3DJIE03MEg1FqFxBUeiMK88dVTEtML2vmKWR/xjpOekhd5
 Pcto+hIj9Wo/W0V1GciKCdhkIbHdKBeLx7wAkLOBw7Oka1bFcgO81KQi1LF8Kq1ZQQ3di/uqQ
 w0XGJ2gX0qQVtha6LM9XsQqHbNJtRx/sj1bfruHYu0xjhG1ld89GWrV4VnGQp8yv9mOkXzeYi
 /2Wj9Q0xfiVliUqH719nVgfd0Qg6NJH7EivzeXkyr/FPpuOnG/VqYecPs
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: 74361 <at> debbugs.gnu.org, juri@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 >> Comments welcome.
 >
 > I added Martin to the discussion, and have a few minor comments below.

Let's see whether Juri has any success with adding an 'xref' category
first.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 15 Nov 2024 12:13:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 15 07:13:44 2024
Received: from localhost ([127.0.0.1]:48874 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tBvCq-0001eF-As
	for submit <at> debbugs.gnu.org; Fri, 15 Nov 2024 07:13:44 -0500
Received: from eggs.gnu.org ([209.51.188.92]:46240)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1tBvCo-0001e2-Ua
 for 74361 <at> debbugs.gnu.org; Fri, 15 Nov 2024 07:13:43 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tBvCh-0000m3-NZ; Fri, 15 Nov 2024 07:13:36 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=d8e6ERi8nn8qYfXzE9sHdqaEK7Vn7RK93XCKBHr9o+o=; b=Ha7bw/VLE7wR
 1JJVNmQpp4t0d5WG8xDuc0H86dmgoYkG0fqxlP881vAZ+aupK5/YZrjwouQxFKaXGfk4t0iJ+DAUK
 bR+TlJWSe51mDtHUl9x8I6Jycz5cpdvO0DJvvulhAu+ITc5d5ziP9geKo74E9nc5nBnp1h3sISmin
 GtWEwLX80qD8vXJSieMlJRfElZwM+qUJsw/UoFn84LAlA3FRnxT/ilpPIx2BxxFbcZwNGDl27VRAQ
 ShSlMzADlFTG31XdlUQrGUeduQ3EPK8aU4TwDyUTvPRuQHs1NcbmwXIUggu03Ckmojnnf5/p4LFll
 7fp0Yup35nCX8/4wXxvTcQ==;
Date: Fri, 15 Nov 2024 14:13:32 +0200
Message-Id: <86ldxkitjn.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dmitry@HIDDEN>, martin rudalics <rudalics@HIDDEN>
In-Reply-To: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN> (message from
 Dmitry Gutov on Fri, 15 Nov 2024 00:29:14 +0200)
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 74361
Cc: 74361 <at> debbugs.gnu.org, juri@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: juri linkov <juri@HIDDEN>
> Date: Fri, 15 Nov 2024 00:29:14 +0200
> From: Dmitry Gutov <dmitry@HIDDEN>
> 
> This adds a capability to customize the destination window selection 
> logic for navigation (xref-find-definitions, xref-go-back, 
> xref-go-forward) by allowing a user-supplied display window function.
> 
> Inspired by the Merlin package and its user option 
> merlin-locate-in-new-window 
> (https://github.com/ocaml/merlin/blob/a36f42a5b181d0c9cc84174e8eb241b11eeabc0f/emacs/merlin.el#L177C12-L177C39) 
> - where the value 'diff' uses a different window if the destination is 
> in an file different from the current one.
> 
> With the attached patch the customization looks a bit noisier though:
> 
>    (setq xref-navigation-display-window-action
>          '(display-buffer-reuse-window))
> 
> ^ This makes it try to reuse an existing window and fall back to 
> pop-to-window, but the effect is similar to what's described above.
> 
> Comments welcome.

I added Martin to the discussion, and have a few minor comments below.

> diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
> index cc06e06ef78..670e80ea40b 100644
> --- a/lisp/progmodes/xref.el
> +++ b/lisp/progmodes/xref.el
> @@ -431,6 +431,21 @@ xref-auto-jump-to-first-xref
>    :version "28.1"
>    :package-version '(xref . "1.2.0"))
>  
> +(defcustom xref-navigation-display-window-action nil
> +  "When non-nil, the display action to use for navigation commands.

This is too general, when taken alone (as in the apropos commands).  I
suggest something like

  If non-nil, the `display-buffer' action for showing results of Xref commands.

(The "navigation" part seems misleading, since xref-find-definitions
is not a navigation command.)

> +This does not affect commands that specify the action explicitly,

I guess "...that specify the window to use explicitly" is more
accurate?

> +such as `xref-find-definitions-other-window'."
> +  :type '(choice (const :tag "Use selected window" nil)
> +                 (const :tag "Reuse window showing destination or use another"

I think "If possible, reuse window already showing destination" is
better?

> +(defun xref--switch-to-buffer (buf)
> +  (if xref-navigation-display-window-action
> +      (pop-to-buffer buf xref-navigation-display-window-action)

Should we have some sanity checks for the value of
xref-navigation-display-window-action?  It's a user option, so
theoretically the user could use setq to set it to any value.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 15 Nov 2024 07:51:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 15 02:51:54 2024
Received: from localhost ([127.0.0.1]:48415 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tBr7R-0007B0-PL
	for submit <at> debbugs.gnu.org; Fri, 15 Nov 2024 02:51:54 -0500
Received: from relay6-d.mail.gandi.net ([217.70.183.198]:58663)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1tBr7Q-0007Am-4B
 for 74361 <at> debbugs.gnu.org; Fri, 15 Nov 2024 02:51:52 -0500
Received: by mail.gandi.net (Postfix) with ESMTPSA id BDA1FC0004;
 Fri, 15 Nov 2024 07:51:23 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Dmitry Gutov <dmitry@HIDDEN>
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
In-Reply-To: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN> (Dmitry Gutov's
 message of "Fri, 15 Nov 2024 00:29:14 +0200")
Organization: LINKOV.NET
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
Date: Fri, 15 Nov 2024 09:49:39 +0200
Message-ID: <87msi1ueb0.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: 74361 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> This adds a capability to customize the destination window selection logic
> for navigation (xref-find-definitions, xref-go-back, xref-go-forward) by
> allowing a user-supplied display window function.
>
> Inspired by the Merlin package and its user option
> merlin-locate-in-new-window
> (https://github.com/ocaml/merlin/blob/a36f42a5b181d0c9cc84174e8eb241b11eeabc0f/emacs/merlin.el#L177C12-L177C39)
> - where the value 'diff' uses a different window if the destination is in
> an file different from the current one.
>
> With the attached patch the customization looks a bit noisier though:
>
>   (setq xref-navigation-display-window-action
>         '(display-buffer-reuse-window))
>
> ^ This makes it try to reuse an existing window and fall back to
> pop-to-window, but the effect is similar to what's described above.
>
> Comments welcome.

This option looks similar to 'display-comint-buffer-action'
whose addition was deemed to be a mistake, so we needed to declare it
obsolete and replace it with '(category . comint)'.

So instead of adding 'xref-navigation-display-window-action',
could you just add a category 'xref' to xref display function calls?
Then users will be able to customize it with e.g.:

  (setq display-buffer-alist '(((category . xref)
                                (display-buffer-reuse-window))))

Or maybe I misunderstand other requirements for this feature.

Ok, meanwhile I'll play more with your patch to see if 'category'
could really help here.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at 74361 <at> debbugs.gnu.org:


Received: (at 74361) by debbugs.gnu.org; 15 Nov 2024 00:51:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 14 19:51:07 2024
Received: from localhost ([127.0.0.1]:47822 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tBkYE-0005TE-Il
	for submit <at> debbugs.gnu.org; Thu, 14 Nov 2024 19:51:06 -0500
Received: from fout-b2-smtp.messagingengine.com ([202.12.124.145]:52197)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1tBkY9-0005Sd-1U
 for 74361 <at> debbugs.gnu.org; Thu, 14 Nov 2024 19:51:04 -0500
Received: from phl-compute-09.internal (phl-compute-09.phl.internal
 [10.202.2.49])
 by mailfout.stl.internal (Postfix) with ESMTP id EC46F1140171;
 Thu, 14 Nov 2024 19:50:54 -0500 (EST)
Received: from phl-mailfrontend-02 ([10.202.2.163])
 by phl-compute-09.internal (MEProxy); Thu, 14 Nov 2024 19:50:55 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :cc: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=1731631854; x=1731718254; bh=3OGP3eNikk
 MEgmF6kgZJeXuTgimQDB+cexwHIjqM9Rs=; b=Naa6UNWt+TEzmGgHnO2dof9K5V
 ef1QlwnbI/4lIoSCEZi1/uR9aDsY3IKnqAD0Kjut1P+dLgZ3hJdtBqPL7YO0oXfD
 3h/ek1JVV8SQz8W64NLFGgPAGfwUhkpPPc2yiE2QKBE7L4lY1K9ioi2QZGkEmObX
 em488adluTELgHaVJm3MssreJ5p3X+E88b/WxtniWoUy6hEppon1EHA7/GQSH680
 rGVPU2+3hxtrli/ZDOVCQUyGMU3zQhGbHb40F5uX+A2b1XJGCBpQ+VEMQWTVAUKu
 hy+lIQpb3UsF4NI6yppSIZX9wbhIRAYSH6+q62HGfavObVOAatyykb2boM/g==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc: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=fm3; t=
 1731631854; x=1731718254; bh=3OGP3eNikkMEgmF6kgZJeXuTgimQDB+cexw
 HIjqM9Rs=; b=K305XjvLrVUmjgd5lWCaN5jiHEiLkW5UwQiSWG8xXlF6RLwl8V0
 yvFzkvRA/ynCo8Pm90VH97smqGUc+z3EHjzZOhC4PDAVXcPumLEb168aH9WUrlGR
 clYzmCdZFrBT3fkiS15XBr2B9YFHaiQIx05BQz3NoZngezPC+LOhF7NLaOEz3q9z
 FvMePXo25A9ks4DZ5GFv0xYBIBPMXXzfWsxqtOH/6ih+B0KK32RYpE98PBWjxzL5
 QiewTt6bT5ZgpWHfuzHAv3/9HOwuenm5ZW9Cn0onuPv5lH9IQmuL1HBV0OT3IkAV
 tzLq1FmTiMhAUDWTEMwH1SWmDMcep12iJqA==
X-ME-Sender: <xms:7po2Z61Kyp3R4c-8C10UakDnHelOyRt9rPFyYP2DXzYW_uoQR6W9zA>
 <xme:7po2Z9FVqxNJ3orgSx5noUIYNgCOxO24Vsn4xkylsTOaCdr4Q5_uuMMx_-Wub9q_w
 qKfPE8qJ0xmTGhrytI>
X-ME-Received: <xmr:7po2Zy6oGaH3zC_ZWDqJ2snBDBntIm7mF013EsULLXwgsJVyHiuRhO0tADzxKaTZrw>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrvdefgddviecutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr
 tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth
 hsucdlqddutddtmdenucfjughrpegtkfffgggfuffhvfevfhgjsehmtderredtvdejnecu
 hfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvh
 eqnecuggftrfgrthhtvghrnheptddvueegvdetledvgeevgfeutdfgteehgfegffektdek
 geevieefiedujeeuffffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg
 hilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghvpdhnsggprhgtphhtthhopedv
 pdhmohguvgepshhmthhpohhuthdprhgtphhtthhopeejgeefieduseguvggssghughhsrd
 hgnhhurdhorhhgpdhrtghpthhtohepjhhurhhisehlihhnkhhovhdrnhgvth
X-ME-Proxy: <xmx:7po2Z71bUdjyGdB3yqXpZdaQmvmiPcCkc8Wf9SxvtY4jVAMuSuQRag>
 <xmx:7po2Z9Ghj-eeKVrnvBmnerFTf04Wu3RY8GHvwSi4HOyrf0XOvBmFaw>
 <xmx:7po2Z09IHI_0Pzn2xJ_3byPEOsDnr1iR9dRB7GdE75-RcXWavUPVmg>
 <xmx:7po2ZylVc_WwBQvr2o2qiesLeWrA5QYZZW1kfG4vOTsbntb-kS-2aw>
 <xmx:7po2ZyS4BP7_IV8NMJmR_0fXBykS2knSlN_RtP3PHEWdJttzoZJeIO2h>
Feedback-ID: i07de48aa:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu,
 14 Nov 2024 19:50:53 -0500 (EST)
Content-Type: multipart/mixed; boundary="------------Z9fU50jbjwxWhl0wi9GfwtDc"
Message-ID: <9e79299a-0afb-462c-9362-987f4bb12e34@HIDDEN>
Date: Fri, 15 Nov 2024 02:50:50 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#74361: [PATCH] New option
 xref-navigation-display-window-action
From: Dmitry Gutov <dmitry@HIDDEN>
To: 74361 <at> debbugs.gnu.org
References: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
Content-Language: en-US
In-Reply-To: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74361
Cc: juri linkov <juri@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

This is a multi-part message in MIME format.
--------------Z9fU50jbjwxWhl0wi9GfwtDc
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

On 15/11/2024 00:29, Dmitry Gutov wrote:
> Comments welcome.

Here's a small revision in xref--show-pos-in-buf that allows including 
ALIST elements as well - just because those are allowed in the structure 
of ACTION as documented.
--------------Z9fU50jbjwxWhl0wi9GfwtDc
Content-Type: text/x-patch; charset=UTF-8;
 name="xref-navigation-display-window-action-v2.diff"
Content-Disposition: attachment;
 filename="xref-navigation-display-window-action-v2.diff"
Content-Transfer-Encoding: base64

ZGlmZiAtLWdpdCBhL2xpc3AvcHJvZ21vZGVzL3hyZWYuZWwgYi9saXNwL3Byb2dtb2Rlcy94
cmVmLmVsCmluZGV4IGNjMDZlMDZlZjc4Li43ZDI5NjE5MWRhOCAxMDA2NDQKLS0tIGEvbGlz
cC9wcm9nbW9kZXMveHJlZi5lbAorKysgYi9saXNwL3Byb2dtb2Rlcy94cmVmLmVsCkBAIC00
MzEsNiArNDMxLDIxIEBAIHhyZWYtYXV0by1qdW1wLXRvLWZpcnN0LXhyZWYKICAgOnZlcnNp
b24gIjI4LjEiCiAgIDpwYWNrYWdlLXZlcnNpb24gJyh4cmVmIC4gIjEuMi4wIikpCiAKKyhk
ZWZjdXN0b20geHJlZi1uYXZpZ2F0aW9uLWRpc3BsYXktd2luZG93LWFjdGlvbiBuaWwKKyAg
IldoZW4gbm9uLW5pbCwgdGhlIGRpc3BsYXkgYWN0aW9uIHRvIHVzZSBmb3IgbmF2aWdhdGlv
biBjb21tYW5kcy4KKworVGhlIHZhbHVlIHNob3VsZCBiZSBuaWwgb3IgYSBidWZmZXIgZGlz
cGxheSBhY3Rpb24gbGlrZSBkZXNjcmliZWQgaW4KK2RvY3N0cmluZyBmb3IgYGRpc3BsYXkt
YnVmZmVyJy4KKworVGhpcyBkb2VzIG5vdCBhZmZlY3QgY29tbWFuZHMgdGhhdCBzcGVjaWZ5
IHRoZSBhY3Rpb24gZXhwbGljaXRseSwKK3N1Y2ggYXMgYHhyZWYtZmluZC1kZWZpbml0aW9u
cy1vdGhlci13aW5kb3cnLiIKKyAgOnR5cGUgJyhjaG9pY2UgKGNvbnN0IDp0YWcgIlVzZSBz
ZWxlY3RlZCB3aW5kb3ciIG5pbCkKKyAgICAgICAgICAgICAgICAgKGNvbnN0IDp0YWcgIlJl
dXNlIHdpbmRvdyBzaG93aW5nIGRlc3RpbmF0aW9uIG9yIHVzZSBhbm90aGVyIgorICAgICAg
ICAgICAgICAgICAgICAgICAgKGRpc3BsYXktYnVmZmVyLXJldXNlLXdpbmRvdykpCisgICAg
ICAgICAgICAgICAgIGRpc3BsYXktYnVmZmVyLS1hY3Rpb24tY3VzdG9tLXR5cGUpCisgIDp2
ZXJzaW9uICIzMS4xIgorICA6cGFja2FnZS12ZXJzaW9uICcoeHJlZiAuICIxLjguMCIpKQor
CiAoZGVmY3VzdG9tIHhyZWYtaGlzdG9yeS1zdG9yYWdlICMneHJlZi1nbG9iYWwtaGlzdG9y
eQogICAiRnVuY3Rpb24gdGhhdCByZXR1cm5zIHhyZWYgaGlzdG9yeS4KIApAQCAtNTEzLDYg
KzUyOCwxMSBAQCB4cmVmLXB1c2gtbWFya2VyLXN0YWNrCiA7OzsjIyNhdXRvbG9hZAogKGRl
ZmluZS1vYnNvbGV0ZS1mdW5jdGlvbi1hbGlhcyAneHJlZi1wb3AtbWFya2VyLXN0YWNrICMn
eHJlZi1nby1iYWNrICIyOS4xIikKIAorKGRlZnVuIHhyZWYtLXN3aXRjaC10by1idWZmZXIg
KGJ1ZikKKyAgKGlmIHhyZWYtbmF2aWdhdGlvbi1kaXNwbGF5LXdpbmRvdy1hY3Rpb24KKyAg
ICAgIChwb3AtdG8tYnVmZmVyIGJ1ZiB4cmVmLW5hdmlnYXRpb24tZGlzcGxheS13aW5kb3ct
YWN0aW9uKQorICAgIChzd2l0Y2gtdG8tYnVmZmVyIGJ1ZikpKQorCiA7OzsjIyNhdXRvbG9h
ZAogKGRlZnVuIHhyZWYtZ28tYmFjayAoKQogICAiR28gYmFjayB0byB0aGUgcHJldmlvdXMg
cG9zaXRpb24gaW4geHJlZiBoaXN0b3J5LgpAQCAtNTIzLDggKzU0Myw4IEBAIHhyZWYtZ28t
YmFjawogICAgICAgICAodXNlci1lcnJvciAiQXQgc3RhcnQgb2YgeHJlZiBoaXN0b3J5IikK
ICAgICAgIChsZXQgKChtYXJrZXIgKHBvcCAoY2FyIGhpc3RvcnkpKSkpCiAgICAgICAgICh4
cmVmLS1wdXNoLWZvcndhcmQgKHBvaW50LW1hcmtlcikpCi0gICAgICAgIChzd2l0Y2gtdG8t
YnVmZmVyIChvciAobWFya2VyLWJ1ZmZlciBtYXJrZXIpCi0gICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAodXNlci1lcnJvciAiVGhlIG1hcmtlZCBidWZmZXIgaGFzIGJlZW4gZGVs
ZXRlZCIpKSkKKyAgICAgICAgKHhyZWYtLXN3aXRjaC10by1idWZmZXIgKG9yIChtYXJrZXIt
YnVmZmVyIG1hcmtlcikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1
c2VyLWVycm9yICJUaGUgbWFya2VkIGJ1ZmZlciBoYXMgYmVlbiBkZWxldGVkIikpKQogICAg
ICAgICAoZ290by1jaGFyIChtYXJrZXItcG9zaXRpb24gbWFya2VyKSkKICAgICAgICAgKHNl
dC1tYXJrZXIgbWFya2VyIG5pbCBuaWwpCiAgICAgICAgIChydW4taG9va3MgJ3hyZWYtYWZ0
ZXItcmV0dXJuLWhvb2spKSkpKQpAQCAtNTM4LDggKzU1OCw4IEBAIHhyZWYtZ28tZm9yd2Fy
ZAogICAgICAgICAodXNlci1lcnJvciAiQXQgZW5kIG9mIHhyZWYgaGlzdG9yeSIpCiAgICAg
ICAobGV0ICgobWFya2VyIChwb3AgKGNkciBoaXN0b3J5KSkpKQogICAgICAgICAoeHJlZi0t
cHVzaC1iYWNrd2FyZCAocG9pbnQtbWFya2VyKSkKLSAgICAgICAgKHN3aXRjaC10by1idWZm
ZXIgKG9yIChtYXJrZXItYnVmZmVyIG1hcmtlcikKLSAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICh1c2VyLWVycm9yICJUaGUgbWFya2VkIGJ1ZmZlciBoYXMgYmVlbiBkZWxldGVk
IikpKQorICAgICAgICAoeHJlZi0tc3dpdGNoLXRvLWJ1ZmZlciAob3IgKG1hcmtlci1idWZm
ZXIgbWFya2VyKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHVzZXIt
ZXJyb3IgIlRoZSBtYXJrZWQgYnVmZmVyIGhhcyBiZWVuIGRlbGV0ZWQiKSkpCiAgICAgICAg
IChnb3RvLWNoYXIgKG1hcmtlci1wb3NpdGlvbiBtYXJrZXIpKQogICAgICAgICAoc2V0LW1h
cmtlciBtYXJrZXIgbmlsIG5pbCkKICAgICAgICAgKHJ1bi1ob29rcyAneHJlZi1hZnRlci1y
ZXR1cm4taG9vaykpKSkpCkBAIC02MTIsNyArNjMyLDcgQEAgeHJlZi1wb3AtdG8tbG9jYXRp
b24KICAgICAgICAgICAgICAgICAgICAoeHJlZi1sb2NhdGlvbi1tYXJrZXIgKHhyZWYtaXRl
bS1sb2NhdGlvbiBpdGVtKSkpKQogICAgICAgICAgKGJ1ZiAobWFya2VyLWJ1ZmZlciBtYXJr
ZXIpKSkKICAgICAoY2wtZWNhc2UgYWN0aW9uCi0gICAgICAoKG5pbCkgIChzd2l0Y2gtdG8t
YnVmZmVyIGJ1ZikpCisgICAgICAoKG5pbCkgICh4cmVmLS1zd2l0Y2gtdG8tYnVmZmVyIGJ1
ZikpCiAgICAgICAod2luZG93IChwb3AtdG8tYnVmZmVyIGJ1ZiB0KSkKICAgICAgIChmcmFt
ZSAgKGxldCAoKHBvcC11cC1mcmFtZXMgdCkpIChwb3AtdG8tYnVmZmVyIGJ1ZiB0KSkpKQog
ICAgICh4cmVmLS1nb3RvLWNoYXIgbWFya2VyKSkKQEAgLTY4Myw2ICs3MDMsMTAgQEAgeHJl
Zi0tc2hvdy1wb3MtaW4tYnVmCiAgICAgICAgICAgICAgICAgKChlcSB4cmVmLS1vcmlnaW5h
bC13aW5kb3ctaW50ZW50ICd3aW5kb3cpCiAgICAgICAgICAgICAgICAgIGAoKHhyZWYtLWRp
c3BsYXktYnVmZmVyLWluLW90aGVyLXdpbmRvdykKICAgICAgICAgICAgICAgICAgICAod2lu
ZG93IC4gLHhyZWYtLW9yaWdpbmFsLXdpbmRvdykpKQorICAgICAgICAgICAgICAgICh4cmVm
LW5hdmlnYXRpb24tZGlzcGxheS13aW5kb3ctYWN0aW9uCisgICAgICAgICAgICAgICAgIChh
cHBlbmQKKyAgICAgICAgICAgICAgICAgIHhyZWYtbmF2aWdhdGlvbi1kaXNwbGF5LXdpbmRv
dy1hY3Rpb24KKyAgICAgICAgICAgICAgICAgIGAoKHdpbmRvdyAuICx4cmVmLS1vcmlnaW5h
bC13aW5kb3cpKSkpCiAgICAgICAgICAgICAgICAgKChhbmQKICAgICAgICAgICAgICAgICAg
ICh3aW5kb3ctbGl2ZS1wIHhyZWYtLW9yaWdpbmFsLXdpbmRvdykKICAgICAgICAgICAgICAg
ICAgIChvciAobm90ICh3aW5kb3ctZGVkaWNhdGVkLXAgeHJlZi0tb3JpZ2luYWwtd2luZG93
KSkKQEAgLTE2MjgsNiArMTY1Miw5IEBAIHhyZWYtZmluZC1kZWZpbml0aW9ucwogT3RoZXJ3
aXNlLCBkaXNwbGF5IHRoZSBsaXN0IG9mIHRoZSBwb3NzaWJsZSBkZWZpbml0aW9ucyBpbiBh
CiBidWZmZXIgd2hlcmUgdGhlIHVzZXIgY2FuIHNlbGVjdCBmcm9tIHRoZSBsaXN0LgogCitT
ZWUgYWxzbyBgeHJlZi1uYXZpZ2F0aW9uLWRpc3BsYXktd2luZG93LWFjdGlvbicgd2hpY2gg
Y2FuIGNoYW5nZQordGhlIGRlc3RpbmF0aW9uIHdpbmRvdy4KKwogVXNlIFxcW3hyZWYtZ28t
YmFja10gdG8gcmV0dXJuIGJhY2sgdG8gd2hlcmUgeW91IGludm9rZWQgdGhpcyBjb21tYW5k
LiIKICAgKGludGVyYWN0aXZlIChsaXN0ICh4cmVmLS1yZWFkLWlkZW50aWZpZXIgIkZpbmQg
ZGVmaW5pdGlvbnMgb2Y6ICIpKSkKICAgKHhyZWYtLWZpbmQtZGVmaW5pdGlvbnMgaWRlbnRp
ZmllciBuaWwpKQo=

--------------Z9fU50jbjwxWhl0wi9GfwtDc--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 14 Nov 2024 22:29:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 14 17:29:23 2024
Received: from localhost ([127.0.0.1]:47631 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tBiL5-0007lK-B3
	for submit <at> debbugs.gnu.org; Thu, 14 Nov 2024 17:29:23 -0500
Received: from lists.gnu.org ([209.51.188.17]:49340)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1tBiL3-0007lA-Cq
 for submit <at> debbugs.gnu.org; Thu, 14 Nov 2024 17:29:22 -0500
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 <dmitry@HIDDEN>) id 1tBiL2-00044m-Ts
 for bug-gnu-emacs@HIDDEN; Thu, 14 Nov 2024 17:29:21 -0500
Received: from fhigh-a7-smtp.messagingengine.com ([103.168.172.158])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <dmitry@HIDDEN>) id 1tBiL1-0004nK-4P
 for bug-gnu-emacs@HIDDEN; Thu, 14 Nov 2024 17:29:20 -0500
Received: from phl-compute-07.internal (phl-compute-07.phl.internal
 [10.202.2.47])
 by mailfhigh.phl.internal (Postfix) with ESMTP id C421C1140169
 for <bug-gnu-emacs@HIDDEN>; Thu, 14 Nov 2024 17:29:17 -0500 (EST)
Received: from phl-mailfrontend-02 ([10.202.2.163])
 by phl-compute-07.internal (MEProxy); Thu, 14 Nov 2024 17:29:17 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :content-type:content-type:date:date:from:from:in-reply-to
 :message-id:mime-version:reply-to:subject:subject:to:to; s=fm2;
 t=1731623357; x=1731709757; bh=sWN7c35y+cTrnkmyKqSiDY4S0+onhcT2
 OT9SWhzLI6U=; b=if6mk4eanxjnVFj/FsOLjm21PgA0Bjqud3DF2mElhY8YQ1La
 aj6qViZQYdoJzFJtUW6q5nhrR61ePMqohkIKYDaMELgpFQEAvva+KZLLHF44lvWI
 2QF+/yjMCsNwNMS4rfP3HbJ8WlzxTnORVPB4j6RiCSn4HpR9KoTGZhcbVGmgs8p5
 OezCjGUHEGX/BCjt1o7j6mpRGI8Xq3Ci3ZpwIdnmuTBvU4xa2eRyusN+oYAfeRvi
 8AnoIAFMHGfktOXFxZTk3FkdZ7AqsjF5YDCuH36M5qZhRilvVX0AUZr8FVgf6n7h
 hKKQ7na+uws4m8pSss3Y3jFbyXVUEgCYZ4fl2w==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-type:content-type:date:date
 :feedback-id:feedback-id:from:from:in-reply-to:message-id
 :mime-version:reply-to:subject:subject:to:to:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1731623357; x=
 1731709757; bh=sWN7c35y+cTrnkmyKqSiDY4S0+onhcT2OT9SWhzLI6U=; b=e
 u4CBXtF7LMeGpPK1dDdKPXu2IADeWvmVMGvps346oHZS3LXmhbfm0eZ9E05d1qgE
 sgfMU1UzObFvlY3qAasFxyJhoU1euggWXFxuii/+N4AlG7l7PKMy+4gMpJ/nxnCv
 v/xN+QvXg9ferzjQye7zBqsCZkOeflxsbmsicOCMJin3cXAF1tl26z8RZw2PEW2F
 FNgcrsudLNhJhPDiSo3k/ybRjuRrvWqeJ6uU9FFqz1SziKbiPxGBeBONYcGWr4t7
 3zOOmyhATbkkm9Hcx2vkTMhMFF+dUszP+onWqIpR5+a+OOzfFx3YpdQzR0auijw1
 LYPKIqpZNCcduVm9uC4hg==
X-ME-Sender: <xms:vXk2Z5Z-ZiEUt27reD0avUh50GzroaghOt_hUj6cy8AspK1-FAce_Q>
 <xme:vXk2ZwbGnFzpw9N-VnEvZ_n0u2Oz2SwblPRoCvKLVRP5vkh0cqTCwjvcuQinMQahr
 SajRcHgq769aL1Hu5s>
X-ME-Received: <xmr:vXk2Z78MkgEhYwxlx1jbf40ZUISxPCAu537pk5t8nXNjDmKa53BhZrK_Qr76febOzg>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrvddvgdduiedtucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu
 rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpegtkfffgg
 gfvffhufesmhdtreertddvjeenucfhrhhomhepffhmihhtrhihucfiuhhtohhvuceoughm
 ihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtthgvrhhnpedvkeeuveeiveeike
 etieefffeghfekiefhteetteehueeivdduhefgvdegtdfhheenucffohhmrghinhepghhi
 thhhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh
 hfrhhomhepughmihhtrhihsehguhhtohhvrdguvghvpdhnsggprhgtphhtthhopedupdhm
 ohguvgepshhmthhpohhuthdprhgtphhtthhopegsuhhgqdhgnhhuqdgvmhgrtghssehgnh
 hurdhorhhg
X-ME-Proxy: <xmx:vXk2Z3pzmokTwGrpvAFhi_2TYq5sHQLDDOW4WH7MxppFOTuDhB6xFQ>
 <xmx:vXk2Z0qLPtfaqLigYy6jMeJ7M1Jnp6C8GJ4ETn7n-SS50O_O5_pHpA>
 <xmx:vXk2Z9Rm5OvH-42-5yTwUumQKLshcMecyWrAwWjrsYz0i3te43x3CQ>
 <xmx:vXk2Z8rRr7oui4lNbXacnOtfJnsAPXwZuneVZz88AVoYLZeRtWug6w>
 <xmx:vXk2ZxC0mjzbhoZ9s0KRE-DajhvG0Nx2b_bNvZGm_0CSodUmSoi7YS9j>
Feedback-ID: i07de48aa:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA for
 <bug-gnu-emacs@HIDDEN>; Thu, 14 Nov 2024 17:29:16 -0500 (EST)
Content-Type: multipart/mixed; boundary="------------TK2df2p86AVDkmxwb70TDdq0"
Message-ID: <dfc132c1-2b1c-4c82-a996-098d83b31e8d@HIDDEN>
Date: Fri, 15 Nov 2024 00:29:14 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-US
To: bug-gnu-emacs@HIDDEN
From: Dmitry Gutov <dmitry@HIDDEN>
Subject: [PATCH] New option xref-navigation-display-window-action
Received-SPF: pass client-ip=103.168.172.158; envelope-from=dmitry@HIDDEN;
 helo=fhigh-a7-smtp.messagingengine.com
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 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_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001,
 RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.6 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.6 (--)

This is a multi-part message in MIME format.
--------------TK2df2p86AVDkmxwb70TDdq0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

X-Debbugs-Cc: Juri Linkov <juri@HIDDEN>

This adds a capability to customize the destination window selection 
logic for navigation (xref-find-definitions, xref-go-back, 
xref-go-forward) by allowing a user-supplied display window function.

Inspired by the Merlin package and its user option 
merlin-locate-in-new-window 
(https://github.com/ocaml/merlin/blob/a36f42a5b181d0c9cc84174e8eb241b11eeabc0f/emacs/merlin.el#L177C12-L177C39) 
- where the value 'diff' uses a different window if the destination is 
in an file different from the current one.

With the attached patch the customization looks a bit noisier though:

   (setq xref-navigation-display-window-action
         '(display-buffer-reuse-window))

^ This makes it try to reuse an existing window and fall back to 
pop-to-window, but the effect is similar to what's described above.

Comments welcome.
--------------TK2df2p86AVDkmxwb70TDdq0
Content-Type: text/x-patch; charset=UTF-8;
 name="xref-navigation-display-window-action.diff"
Content-Disposition: attachment;
 filename="xref-navigation-display-window-action.diff"
Content-Transfer-Encoding: base64

ZGlmZiAtLWdpdCBhL2xpc3AvcHJvZ21vZGVzL3hyZWYuZWwgYi9saXNwL3Byb2dtb2Rlcy94
cmVmLmVsCmluZGV4IGNjMDZlMDZlZjc4Li42NzBlODBlYTQwYiAxMDA2NDQKLS0tIGEvbGlz
cC9wcm9nbW9kZXMveHJlZi5lbAorKysgYi9saXNwL3Byb2dtb2Rlcy94cmVmLmVsCkBAIC00
MzEsNiArNDMxLDIxIEBAIHhyZWYtYXV0by1qdW1wLXRvLWZpcnN0LXhyZWYKICAgOnZlcnNp
b24gIjI4LjEiCiAgIDpwYWNrYWdlLXZlcnNpb24gJyh4cmVmIC4gIjEuMi4wIikpCiAKKyhk
ZWZjdXN0b20geHJlZi1uYXZpZ2F0aW9uLWRpc3BsYXktd2luZG93LWFjdGlvbiBuaWwKKyAg
IldoZW4gbm9uLW5pbCwgdGhlIGRpc3BsYXkgYWN0aW9uIHRvIHVzZSBmb3IgbmF2aWdhdGlv
biBjb21tYW5kcy4KKworVGhlIHZhbHVlIHNob3VsZCBiZSBuaWwgb3IgYSBidWZmZXIgZGlz
cGxheSBhY3Rpb24gbGlrZSBkZXNjcmliZWQgaW4KK2RvY3N0cmluZyBmb3IgYGRpc3BsYXkt
YnVmZmVyJy4KKworVGhpcyBkb2VzIG5vdCBhZmZlY3QgY29tbWFuZHMgdGhhdCBzcGVjaWZ5
IHRoZSBhY3Rpb24gZXhwbGljaXRseSwKK3N1Y2ggYXMgYHhyZWYtZmluZC1kZWZpbml0aW9u
cy1vdGhlci13aW5kb3cnLiIKKyAgOnR5cGUgJyhjaG9pY2UgKGNvbnN0IDp0YWcgIlVzZSBz
ZWxlY3RlZCB3aW5kb3ciIG5pbCkKKyAgICAgICAgICAgICAgICAgKGNvbnN0IDp0YWcgIlJl
dXNlIHdpbmRvdyBzaG93aW5nIGRlc3RpbmF0aW9uIG9yIHVzZSBhbm90aGVyIgorICAgICAg
ICAgICAgICAgICAgICAgICAgKGRpc3BsYXktYnVmZmVyLXJldXNlLXdpbmRvdykpCisgICAg
ICAgICAgICAgICAgIGRpc3BsYXktYnVmZmVyLS1hY3Rpb24tY3VzdG9tLXR5cGUpCisgIDp2
ZXJzaW9uICIzMS4xIgorICA6cGFja2FnZS12ZXJzaW9uICcoeHJlZiAuICIxLjguMCIpKQor
CiAoZGVmY3VzdG9tIHhyZWYtaGlzdG9yeS1zdG9yYWdlICMneHJlZi1nbG9iYWwtaGlzdG9y
eQogICAiRnVuY3Rpb24gdGhhdCByZXR1cm5zIHhyZWYgaGlzdG9yeS4KIApAQCAtNTEzLDYg
KzUyOCwxMSBAQCB4cmVmLXB1c2gtbWFya2VyLXN0YWNrCiA7OzsjIyNhdXRvbG9hZAogKGRl
ZmluZS1vYnNvbGV0ZS1mdW5jdGlvbi1hbGlhcyAneHJlZi1wb3AtbWFya2VyLXN0YWNrICMn
eHJlZi1nby1iYWNrICIyOS4xIikKIAorKGRlZnVuIHhyZWYtLXN3aXRjaC10by1idWZmZXIg
KGJ1ZikKKyAgKGlmIHhyZWYtbmF2aWdhdGlvbi1kaXNwbGF5LXdpbmRvdy1hY3Rpb24KKyAg
ICAgIChwb3AtdG8tYnVmZmVyIGJ1ZiB4cmVmLW5hdmlnYXRpb24tZGlzcGxheS13aW5kb3ct
YWN0aW9uKQorICAgIChzd2l0Y2gtdG8tYnVmZmVyIGJ1ZikpKQorCiA7OzsjIyNhdXRvbG9h
ZAogKGRlZnVuIHhyZWYtZ28tYmFjayAoKQogICAiR28gYmFjayB0byB0aGUgcHJldmlvdXMg
cG9zaXRpb24gaW4geHJlZiBoaXN0b3J5LgpAQCAtNTIzLDggKzU0Myw4IEBAIHhyZWYtZ28t
YmFjawogICAgICAgICAodXNlci1lcnJvciAiQXQgc3RhcnQgb2YgeHJlZiBoaXN0b3J5IikK
ICAgICAgIChsZXQgKChtYXJrZXIgKHBvcCAoY2FyIGhpc3RvcnkpKSkpCiAgICAgICAgICh4
cmVmLS1wdXNoLWZvcndhcmQgKHBvaW50LW1hcmtlcikpCi0gICAgICAgIChzd2l0Y2gtdG8t
YnVmZmVyIChvciAobWFya2VyLWJ1ZmZlciBtYXJrZXIpCi0gICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAodXNlci1lcnJvciAiVGhlIG1hcmtlZCBidWZmZXIgaGFzIGJlZW4gZGVs
ZXRlZCIpKSkKKyAgICAgICAgKHhyZWYtLXN3aXRjaC10by1idWZmZXIgKG9yIChtYXJrZXIt
YnVmZmVyIG1hcmtlcikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1
c2VyLWVycm9yICJUaGUgbWFya2VkIGJ1ZmZlciBoYXMgYmVlbiBkZWxldGVkIikpKQogICAg
ICAgICAoZ290by1jaGFyIChtYXJrZXItcG9zaXRpb24gbWFya2VyKSkKICAgICAgICAgKHNl
dC1tYXJrZXIgbWFya2VyIG5pbCBuaWwpCiAgICAgICAgIChydW4taG9va3MgJ3hyZWYtYWZ0
ZXItcmV0dXJuLWhvb2spKSkpKQpAQCAtNTM4LDggKzU1OCw4IEBAIHhyZWYtZ28tZm9yd2Fy
ZAogICAgICAgICAodXNlci1lcnJvciAiQXQgZW5kIG9mIHhyZWYgaGlzdG9yeSIpCiAgICAg
ICAobGV0ICgobWFya2VyIChwb3AgKGNkciBoaXN0b3J5KSkpKQogICAgICAgICAoeHJlZi0t
cHVzaC1iYWNrd2FyZCAocG9pbnQtbWFya2VyKSkKLSAgICAgICAgKHN3aXRjaC10by1idWZm
ZXIgKG9yIChtYXJrZXItYnVmZmVyIG1hcmtlcikKLSAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICh1c2VyLWVycm9yICJUaGUgbWFya2VkIGJ1ZmZlciBoYXMgYmVlbiBkZWxldGVk
IikpKQorICAgICAgICAoeHJlZi0tc3dpdGNoLXRvLWJ1ZmZlciAob3IgKG1hcmtlci1idWZm
ZXIgbWFya2VyKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHVzZXIt
ZXJyb3IgIlRoZSBtYXJrZWQgYnVmZmVyIGhhcyBiZWVuIGRlbGV0ZWQiKSkpCiAgICAgICAg
IChnb3RvLWNoYXIgKG1hcmtlci1wb3NpdGlvbiBtYXJrZXIpKQogICAgICAgICAoc2V0LW1h
cmtlciBtYXJrZXIgbmlsIG5pbCkKICAgICAgICAgKHJ1bi1ob29rcyAneHJlZi1hZnRlci1y
ZXR1cm4taG9vaykpKSkpCkBAIC02MTIsNyArNjMyLDcgQEAgeHJlZi1wb3AtdG8tbG9jYXRp
b24KICAgICAgICAgICAgICAgICAgICAoeHJlZi1sb2NhdGlvbi1tYXJrZXIgKHhyZWYtaXRl
bS1sb2NhdGlvbiBpdGVtKSkpKQogICAgICAgICAgKGJ1ZiAobWFya2VyLWJ1ZmZlciBtYXJr
ZXIpKSkKICAgICAoY2wtZWNhc2UgYWN0aW9uCi0gICAgICAoKG5pbCkgIChzd2l0Y2gtdG8t
YnVmZmVyIGJ1ZikpCisgICAgICAoKG5pbCkgICh4cmVmLS1zd2l0Y2gtdG8tYnVmZmVyIGJ1
ZikpCiAgICAgICAod2luZG93IChwb3AtdG8tYnVmZmVyIGJ1ZiB0KSkKICAgICAgIChmcmFt
ZSAgKGxldCAoKHBvcC11cC1mcmFtZXMgdCkpIChwb3AtdG8tYnVmZmVyIGJ1ZiB0KSkpKQog
ICAgICh4cmVmLS1nb3RvLWNoYXIgbWFya2VyKSkKQEAgLTY4Myw2ICs3MDMsOSBAQCB4cmVm
LS1zaG93LXBvcy1pbi1idWYKICAgICAgICAgICAgICAgICAoKGVxIHhyZWYtLW9yaWdpbmFs
LXdpbmRvdy1pbnRlbnQgJ3dpbmRvdykKICAgICAgICAgICAgICAgICAgYCgoeHJlZi0tZGlz
cGxheS1idWZmZXItaW4tb3RoZXItd2luZG93KQogICAgICAgICAgICAgICAgICAgICh3aW5k
b3cgLiAseHJlZi0tb3JpZ2luYWwtd2luZG93KSkpCisgICAgICAgICAgICAgICAgKHhyZWYt
bmF2aWdhdGlvbi1kaXNwbGF5LXdpbmRvdy1hY3Rpb24KKyAgICAgICAgICAgICAgICAgYCgs
eHJlZi1uYXZpZ2F0aW9uLWRpc3BsYXktd2luZG93LWFjdGlvbgorICAgICAgICAgICAgICAg
ICAgICh3aW5kb3cgLiAseHJlZi0tb3JpZ2luYWwtd2luZG93KSkpCiAgICAgICAgICAgICAg
ICAgKChhbmQKICAgICAgICAgICAgICAgICAgICh3aW5kb3ctbGl2ZS1wIHhyZWYtLW9yaWdp
bmFsLXdpbmRvdykKICAgICAgICAgICAgICAgICAgIChvciAobm90ICh3aW5kb3ctZGVkaWNh
dGVkLXAgeHJlZi0tb3JpZ2luYWwtd2luZG93KSkKQEAgLTE2MjgsNiArMTY1MSw5IEBAIHhy
ZWYtZmluZC1kZWZpbml0aW9ucwogT3RoZXJ3aXNlLCBkaXNwbGF5IHRoZSBsaXN0IG9mIHRo
ZSBwb3NzaWJsZSBkZWZpbml0aW9ucyBpbiBhCiBidWZmZXIgd2hlcmUgdGhlIHVzZXIgY2Fu
IHNlbGVjdCBmcm9tIHRoZSBsaXN0LgogCitTZWUgYWxzbyBgeHJlZi1uYXZpZ2F0aW9uLWRp
c3BsYXktd2luZG93LWFjdGlvbicgd2hpY2ggY2FuIGNoYW5nZQordGhlIGRlc3RpbmF0aW9u
IHdpbmRvdy4KKwogVXNlIFxcW3hyZWYtZ28tYmFja10gdG8gcmV0dXJuIGJhY2sgdG8gd2hl
cmUgeW91IGludm9rZWQgdGhpcyBjb21tYW5kLiIKICAgKGludGVyYWN0aXZlIChsaXN0ICh4
cmVmLS1yZWFkLWlkZW50aWZpZXIgIkZpbmQgZGVmaW5pdGlvbnMgb2Y6ICIpKSkKICAgKHhy
ZWYtLWZpbmQtZGVmaW5pdGlvbnMgaWRlbnRpZmllciBuaWwpKQo=

--------------TK2df2p86AVDkmxwb70TDdq0--




Acknowledgement sent to Dmitry Gutov <dmitry@HIDDEN>:
New bug report received and forwarded. Copy sent to juri@HIDDEN, bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to juri@HIDDEN, bug-gnu-emacs@HIDDEN:
bug#74361; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 13 Feb 2025 10:15:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.