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.devel Subject: Re: Adding support for xref jumping to headers/interfaces Date: Mon, 6 Mar 2023 16:09:40 +0200 Message-ID: References: <1587ddb6-f631-0890-965a-c7acb5729fa6@yandex.ru> 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="13109"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Cc: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= , Helmut Eller , emacs-devel To: John Yates Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Mar 06 15:11:04 2023 Return-path: Envelope-to: ged-emacs-devel@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 1pZBYN-0003HE-3v for ged-emacs-devel@m.gmane-mx.org; Mon, 06 Mar 2023 15:11:03 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pZBXB-0007kY-46; Mon, 06 Mar 2023 09:09:49 -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 1pZBX8-0007jp-1x for emacs-devel@gnu.org; Mon, 06 Mar 2023 09:09:46 -0500 Original-Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pZBX5-0007yO-9Q for emacs-devel@gnu.org; Mon, 06 Mar 2023 09:09:44 -0500 Original-Received: by mail-wm1-x32f.google.com with SMTP id k37so5769583wms.0 for ; Mon, 06 Mar 2023 06:09:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678111782; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=7GePcL3ZXq/Z2b56InYgIn2pS4si1a65QrvUryBlNpw=; b=qIJ0U9DW6RAJmKKre49nBWgSVRfZS6vXCDzUDJiqGV6NzynexK+4nUALYxhPifFYsc Zpua+1MzbTPlSbWt+TTI6YAquQTt30aeR0iCCQreuZfpItTSRLCGcIjyulzFZnZpflVx i4qhFP0MjUxhclu8cUANPpHCEf0Egsg0RJZ2v5TsG/jW5huddMd0wxnQN78FWwl89cTd PSUM3/IwiqrA9eO7KjH3VIeV8j8Fa0mcd+N5EkBc/955nPlWomySs1naWlQdMnSwhkOS OwSiLR5UaGd/P9yn/M7IwZTGhchm6LeflHIi4Qy2c+ynYFZxWxPr/LYgdSj3541476id NanA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678111782; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=7GePcL3ZXq/Z2b56InYgIn2pS4si1a65QrvUryBlNpw=; b=O5L1mIuNSRS5qHvjmfikC2P2wzNo1WT2+NMpkn0mEJ2T5NCOZ0vOznOW8UJ65tXvz8 bqqjsrPoJiBxFy3UHTEn2AOmTPqzrbs5ZUCkdIdOS891G2I55aPB9R8Vn5kG0QgdYsdr ReDxTegDY4Bqk4MBb3qTRy58A3LXi68upBTsIh7PAZ20DdlbKOj+CK3K1oKgvUIu7GNU AIvnRNthNy/wlju6KHxSwbxG8JDtwFC4K9nYvc6JcVqgHLfWgfGLF5nnvKmk5y2Qy28y or11ZQ5LBJZfbEgGnU5/F/mSBL/4YkW8KFVpJVUuxv56vK+WV6XZvMGc26qVIV+NX7bQ k6pg== X-Gm-Message-State: AO0yUKWbDUVGIvy72aeKazEJbt/23rkoqvE8HghBQMiXC1+vyNYUTcrN JQ24kkr3397K8QtJ40947Z4= X-Google-Smtp-Source: AK7set8bqgNGntZl1m+B6g9+B/ygQ7rQt3jSvEnNXGHUtqJ5AVxNp91XOmiYKF32V/moQGMhxoACyA== X-Received: by 2002:a05:600c:4510:b0:3ea:edc7:aa59 with SMTP id t16-20020a05600c451000b003eaedc7aa59mr9378971wmo.32.1678111781832; Mon, 06 Mar 2023 06:09:41 -0800 (PST) Original-Received: from [192.168.0.2] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id z4-20020a056000110400b002ce3b31753fsm9025151wrw.26.2023.03.06.06.09.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 Mar 2023 06:09:41 -0800 (PST) Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=raaahh@gmail.com; helo=mail-wm1-x32f.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:304048 Archived-At: On 06/03/2023 01:40, John Yates wrote: > For languages that do not distinguish declaration from definition, > another alternative is to have both key bindings reference the same > find-definition functionality. I think I would generally prefer for the "find declarations" binding to end with an error when unsupported rather than repeat an existing command which is already accessible through an easier key binding. Otherwise some users might waste time wondering over the difference, testing, and comparing -- I myself would, probably. Anyway, the question is moot if we're going the way of dynamically detecting the set of possible navigations. But I suppose some simpler languages might have no "extra" searches to suggest. I wouldn't necessarily oppose rebinding xref-find-extra in such major mode to something different, as long as the command is doing something related. The key bindings are a limited set, after all.