From unknown Tue Jun 17 20:10:12 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#2544 <2544@debbugs.gnu.org> To: bug#2544 <2544@debbugs.gnu.org> Subject: Status: 23.0.60; Could etags please try find a local tag first? Reply-To: bug#2544 <2544@debbugs.gnu.org> Date: Wed, 18 Jun 2025 03:10:12 +0000 retitle 2544 23.0.60; Could etags please try find a local tag first? reassign 2544 emacs submitter 2544 Matzi Kratzi severity 2544 wishlist thanks From matzikratzi@gmail.com Mon Mar 2 13:36:53 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 2 Mar 2009 21:36:53 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.1 required=4.0 tests=FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n22Lanbn026141 for ; Mon, 2 Mar 2009 13:36:50 -0800 Received: from mx10.gnu.org ([199.232.76.166]:35261) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1LeFmL-00048a-7C for emacs-pretest-bug@gnu.org; Mon, 02 Mar 2009 16:34:25 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1LeFoc-00008a-Qs for emacs-pretest-bug@gnu.org; Mon, 02 Mar 2009 16:36:47 -0500 Received: from fg-out-1718.google.com ([72.14.220.155]:60017) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LeFoc-00007T-7w for emacs-pretest-bug@gnu.org; Mon, 02 Mar 2009 16:36:46 -0500 Received: by fg-out-1718.google.com with SMTP id l27so993532fgb.30 for ; Mon, 02 Mar 2009 13:36:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=joE549E7YkEZGKE6TLB3Wg6d3uLQ1OnDAsEJwcCrj+k=; b=p/jHk0kiKPEkGCssDDcVm5xyF9IGkhDTe73Q+bx0GzQ/x9JvJ9Sa+lJ+krTUPkYptu Dqm1cc3LCq2YHAxy34MN/Gi6275O2ll4YITHZhT0dTrdSv06IGGln3W4zUic3W4jEvHo rEUTVrNdHTvnbKZcvt6PQZd7l2u+J4K/0jHWA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=xfoEU6StD0HFWmTR5AL5EeBRQxhNaPNKq5lBmduuReOnQCC9M/g218xPoUi43mAN0K 5HjxXvwABRkVYlRW5cNm2aDZKh7njMShGfgRpDdaDO0Vkzl7iFrQ1y2rCEi9hMVQucDA zlnGZXrbgf843SVZB5gWXfMJLBEBpZ8Y58Is4= MIME-Version: 1.0 Received: by 10.86.28.2 with SMTP id b2mr2159987fgb.75.1236029800680; Mon, 02 Mar 2009 13:36:40 -0800 (PST) Date: Mon, 2 Mar 2009 22:36:40 +0100 Message-ID: <7f9b11c90903021336o775a3f75i8bd89f3ae4540cb7@mail.gmail.com> Subject: 23.0.60; Could etags please try find a local tag first? From: Matzi Kratzi To: emacs-pretest-bug@gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Please write in English if possible, because the Emacs maintainers usually do not have translators to read other languages for them. Your bug report will be posted to the emacs-pretest-bug@gnu.org mailing list. Please describe exactly what actions triggered the bug and the precise symptoms of the bug: Would it make sense, in general, for etags to first try to find a tag inside the current buffer? I am working in legacy code that has the same name for certain help functions in many files. I would like etags to first try find the tag inside the current buffer. Please consider the following files: a.c: #include static void help_func (void) { printf ("ad"); } void a_func (void) { help_func (); printf ("a\n"); } a.h: void a_func (void); b.c: #include #include "a.h" static void help_func (void); int main (void) { help_func (); a_func (); return 0; } static void help_func (void) { printf ("kalle\n"); } c:\src\example>C:\download\emacs-cvs\bin\etags a.c a.h b.c Then go to the line " help_func ();" in b.c and try find-tag. You will be taken to the function defined in a.c. I know about "C-u M-.", but that is not a very big help if there is a big number of files with different help_funcs. Best Regards Mats If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. If you would like to further debug the crash, please read the file c:/download/emacs-cvs/etc/DEBUG for instructions. In GNU Emacs 23.0.60.1 (i386-mingw-nt6.0.6001) of 2009-01-15 on LENNART-69DE564 Windowing system distributor `Microsoft Corp.', version 6.0.6001 configured using `configure --with-gcc (3.4) --no-opt --cflags -Ic:/g/include -fno-crossjumping' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: SVE value of $XMODIFIERS: nil locale-coding-system: cp1252 default-enable-multibyte-characters: t Major mode: C/l Minor modes in effect: shell-dirtrack-mode: t tooltip-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t abbrev-mode: t Recent input: h e l p _ f u n c C-SPC M-w C-y M-d C-a C-SPC M-; h e M-/ M-d C-x C-s C-x C-s ; C-x C-s M-d M-/ M-/ h e M-/ M-d C-x C-s M-x C-g C-g C-x 5 2 M-x s h e l l c d SPC C-y c d SPC C-a e t a g s SPC a . c SPC * SPC b * . * C-x C-f T A G S C-x k c SPC a . h SPC c C-x C-f C-x k M-. M-* M-x r e p o r t SPC e m a SPC Recent messages: Quit [2 times] Mark set c:/download/emacs-cvs/bin Mark set c:/download/src/a History item: 1 History item: 2 History item: 1 Starting a new list of tags tables Mark set From rgm@gnu.org Tue Mar 3 17:09:49 2009 Received: (at control) by emacsbugs.donarmstrong.com; 4 Mar 2009 01:09:50 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-5.0 required=4.0 tests=VALID_BTS_CONTROL, X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2419lW2022962 for ; Tue, 3 Mar 2009 17:09:48 -0800 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1LefZy-00038Y-Dw; Tue, 03 Mar 2009 20:07:22 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18861.54346.365884.785353@fencepost.gnu.org> Date: Tue, 3 Mar 2009 20:07:22 -0500 From: Glenn Morris To: control Subject: control message X-Debbugs-No-Ack: yes reassign 2540 emacs,ns reassign 2542 emacs,ns severity 2544 wishlist reassign 2546 emacs,ns reassign 2550 emacs,ns reassign 2557 spam reassign 2558 spam reassign 2559 spam severity 2561 minor reassign 2564 emacs,ns tags 2499 notabug severity 2499 minor severity 2517 minor From rgm@gnu.org Fri Nov 13 12:28:53 2009 Received: (at control) by emacsbugs.donarmstrong.com; 13 Nov 2009 20:28:54 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.8 required=4.0 tests=AWL,ONEWORD,VALID_BTS_CONTROL autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nADKSqGQ031044 for ; Fri, 13 Nov 2009 12:28:53 -0800 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1N92lH-00024p-Uq; Fri, 13 Nov 2009 15:28:51 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19197.49539.921874.392388@fencepost.gnu.org> Date: Fri, 13 Nov 2009 15:28:51 -0500 From: Glenn Morris To: control Subject: control reassign 4871 emacs,ns reassign 4908 spam tags 4910 moreinfo reaassign 4918 spam reassign 4919 spam tags 1134 = reassign 1134 emacs,rmail reassign 2624 emacs,rmail reassign 364 emacs,rmail reassign 1140 emacs,rmail reassign 4448 emacs,rmail reassign 158 emacs,etags tags 4142 = reassign 4863 emacs,etags reassign 2807 emacs,etags reassign 2008 emacs,etags reassign 2544 emacs,etags From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 19 10:49:03 2021 Received: (at 2544) by debbugs.gnu.org; 19 Jul 2021 14:49:03 +0000 Received: from localhost ([127.0.0.1]:59729 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5UZr-0005qU-Gq for submit@debbugs.gnu.org; Mon, 19 Jul 2021 10:49:03 -0400 Received: from quimby.gnus.org ([95.216.78.240]:45772) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5UZp-0005q0-B9 for 2544@debbugs.gnu.org; Mon, 19 Jul 2021 10:49:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=NCSoj+3cIsD5H/ung7FPezN8Mtygh2gR1+TTa88bPZM=; b=LvCTH3/XOwZaORDMKAswxe8G9X /I2jtuU1fpFF2FBnU/pzff3H3hPWvciQQYGyWfwL5FLa7y7Ry5DMzJ8vLRNR60zMyG11ZzLv4wpiC +JfBk1OA3Htyd8VLMDNt9BzByB9lnxZMz6DBoOKR6oG+GyM3xZnok5/G8VUr0UxDa8d8=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m5UZg-0007sj-Rj; Mon, 19 Jul 2021 16:48:55 +0200 From: Lars Ingebrigtsen To: Matzi Kratzi Subject: Re: bug#2544: 23.0.60; Could etags please try find a local tag first? References: <7f9b11c90903021336o775a3f75i8bd89f3ae4540cb7@mail.gmail.com> X-Now-Playing: Colored Music's _Individual Beauty_: "Trick Or Treat" Date: Mon, 19 Jul 2021 16:48:52 +0200 In-Reply-To: <7f9b11c90903021336o775a3f75i8bd89f3ae4540cb7@mail.gmail.com> (Matzi Kratzi's message of "Mon, 2 Mar 2009 22:36:40 +0100") Message-ID: <878s22nyuj.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Matzi Kratzi writes: > Would it make sense, in general, for etags to first try to find a tag > inside the current buffer? I am working in legacy code that has the > same name for certain help functions in many files. I wo [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 2544 Cc: 2544@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Matzi Kratzi writes: > Would it make sense, in general, for etags to first try to find a tag > inside the current buffer? I am working in legacy code that has the > same name for certain help functions in many files. I would like etags > to first try find the tag inside the current buffer. (I'm going through old bug reports that unfortunately got no response at the time.) I can certainly see cases where that would be useful. I think much of this stuff has been rewritten in terms of xref now? I gave the xref code a quick look-over, but I didn't see anything obvious in this area... Does anybody know whether Emacs grown support for this use case in the 12 years since this bug report was filed? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 19 11:56:35 2021 Received: (at 2544) by debbugs.gnu.org; 19 Jul 2021 15:56:36 +0000 Received: from localhost ([127.0.0.1]:60029 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5VdD-00088c-L1 for submit@debbugs.gnu.org; Mon, 19 Jul 2021 11:56:35 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56680) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5VdB-00088O-Q1 for 2544@debbugs.gnu.org; Mon, 19 Jul 2021 11:56:34 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47114) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m5Vd6-0001kR-BF; Mon, 19 Jul 2021 11:56:28 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2568 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m5Vd5-0001ez-KO; Mon, 19 Jul 2021 11:56:28 -0400 Date: Mon, 19 Jul 2021 18:56:22 +0300 Message-Id: <8335sa70wp.fsf@gnu.org> From: Eli Zaretskii To: Lars Ingebrigtsen , Dmitry Gutov In-Reply-To: <878s22nyuj.fsf@gnus.org> (message from Lars Ingebrigtsen on Mon, 19 Jul 2021 16:48:52 +0200) Subject: Re: bug#2544: 23.0.60; Could etags please try find a local tag first? References: <7f9b11c90903021336o775a3f75i8bd89f3ae4540cb7@mail.gmail.com> <878s22nyuj.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 2544 Cc: matzikratzi@gmail.com, 2544@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Date: Mon, 19 Jul 2021 16:48:52 +0200 > Cc: 2544@debbugs.gnu.org > > Matzi Kratzi writes: > > > Would it make sense, in general, for etags to first try to find a tag > > inside the current buffer? I am working in legacy code that has the > > same name for certain help functions in many files. I would like etags > > to first try find the tag inside the current buffer. > > (I'm going through old bug reports that unfortunately got no response at > the time.) > > I can certainly see cases where that would be useful. I think much of > this stuff has been rewritten in terms of xref now? I gave the xref > code a quick look-over, but I didn't see anything obvious in this > area... > > Does anybody know whether Emacs grown support for this use case in the > 12 years since this bug report was filed? We did switch to Xref, but for many languages (including C), Xref still uses etags as its back-end. So etags is still relevant. As for the original request: I guess we could satisfy that by having Xref sort the matches so that those in the current buffer come first in the display we show in the *XREF* buffer? Dmitry, would it make sense to add such an option, and if so, would it be hard to do so? In xref--alistify, perhaps, or in xref--analyze? From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 19 19:00:40 2021 Received: (at 2544) by debbugs.gnu.org; 19 Jul 2021 23:00:40 +0000 Received: from localhost ([127.0.0.1]:60585 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5cFc-00047W-H3 for submit@debbugs.gnu.org; Mon, 19 Jul 2021 19:00:40 -0400 Received: from mail-wr1-f41.google.com ([209.85.221.41]:34497) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5cFb-00047J-8K for 2544@debbugs.gnu.org; Mon, 19 Jul 2021 19:00:39 -0400 Received: by mail-wr1-f41.google.com with SMTP id u1so23963372wrs.1 for <2544@debbugs.gnu.org>; Mon, 19 Jul 2021 16:00:39 -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=UbN+ukuQfAruvJQ1R85++VtAuvg63g9kYBYtHAm2Dnw=; b=rzF7zlUU2BC9423fmJ3Z82zvpnKIC+3CTMLo9ypKUmx3BLETme+suvpm47qdB4XRLa MuZF6zoqEhAQj6tKRV5NsNJPiQ+v0E89lRZBgVfOkQnonjictAawt0W/JuJvV7JluQIn t3BIbDbqfjPTF1DurmQ9WSEvLYjz28vVegSZ5h1tZap1IqlLAdq0BU5NacY4byKS9hiZ 2ZzQyzB/r9lq6o/fuY9rkTkmzi/lAnG4wh1cY4dqmvYuIhCqvZODuDO8RT8wm9fGW7Gk s+IOGSHwX4gShmtEFmTL/yVtcI5tf39tPL8nWg472w0TsdE4YqEGsqCS2XGnVEOGstKX gWzw== 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=UbN+ukuQfAruvJQ1R85++VtAuvg63g9kYBYtHAm2Dnw=; b=E0VvXH4CsZj/ZXorECOV1cM/un9cfqhaUya8o0GgNLoacghGFSoKXBV6Nulr6YffnG 7YVRss+NZj2CXa3lCGByaN9Fjc4QzjzUv+sZvO1I4tsnn/zKZE/J2xgtHwyhUwh5jyYf SlnpXdr12F/t9nLAvAUE5nHcRDSSM05ceNaKmxa1ldqoERKHZcw/CDpZ4fBc5Y5DMEqx o1/lnTM84FIomG2sPNoFyOrdfisGwnXEvxFOeP1g4huMrjbZf5PDEIca14KbukAHVE9y jrHJ7G7k1mk6bhfMWuXflJvp5YsQoxWD2KLrSdISxzpttOfKX8g/0SRtPh7DzwOTYL+9 wo7A== X-Gm-Message-State: AOAM533yTfDh42WAE4Rfr5IKAeQsyuveKGB7W0dDdKmsjvk4CXOsXxJH RL4lW014lnioDTK4NoNGKsY6FqvWQNI= X-Google-Smtp-Source: ABdhPJzCHcViE5wd4CBvYv8S8zP3+0RDLY04ZszuYvjERDf1cd7LciqjkiIteT9pnzWiXKYbw3ipSQ== X-Received: by 2002:adf:f04a:: with SMTP id t10mr31725035wro.318.1626735633284; Mon, 19 Jul 2021 16:00:33 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id i12sm21924693wrp.57.2021.07.19.16.00.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 Jul 2021 16:00:32 -0700 (PDT) Subject: Re: bug#2544: 23.0.60; Could etags please try find a local tag first? To: Eli Zaretskii , Lars Ingebrigtsen References: <7f9b11c90903021336o775a3f75i8bd89f3ae4540cb7@mail.gmail.com> <878s22nyuj.fsf@gnus.org> <8335sa70wp.fsf@gnu.org> From: Dmitry Gutov Message-ID: <417d5d01-c3a9-a75e-b134-7f1847749842@yandex.ru> Date: Tue, 20 Jul 2021 02:00:31 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <8335sa70wp.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 2544 Cc: matzikratzi@gmail.com, 2544@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) On 19.07.2021 18:56, Eli Zaretskii wrote: > As for the original request: I guess we could satisfy that by having > Xref sort the matches so that those in the current buffer come first > in the display we show in the*XREF* buffer? Dmitry, would it make > sense to add such an option, and if so, would it be hard to do so? In > xref--alistify, perhaps, or in xref--analyze? It would probably better work as an etags option (residing next to etags-xref-find-definitions-tag-order): Xref, in general, cannot know in advance whether a given tags resides in the current buffer, and following all tags is relatively costly. I was thinking to suggest having that behavior on by default (and maybe avoid adding a new variable altogether), but it seems to conflict with the intention behind etags-xref-find-definitions-tag-order, so probably not. From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 20 07:51:48 2021 Received: (at 2544) by debbugs.gnu.org; 20 Jul 2021 11:51:48 +0000 Received: from localhost ([127.0.0.1]:33021 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5oHr-00029o-OC for submit@debbugs.gnu.org; Tue, 20 Jul 2021 07:51:47 -0400 Received: from quimby.gnus.org ([95.216.78.240]:56416) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5oHp-00029V-Fx for 2544@debbugs.gnu.org; Tue, 20 Jul 2021 07:51:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=wk12Bsx3NhzJ/9L8JFytpni+xDALqOnYs7pPu1YK+Tw=; b=LuFPDVCNvjU1iBS+jWpaNkWyMS lYqR09Os1xIvsh9mTcgBXYHkwz2VZDwJ4arafzZY/g4qpRD7U+WFoHz+GZEGglazl7MWKH8r3/DhV 7JhTQALbdxtTIpUbuhNkCn1WgXf3W3/5cFxEtdUxt6AsC46k3BRHK6TT0YXnGPBQjx/8=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m5oHg-0002iZ-Vc; Tue, 20 Jul 2021 13:51:39 +0200 From: Lars Ingebrigtsen To: Dmitry Gutov Subject: Re: bug#2544: 23.0.60; Could etags please try find a local tag first? References: <7f9b11c90903021336o775a3f75i8bd89f3ae4540cb7@mail.gmail.com> <878s22nyuj.fsf@gnus.org> <8335sa70wp.fsf@gnu.org> <417d5d01-c3a9-a75e-b134-7f1847749842@yandex.ru> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAALVBMVEUFBAsPESopFRpd FB/PKzbVXp1JT0PdtUy7vMOUDhpBiiEhJFk/XKJckM/////cWtUyAAAAAWJLR0QOb70wTwAAAAd0 SU1FB+UHFAsyK6qffpkAAAFRSURBVDjLY2CAAAEG+gEmYyVlBWwSLKEhoQ7YJFSAEk5YzElgS04z NoByGYGeYAKz2CrawLQgQi0jVKIMrLHcGc0otrQkMFXuiSLcXgGzaoonsjkM7eWwANNENarchQGL hKYlzJEMSgxKSkgeczFggASFiQtKkIAkIFZMmYmQYFJSYALqFgC7QokRoZzTBRQ8TDNBwADZHLCE ANMEJSVNYyQJJSUmMJcJSDApCiAkVq2C2pSAFkIEJTCS0LZEKEMBTWL3bqhRBgw4gLERugh3Nshe prQ0QSAQQIpYnt6LoGi5c/YMEN65i+QIQQFpaRj3zA0U1+09cQDmljM4JBjgcQ0G0jIbEOwbG5D1 MOyIhkl0oAbOjmCYxF1UHfCwYhRCDzWYxG50CcaNG8GUIKbSjbjCkYFRgBG7BYyCikIK2CTE0tLS ErBJCCoJauNwLB0BAObeQfYY7VR9AAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIxLTA3LTIwVDExOjUw OjQzKzAwOjAwAdqZaAAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMS0wNy0yMFQxMTo1MDo0MyswMDow MHCHIdQAAAAASUVORK5CYII= X-Now-Playing: Squarepusher's _Be Up A Hello_: "Nervelevers" Date: Tue, 20 Jul 2021 13:51:36 +0200 In-Reply-To: <417d5d01-c3a9-a75e-b134-7f1847749842@yandex.ru> (Dmitry Gutov's message of "Tue, 20 Jul 2021 02:00:31 +0300") Message-ID: <87v955gq47.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Dmitry Gutov writes: > I was thinking to suggest having that behavior on by default (and > maybe avoid adding a new variable altogether), but it seems to > conflict with the intention behind > etags-xref-find-definitions- [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 2544 Cc: Eli Zaretskii , matzikratzi@gmail.com, 2544@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Dmitry Gutov writes: > I was thinking to suggest having that behavior on by default (and > maybe avoid adding a new variable altogether), but it seems to > conflict with the intention behind > etags-xref-find-definitions-tag-order, so probably not. Hm... well, wouldn't sorting the definitions that are in the local file first fit naturally in that variable? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 20 07:54:47 2021 Received: (at 2544) by debbugs.gnu.org; 20 Jul 2021 11:54:47 +0000 Received: from localhost ([127.0.0.1]:33035 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5oKl-0002F4-Ci for submit@debbugs.gnu.org; Tue, 20 Jul 2021 07:54:47 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40334) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5oKk-0002En-Gx for 2544@debbugs.gnu.org; Tue, 20 Jul 2021 07:54:47 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:41076) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m5oKe-0006ih-TZ; Tue, 20 Jul 2021 07:54:40 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4086 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m5oKe-00031n-G4; Tue, 20 Jul 2021 07:54:40 -0400 Date: Tue, 20 Jul 2021 14:54:39 +0300 Message-Id: <83lf615hfk.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: <417d5d01-c3a9-a75e-b134-7f1847749842@yandex.ru> (message from Dmitry Gutov on Tue, 20 Jul 2021 02:00:31 +0300) Subject: Re: bug#2544: 23.0.60; Could etags please try find a local tag first? References: <7f9b11c90903021336o775a3f75i8bd89f3ae4540cb7@mail.gmail.com> <878s22nyuj.fsf@gnus.org> <8335sa70wp.fsf@gnu.org> <417d5d01-c3a9-a75e-b134-7f1847749842@yandex.ru> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 2544 Cc: larsi@gnus.org, matzikratzi@gmail.com, 2544@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: matzikratzi@gmail.com, 2544@debbugs.gnu.org > From: Dmitry Gutov > Date: Tue, 20 Jul 2021 02:00:31 +0300 > > On 19.07.2021 18:56, Eli Zaretskii wrote: > > As for the original request: I guess we could satisfy that by having > > Xref sort the matches so that those in the current buffer come first > > in the display we show in the*XREF* buffer? Dmitry, would it make > > sense to add such an option, and if so, would it be hard to do so? In > > xref--alistify, perhaps, or in xref--analyze? > > It would probably better work as an etags option (residing next to > etags-xref-find-definitions-tag-order): Xref, in general, cannot know in > advance whether a given tags resides in the current buffer, and > following all tags is relatively costly. But then this feature will be reserved only for the etags backend, no? Maybe there should be a backend-specific sorting method or something? > I was thinking to suggest having that behavior on by default (and maybe > avoid adding a new variable altogether), but it seems to conflict with > the intention behind etags-xref-find-definitions-tag-order, so probably not. Right. From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 20 12:16:03 2021 Received: (at 2544) by debbugs.gnu.org; 20 Jul 2021 16:16:03 +0000 Received: from localhost ([127.0.0.1]:35167 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5sPb-00021x-9P for submit@debbugs.gnu.org; Tue, 20 Jul 2021 12:16:03 -0400 Received: from mail-wr1-f53.google.com ([209.85.221.53]:36422) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5sPa-00021M-Dw for 2544@debbugs.gnu.org; Tue, 20 Jul 2021 12:16:02 -0400 Received: by mail-wr1-f53.google.com with SMTP id c12so8604344wrt.3 for <2544@debbugs.gnu.org>; Tue, 20 Jul 2021 09:16:02 -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=om+VvruRM51N9u+gsEIRz6HzJJ+GMorIjEgy0uwrrEQ=; b=r3A38M0txIxV7evgAczOHy+t25oqPOyTTiJfCtY99kUu3q5UT4CMubgraD3Qog/9DX G1sRA0YQXB2FT9qjmtFRtNt3KF8ji1X1TTo43D+whrmi1U5AxQGKyGNjelhxoXCBFFYk 086Owd6DpWxhW+xgs1blLawmZOS2zqF+RdN7HoC93s3eWbTnBTJFfMIt37gcjg7AuS1a pWkeM6yPpVibwO9EhIZyHCQmm5LeWpdEImGt/nZd/729Df5Bc1BvnyeiQKL+bcbDZnvm cu2mGZjtTexINp/zqwNmEdCs85lsqEiRXqjlfOBsbG54cdIkZZqmEzBLdvl/6ILkWS/9 q+xA== 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=om+VvruRM51N9u+gsEIRz6HzJJ+GMorIjEgy0uwrrEQ=; b=Ad+Jpw6lN8hOK9HP/YkFNUz4T6NdkJLtvEgN/at2K58YjU4mggtG/8wD16GMKAIu3G fZT1OXzS0qceCa/1hd/yIU6xkW+PANzuf7cqVlDjpjc5icyVzPr+FA3HGKoWyFyRhyzp wh3jiwCN4ajuX4Me5/K4FCDPCpnkr/1x2UIExX88AdHOWJaGkGZFth1s7BaX4Izc39bj 6HcSGWsKuWQCE4AYQ6JavJWuw+1kfgOe4ppuzFlqT+IqP//FUkfOUpRJJXw0Z5NMZvv3 AXgO6H23kntDhzKrjapJzS85InB3c4mQPp2amlpVILf8UejMLj2Vq1RokNQSE/TQXgfo Orhw== X-Gm-Message-State: AOAM530pmU0UlmVCezOEmjg1PaAKZcA4E2r0YLBYnw3G6M5yWTEMai22 HDE4LGJ83G/mGw3v7S2XbUR/NrzopcU= X-Google-Smtp-Source: ABdhPJxwEEoyTq6VoNN5Q88rTZEFEqdVb0ekvQFVDgsv02bcTHvSq2qUMIEEv3+TSbvVlCoPZTlpmA== X-Received: by 2002:adf:de84:: with SMTP id w4mr37012038wrl.104.1626797756569; Tue, 20 Jul 2021 09:15:56 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id q17sm18062426wrv.47.2021.07.20.09.15.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Jul 2021 09:15:55 -0700 (PDT) Subject: Re: bug#2544: 23.0.60; Could etags please try find a local tag first? To: Lars Ingebrigtsen References: <7f9b11c90903021336o775a3f75i8bd89f3ae4540cb7@mail.gmail.com> <878s22nyuj.fsf@gnus.org> <8335sa70wp.fsf@gnu.org> <417d5d01-c3a9-a75e-b134-7f1847749842@yandex.ru> <87v955gq47.fsf@gnus.org> From: Dmitry Gutov Message-ID: <44bf34d5-2186-55f6-b9ee-06e8e3f2b4ac@yandex.ru> Date: Tue, 20 Jul 2021 19:15:53 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <87v955gq47.fsf@gnus.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 2544 Cc: Eli Zaretskii , matzikratzi@gmail.com, 2544@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) On 20.07.2021 14:51, Lars Ingebrigtsen wrote: > Hm... well, wouldn't sorting the definitions that are in the local file > first fit naturally in that variable? Possible, but then we'll need to have two sets of such predicates, as well as require more passes over the tags file during the search. Which isn't free, performance-wise. From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 20 12:22:52 2021 Received: (at 2544) by debbugs.gnu.org; 20 Jul 2021 16:22:52 +0000 Received: from localhost ([127.0.0.1]:35193 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5sWB-0002CV-Jv for submit@debbugs.gnu.org; Tue, 20 Jul 2021 12:22:51 -0400 Received: from mail-wm1-f53.google.com ([209.85.128.53]:36413) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5sW9-0002CI-7L for 2544@debbugs.gnu.org; Tue, 20 Jul 2021 12:22:49 -0400 Received: by mail-wm1-f53.google.com with SMTP id l17-20020a05600c1d11b029021f84fcaf75so1844245wms.1 for <2544@debbugs.gnu.org>; Tue, 20 Jul 2021 09:22:49 -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=SvEL1dKWHry7Hw8YduIweMQsNzt0vLj8VotL0lGb90M=; b=HagZXVAh1tIMhi7/eEJSLLiw0lDfKG51oLM8MsD4acmxrCv9obLkqjhaFyy/LNN1jm 9OCj49XYbad8XXE+DAP/ds92whZF7x2Gjx2ReEyVnP1RKFfBqE4d70l72Bf2Dn+5o9R3 IqvsBoC49xuSDltcl0PjR8XCn2pK7RQu/2xOqsjNgiIPlXhk/q9pcCtnkwmNt4dmRIRM JTp0plTQGEwELa8FGbB27EbzWCYGza/SFi8F4gQo78/H/7FxI7+fRohXbx+n7ABlI3tQ B2crx8hPiPQmKzsUNHBeJwuW/VZUBiD4bnjUIu60ntwVqWWmtwqBIKsayOOaBR6cukFz X04A== 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=SvEL1dKWHry7Hw8YduIweMQsNzt0vLj8VotL0lGb90M=; b=G4ETowRRUj8ub1lPBoDNLEJVktT+4YOpZj0hbiUdhtmH0lLMwl3rGSHrkLU6cRL/BV 9tj+8Och8AOdUkl8XdhIJelUnEmzg7wvooKLZXA6hxwFbnsuKm/F5G3UUV4bRPSWPa3Y iked8lX0U8EF/xq5aHRHMcvh6fBZhLePRHsbai/8cKOgAVqZhniGOi5aqB9x9LFUOpbO I2lvb9E5tngG9ZvIircxMOqFJkiVTg5aUOHc/x5gHaPwDUVLVMThThig8FW4gfzjwJyc wKi2YPF/Rn672ACCtKzbUvzi4BVKKizFrZaymxTNCBk57OxQ3TNWtDQMxhANuZNFPjAF eebQ== X-Gm-Message-State: AOAM5338VrB8ysm0Ozv2VTIDR+OqsuIk1Wh+YxHLUu9TlfHImeoqh4FX UpB8/Js3drGOKCUkltMGoCIb1RkUDPg= X-Google-Smtp-Source: ABdhPJwtRmgj82ZDcIKuTkX2UgOvea2jGrforQiTsVa5nBc/FYIsxwiapEp9znHl2K6MaZzY37k1/g== X-Received: by 2002:a7b:c351:: with SMTP id l17mr32708163wmj.120.1626798163334; Tue, 20 Jul 2021 09:22:43 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id e3sm24289928wra.15.2021.07.20.09.22.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Jul 2021 09:22:42 -0700 (PDT) Subject: Re: bug#2544: 23.0.60; Could etags please try find a local tag first? To: Eli Zaretskii References: <7f9b11c90903021336o775a3f75i8bd89f3ae4540cb7@mail.gmail.com> <878s22nyuj.fsf@gnus.org> <8335sa70wp.fsf@gnu.org> <417d5d01-c3a9-a75e-b134-7f1847749842@yandex.ru> <83lf615hfk.fsf@gnu.org> From: Dmitry Gutov Message-ID: Date: Tue, 20 Jul 2021 19:22:41 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <83lf615hfk.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 20.07.2021 14:54, Eli Zaretskii wrote: >> Cc: matzikratzi@gmail.com, 2544@debbugs.gnu.org >> From: Dmitry Gutov >> Date: Tue, 20 Jul 2021 02:00:31 +0300 >> >> On 19.07.2021 18:56, Eli Zaretskii w [...] Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (dgutov[at]yandex.ru) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.128.53 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.128.53 listed in list.dnswl.org] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different -0.1 NICE_REPLY_A Looks like a legit reply (A) 1.0 FREEMAIL_REPLY From and body contain different freemails X-Debbugs-Envelope-To: 2544 Cc: larsi@gnus.org, matzikratzi@gmail.com, 2544@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) On 20.07.2021 14:54, Eli Zaretskii wrote: >> Cc: matzikratzi@gmail.com, 2544@debbugs.gnu.org >> From: Dmitry Gutov >> Date: Tue, 20 Jul 2021 02:00:31 +0300 >> >> On 19.07.2021 18:56, Eli Zaretskii wrote: >>> As for the original request: I guess we could satisfy that by having >>> Xref sort the matches so that those in the current buffer come first >>> in the display we show in the*XREF* buffer? Dmitry, would it make >>> sense to add such an option, and if so, would it be hard to do so? In >>> xref--alistify, perhaps, or in xref--analyze? >> >> It would probably better work as an etags option (residing next to >> etags-xref-find-definitions-tag-order): Xref, in general, cannot know in >> advance whether a given tags resides in the current buffer, and >> following all tags is relatively costly. > > But then this feature will be reserved only for the etags backend, no? > > Maybe there should be a backend-specific sorting method or something? Not 100% sure how that could work, but I'm reasonably certain that "prioritize hits in the current file" is mostly relevant to etags. Because when one uses more precise backends, "find definition" gets fewer hits, and you don't really need to choose which ones to start with -- the current file or otherwise. Even if there are exceptions, I think only etags has the problem mentioned below. Other backends could simply always prioritize the current file, no user option needed. >> I was thinking to suggest having that behavior on by default (and maybe >> avoid adding a new variable altogether), but it seems to conflict with >> the intention behind etags-xref-find-definitions-tag-order, so probably not. > > Right. ^^^ the aforementioned problem. From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 20 12:57:02 2021 Received: (at 2544) by debbugs.gnu.org; 20 Jul 2021 16:57:03 +0000 Received: from localhost ([127.0.0.1]:35223 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5t3G-00031J-FE for submit@debbugs.gnu.org; Tue, 20 Jul 2021 12:57:02 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49872) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5t3E-00030r-82 for 2544@debbugs.gnu.org; Tue, 20 Jul 2021 12:57:00 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51688) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m5t38-00056f-R2; Tue, 20 Jul 2021 12:56:54 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2847 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m5t38-0002JV-Eu; Tue, 20 Jul 2021 12:56:54 -0400 Date: Tue, 20 Jul 2021 19:56:53 +0300 Message-Id: <838s206i0a.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: (message from Dmitry Gutov on Tue, 20 Jul 2021 19:22:41 +0300) Subject: Re: bug#2544: 23.0.60; Could etags please try find a local tag first? References: <7f9b11c90903021336o775a3f75i8bd89f3ae4540cb7@mail.gmail.com> <878s22nyuj.fsf@gnus.org> <8335sa70wp.fsf@gnu.org> <417d5d01-c3a9-a75e-b134-7f1847749842@yandex.ru> <83lf615hfk.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 2544 Cc: larsi@gnus.org, matzikratzi@gmail.com, 2544@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: larsi@gnus.org, matzikratzi@gmail.com, 2544@debbugs.gnu.org > From: Dmitry Gutov > Date: Tue, 20 Jul 2021 19:22:41 +0300 > > > But then this feature will be reserved only for the etags backend, no? > > > > Maybe there should be a backend-specific sorting method or something? > > Not 100% sure how that could work, but I'm reasonably certain that > "prioritize hits in the current file" is mostly relevant to etags. > > Because when one uses more precise backends, "find definition" gets > fewer hits, and you don't really need to choose which ones to start with > -- the current file or otherwise. When a backend returns just one hit, this is a non-issue. The OP specifically described a situation where there are many functions with the same name in the project. That's the use case we are discussing. I don't see how the backend can affect this situation. Especially since the etags backend is also quite accurate. But I'm going to stop arguing. If there isn't enough enthusiasm for implementing this, it will remain a pipe dream, I guess. From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 20 18:36:19 2021 Received: (at 2544) by debbugs.gnu.org; 20 Jul 2021 22:36:19 +0000 Received: from localhost ([127.0.0.1]:35637 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5yLa-000556-W0 for submit@debbugs.gnu.org; Tue, 20 Jul 2021 18:36:19 -0400 Received: from mail-wm1-f47.google.com ([209.85.128.47]:40476) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5yLZ-00054s-4A for 2544@debbugs.gnu.org; Tue, 20 Jul 2021 18:36:17 -0400 Received: by mail-wm1-f47.google.com with SMTP id f8-20020a1c1f080000b029022d4c6cfc37so2339162wmf.5 for <2544@debbugs.gnu.org>; Tue, 20 Jul 2021 15:36:17 -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=t+3SmYrSMcFViaX5z8uR8Xr5CSQztgoAV1I4KjrW/U4=; b=YgFberImN8Yda8R112taRdCIro0v4gVaDshDsD0/1LgSBJGu5c63hJE0ioaqP7X+kg eH8C2y0We+e8b1NybfaXiFWm8Z5FtdPZfZbszOj89nLVJ9OrOrsPf8tHgbZsqNxFMerO I5/Bf8QHOpYG8tGLeGCqF35v5seLv60Nkauc81ryJQFe1l42c7j10QVESzK+/Ilj9ciY ne1KHmsL0a6JFz47tpFrUyqmZOBiFiHQ88820aLZM7MOWoR5nOh2bTiGtsB3zG0glkS9 o7Z4eMBxyLaPRvBEPje1KId8CDg9A2DPN5RNxM1v8cZhbbY7IXwA58ffUUumK2pifTlZ xWCA== 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=t+3SmYrSMcFViaX5z8uR8Xr5CSQztgoAV1I4KjrW/U4=; b=rb/Pcv05EMTJHLiDFeddPBdWO70yEJgBJ24a/4kUZwrb4G/6UnkL7OFmXQWuaPW6XK Tu0nJWMKBp69qWZpoopoydPbGPEZc2F+/L9kOjF0RfdZVyvu1V8wsHuaXlZi2hekXajg AUZ1a93WckrRZYwpMDeTXsx3I7LIkFmD6SFBe4lGJnkWCbzNC6wzu66CC3zXCPJgSC9F EdTqDHLsBJ51eJ8w7SmaOAyPRG5K1b7skFiHIEpdjsq3rLDmv0wNuHbFFIvkGlP86d// qVgsgtweE/vkjPAyg37mVOll47+rRXzmSGvstqQAQlbLGezYc1sv9tEvYGSBjUWEbMw2 PhOA== X-Gm-Message-State: AOAM531aGrGKOlZ22UYlFtRcWh8zfBtXu4NdTtod+s7p/wK4ZaEwitHe +jEOb+te7rj/GlBH3RfpEyR4I3JdB7Q= X-Google-Smtp-Source: ABdhPJwf3gmEVrVZYvALsKy/qm1bFZ0b44xhMFTx0gU00/Z+aUagFFFD8DTU3wJ4aoj6t/XrDZ/ZzA== X-Received: by 2002:a05:600c:4101:: with SMTP id j1mr34644490wmi.130.1626820571224; Tue, 20 Jul 2021 15:36:11 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id q7sm20996910wmq.33.2021.07.20.15.36.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Jul 2021 15:36:10 -0700 (PDT) Subject: Re: bug#2544: 23.0.60; Could etags please try find a local tag first? To: Eli Zaretskii References: <7f9b11c90903021336o775a3f75i8bd89f3ae4540cb7@mail.gmail.com> <878s22nyuj.fsf@gnus.org> <8335sa70wp.fsf@gnu.org> <417d5d01-c3a9-a75e-b134-7f1847749842@yandex.ru> <83lf615hfk.fsf@gnu.org> <838s206i0a.fsf@gnu.org> From: Dmitry Gutov Message-ID: <4a8bb24b-51cd-f82b-c8ff-f57d3576eff1@yandex.ru> Date: Wed, 21 Jul 2021 01:36:08 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <838s206i0a.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 2544 Cc: larsi@gnus.org, matzikratzi@gmail.com, 2544@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) On 20.07.2021 19:56, Eli Zaretskii wrote: >> Because when one uses more precise backends, "find definition" gets >> fewer hits, and you don't really need to choose which ones to start with >> -- the current file or otherwise. > > When a backend returns just one hit, this is a non-issue. The OP > specifically described a situation where there are many functions with > the same name in the project. That's the use case we are discussing. Static analysis can very often determine which of the multiple functions with the same name will be used at a particular call site. Yes, there are exceptions (which will happen less frequently than with etags), like when we're trying to jump to a virtual function with overloads in several subclasses. But jumping to such function call from a file with one of the definitions, and not being able to determine which of the functions is going to be called, is going to be an even more rare occurrence. And even so, those backends can choose to sort the results starting with the current file by default. No user option needed. > I don't see how the backend can affect this situation. Especially > since the etags backend is also quite accurate. I'm saying etags' particular characteristics and varied usage patterns justify the addition of an etags-specific variable. I don't see much use for it for other backends, but if I'm proven wrong, that proof would also provide some new information which would help generalize the feature. This can happen at a later stage. From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 21 06:40:08 2021 Received: (at 2544) by debbugs.gnu.org; 21 Jul 2021 10:40:08 +0000 Received: from localhost ([127.0.0.1]:36173 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m69e3-0001t8-Rv for submit@debbugs.gnu.org; Wed, 21 Jul 2021 06:40:08 -0400 Received: from quimby.gnus.org ([95.216.78.240]:40780) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m69e2-0001sP-4m for 2544@debbugs.gnu.org; Wed, 21 Jul 2021 06:40:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=xqOnMyDf71Knn9trekUUtnSiW1k9s+NLvGTIqHAU02o=; b=vYwSHGIKK/BiHeb+OISKxBly0S CGxOZFeDrZ5x9QdQHHi89N5LgyVNkW2a6PWDX5zvqjOe6JGEPFS1xu19GapuZFZjXy5pskbO+ZK7Y alPh8d1zJKHHvAmCPEWmniBVUXWOz3cx8ZDAeJbRGylbh2nuk/noGGRK9GMDMYtEWUlo=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m69dt-0005V2-Jv; Wed, 21 Jul 2021 12:40:00 +0200 From: Lars Ingebrigtsen To: Dmitry Gutov Subject: Re: bug#2544: 23.0.60; Could etags please try find a local tag first? References: <7f9b11c90903021336o775a3f75i8bd89f3ae4540cb7@mail.gmail.com> <878s22nyuj.fsf@gnus.org> <8335sa70wp.fsf@gnu.org> <417d5d01-c3a9-a75e-b134-7f1847749842@yandex.ru> <83lf615hfk.fsf@gnu.org> <838s206i0a.fsf@gnu.org> <4a8bb24b-51cd-f82b-c8ff-f57d3576eff1@yandex.ru> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAGFBMVEUWFRMREA4QDw0G BgUfHh0hIB4kJCP///8ETlpUAAAAAWJLR0QHFmGI6wAAAAd0SU1FB+UHFQohMPhr+7UAAAGoSURB VDjLZVQ7lsIwDJRioJa8F8DmAiy5ANXWVNQ0y/2PsBpJzofVCwmRMqPR2AnRR6iQau+XvD3EhQUV JpISiaNnHeAHUVk5zqPCjXsLqjtOkidFmy0iKk7V/hWY2KiERb+2SqNHc0gZGYmraVUAZKWyOyeT SVl5FEDCamrERVVZEWhrwVRhiWjZ9sUZjPbjtYfK8g+QkGu2MUOS9WA4qSEXPMo2mqB/TFgWLxj1 SMKXkkyQAuqoDSrvoRHem5KqNuj0kiTA5Zb5G6biYZswAE51sQJmthzkOoAm45jnK9oyC6wNACTW WwMeR7T3zTD5YjJGY+8dFgsKYRyYAMvdM1zV4d3iJeeKuqaRFM+dm1aaMIG5dKBHej9Rv1UsP4cf 2x1TewMZZYWXQpkbbHSMLAWTa1uCYzUiHhu5rgQzmjF32heGH0LbMH7YlwPstI0lpI8AgDMfkNPY bb4iw0GLV0qy+XpdIa/TK18BlqTw0pFO73Wvu6RQe08mJxuq9oOMR0PQz/P3+Y6vhXsLlPAegZdY W++tthT8HmuZXuXzcFJkIu56mT/iD8itIv4C+SlMAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIxLTA3 LTIxVDEwOjMzOjQ4KzAwOjAwc6H0xgAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMS0wNy0yMVQxMDoz Mzo0OCswMDowMAL8THoAAAAASUVORK5CYII= X-Now-Playing: Orchestral Manoeuvres in the Dark's _Souvenir (1): The Singles 1979-1987_: "Messages" Date: Wed, 21 Jul 2021 12:39:57 +0200 In-Reply-To: <4a8bb24b-51cd-f82b-c8ff-f57d3576eff1@yandex.ru> (Dmitry Gutov's message of "Wed, 21 Jul 2021 01:36:08 +0300") Message-ID: <87mtqglzlu.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Dmitry Gutov writes: > I'm saying etags' particular characteristics and varied usage patterns > justify the addition of an etags-specific variable. The problem is definitely much more noticeable in the etags backend, so if your judgement is that that's where the option (and sorting) should go, then please go ahead. :-) Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 2544 Cc: Eli Zaretskii , matzikratzi@gmail.com, 2544@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Dmitry Gutov writes: > I'm saying etags' particular characteristics and varied usage patterns > justify the addition of an etags-specific variable. The problem is definitely much more noticeable in the etags backend, so if your judgement is that that's where the option (and sorting) should go, then please go ahead. :-) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 26 19:15:44 2021 Received: (at 2544) by debbugs.gnu.org; 26 Jul 2021 23:15:44 +0000 Received: from localhost ([127.0.0.1]:51724 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m89p2-0003HR-0p for submit@debbugs.gnu.org; Mon, 26 Jul 2021 19:15:44 -0400 Received: from mail-ej1-f48.google.com ([209.85.218.48]:35540) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m89ow-0003HA-P7 for 2544@debbugs.gnu.org; Mon, 26 Jul 2021 19:15:42 -0400 Received: by mail-ej1-f48.google.com with SMTP id o5so19128419ejy.2 for <2544@debbugs.gnu.org>; Mon, 26 Jul 2021 16:15:38 -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; bh=RcKgwxLgnj68gY1XtIpf4tc1OA4DOItbOM8FQZYpSa0=; b=E27aQ5OKpBF4HQy+suoWm7Wnc4uEE2CWX+ugX+hiwiNgC1jJE5+tOH8/LBBAyMe1fP VFvNF3WNwf6mGOS1hab1XWapFpX4G1tL7BeRO2n6msEYWzIRq1PIEFOb12ctJpM/XtEq Rc9C1hzqpTZ+mcNLwVCuX45iQbZFWhVC+2mvZzkT7G5ozrL8V7kalB53gWUf+k+bQPNE kL/jC3C6KR7+OHTvZf8HdtfuL880O9Hz4mN6m3MT2fHBG8hmkiekD+rEby+3gamTzEqd qVQNpyZPdgnSz9pOb3YikIcxktvVaZGmkItjztQHAehHExeg8rbMP0z8zEtzfe8N5Jz1 YslQ== 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; bh=RcKgwxLgnj68gY1XtIpf4tc1OA4DOItbOM8FQZYpSa0=; b=Z5H6wm5aRvcpmOGcHsirjk9pSbN1LdR7Z/fW7XdC0SvLxYqp3Mgz10gUKDu4V+qkz+ elD+r4V+TJDVUE+Ib+dcAonaBN74Y3mBHBqyVEe3IveQRVM1fypLXhpp9ORlauKSK+7I WRYyER78RGvXKmHHAMz8xb0XTKHSzQDeSTit7EFo2jyZ9hMRFiu4IZNKtnV5anckrOFa c6988tcsemrA0wIEjickmtxnAmAfa1fCAz/WYC9wikwylJm5PlQiZK1jtaNS2K0hyFea pQuXr3VC5fVfTnz9v25nYVHkBL95riJSHIgGWYxoTXQSQ95c5rDlb5zdrnfnghCX0Ee0 5KZA== X-Gm-Message-State: AOAM5300dUSJ6z73yjRojDSNjau8WddXerBY2eL4lO3ge7mPaZsSiQM0 WcRJPzY3d2fbbhWUoCQcifIGPh48jts= X-Google-Smtp-Source: ABdhPJwYLU2XNz1v6qtuoyKeNfvSwZOWaTlyQXv//dFeDwhI8a4iHI1GdEXW+Wo8PNhBI69t7xxq5A== X-Received: by 2002:a17:906:b1d3:: with SMTP id bv19mr19169518ejb.47.1627341332925; Mon, 26 Jul 2021 16:15:32 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id i6sm487859edt.28.2021.07.26.16.15.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 26 Jul 2021 16:15:32 -0700 (PDT) Subject: Re: bug#2544: 23.0.60; Could etags please try find a local tag first? To: Lars Ingebrigtsen References: <7f9b11c90903021336o775a3f75i8bd89f3ae4540cb7@mail.gmail.com> <878s22nyuj.fsf@gnus.org> <8335sa70wp.fsf@gnu.org> <417d5d01-c3a9-a75e-b134-7f1847749842@yandex.ru> <83lf615hfk.fsf@gnu.org> <838s206i0a.fsf@gnu.org> <4a8bb24b-51cd-f82b-c8ff-f57d3576eff1@yandex.ru> <87mtqglzlu.fsf@gnus.org> From: Dmitry Gutov Message-ID: Date: Tue, 27 Jul 2021 02:15:30 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <87mtqglzlu.fsf@gnus.org> Content-Type: multipart/mixed; boundary="------------0D69128AB50EFEA28DEFFABC" Content-Language: en-US X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 2544 Cc: Eli Zaretskii , matzikratzi@gmail.com, 2544@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) This is a multi-part message in MIME format. --------------0D69128AB50EFEA28DEFFABC Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 21.07.2021 13:39, Lars Ingebrigtsen wrote: > The problem is definitely much more noticeable in the etags backend, so > if your judgement is that that's where the option (and sorting) should > go, then please go ahead.:-) Here's a rough patch. Please test and send feedback (how well it works, variable naming, docstring, etc). --------------0D69128AB50EFEA28DEFFABC Content-Type: text/x-patch; charset=UTF-8; name="etags-xref-prioritize-same-file.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="etags-xref-prioritize-same-file.diff" diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index f0180ceeec..2af160be74 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -2059,6 +2059,10 @@ etags-xref-find-definitions-tag-order If you want `xref-find-definitions' to find the tagged files by their file name, add `tag-partial-file-name-match-p' to the list value.") +(defcustom etags-xref-prioritize-same-file nil + "Non-nil to show the matches in the same file first." + :type 'boolean) + ;;;###autoload (defun etags--xref-backend () 'etags) @@ -2072,7 +2076,21 @@ xref-backend-identifier-completion-ignore-case (find-tag--completion-ignore-case)) (cl-defmethod xref-backend-definitions ((_backend (eql etags)) symbol) - (etags--xref-find-definitions symbol)) + (let ((file (and buffer-file-name (expand-file-name buffer-file-name))) + (definitions (etags--xref-find-definitions symbol)) + same-file-definitions) + (when (and etags-xref-prioritize-same-file file) + (cl-delete-if + (lambda (definition) + (when (equal file + (xref-location-group + (xref-item-location definition))) + (push definition same-file-definitions) + t)) + definitions) + (setq definitions (nconc (nreverse same-file-definitions) + definitions))) + definitions)) (cl-defmethod xref-backend-apropos ((_backend (eql etags)) pattern) (etags--xref-find-definitions (xref-apropos-regexp pattern) t)) --------------0D69128AB50EFEA28DEFFABC-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 28 11:49:47 2021 Received: (at 2544) by debbugs.gnu.org; 28 Jul 2021 15:49:47 +0000 Received: from localhost ([127.0.0.1]:55676 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m8loY-0006wb-VL for submit@debbugs.gnu.org; Wed, 28 Jul 2021 11:49:47 -0400 Received: from quimby.gnus.org ([95.216.78.240]:49316) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m8loX-0006wP-O1 for 2544@debbugs.gnu.org; Wed, 28 Jul 2021 11:49:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=eBwB3OgrdHcdlRtivPFX1lKzHIyugP3HHy+By99ceXI=; b=P3gwY7BwW3ocLF6maGAfFdU4Hr 3rVNIsr9tjpgVdk4RiQouWTwPHynG1PDoGMzPqIWSTR0FWi95+5RcTpWkKATbk7gquFP46t3F20e2 4H9LiLq1wrti+0yyVdzvg7BTg0a/X2OBb1Mi+Nbu8F7u77pn91XBbtAeOBzfEcanDcCE=; Received: from 2.149.45.105.tmi.telenormobil.no ([2.149.45.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m8loO-0001AW-TG; Wed, 28 Jul 2021 17:49:39 +0200 From: Lars Ingebrigtsen To: Dmitry Gutov Subject: Re: bug#2544: 23.0.60; Could etags please try find a local tag first? References: <7f9b11c90903021336o775a3f75i8bd89f3ae4540cb7@mail.gmail.com> <878s22nyuj.fsf@gnus.org> <8335sa70wp.fsf@gnu.org> <417d5d01-c3a9-a75e-b134-7f1847749842@yandex.ru> <83lf615hfk.fsf@gnu.org> <838s206i0a.fsf@gnu.org> <4a8bb24b-51cd-f82b-c8ff-f57d3576eff1@yandex.ru> <87mtqglzlu.fsf@gnus.org> Date: Wed, 28 Jul 2021 17:49:35 +0200 In-Reply-To: (Dmitry Gutov's message of "Tue, 27 Jul 2021 02:15:30 +0300") Message-ID: <87r1fia168.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Dmitry Gutov writes: > Here's a rough patch. > > Please test and send feedback (how well it works, variable naming, > docstring, etc). I've just tested lightly, but it seems to work great for me. And the patch looks good to me. Only extremely minor thing: Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP 0.0 TVD_RCVD_IP Message was received from an IP address -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 2544 Cc: Eli Zaretskii , matzikratzi@gmail.com, 2544@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Dmitry Gutov writes: > Here's a rough patch. > > Please test and send feedback (how well it works, variable naming, > docstring, etc). I've just tested lightly, but it seems to work great for me. And the patch looks good to me. Only extremely minor thing: > +(defcustom etags-xref-prioritize-same-file nil > + "Non-nil to show the matches in the same file first." > + :type 'boolean) :version "28.1" -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 01 22:12:03 2021 Received: (at 2544) by debbugs.gnu.org; 2 Aug 2021 02:12:03 +0000 Received: from localhost ([127.0.0.1]:37267 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mANQx-0006yM-6U for submit@debbugs.gnu.org; Sun, 01 Aug 2021 22:12:03 -0400 Received: from mail-wr1-f42.google.com ([209.85.221.42]:42934) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mANQw-0006xr-5v for 2544@debbugs.gnu.org; Sun, 01 Aug 2021 22:12:02 -0400 Received: by mail-wr1-f42.google.com with SMTP id j2so19533346wrx.9 for <2544@debbugs.gnu.org>; Sun, 01 Aug 2021 19:12:02 -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=oUFZ5K2MfA38cvRwXzflbUva7LdX3sIZoGCjM2uQ/jM=; b=QvzqsGYqynxDY0t3uMXhocETU+lEavIjDhpDmCWE1oPns48u3+66jZwESk9URDe4kM +NpJytXtpt1htvxDkj4WnIiW9M2fJrmUkBAK0tbz3dYVFkpN2UsvPS9AdzhSOQlWCUh+ pB11/2eixVNmt3nsUH4xRD8LJnwHMDTSmmfmkjuH6geeEJhLFUrZ1mSpVPHKYicCkNqx d6WRzRULa8dWJYLkK3WLBHBNJuZqcV/recq8skpafs1S+7DNSb3xECoTC7T/kNJUI4Ep 3NxOkmdmW4qEt8XmYZhBa1QUj0q1tFPu1srvvoD/NkCm5351AXVbYrzYFtLVI3QmRBIU rL6g== 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=oUFZ5K2MfA38cvRwXzflbUva7LdX3sIZoGCjM2uQ/jM=; b=UV65ywsbRqb3LREY/DlhRB95gfSab9OkQIO3zopn7ciR3LtorXv/dXPMnYPQvRcow2 GJ537U00Yt/4+OkRGyQAQpsY8XqMXZbUtfRERKDKbfeUckRV414mGvH62L/hrDQ3LBqg 6pv8uClfHk4OA8gRSWyTxq2KYZywaPnRk1LT8l8n6JqCVX9N3zS+7QPwBWuife4DcpVQ lfL4LvVstDCi7K6wnQFJKakksFv2tYLtx4Un2hywg7U80kpcW0BOK9ZqWkM8ip5OyQSW 2O7wvn7iH45I8XoKHqkFQ05EHlSxnHqKMYJ37dfn7rktVZ95ZfZn/6UDLZn18OVa3Cum 7PYw== X-Gm-Message-State: AOAM533zt4NAxhFHvMZVrrOf8jJSfM+vybyNLUSjqo1npxV++A14rpor Ic9Zjo0/dJxyd5ZUa6ZRa91+VrMZWsQ= X-Google-Smtp-Source: ABdhPJwD6AofZE/LEhZ8knjMhZ6vVtnu5fDC3NIjIjJACAZ5MRWWM17SneP5yFahYXz7Im6TK7A1jQ== X-Received: by 2002:a5d:5703:: with SMTP id a3mr14848976wrv.333.1627870316632; Sun, 01 Aug 2021 19:11:56 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id k17sm5192317wmj.0.2021.08.01.19.11.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 01 Aug 2021 19:11:56 -0700 (PDT) Subject: Re: bug#2544: 23.0.60; Could etags please try find a local tag first? To: Lars Ingebrigtsen References: <7f9b11c90903021336o775a3f75i8bd89f3ae4540cb7@mail.gmail.com> <878s22nyuj.fsf@gnus.org> <8335sa70wp.fsf@gnu.org> <417d5d01-c3a9-a75e-b134-7f1847749842@yandex.ru> <83lf615hfk.fsf@gnu.org> <838s206i0a.fsf@gnu.org> <4a8bb24b-51cd-f82b-c8ff-f57d3576eff1@yandex.ru> <87mtqglzlu.fsf@gnus.org> <87r1fia168.fsf@gnus.org> From: Dmitry Gutov Message-ID: Date: Mon, 2 Aug 2021 05:11:54 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <87r1fia168.fsf@gnus.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 2544 Cc: matzikratzi@gmail.com, 2544@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) On 28.07.2021 18:49, Lars Ingebrigtsen wrote: >> +(defcustom etags-xref-prioritize-same-file nil >> + "Non-nil to show the matches in the same file first." >> + :type 'boolean) > :version "28.1" Thanks. Is the above a good variable name? I wasn't sure about it. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 02 07:36:42 2021 Received: (at 2544) by debbugs.gnu.org; 2 Aug 2021 11:36:42 +0000 Received: from localhost ([127.0.0.1]:37808 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mAWFO-0006ol-7j for submit@debbugs.gnu.org; Mon, 02 Aug 2021 07:36:42 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48472) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mAWFK-0006oS-N9 for 2544@debbugs.gnu.org; Mon, 02 Aug 2021 07:36:40 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:41292) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mAWFF-00046U-3s; Mon, 02 Aug 2021 07:36:33 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2144 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mAWFE-0001i1-MG; Mon, 02 Aug 2021 07:36:33 -0400 Date: Mon, 02 Aug 2021 14:36:21 +0300 Message-Id: <83o8agm62y.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: (message from Dmitry Gutov on Mon, 2 Aug 2021 05:11:54 +0300) Subject: Re: bug#2544: 23.0.60; Could etags please try find a local tag first? References: <7f9b11c90903021336o775a3f75i8bd89f3ae4540cb7@mail.gmail.com> <878s22nyuj.fsf@gnus.org> <8335sa70wp.fsf@gnu.org> <417d5d01-c3a9-a75e-b134-7f1847749842@yandex.ru> <83lf615hfk.fsf@gnu.org> <838s206i0a.fsf@gnu.org> <4a8bb24b-51cd-f82b-c8ff-f57d3576eff1@yandex.ru> <87mtqglzlu.fsf@gnus.org> <87r1fia168.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 2544 Cc: larsi@gnus.org, matzikratzi@gmail.com, 2544@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Dmitry Gutov > Date: Mon, 2 Aug 2021 05:11:54 +0300 > Cc: matzikratzi@gmail.com, 2544@debbugs.gnu.org > > On 28.07.2021 18:49, Lars Ingebrigtsen wrote: > >> +(defcustom etags-xref-prioritize-same-file nil > >> + "Non-nil to show the matches in the same file first." > >> + :type 'boolean) > > :version "28.1" > > Thanks. > > Is the above a good variable name? I wasn't sure about it. I suggest "prefer" instead of "prioritize", and "current" instead of "same". ("Same" here leaves me wondering "same as what?") From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 05 20:17:31 2021 Received: (at 2544-done) by debbugs.gnu.org; 6 Aug 2021 00:17:31 +0000 Received: from localhost ([127.0.0.1]:48682 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBnYJ-0003qj-CV for submit@debbugs.gnu.org; Thu, 05 Aug 2021 20:17:31 -0400 Received: from mail-wr1-f44.google.com ([209.85.221.44]:39508) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBnYI-0003qU-DL for 2544-done@debbugs.gnu.org; Thu, 05 Aug 2021 20:17:30 -0400 Received: by mail-wr1-f44.google.com with SMTP id b11so8794329wrx.6 for <2544-done@debbugs.gnu.org>; Thu, 05 Aug 2021 17:17:30 -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=Wq4QnE8+aoixZgPRPYdfNMLQkaH4OFCpVfQN6SY0rVk=; b=kEeX/64MsZPZuvau483SBi0s9uNC+BExtCurMjGQgrV622tvexnwQwGqAHULMW4qqH R9/ryJvvdk0oVZaKsDF85igwguyIJwmqmaqkxbZx3ymkhKP+a9MM9LeYNQKRqDbQ8TEM CcTiUYXDfIOXJBP6UqpD40SZNnthJXlr6MSI8ECY4MXoKovggtM1Bir5up4UKO+c8ASm +fccnZILJnagBLW13C/PgMh5t3nKxyL2gih4xTFTJBr/DHSQheMjfnh6jflZpsGMrS5l pNFNzAel9XfNm+kAD7wczGFRoGWQn0vzIlj3cdWLia4/SJyUIOHjkUy4kuBKr+IVTggj Hx4w== 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=Wq4QnE8+aoixZgPRPYdfNMLQkaH4OFCpVfQN6SY0rVk=; b=H/lwacbOz3r1P0dA4U/UGIlNkBOHcmZxkZibGlXmHoBuX+MLj9UkGLnZQRHVUAmT3I ZmFAAwfJdjdE0wN5fzjMsgo5xjysgM4wCYz5NyNYiEYsva3VkoE3pYnK/NYsObT3K83h SMG7eevsE801OE4FVpqQU31cJ6f3Pjq/BJt3EPIJmqsxbvPLRCninoCnjFHbP2l31XJr kycfF4lspoNaulbkPU3Vogzn0BjFazL4tmGeiG1wLv82evJlxNOJwn7mlyj3SzjxHk3M y+sViTbICergwJfQlH9ywcqg09+ccy+QfXMTtIb4t3BuwcQYZ4vATQneAoIH2UfJUlFr SKSA== X-Gm-Message-State: AOAM532I5tv04KuHu1hq+Uzi3I0SEsFjNXAPbXS7pZQUB9AEzdqxTwuH qQYLHZalcRl1sYb0Hxq68YJUKGphzWA= X-Google-Smtp-Source: ABdhPJxIom6UzF7DMZdTrUqitpOhRkycZDRepcAW0WLtwK9nArkqWrLDPpoBIDSTKFQbb7QW74hTQA== X-Received: by 2002:adf:f44e:: with SMTP id f14mr7910195wrp.101.1628209044789; Thu, 05 Aug 2021 17:17:24 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id q17sm7645290wre.3.2021.08.05.17.17.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 05 Aug 2021 17:17:24 -0700 (PDT) Subject: Re: bug#2544: 23.0.60; Could etags please try find a local tag first? To: Eli Zaretskii References: <7f9b11c90903021336o775a3f75i8bd89f3ae4540cb7@mail.gmail.com> <878s22nyuj.fsf@gnus.org> <8335sa70wp.fsf@gnu.org> <417d5d01-c3a9-a75e-b134-7f1847749842@yandex.ru> <83lf615hfk.fsf@gnu.org> <838s206i0a.fsf@gnu.org> <4a8bb24b-51cd-f82b-c8ff-f57d3576eff1@yandex.ru> <87mtqglzlu.fsf@gnus.org> <87r1fia168.fsf@gnus.org> <83o8agm62y.fsf@gnu.org> From: Dmitry Gutov Message-ID: <8267afb3-44bb-f21d-bd99-6ddb35db587e@yandex.ru> Date: Fri, 6 Aug 2021 03:17:23 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <83o8agm62y.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 2544-done Cc: larsi@gnus.org, matzikratzi@gmail.com, 2544-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) On 02.08.2021 14:36, Eli Zaretskii wrote: > I suggest "prefer" instead of "prioritize", and "current" instead of > "same". ("Same" here leaves me wondering "same as what?") Thank you. With these tweaks, I've installed the patch. So this bug can (finally?) be closed. From unknown Tue Jun 17 20:10:12 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 03 Sep 2021 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator