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#53749: 29.0.50; [PATCH] Xref backend for TeX buffers Date: Sun, 9 Jun 2024 21:45:40 +0300 Message-ID: <6efddf34-1f18-41c8-9125-b6b2e3ad3d21@yandex.ru> References: <831qf1mgjl.fsf@gnu.org> <87cyyj9rpp.fsf@gnu.org> <65793.1694843596@localhost> <83ba27b7-4d28-4a3f-b803-4bc49f62986c@yandex.ru> <82993b86-0f34-4adb-a392-c74db5176d14@yandex.ru> <86v832z5lp.fsf@gnu.org> 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="27316"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: 53749@debbugs.gnu.org, arash@gnu.org, tsdh@gnu.org, Stefan Monnier , ikumi@ikumi.que.jp To: Stefan Kangas , David Fussner , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 09 20:47:10 2024 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 1sGNZN-0006tg-Rq for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 09 Jun 2024 20:47:09 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sGNZ4-0004OU-Tz; Sun, 09 Jun 2024 14:46:50 -0400 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 1sGNZ0-0004N7-31 for bug-gnu-emacs@gnu.org; Sun, 09 Jun 2024 14:46:48 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sGNYz-0003di-GJ for bug-gnu-emacs@gnu.org; Sun, 09 Jun 2024 14:46:45 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sGNZF-0000a0-NZ for bug-gnu-emacs@gnu.org; Sun, 09 Jun 2024 14:47:01 -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, 09 Jun 2024 18:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53749 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: pending patch Original-Received: via spool by 53749-submit@debbugs.gnu.org id=B53749.17179587722096 (code B ref 53749); Sun, 09 Jun 2024 18:47:01 +0000 Original-Received: (at 53749) by debbugs.gnu.org; 9 Jun 2024 18:46:12 +0000 Original-Received: from localhost ([127.0.0.1]:54435 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sGNYR-0000Xh-Tn for submit@debbugs.gnu.org; Sun, 09 Jun 2024 14:46:12 -0400 Original-Received: from forward502c.mail.yandex.net ([178.154.239.210]:40200) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sGNYO-0000XT-JP for 53749@debbugs.gnu.org; Sun, 09 Jun 2024 14:46:11 -0400 Original-Received: from mail-nwsmtp-smtp-production-main-36.sas.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-36.sas.yp-c.yandex.net [IPv6:2a02:6b8:c10:2b05:0:640:2bb4:0]) by forward502c.mail.yandex.net (Yandex) with ESMTPS id C103360C25; Sun, 9 Jun 2024 21:45:49 +0300 (MSK) Original-Received: by mail-nwsmtp-smtp-production-main-36.sas.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id ijhtNp1o8Sw0-NfWH7irY; Sun, 09 Jun 2024 21:45:48 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1717958749; bh=/KjbP34QlBmlrQtqEi4+G+J3JsWZ6YxYEFUNPQCytA0=; h=In-Reply-To:From:Subject:Message-ID:Cc:References:Date:To; b=uFbCtq1BbM6bCMEzvWC+i4cIeO0EONJQ4p12ef0Qayy5I34iHudkySh1iVHRPncvd zxh2f/Rl8msQ1gigeCFXCeYaN1HhI9ahdJ9t2+3ZnshPLCuN56Hxl4oIc/J76FD5VQ jsTWryEL4sLFmLr/xOt8eENaEGrIxTIQnCD8574A= Authentication-Results: mail-nwsmtp-smtp-production-main-36.sas.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfauth.nyi.internal (Postfix) with ESMTP id 4EC071200043; Sun, 9 Jun 2024 14:45:44 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Sun, 09 Jun 2024 14:45:44 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfedtjedguddvkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeenucfhrhhomhepffhm ihhtrhihucfiuhhtohhvuceoughguhhtohhvseihrghnuggvgidrrhhuqeenucggtffrrg htthgvrhhnpeeihfejueevteffffdvfeetffffkefhuedujeeiheehiedulefghefgffef udffudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gughhuthhovhdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqudeffeefleel heehvddqvdelgeejjeejjeeiqdgughhuthhovheppeihrghnuggvgidrrhhusehfrghsth hmrghilhdrtghomh X-ME-Proxy: Feedback-ID: ib1d9465d:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 9 Jun 2024 14:45:42 -0400 (EDT) Content-Language: en-US In-Reply-To: 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:286967 Archived-At: On 09/06/2024 14:36, Stefan Kangas wrote: >> diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi >> index 579098c81b1..a064103aa25 100644 >> --- a/doc/emacs/maintaining.texi >> +++ b/doc/emacs/maintaining.texi >> @@ -2529,6 +2529,15 @@ Identifier Search >> referenced. The XREF mode commands are available in this buffer, see >> @ref{Xref Commands}. >> >> +When invoked in a buffer whose major mode uses the @code{etags} backend, >> +@kbd{M-?} searches files and buffers whose major mode matches that of >> +the original buffer. It guesses that mode from file extensions, so if >> +@kbd{M-?} seems to be skipping relevant buffers or files, try >> +customizing either the variable @code{semantic-symref-filepattern-alist} > Why does this speak of Semantic? Does `xref-find-references` depend on > it somehow? xref-backend-references's default implementation calls semantic-symref-perform-search under the cover. It's just the "symref" package, not the parser or the rest. David's addition also uses it, and that's fine. >> +;; Populate `semantic-symref-filepattern-alist' for the in-tree modes; >> +;; AUCTeX is doing the same for its modes. >> +(with-eval-after-load 'semantic/symref/grep >> + (defvar semantic-symref-filepattern-alist) >> + (push '(latex-mode "*.[tT]e[xX]" "*.ltx" "*.sty" "*.cl[so]" >> + "*.bbl" "*.drv" "*.hva") >> + semantic-symref-filepattern-alist) >> + (push '(plain-tex-mode "*.[tT]e[xX]" "*.ins") >> + semantic-symref-filepattern-alist) >> + (push '(doctex-mode "*.dtx") semantic-symref-filepattern-alist)) > Doesn't this stuff rather belong in semantic itself? Good point.