GNU bug report logs -
#21192
25.0.50; search-replace of spaces erroneously touches newlines
Previous Next
Reported by: Dima Kogan <dima <at> secretsauce.net>
Date: Wed, 5 Aug 2015 08:30:04 UTC
Severity: normal
Found in version 25.0.50
Done: Artur Malabarba <bruce.connor.am <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Dima Kogan <dima <at> secretsauce.net>
> Date: Wed, 05 Aug 2015 03:10:27 -0700
> Cc: 21192 <at> debbugs.gnu.org
>
> Artur Malabarba <bruce.connor.am <at> gmail.com> writes:
>
> > Is your replace-regexp-lax-whitespace variable non-nil, by any chance?
>
> It is nil. This issue is reproducible from 'emacs -Q'
Artur, this happens because we are "folding" newline with whitespace:
;; Add some manual entries.
(dolist (it '((?\" """ "“" "”" "”" "„" "⹂" "〞" "‟" "‟" "❞" "❝" "❠" "“" "„" "〝" "〟" "🙷" "🙶" "🙸" "«" "»")
(?' "❟" "❛" "❜" "‘" "’" "‚" "‛" "‚" "" "❮" "❯" "‹" "›")
(?` "❛" "‘" "‛" "" "❮" "‹")
(?\s "\t" "\r" "\n"))) <<<<<<<<<<<<<<<<<<<<<<<<<
I think we should remove this, since replace-regexp-lax-whitespace
already provides the same feature, and it's confusing to have that
variable set to nil and still see such "lax" matches.
Regardless, I think replace commands should start with character
folding off, as I don't think most users will want that by default,
especially since we don't perform the reverse transformation when
replacing, and so, say, ² is replaced with 3, not with ³.
This bug report was last modified 9 years and 295 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.