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: Wed, 13 Sep 2023 18:23:13 +0300 Message-ID: References: <1de34060-e93b-0a42-fff5-20e283abe0dc@yandex.ru> <87o7vq0zir.fsf@gnus.org> <8735d20yvd.fsf@gnus.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="11322"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cc: 53749@debbugs.gnu.org, Lars Ingebrigtsen To: David Fussner , Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 13 17:24:31 2023 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 1qgRjC-0002ok-P5 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 13 Sep 2023 17:24:30 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qgRih-0006EA-3h; Wed, 13 Sep 2023 11:23:59 -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 1qgRif-0006Dc-5B for bug-gnu-emacs@gnu.org; Wed, 13 Sep 2023 11:23:57 -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 1qgRie-0000xj-TQ for bug-gnu-emacs@gnu.org; Wed, 13 Sep 2023 11:23:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qgRij-0005f0-QB for bug-gnu-emacs@gnu.org; Wed, 13 Sep 2023 11:24: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: Wed, 13 Sep 2023 15:24: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.169461861321719 (code B ref 53749); Wed, 13 Sep 2023 15:24:01 +0000 Original-Received: (at 53749) by debbugs.gnu.org; 13 Sep 2023 15:23:33 +0000 Original-Received: from localhost ([127.0.0.1]:35668 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qgRiG-0005eF-OO for submit@debbugs.gnu.org; Wed, 13 Sep 2023 11:23:33 -0400 Original-Received: from forward501b.mail.yandex.net ([178.154.239.145]:38740) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qgRiC-0005e2-P2 for 53749@debbugs.gnu.org; Wed, 13 Sep 2023 11:23:31 -0400 Original-Received: from mail-nwsmtp-smtp-production-main-73.iva.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-73.iva.yp-c.yandex.net [IPv6:2a02:6b8:c0c:7e9c:0:640:587e:0]) by forward501b.mail.yandex.net (Yandex) with ESMTP id F35205E7A1; Wed, 13 Sep 2023 18:23:19 +0300 (MSK) Original-Received: by mail-nwsmtp-smtp-production-main-73.iva.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id HNhdbhADgeA0-777hMwy4; Wed, 13 Sep 2023 18:23:19 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1694618599; bh=cVIHCR+BFTKECr/K8OeXfbKGQSHWFHxDdg6SQkbdX1c=; h=In-Reply-To:From:Subject:Message-ID:Cc:References:Date:To; b=A24eHabsHoRQzHHr9RrmGDtaXBgn844gey8MYcT6iqJaI7cChkR85SGgvyBvdlIkz IE1QGRXqA4RHAtOwh/5nuSoLlc51BYjijE8lv4Sr06jZtPOM9m0zvOTXwnfPKS+meK YxoigluWTilrIdNwB5ecSKvLFypWLtxRrWb/1fZM= Authentication-Results: mail-nwsmtp-smtp-production-main-73.iva.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Original-Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id 514B127C0054; Wed, 13 Sep 2023 11:23:17 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Wed, 13 Sep 2023 11:23:17 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudeikedgkeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegughhuthhovheshigrnhguvgigrdhruheqnecuggftrfgrth htvghrnheptdffgeegkeelteevtdekleethfeftdduvdegkedtkedujefhfedtveeftdff udevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hguhhtohhvodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqddufeeffeelleeh hedvqddvleegjeejjeejiedqughguhhtohhvpeephigrnhguvgigrdhruhesfhgrshhtmh grihhlrdgtohhm X-ME-Proxy: Feedback-ID: ib1d9465d:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 13 Sep 2023 11:23:15 -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:270317 Archived-At: Hi David! Thanks for the new patch. I'm skipping over the etags parser changes (others might comment, I'm just assuming they are good). And "thing at point" code is, I think, at your discretion (if the result is useful, then that seems good). I would probably not call the function the same way given that we don't install this "thing" globally, just using it from several the major modes in a particular way. Anyway, that is a minor affair. I'd like to suggest two simplifications for the xref-related stuff, if those work for you. On 13/09/2023 14:10, David Fussner via Bug reports for GNU Emacs, the Swiss army knife of text editors wrote: > <...> I also manipulate some > variables buffer-locally to make things like project-find-regexp and > isearch-forward-thing-at-point work better in such buffers. These won't be affected either way, right? Because project-find-regexp defaults its input to (thing-at-point 'symbol t), and isearch... probably also uses "symbol" if you ask it to. So... why not just make tex-thingatpt-include-escape a boolean? What commands need to be distinguished that way? I think 'find-tag' (it's obsolete but still used sometimes) would need to obey this var as well. And the second thing: you're putting the symbol on major modes. +(dolist (texmode tex-thingatpt-modes-list) + (put texmode 'find-tag-default-function 'tex--thing-at-point)) Why not set the variable find-tag-default-function instead? That seems easier and more appropriate to do inside a major mode function. Thanks.