auctex-devel
[Top][All Lists]
Advanced

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

Re: ExecuteMetaData with [ ] instead of { }


From: Arash Esbati
Subject: Re: ExecuteMetaData with [ ] instead of { }
Date: Tue, 23 Aug 2022 10:37:28 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50

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

>>>> "AE" == Arash Esbati <arash@gnu.org> writes:
>
>> Thanks.  I don't think the code is too primitive, I think it is more
>> use-case specific.  I would appreciate if you would send a patch for
>> catchbetweentags.el covering the functionality provided by the LaTeX
>> package, but anything else should be part of private code, like in your
>> case.
>
> Sure I can do that, but the second part of your last sentence confuses
> me. Catchbetweentags needs two things
>
>     1. \ExecuteMetaData[filename]{tag} in the target flie
>
>     2. A «environment» style in the source file
>        %<*tag>
>         text
>        %</tag>
>        
>
> In 2 an automatic labeled tag is extremely useful and convenient.
> Are you saying that part should not be in the style file, because I am
> using (require 'cl-lib) ?

With use-case specific, I meant the numeric scheme of tags you're using
like this:

%<*1>
 text
%</1>
..
%<*2>
 text
%</2>

I'm not sure if other users of the package go the same route.

I don't see any issue to add some generic code to catchbetweentags.el
which parses the source file and offers them for completion in the
target file, as described above.  If you want to introduce a custom
variable for numeric scheme, that would be also Ok.  I'm just saying
that the code should be usable for all users.

(require 'cl-lib) isn't a big deal, you can replace that one occurrence
of `incf' (which should be `cl-incf' actually) with (setq foo (1+ foo))
and you're done.

Also note that `next-line' is for interactive use only, in lisp you
should use `forward-line', check the docstring.

Best, Arash



reply via email to

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