auctex-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[some progress still not reliable] (was: reftex+catchfilebetweentags, re


From: Uwe Brauer
Subject: [some progress still not reliable] (was: reftex+catchfilebetweentags, reftex support for catchfilebetweentags tags)
Date: Fri, 02 Dec 2022 08:37:25 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

>>> "AE" == Arash Esbati <arash@gnu.org> writes:

> Hi Uwe,
> Uwe Brauer <oub@mat.ucm.es> writes:

I think I understand some of the structure but still the workflow is not
entirely reliable.



>   \newcommand{\ExecuteExternalMetaData}[2]{%
>     \ExecuteMetaData[#1]{#2}%
>   }


I now understand the purpose of this macro and added it to my LaTeX
file.

I also added to catchfilebetweentags.el the macro

;; New macro to provide basic RefTeX support for inserting the label.
    '("ExecuteExternalMetaData"
      (TeX-arg-input-file  "File-name" t) "Tag")



> Then you need to add <*TAG-NAME> to `reftex-label-regexps'.  Finally,
> you need to write a little lisp for your `ExecuteExternalMetaData' which
> asks for two arguments, file name and then runs `reftex-label' with the
> `no-insert' argument set to t in order to get only the label and insert
> that without \ref.  This is the first part I tried and it works in terms
> of RefTeX sees the labels in an external file (note that they are
> commented out, you need to hit '%' to make them visible in RefTeX Select
> buffer)

>   (add-to-list 'reftex-include-file-commands
>                "ExecuteExternalMetaData" t)

>   (add-to-list 'reftex-label-regexps
>                "<\\*\\(?1:[^>]+\\)>" t)

>   (reftex-compile-variables)


Indeed that works in the current Emacs session.

However,  even after putting these lines in
my reftex_init.el file and byte-compiling it, after a restart of Emacs,  the 
reftex
did not add the correct reference/label to ExecuteExternalMetaData!

I had explicitly to eval these lines again, to make it work. I am sort
of puzzled.

Regards

Uwe 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]