[Top][All Lists]

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

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


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


leaving me at ) and I end up with


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

/Lars Madsen
Institut for Matematik / Department of Mathematics
Aarhus Universitet / Aarhus University
Mere info: / More information:

From: address@hidden address@hidden on behalf of Tassilo Horn address@hidden
Sent: 27 November 2014 16:08
To: address@hidden
Subject: Re: [AUCTeX-devel] extended reftex-search-document

Lars Madsen <address@hidden> writes:

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)


auctex-devel mailing list

reply via email to

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