10

Is there a way to let emacs automatically search and replace strings/regex in all files that are part of a multifile document? With C-s or M-% only the current buffer is included in the search, even if TeX-master variable is set.

I'm using GNU Emacs 24.3.1

  • 1
    classic way is to use tags-query-replace (with etags) – David Carlisle Oct 25 '14 at 11:54
  • What version of Emacs are you using? – user65002 Oct 25 '14 at 12:24
  • 3
    Enable reftex, it contains features to search and replace (I think it is based on David's answer). Always pair auctex with reftex. Makes your life easier – daleif Oct 25 '14 at 13:28
  • 1
    @daleif That's it: reftex-query-replace-document and reftex-search-document. Please add it as solution so I can accept it. – S1lentSt0rm Oct 25 '14 at 14:31
  • @S1lentSt0rm. Done – daleif Oct 25 '14 at 17:07
10

When ever you use emacs and auctex always remember to enable reftex as well or you will miss out on all sorts of useful goodies. In this case reftex-query-replace-document and reftex-search-document. Another one I like is the label rename feature, really nice.

  • 3
    In addition, reftex-isearch-minor-mode lets you use normal C-s key stroke to search the whole multifile document. thanks! – S1lentSt0rm Oct 25 '14 at 17:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.