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#50067: Context menus Date: Sun, 5 Sep 2021 03:55:43 +0300 Message-ID: References: <83sfz639lh.fsf@gnu.org> <83eeanyrm5.fsf@gnu.org> <4BC1074D-DE75-4303-8385-B70BAACFCDA0@acm.org> <83czq7youc.fsf@gnu.org> <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@yandex.ru> <83y28twahy.fsf@gnu.org> <7af845e0-1f19-61fc-65e0-b23fac3927aa@yandex.ru> <83v93wx5ny.fsf@gnu.org> <83r1ekwfrd.fsf@gnu.org> <871r6ki6aw.fsf@mail.linkov.net> <838s0otl6b.fsf@gnu.org> <0273902a-1f93-c643-da26-ab314d6d2db4@yandex.ru> <8335qvs8re.fsf@gnu.org> <835yvnkuwb.fsf@gnu.org> <87wno26qlo.fsf@mail.linkov.net> <87fsupr1rv.fsf@mail.linkov.net> <3656c47f-49e2-1a90-ce2f-12b8899742aa@yandex.ru> <87czps95tt.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="24096"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 Cc: alan@idiocy.org, mattiase@acm.org, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org To: Juri Linkov , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 05 02:56:41 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 1mMgSe-00068w-So for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Sep 2021 02:56:40 +0200 Original-Received: from localhost ([::1]:55104 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mMgSd-0008B7-Cv for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 04 Sep 2021 20:56:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52096) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mMgS3-0008Aw-GQ for bug-gnu-emacs@gnu.org; Sat, 04 Sep 2021 20:56:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37333) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mMgS2-0004Zz-K9 for bug-gnu-emacs@gnu.org; Sat, 04 Sep 2021 20:56:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mMgS2-0000kM-7j for bug-gnu-emacs@gnu.org; Sat, 04 Sep 2021 20:56: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: Sun, 05 Sep 2021 00:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50067 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed Original-Received: via spool by 50067-submit@debbugs.gnu.org id=B50067.16308033532854 (code B ref 50067); Sun, 05 Sep 2021 00:56:02 +0000 Original-Received: (at 50067) by debbugs.gnu.org; 5 Sep 2021 00:55:53 +0000 Original-Received: from localhost ([127.0.0.1]:48879 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMgRs-0000jy-Rd for submit@debbugs.gnu.org; Sat, 04 Sep 2021 20:55:53 -0400 Original-Received: from mail-wr1-f49.google.com ([209.85.221.49]:39707) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMgRr-0000jm-SK for 50067@debbugs.gnu.org; Sat, 04 Sep 2021 20:55:52 -0400 Original-Received: by mail-wr1-f49.google.com with SMTP id z4so4148356wrr.6 for <50067@debbugs.gnu.org>; Sat, 04 Sep 2021 17:55:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ka/KD+FOj/MkPKzvCeXVh8qaULqLcv89mM7nXGPh2yM=; b=CTE+xg93t6lELUcrAgTN6YSoGfqgw/75Bn/V7KZT70Hl3SsakyFx6m4PtK4DqRtNHY n9OcqKEO++hf6CHfh7YSZh77yNNIeRtKrejK/Ez+kBohxw8Mt/bkwg/9BFOSpIP4kmXf tQ37TgcHon4pITK8/1133aj5sspk4WZ6o2cHiMivwMW/4/EC4qdZbZ6ib/OisgYqEt26 7Cp6pO6ndAXHFcK+e+4N79DOkgnYN3E0Ye116hVp3zp4suhDbqyDEr7sICCYePozHBL5 pWMF0FzkUcxp0GL4q+eq4x8iO3GRBd+qlxgZgDnOiUgI0PVdqDG1ZJfGIuZ4+SWlB60l mO+A== 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=ka/KD+FOj/MkPKzvCeXVh8qaULqLcv89mM7nXGPh2yM=; b=VoPWrmF2qMNm8VngvW9SI+/Ike437ZfmYCwfuccfMFfxBIF0Ouy5a39F7HNdUHqx9V r4shIBTLrPmD91geMyyxwwxMds6TE3T8alxtJY+g9AEqHrSjiO4xwLl6wQvUycqHWAWC 90o+xiOMVMPBWaxrVXI/vnDig5HwVo/QHBH56srqGWS7jbPWwMu1PrGwKAepUpM+f/Ai eIMz/mRMvqzeVMkzvGBLWXdgKqHT3d4/WLQ709k4BN9Ri1l1Ties3Ob21AZ8dIEM/XYo Q6vqLf7j3L0AUEHQtt6Ac9sPzY/O3/HieOmtzSJUaKl7zYk12Al81rn8ZcABXh1jOhaF zY/Q== X-Gm-Message-State: AOAM530aSGgEmcKk3x/cuhknUftUenzm1+3RVVxzXSTJVzLE+HHkkUIQ qeWl2pf1RwI49A2bu2vxXPE3yW7B57o= X-Google-Smtp-Source: ABdhPJwlil8vxHm2fp4ZO/vdRBAzdXcJ8Bu5Hq0mwvMy7TBCznVuIUNglZuhZXc1yJzGmtsh1822vw== X-Received: by 2002:adf:d1c3:: with SMTP id b3mr5981375wrd.286.1630803345864; Sat, 04 Sep 2021 17:55:45 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id k16sm3565840wrx.87.2021.09.04.17.55.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 04 Sep 2021 17:55:45 -0700 (PDT) In-Reply-To: <87czps95tt.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:213444 Archived-At: On 01.09.2021 10:08, Juri Linkov wrote: >>> so the new option could provide at least these choices: >>> 1. 'jump': Jump to the first location by selecting its window; >>> 2. 'show': Show the first item, but keep focus in the Xref window; >>> 3. 'move': Move point to the first item in the Xref window >>> without showing it (maybe this should be the default behavior). >> >> We can do that. Do you expect to be using more than 1 of these values >> yourself, or is it just for completeness? > > A good indication that all values are needed is that I still can't decide > which to use, so it would be possible to switch to another value when > one of them does too much or too little. > >> Regarding 3 as default, it makes a certain sense, but then you won't be >> able to iterate through all locations with just 'n'. You'd have to press >> 'C-o' and then 'n', 'n', 'n'... > > I agree, it should not be the default. > >>> To be able to add later a similar variable for xref-find-references, >>> the new variable for xref-find-definitions could be named accordingly >>> with a name that refers to xref-find-definitions, for example, >>> xref-find-definitions-auto-jump. Then later xref-find-references-auto-jump. >> >> I think the "other" variable would be called something with the word >> "xrefs", not "references", and apply to other commands as well, such as >> xref-find-apropos and project-find-regexp. >> >> So the proposed scheme would not quite work. Maybe like this instead? >> >> - xref-auto-jump-to-first-definition >> - xref-auto-jump-to-first-. Or just >> xref-auto-jump-to-first. > > grep/compilation already supports the value 'jump' by non-nil > 'compilation-auto-jump-to-first-error', and the value 'move' when > 'compilation-scroll-output' is customized to 'first-error'. > > But I think for xref still two separate options are needed > xref-auto-jump-to-first-definition for xref-find-definitions, and > xref-auto-jump-to-first-xref for other more grep-like xref commands. It's now in master: two variables, three methods of behavior for each. Let me know if you see any problems.