title: emacs, auctex and query-replace strings with newline
body: <p>I use emacs+auctex and auto-fill-mode. </p>
  
  <p>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. </p>
  
  <p>Any idea how to solve this problem?</p>
  
  <p>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. </p>
  
  <p>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:</p>
  
  <pre><code>M-x query-replace-regexp RET
  
  test1[ &lt;-- one space
  
  C-j C-q
  
  ]\s-*test2
  </code></pre>
  
  <p>The last \s-* is because of possible indentations in auctex.
  This seems not to be very elegant.</p>
  
  <p>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...</p>