auctex-devel
[Top][All Lists]

## Re: [AUCTeX-devel] extended reftex-search-document

 From: Lars Madsen Subject: Re: [AUCTeX-devel] extended reftex-search-document Date: Fri, 28 Nov 2014 09:23:09 +0000

Thanks, I'll try to give that a spin

On another note, I was hit by this

\begin{enumerate}[a)]

I have a macro that cleans up envs and sets \begin/end parts on lines of their
own, attempting to leave any arguments alone.

I my macro (with point at [) I'm attempting to jump to the matching ], but
using (forward-sexp) this fails on

[a)]

leaving me at ) and I end up with

\begin{enumerate}[a)
]

Any advise on the proper method to go to a matching end?

Institut for Matematik / Department of Mathematics
Aarhus Universitet / Aarhus University

________________________________________
Sent: 27 November 2014 16:08
Subject: Re: [AUCTeX-devel] extended reftex-search-document

Hi Lars,

> I was wondering, has anyone thought of making an extended version of
> reftex-search-document?
>
> By this I mean a similar feature, but where one can add, say a
> callback, that will make extra tests on a match found, and if the test
> fails, automatically continue to the next match.
>
> This could be rather useful then editing sources other people
> wrote. For example, adding that we are only interested in matches
> outside of math.
>
> In the manuscript I'm currently editing, there are a lot of standard
> commas missing in the text, so if I had a feature like this I could
> make a regexp (only lower case matches) of standard words that should
> always be preceeded by a comma in my language, as a callback it should
> be looking to see if a comma was already present.
>
> I haven't gone too far down the details of how tags-search (which
> reftex-search-document use) actually work.

That shouldn't be too hard.  Have a look at tags-search'.  That sets
tags-loop-scan' to (re-search-forward ',regexp nil t) to do the actual
search.  So just make your own lars/tags-search' function by copying
tags-search' and setting tags-loop-scan' to something like

(when (re-search-forward ',regexp nil t)
(check-whatever-needs-to-be-checked))

Bye,
Tassilo

_______________________________________________
auctex-devel mailing list
`