[Top][All Lists]

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

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

From: Tassilo Horn
Subject: Re: [AUCTeX-devel] extended reftex-search-document
Date: Thu, 27 Nov 2014 16:08:18 +0100
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux)

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)


reply via email to

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