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: Mon, 10 Jun 2024 01:13:43 +0300 Message-ID: <75d6872c-4c31-44a5-8597-781741dca720@yandex.ru> References: <83ba27b7-4d28-4a3f-b803-4bc49f62986c@yandex.ru> <82993b86-0f34-4adb-a392-c74db5176d14@yandex.ru> <86v832z5lp.fsf@gnu.org> <6efddf34-1f18-41c8-9125-b6b2e3ad3d21@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="34224"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: 53749@debbugs.gnu.org, ikumi@ikumi.que.jp, David Fussner , arash@gnu.org, Stefan Kangas , tsdh@gnu.org, Eli Zaretskii To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 10 00:14:59 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 1sGQoU-0008g0-KY for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 10 Jun 2024 00:14:58 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sGQoK-00069u-QJ; Sun, 09 Jun 2024 18:14:48 -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 1sGQoI-00069N-PW for bug-gnu-emacs@gnu.org; Sun, 09 Jun 2024 18:14:46 -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 1sGQoI-0000Hi-4g for bug-gnu-emacs@gnu.org; Sun, 09 Jun 2024 18:14:46 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sGQoX-0001lt-R4 for bug-gnu-emacs@gnu.org; Sun, 09 Jun 2024 18:15: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 22:15: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.17179712546701 (code B ref 53749); Sun, 09 Jun 2024 22:15:01 +0000 Original-Received: (at 53749) by debbugs.gnu.org; 9 Jun 2024 22:14:14 +0000 Original-Received: from localhost ([127.0.0.1]:35680 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sGQnm-0001k0-Cp for submit@debbugs.gnu.org; Sun, 09 Jun 2024 18:14:14 -0400 Original-Received: from forward502c.mail.yandex.net ([178.154.239.210]:49798) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sGQnj-0001jk-Du for 53749@debbugs.gnu.org; Sun, 09 Jun 2024 18:14:13 -0400 Original-Received: from mail-nwsmtp-smtp-production-main-44.sas.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-44.sas.yp-c.yandex.net [IPv6:2a02:6b8:c24:a33:0:640:d837:0]) by forward502c.mail.yandex.net (Yandex) with ESMTPS id 2962E60C82; Mon, 10 Jun 2024 01:13:52 +0300 (MSK) Original-Received: by mail-nwsmtp-smtp-production-main-44.sas.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id lDlgnC0Qt4Y0-CzWVaNff; Mon, 10 Jun 2024 01:13:51 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1717971231; bh=v+qhvfhjCPgXKTQq0xLV3G5FfeneY10RWMP8sX8gnQg=; h=In-Reply-To:From:Subject:Message-ID:Cc:References:Date:To; b=CgxMD0JmkCPnmzjMK9HEo3wqrQpXoITHQUadomf7VCzQoTtyGsBEGHN4uF1wgeCVz CrMedN0ixKC3vT4z5Zphgq7ZOMjZL9YBd0SkGDozrHCqBXSyMmf74eYnU7RgnDv3oA Ut5gwNuqf5KiEop7XF1uIxcj1MhqWa1NHU0C2AKA= Authentication-Results: mail-nwsmtp-smtp-production-main-44.sas.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfauth.nyi.internal (Postfix) with ESMTP id D16B41200043; Sun, 9 Jun 2024 18:13:46 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sun, 09 Jun 2024 18:13:46 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfedtkedgtdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegughhuthhovheshigrnhguvgigrdhruheqnecuggftrfgrth htvghrnhepiefhjeeuveetffffvdefteffffekhfeuudejieehheeiudelgfehgffffedu ffdunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hguhhtohhvodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqddufeeffeelleeh hedvqddvleegjeejjeejiedqughguhhtohhvpeephigrnhguvgigrdhruhesfhgrshhtmh grihhlrdgtohhm X-ME-Proxy: Feedback-ID: ib1d9465d:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 9 Jun 2024 18:13:44 -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:286991 Archived-At: On 10/06/2024 00:03, Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors wrote: >>>> +;; 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. > FWIW, I think the responsability of `symref.el` is to provide hooks like > the `semantic-symref-filepattern-alist` var along with the code that > uses them, but the mode-specific settings, such as knowledge about which > glob patterns should be used for `latex-mode` belong to the > corresponding mode. I've been looking at semantic-symref-filepattern-alist like a workaround for the fast that the major modes don't provide enough relevant information in auto-mode-alist (or, to look at it differently, don't provide such info in some other variable which the auto-mode-alist entry would be computed from). From that perspective, storing the missing association inside the semantic-symref package seems suitable. But a more "proper" place for it would be better, of course.