I use emacs+auctex and auto-fill-mode.
Now sometimes I want to search (and replace) a string containing spaces like "test1 test2". The problem is, that auto-fill-mode replaces space-characters sometimes by newline characters. So search and replace of "test1 test2" does not find those occurrences of this string where auto-fill replaced the whitespace by a newline character.
Any idea how to solve this problem?
I text mode it works to use \s- in query-replace-regexp, i.e. "test1\s-test2" but this does not work in auctex-mode, I don't know why.
Using C-q C-j is very uncomfortable to use, because such cases as "test1 test2" occur very often especially because I want to get the newlines and the spaces in one run, so I have to do something like this:
M-x query-replace-regexp RET
test1[ <-- one space
C-j C-q
]\s-*test2
The last \s-* is because of possible indentations in auctex. This seems not to be very elegant.
By the way if you want to search and replace "test1 test2" is is very annoying to think every time of treating the newline cases specially...