In a multifile project, I turned on reftex and I can do incremental search through all the subfiles, as is alluded to in this post quite a while back, by the following
(add-hook 'TeX-mode-hook (lambda () (reftex-isearch-minor-mode))) ; for AUCTeX
query-replace (or shortkey
M-%) function is not working as promised in this document as
- RefTeX has full support for multifile documents. You can edit parts of several (multifile) documents at the same time without conflicts. RefTeX provides functions to run grep, search and query-replace on all files which are part of a multifile document.
I had expected that it would automatically work since the incremental search works, yet it still only works within the current buffer.
reftex-query-replace-document mentioned in another post does work for replacing regular expressions over all the subfiles, or for some very simple strings. If some complicated strings are to be replaced, the cursor will jump to the end of the last file (without doing anything), and we will get the message
user-error: All files processed
Any idea how to make it work as described in the document? Many thanks!