[Top][All Lists]

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

Re: [AUCTeX-devel] Coding docstrip.el

From: Arash Esbati
Subject: Re: [AUCTeX-devel] Coding docstrip.el
Date: Sun, 19 Mar 2017 14:02:53 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2

Jan Braun <address@hidden> writes:

> you offered me to contact you via this mail address on
> <>.  Thank you
> very much.

Hi Jan,

sure, you're welcome.  Please note that this is the official AUCTeX
devel mailing-list and not my private e-mail address.

> Meanwhile, I have some good progress and wanted to ask you, if you
> would be so kind, to have a first glance on it, to keep me on the
> right track, avoid bad habits …, before I blame myself by releasing
> the code ;-)

I suggest you send code, questions etc. to this mailing list as this
increases the chance that others will give you feedback as well.

> I think, this code should be added as patch/extension/addon to doc.el,
> as it affects files, that will load doc.el from the actual AUCTeX
> styles.
> But the guards inserted in the DTX-files have to match those in the
> docstrip „.ins“-files.
> Therefore, I plan to save the list of used guard symbols in an extra
> list, which will be queried, if the user has to insert the name of a
> guard in a docstrip .ins or a doc .dtx file.  Furthermore, these guard
> symbols should be also saved into the corresponding auto-files of the
> sources, in order to be used by doc.el, i. e. the user could use
> completion to insert a guard, in a .dtx file which was declared in the
> docstrip .ins-file and vice-versa.

This is indeed an interesting feature you want to implement.  My
approach would be:

1) doc.el: Add some functions in order to add user queried guards
(one-line and/or environment) into the .dtx file

2) doc.el: Add parsing facilities in order to extract and process guard

3) doctrip.el: Add a function to run the style hook for the file inside
the first argument of \from{foo.dtx}, then offer parsed/saved guards
from foo.dtx for the second argument.

For 1) and 2), AUCTeX has a lot style files with parsing support.  You
can get some idea from them.  For 3), have a look at subfiles.el, maybe
that help.

> Although, I know, that the code on Stackexchange is CC, I think, it
> would be rude, to not ask you, to permit me, to use your code for the
> above described usage.  Of course, I will credit you as the real
> author.

Thanks for asking.  Sure, go ahead and use that snippet.

Looking forward to seeing docstrip.el.

Best, Arash

reply via email to

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