From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: David Fussner via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#53749: 29.0.50; [PATCH] Xref backend for TeX buffers Date: Sat, 26 Feb 2022 09:29:06 +0000 Message-ID: References: <87pmnad7n3.fsf@gmail.com> Reply-To: David Fussner Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12372"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 53749@debbugs.gnu.org To: Augusto Stoffel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 26 10:30:52 2022 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 1nNtPf-00036a-Ng for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 26 Feb 2022 10:30:51 +0100 Original-Received: from localhost ([::1]:49338 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nNtPe-0005Fb-9x for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 26 Feb 2022 04:30:50 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38756) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNtOs-0005Dt-IN for bug-gnu-emacs@gnu.org; Sat, 26 Feb 2022 04:30:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60399) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nNtOs-0002Yn-9I for bug-gnu-emacs@gnu.org; Sat, 26 Feb 2022 04:30:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nNtOs-0005dq-2Y for bug-gnu-emacs@gnu.org; Sat, 26 Feb 2022 04:30:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: David Fussner Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 26 Feb 2022 09:30: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: patch X-Debbugs-Original-Cc: 53749@debbugs.gnu.org, "David Fussner via Bug reports for GNU Emacs, the Swiss army knife of text editors" Original-Received: via spool by submit@debbugs.gnu.org id=B.164586776421600 (code B ref -1); Sat, 26 Feb 2022 09:30:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 Feb 2022 09:29:24 +0000 Original-Received: from localhost ([127.0.0.1]:54293 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNtOF-0005cI-Ld for submit@debbugs.gnu.org; Sat, 26 Feb 2022 04:29:24 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:39174) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNtOD-0005cA-Gm for submit@debbugs.gnu.org; Sat, 26 Feb 2022 04:29:22 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38630) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNtOD-0004mn-2x for bug-gnu-emacs@gnu.org; Sat, 26 Feb 2022 04:29:21 -0500 Original-Received: from [2607:f8b0:4864:20::735] (port=45755 helo=mail-qk1-x735.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nNtOB-0002U3-C1 for bug-gnu-emacs@gnu.org; Sat, 26 Feb 2022 04:29:20 -0500 Original-Received: by mail-qk1-x735.google.com with SMTP id b13so6523576qkj.12 for ; Sat, 26 Feb 2022 01:29:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=QCQ9aqQF2VgkXkjJXKe+ExzyiCy1QnZKHQ5H+PCQXpI=; b=HIn811gh+Jc0o/BUZ6t1v+zQfvF6lr2edfonkYLeK+KdX0qr45Hn/mpaPu8wDk6zyI sW5UmUfOI86t6sT6C9cCr3GqSFlXxVTfRljKQmu2AQm6yqfEJUeBZVXl9T+5EuHFB6Rn ELQzecofeKwr/7EW5ck84ZNr93cBhPGapT5aofqJ4aVOvTIOvyPCMWiSZaek/FfHFmz6 pkQ9MBb3i37zyido9tT/5G4yr1TRTfOgC6ul/TBee6cScA5H4d7DCmLRvFP2tQX5QyUF QFXSbLCRO/RJT/gHT276KefVlGGCTCtVg7Z5nLGnRDkrMmt4SmZTLFfbJrHVrwSyPmJD Yrsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QCQ9aqQF2VgkXkjJXKe+ExzyiCy1QnZKHQ5H+PCQXpI=; b=OfLHYdKA/hQWUWnAk5b93l5U+72AOG3o5Od2w7zM4X84lS3EY8LZKTi72i1Kv05MEj kC4eCJ+ccwNyBsQCU1xFdJqBRo7FaIkV7YwSR2aEL9bN1lxYKUiDidyRKDERH8UZVOje ih8m/gvpIEnC+U4o6QfWy4+4jg9QEtM6nrOolGAiOwFYzYI00NDo9kNtl6CKFP0BnRsT JvEpMelEMJMhXZ7OzarNIBiM11a1FfpU6tjc5kezDcrCIwNfsnsGkmPHUCDW00fIO1GC UBKOuyYTzZSuVAGh8axnrArdJd8mkJlGVbcIjhz+lGalWmpyQMuBVipV269iMekuXjlf 1tgA== X-Gm-Message-State: AOAM531D2PtBbOJ1FRo9kAfM/2THdSORjx2LB99ar1Zc5lEm3oGJkFKz 4NrBxCYlA1dRhtCXigsBqE7wSxqJtMq9QyBqS7k= X-Google-Smtp-Source: ABdhPJxD2uIvSagDTxAakvQVcDMJpunL8m0eLgVUMJRahlDmDZcQBJ6vMq6XXWoGSoBKp0MEFApWJWatXWn+BsDFl8Y= X-Received: by 2002:a37:4147:0:b0:47c:4595:b8c with SMTP id o68-20020a374147000000b0047c45950b8cmr6917449qka.267.1645867757950; Sat, 26 Feb 2022 01:29:17 -0800 (PST) In-Reply-To: <87pmnad7n3.fsf@gmail.com> X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::735 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::735; envelope-from=dfussner@googlemail.com; helo=mail-qk1-x735.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action 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" Xref: news.gmane.io gmane.emacs.bugs:227669 Archived-At: Hi Augusto, On Fri, 25 Feb 2022 at 20:16, Augusto Stoffel wrote: > > Hi David, > > I took a superficial look at this thread, and this seems very nice. Thanks! > > I was wondering why you want to be able to find the definition of macros > with @ in their name. Those are "private" macros that the user > shouldn't have occasion to use. Is it for a TeX programmer mode? I confess that TeX developers are indeed one of the main targets for the feature as I envisioned it. For creating and following \labels, \refs, and \cites (of all sorts) I find RefTeX very handy, as well as for jumping around \chapters and \sections and the like. What I miss when developing are the code-navigation features of something like xref, which are (from the user point of view) both simple and powerful. My modest goal was to make Emacs' extensive infrastructure work a little better out of the box for TeX documents, especially for styles and other collections of macros. > > Let me also mention a library I wrote for analyzing TeX code (accessible > to Emacs via LSP): > > https://github.com/astoff/digestif > > It's written in Lua (can run on the LuaTeX interpreter) and uses PEGs > for flexible parsing. If you want to be very ambitious about what you > are able to parse, I think regexps are not sufficient. > > Digestif can handle \cite{messed up reference} just fine, for example. > This looks very nice indeed, and if I'm reading it right provides a replacement both for RefTeX and for the code-navigation features I'm trying to implement. I figure I'll continue trying to get improved out-of-the-box features into core, and if I manage to satisfy Dmitry we'll then have a choice, but in any case I'm going to have a longer look at digestif when I get some time. Thanks for the hint! David.