From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#44611: Prefix arg for xref-goto-xref Date: Fri, 13 Nov 2020 13:20:41 +0200 Message-ID: <99772eb6-5a4e-7cf6-259d-0e9429e6bf97@yandex.ru> References: <87k0up68e4.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2793"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 To: Juri Linkov , 44611@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 13 12:21:26 2020 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 1kdX8w-0000bm-Ad for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 13 Nov 2020 12:21:26 +0100 Original-Received: from localhost ([::1]:58370 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kdX8v-0005je-Cz for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 13 Nov 2020 06:21:25 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47246) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdX8Z-0005hW-6S for bug-gnu-emacs@gnu.org; Fri, 13 Nov 2020 06:21:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35405) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kdX8Y-00021d-TR for bug-gnu-emacs@gnu.org; Fri, 13 Nov 2020 06:21:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kdX8Y-0001rT-QK for bug-gnu-emacs@gnu.org; Fri, 13 Nov 2020 06:21:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 Nov 2020 11:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44611 X-GNU-PR-Package: emacs Original-Received: via spool by 44611-submit@debbugs.gnu.org id=B44611.16052664547105 (code B ref 44611); Fri, 13 Nov 2020 11:21:02 +0000 Original-Received: (at 44611) by debbugs.gnu.org; 13 Nov 2020 11:20:54 +0000 Original-Received: from localhost ([127.0.0.1]:46949 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdX8P-0001qW-Pd for submit@debbugs.gnu.org; Fri, 13 Nov 2020 06:20:53 -0500 Original-Received: from mail-wm1-f45.google.com ([209.85.128.45]:35279) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdX8L-0001ps-FO for 44611@debbugs.gnu.org; Fri, 13 Nov 2020 06:20:51 -0500 Original-Received: by mail-wm1-f45.google.com with SMTP id w24so8081547wmi.0 for <44611@debbugs.gnu.org>; Fri, 13 Nov 2020 03:20:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=cyNTYN98Z7ecez0ncGc4SUdqcYESSETs3wUFF2S1JdU=; b=XB3a56deiPHO2IyW4lK8vj6kc0Hy67GZZv6vQCbMJMSNJ6ox0zRUPS3+HM9zviunI9 Tz1n1KTE74bTMmLZjzum5/PFkIHMTbJMYQjEFp7t0mXk59r9lBsJgFyksl2fsMDLL7D5 5a5KV84NniqY1l6mWhvozak8zHfECO+9fpN+Y5l5Kp0w3bhFhbBN2kNJ5cwKRJqUu0ea H2ukxMdzMslorTeQbiARqMF7bE6+kTbAz70C1bMI2TL6ZklzA9FWk8V7amAXbBfImru6 luLpzzC9vhp3LElcr9Yiz6HX9wl4XEaFiHLKHvYIz8OICcFCQtSKpOrjHsYq1R7jBCri A/XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=cyNTYN98Z7ecez0ncGc4SUdqcYESSETs3wUFF2S1JdU=; b=VLXTDSQAZHHcesQwLV+UXnTv0LCIM4ly92u0pTuyTTKC7hzc2vOBxH6DfOYJSuMLub KxCUc1NT5FhA2TyALy5PCuQjANS8mkk4rc8nos8IkQi3O1YiMgTECu6NjYjmqXQ7/ByU OwfghC0Tnx9onchz8ropIpPVcwgPLxfEsJT0OPPVc+DXi9q2cgT4SPzLtP/kp733KliG swOxdii71NpNSZtib5KZDkx6NkLt+irHgiNHZArALyopaFP+M4Xzl1iThhhTACWtxTSl B1YLOvDqBL9nBhPTKqZSnPhJewwlfs3gkgpOV+/LBO/ZQBq7xFSAZZBC+T4HE9cElghG LXuw== X-Gm-Message-State: AOAM531MN0236qPZpUSFYGMK535CdtYQ2l+6OQVcLoY/stChMar2aM8J 1Mju1b/3AYAbQEoyesMlX9nz7leXZAH7Mw== X-Google-Smtp-Source: ABdhPJwv455yWK42WYCiw2RpPOgO013PD/p2IWsqYTMc1bPTOALpJgpQq2x0S+bVCdyUb15n5uxONw== X-Received: by 2002:a1c:750b:: with SMTP id o11mr2110318wmc.32.1605266443364; Fri, 13 Nov 2020 03:20:43 -0800 (PST) Original-Received: from [192.168.0.4] ([66.205.71.3]) by smtp.googlemail.com with ESMTPSA id v19sm11104623wrf.40.2020.11.13.03.20.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 13 Nov 2020 03:20:42 -0800 (PST) In-Reply-To: <87k0up68e4.fsf@mail.linkov.net> Content-Language: en-US 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" Xref: news.gmane.io gmane.emacs.bugs:193224 Archived-At: Hi Juri, On 13.11.2020 10:18, Juri Linkov wrote: > I recall endless discussions about xref in the past. > But now I realized that xref-goto-xref just misses > an obvious thing, and nothing more is needed. Sounds promising! > Like e.g. 'quit-window' allows using a prefix argument > to change its behavior by relying on (interactive "P"), > xref-goto-xref should do the same: The proposed change is not quite the same (bury instead of kill), but if it really helps, go ahead. Please also note that instead of 'C-u RET' you can use 'TAB' already: it's bound to xref-quit-and-goto-xref which calls xref-goto-xref with QUIT=t. > diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el > index a1c4c08c26..e1dd6e56bb 100644 > --- a/lisp/progmodes/xref.el > +++ b/lisp/progmodes/xref.el > @@ -600,9 +600,9 @@ xref--item-at-point > > (defun xref-goto-xref (&optional quit) > "Jump to the xref on the current line and select its window. > -Non-interactively, non-nil QUIT means to first quit the *xref* > -buffer." > - (interactive) > +Non-interactively, non-nil QUIT, or interactively, with prefix argument > +means to first quit the *xref* buffer." > + (interactive "P") > (let* ((buffer (current-buffer)) > (xref (or (xref--item-at-point) > (user-error "No reference at point")))