all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: How to define xref-find-definitions for a new mode?
Date: Sat, 09 Jun 2018 12:48:15 +0300	[thread overview]
Message-ID: <83vaass334.fsf@gnu.org> (raw)
In-Reply-To: <87muw4z5oh.fsf@mbork.pl> (message from Marcin Borkowski on Sat,  09 Jun 2018 11:10:22 +0200)

> From: Marcin Borkowski <mbork@mbork.pl>
> Cc: help-gnu-emacs@gnu.org
> Date: Sat, 09 Jun 2018 11:10:22 +0200
> 
> Thanks.  Are there other places I could look into, like xref
> implementation for a concrete language?

In the sources for the respective languages, notably Lisp.  Search for
"xref-".

> > (Btw, doesn't it already work?  Etags is an existing back-end for
> > Xref, and 'etags' the program already supports TeX and its
> > derivatives, so it is able to create TAGS tables for LaTeX files.)
> 
> Well, possibly, but I'd like it to work like for Elisp or JavaScript,
> without a TAGS table.

Is this likely to happen?  Lisp and JavaScript know where to find
functions and variables because they keep that information as part of
defining them.  I don't think TeX does anything similar, does it?

> Also, I want it to go to \label when on \ref, to \bib / \bibitem
> when on \cite etc.

Are you sure it doesn't work already?  E.g., if \label is tagged, then
"M-." on the tag's name at \ref should go to the label's definition.



  reply	other threads:[~2018-06-09  9:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-09  6:46 How to define xref-find-definitions for a new mode? Marcin Borkowski
2018-06-09  8:47 ` Eli Zaretskii
2018-06-09  9:10   ` Marcin Borkowski
2018-06-09  9:48     ` Eli Zaretskii [this message]
2018-06-11  3:22       ` Marcin Borkowski
2018-06-11 15:13         ` Eli Zaretskii
2018-06-15  4:49           ` Marcin Borkowski
2018-06-15  7:41             ` Eli Zaretskii
2018-06-15  8:59               ` Marcin Borkowski
2018-06-12 13:30     ` Dmitry Gutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83vaass334.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.