From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John Yates Newsgroups: gmane.emacs.devel Subject: Re: Adding support for xref jumping to headers/interfaces Date: Sun, 5 Mar 2023 18:40:58 -0500 Message-ID: References: <1587ddb6-f631-0890-965a-c7acb5729fa6@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25849"; mail-complaints-to="usenet@ciao.gmane.io" Cc: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= , Helmut Eller , emacs-devel To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Mar 06 00:42:07 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 1pYxzT-0006XT-FU for ged-emacs-devel@m.gmane-mx.org; Mon, 06 Mar 2023 00:42:07 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pYxyf-0007CQ-99; Sun, 05 Mar 2023 18:41:17 -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 1pYxyd-0007Bh-B7 for emacs-devel@gnu.org; Sun, 05 Mar 2023 18:41:15 -0500 Original-Received: from mail-ed1-f51.google.com ([209.85.208.51]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pYxyb-0006ox-81 for emacs-devel@gnu.org; Sun, 05 Mar 2023 18:41:14 -0500 Original-Received: by mail-ed1-f51.google.com with SMTP id cw28so31744135edb.5 for ; Sun, 05 Mar 2023 15:41:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678059670; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TCxHwsP6bmlrpyBsPy7UGFDL5B6IWsr1OL2OiewjdAc=; b=udih7aMM9Y5TLmNQJIN5aINKA1sWvD22NvBWUgUbjI9GYxGTQWiBJTe52gArt3+MPE EVe4Qbha/BbSoMnheYKx+Y0QAaEWJAFTpH4yBa1qZyHJhNU1Hg61VQRV4pKqx+XK7Xtq KAvbx7DYu2mLgbYN7D7Gcb3ZxUXJmIm92NvQEILr1jIaPCZKwY3MmdWBfsXNr4eycePg CjrWESbAflbMnkF262TS1tnXXSzARhoDHIlfiXcx6FU2DTK1WwOvjw4L3CdmKozBhLvP yM2BYFg8ye2T7q8BPymfy5OThPew7FpfIN3RZdE4BagTb+08ZxHx3WLAvgCrSWjajkhv AGKQ== X-Gm-Message-State: AO0yUKViXnYntotxvPcHAEhSRi8Bt7mefjy124+pQRWbBO/b/seo6Hg3 9LwsdXzPPaJQnqTtkRMUnW7BEKS4emheN7Gm+bo= X-Google-Smtp-Source: AK7set8+Q14jr156IrnJ13P4ISnlgUqhrfydFf0jfM+JlznR5ht00tkVz4U0vrVeMUrB/uCLKEZvI+z96FJOSz6ryk4= X-Received: by 2002:a50:aa95:0:b0:4ad:7439:cecb with SMTP id q21-20020a50aa95000000b004ad7439cecbmr4773035edc.7.1678059670447; Sun, 05 Mar 2023 15:41:10 -0800 (PST) In-Reply-To: <1587ddb6-f631-0890-965a-c7acb5729fa6@yandex.ru> Received-SPF: pass client-ip=209.85.208.51; envelope-from=john.yates.sheets@gmail.com; helo=mail-ed1-f51.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, 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:304008 Archived-At: On Sun, Mar 5, 2023 at 5:09=E2=80=AFPM Dmitry Gutov wrot= e: > > Having a common binding and a common xref backend method to dispatch to > simplifies things. The major modes which don't have the notion of > 'declaration' will have options: do nothing (and simply have the command > return an error), or rebind the keys to a different command. For languages that do not distinguish declaration from definition, another alternative is to have both key bindings reference the same find-definition functionality. As a user, I suspect that I would find that easier to master and remember as I switch from one language to another. Rebinding to a different command feels hacky, and special case. I fear, if that option exists, different languages will bind it to entirely different functionalities, exactly the phenomenon I would hope we are trying to avoid.