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: Sun, 27 Dec 2020 20:53:14 +0200 Message-ID: References: <87k0up68e4.fsf@mail.linkov.net> <834kkhtaxm.fsf@gnu.org> <874kkgswg2.fsf@mail.linkov.net> <83v9cwsct7.fsf@gnu.org> <87k0tab3y0.fsf@mail.linkov.net> <83pn31rg5a.fsf@gnu.org> <877dp9ycq6.fsf@mail.linkov.net> <837dp8r250.fsf@gnu.org> <4a0c8870-e2e7-97c7-5808-afa704ebee13@yandex.ru> <83mty4pj0u.fsf@gnu.org> <1d9bf365-224f-bb41-d79c-e22d110b41e3@yandex.ru> <83eejgpbs8.fsf@gnu.org> <9fa9d286-4497-baa9-15cd-1ef31651781f@yandex.ru> <83a6u4p8nz.fsf@gnu.org> <3c740ee3-cc1c-e2e3-d540-7be0b37d91ef@yandex.ru> <83pn2znloa.fsf@gnu.org> <87pn2zlzy3.fsf@mail.linkov.net> <83k0t7ndbs.fsf@gnu.org> <87wnx6z1gs.fsf@mail.linkov.net> <83a6u2nm8o.fsf@gnu.org> <87eejbbfm9.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="357"; 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 Cc: joaotavora@gmail.com, 44611@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 27 19:54:13 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 1ktbBF-000AaO-22 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 27 Dec 2020 19:54:13 +0100 Original-Received: from localhost ([::1]:35428 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ktbBE-0000kc-4E for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 27 Dec 2020 13:54:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33332) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ktbB4-0000jK-9e for bug-gnu-emacs@gnu.org; Sun, 27 Dec 2020 13:54:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50198) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ktbB4-0007bp-0f for bug-gnu-emacs@gnu.org; Sun, 27 Dec 2020 13:54:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ktbB3-0000av-SY for bug-gnu-emacs@gnu.org; Sun, 27 Dec 2020 13:54:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 27 Dec 2020 18:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44611 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed Original-Received: via spool by 44611-submit@debbugs.gnu.org id=B44611.16090952052239 (code B ref 44611); Sun, 27 Dec 2020 18:54:01 +0000 Original-Received: (at 44611) by debbugs.gnu.org; 27 Dec 2020 18:53:25 +0000 Original-Received: from localhost ([127.0.0.1]:33511 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ktbAT-0000a3-J2 for submit@debbugs.gnu.org; Sun, 27 Dec 2020 13:53:25 -0500 Original-Received: from mail-wr1-f54.google.com ([209.85.221.54]:43105) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ktbAR-0000Zp-Oh for 44611@debbugs.gnu.org; Sun, 27 Dec 2020 13:53:24 -0500 Original-Received: by mail-wr1-f54.google.com with SMTP id y17so8670760wrr.10 for <44611@debbugs.gnu.org>; Sun, 27 Dec 2020 10:53:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=LPiyoPQfSTWKdYqu6MAvKioet0oCimV86n1gWZwwxr0=; b=nRcT6QBB9UaAmBmZUZzuxhygvT+TJ8Uesa4zHqvh8gIwE7VnmL6T0Upzhuhz7IwMBZ yttI9aFXnThLG7ZY+u8tCxQaNMnJsevpDk0k3cHb1aulo9hBKtTcR4cQ2GsgSjKU/8/W Qi3PreEsXKV7LD4gwpcOt79hpiTMzrwvsjyyyfTyv74DW6wNfhbRYO10xyQuITgUdCsx FOscfgqeSSSBEs6AdAJx2EWP9seeXCfMlcgM1K056IBVxmNu2j2N+IAHfCFkAAZWTG2o cPFMWoSEj6zJcQ8YfLq3esTwPDQsLa0ExyvfENrbEUYJQrgqCBDhY4FRVqW3Q/AfwH3e Zp7g== 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:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=LPiyoPQfSTWKdYqu6MAvKioet0oCimV86n1gWZwwxr0=; b=jT319+y4xrT0w+VNLn/kqF2pGMo45gnQf6I4dhpVYcRBf/qiWisCtaMP6AapH3MLqu MHFQJuj/PZjscr+FRfZo3iKvu9RCo/224XXYQ8YAoRsp+O7BRtdYz2jTuLGorgdyXAgL rhFDiq3gXbNM8nU0Zl1LFwVUJDBceDLlJja2GxOMYAcfbUd8sWYrl2+B7fKj3QaCxv+P QXf++7kyIXOLiP9L6Vf5DmW5drOSKzDZzTnd+3Hz1DZnu2wyBlDtANT+w3/x9LvirUx6 SLka4zcEXz5VeNbOyJ9KEvNe+jSZ1yFvQQ6wpb7sXoRXvgL1G95zmlSZavUGQz5YmcMq YalA== X-Gm-Message-State: AOAM532bkKSbnjOJRDoeaTvQiouIOLwcFEzVD1LQ73z4VuXPIWYVparY gZEf1Wf2xCPXv/EGOT9FLhanVDlBG1C6hg== X-Google-Smtp-Source: ABdhPJyA3pR1zMOPacUgFir1G0RcugXM/KDEJtdNzjU90wTCuyEMvSLbmgr26smc14Zbh7zbRRcxpQ== X-Received: by 2002:adf:8185:: with SMTP id 5mr46404663wra.44.1609095197592; Sun, 27 Dec 2020 10:53:17 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id b7sm46274842wru.33.2020.12.27.10.53.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Dec 2020 10:53:16 -0800 (PST) In-Reply-To: <87eejbbfm9.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:196815 Archived-At: On 27.12.2020 18:22, Juri Linkov wrote: >> On the subject of grep-mode, it could have a similar command introduced >> too, for situations when you only needed to find one occurrence, to jump to >> it and quit the window. > This is what I already successfully use: > > diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el > index d2293151c7..08c44dcb25 100644 > --- a/lisp/progmodes/compile.el > +++ b/lisp/progmodes/compile.el > @@ -2572,11 +2572,15 @@ compile-goto-error > (or (compilation-buffer-p (current-buffer)) > (error "Not in a compilation buffer")) > (compilation--ensure-parse (point)) > + (let ((window (posn-window (event-end event)))) > (if (get-text-property (point) 'compilation-directory) > (dired-other-window > (car (get-text-property (point) 'compilation-directory))) > (setq compilation-current-error (point)) > - (next-error-internal))) > + (next-error-internal)) > + (when current-prefix-arg > + (with-selected-window window > + (quit-window))))) So... if others like it, we could keep just this binding (C-u RET) for "quit the window and go to location", in both Grep and Xref.