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: Wed, 17 Mar 2021 01:38:10 +0200 Message-ID: <88e10bd7-87cf-dd3a-c08d-cd9a8544c2b3@yandex.ru> References: <87k0up68e4.fsf@mail.linkov.net> <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> <87sg7ponct.fsf@mail.linkov.net> <6511aade-1b6d-7a82-6848-3ccba43a794c@yandex.ru> <87bldkc028.fsf@mail.linkov.net> <871rdzam7q.fsf@mail.linkov.net> <87sg4vgef6.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="1511"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 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 Wed Mar 17 00:40:38 2021 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 1lMJIj-0000Hg-SH for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 17 Mar 2021 00:40:37 +0100 Original-Received: from localhost ([::1]:43710 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMJIi-00046B-Qr for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 16 Mar 2021 19:40:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60980) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMJHC-00039G-Hq for bug-gnu-emacs@gnu.org; Tue, 16 Mar 2021 19:39:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58135) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lMJHC-0002EM-6q for bug-gnu-emacs@gnu.org; Tue, 16 Mar 2021 19:39:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lMJHC-0007KM-2v for bug-gnu-emacs@gnu.org; Tue, 16 Mar 2021 19:39:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 16 Mar 2021 23:39:02 +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.161593790128101 (code B ref 44611); Tue, 16 Mar 2021 23:39:02 +0000 Original-Received: (at 44611) by debbugs.gnu.org; 16 Mar 2021 23:38:21 +0000 Original-Received: from localhost ([127.0.0.1]:41448 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lMJGW-0007JA-Qw for submit@debbugs.gnu.org; Tue, 16 Mar 2021 19:38:21 -0400 Original-Received: from mail-wr1-f52.google.com ([209.85.221.52]:36414) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lMJGV-0007Iy-DM for 44611@debbugs.gnu.org; Tue, 16 Mar 2021 19:38:19 -0400 Original-Received: by mail-wr1-f52.google.com with SMTP id k8so4937wrc.3 for <44611@debbugs.gnu.org>; Tue, 16 Mar 2021 16:38:19 -0700 (PDT) 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=xrsO/UHnElw7RlkdDeP7ByCk39tT95GRw1uYTlGfJUE=; b=ONYPXpFzOEN6D0Jqew9wZTRuet+puwwOGkOWe0eUrVWIBjCQLsjc3aUr4JaEA/OiTh R5X6u6BQ9S/jizpO9H+7JXvjsLpqBbL59jKp8pzWqbr+gzD8TmU+BRWeKejXKR1uOcbs UKjuJ/Gbg7D6ht+Di1IwDCg7jiKjGX8pYVaMPMEX1vr49wGJa5kNMP7TPRB/ARuO2u7q /RoQ0Q8BRmBqkzc54l+uH86xq4A3I011tRLOqSM5K7iWvGT56Gloo+Ytx+k7qvWQfujf UGbkzrvsk1E8K9qg3bcBQcAH0O8/siRcB11FS92LuO200theE73WxMynvFARs+G4bUwH nugA== 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=xrsO/UHnElw7RlkdDeP7ByCk39tT95GRw1uYTlGfJUE=; b=dum4AQFf9QjjwXAloR487zMSgQmSzSe1yTNUvtWW+DNzKcQtHv42EzU62Vpq4xu68X zA1jdjAE8ehZ28sYMmLEMDH+PSFt3+5DoTS5GXkXm//lQ2A5KOSubZBk+QTNzCTUF27X 9rE1KcDhc1vkJKsJJyO5dhIs26CL1aBiCS2yhbZ23spDdLiFKuLRdj0RbT7fTvQe0Nbk Q7eicxBWoO7TzdTOxQes3T7D8iALjJ9BkI8AO85jmhk1vtN1u9eTsu/400FMSBVOKazJ ZwqqMKy436pZVn4ER5mxW6VtluaclqWTWrO5rzGwDCElxwoRkflV0/VZh/p22DjcVRrw Iiiw== X-Gm-Message-State: AOAM5320L/DK1NsGZU+u3CHjN7RpcYsUmxub0rDsGpkmYTbJ87Ofy+PA ULcutETCXIufvnNbPoz4rIcnlPW/ycY= X-Google-Smtp-Source: ABdhPJzwuet+XD7SYtw/Y+48p8I3MZDalpVUt5CPrltsNn5Fn3K6KlldDKmBpWdsnD5wI5UJmiyR0g== X-Received: by 2002:adf:82af:: with SMTP id 44mr1284780wrc.279.1615937893469; Tue, 16 Mar 2021 16:38:13 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id p27sm743712wmi.12.2021.03.16.16.38.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 16 Mar 2021 16:38:12 -0700 (PDT) In-Reply-To: <87sg4vgef6.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:202504 Archived-At: Hi Juri, Sorry for the late response. I was hoping to have made some progress on resolving other issues touched in this thread before answering, but none so far. On 16.03.2021 20:07, Juri Linkov wrote: >> So since 'C-u M-g n' is already taken, an alternative is 'C-0 M-g n'. >> If 'C-0' makes no sense for 'C-0 M-g n', it could be used to close the window. >> Or maybe 'C-0 M-g n' still makes sense, e.g. to redisplay the current location? > > I withdraw this proposal because it's easy to do this in the init file: > > (defun next-error-quit-window () > (when (and (eq current-prefix-arg 0) > (not (eq next-error-last-buffer (current-buffer)))) > (let ((window (get-buffer-window next-error-last-buffer))) > (when (window-live-p window) > (with-selected-window window > (quit-restore-window window)))))) > > (add-hook 'next-error-hook 'next-error-quit-window) Since next-error-hook is a defcustom, perhaps we can/should include this function as one of the advertised values in :type? Even if we keep the list nil by default. >> BTW, here are the commands that work like TAB in grep-mode. >> I propose to install this patch, so at least users could bind them >> in own init files: > > Now pushed to master. Looks good, of course.