It appears that `query-replace' (or whatever this runs) does not properly match spaces in the search string with soft newlines. It should do that just like isearch does now. I encountered this when I had `longlines-mode' turned on and tried to replace a string in the following line(s): \item Adjoin: Combine the \slot{New Type} with the {\sc Context Type} according to one of the combinatorial rules. Note that this is one paragraph, with a soft newline in between "Context" and "Type". To reproduce, enter it as one line and have longlines-mode turned on (perhaps adjusting fill-column) so that it breaks right there. Then do M-% {\s Context Type} RET bar RET The string will not be replaced. This is with an up-to-date Emacs 22 CVS build.