Emacs: query-replace, regular expression, reuse of search result
2
votes
1
answer
1421
views
How do I combine something like
query-replace
with a regular expression search-and-replace that in part reuses the search result?
In my case, how to transform
> The programmers are "sort of" confident that the subroutines "load_students" and "compute_student_grade" are without bugs.
into
> The programmers are "sort of" confident that the subroutines \texttt{load_students} and \texttt{compute_student_grade} are without bugs.
I could use two query-replace
and then hammer yes and no, but it seems sluggish for a big document. Also, I thought about including the whitespace in the searches (one "
and one "
, but that would not work in cases such as ... that's not the way to use "load_students", rather ...
Is there built-in stuff for this or do you write Elisp code?
Asked by Emanuel Berg
(7101 rep)
May 29, 2012, 08:08 PM
Last activity: May 30, 2012, 12:53 AM
Last activity: May 30, 2012, 12:53 AM