From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#74361: [PATCH] New option xref-navigation-display-window-action Date: Thu, 21 Nov 2024 09:34:39 +0200 Organization: LINKOV.NET Message-ID: <87frnl9h0w.fsf@mail.linkov.net> References: <87msi1ueb0.fsf@mail.linkov.net> <4256f446-e11b-450c-b455-131cb75acab0@gutov.dev> <871pzbj8mq.fsf@mail.linkov.net> <87sernhxoa.fsf@mail.linkov.net> <875xoi4cei.fsf@mail.linkov.net> <2ef677aa-1433-4aaa-92a5-c600774dd457@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30326"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) Cc: martin rudalics , 74361@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 21 08:46:11 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tE1tD-0007lP-7B for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 21 Nov 2024 08:46:11 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tE1t5-0000Tc-55; Thu, 21 Nov 2024 02:46:03 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tE1t4-0000T6-2e for bug-gnu-emacs@gnu.org; Thu, 21 Nov 2024 02:46:02 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tE1t3-0000uL-Qg for bug-gnu-emacs@gnu.org; Thu, 21 Nov 2024 02:46:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=E8uhPOFGbsTLC16OGDfe6eD/NvgmSGV+NJ7hjak9ZtY=; b=M1hJpDmTHCS2NNN3Yb88vABaTJBAYng6Gd7DFL4SgyTZzmNeLiHbJ8Llb7dwnEYsLc8T4n6TRNCB/UYKs+kxTaqS+lKaJiA2oTvV9XIFXNIPquAvvfGMP33FDBAt5QhNAGmV8vOAtJYMzAvcx6h/1EsK+Ju5qegGgbfDSCsfXlKxFxZfNUXBmEaRyVkJFigBES2cw5UsSILpgggdWJ/ADeBN5i/ieRlO1oKa2LAmHJBMPdKJGjLnrhw57UQX70a9f/9eFyVEPwCUCBgDcTn0Xn/Eb2DGieZxBNR/4Ffkve+VhFG5Fa1iELXTSMxIm6IQw21ReSZiXoMe0N2cByQYNg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tE1t3-0003j0-K8 for bug-gnu-emacs@gnu.org; Thu, 21 Nov 2024 02:46:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Nov 2024 07:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74361 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 74361-submit@debbugs.gnu.org id=B74361.173217512314255 (code B ref 74361); Thu, 21 Nov 2024 07:46:01 +0000 Original-Received: (at 74361) by debbugs.gnu.org; 21 Nov 2024 07:45:23 +0000 Original-Received: from localhost ([127.0.0.1]:48930 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tE1sQ-0003hq-UV for submit@debbugs.gnu.org; Thu, 21 Nov 2024 02:45:23 -0500 Original-Received: from relay5-d.mail.gandi.net ([217.70.183.197]:43309) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tE1sP-0003hd-MF for 74361@debbugs.gnu.org; Thu, 21 Nov 2024 02:45:22 -0500 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 6577C1C0003; Thu, 21 Nov 2024 07:44:53 +0000 (UTC) In-Reply-To: <2ef677aa-1433-4aaa-92a5-c600774dd457@gutov.dev> (Dmitry Gutov's message of "Wed, 20 Nov 2024 21:12:36 +0200") X-GND-Sasl: juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:295711 Archived-At: >> 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(# ((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'.