Adrian Aichner wrote:
It's a case-fold-search issue I haven't been able to resolve
in
half-an-hour.
%S replacement is done, even though patcher-logmsg-commit-command
%contains %s.
Even in 1.13 (patcher 3.3.1) ?? It was supposed to fix this bug.
(replace-in-string "foo%sbar" "%S" " ") => "foo
bar"
(let (case-fold-search)
(replace-in-string "foo%sbar" "%S" " ")) =>
"foo%sbar"
That's how I fixed it.
I was able to commit my pending change using patcher.el<1.11>.
case treatment in
(defun replace-in-string (str regexp newtext &optional literal)
is on trial.
It uses re-search-forward for strings longer than 50, string-match otherwise.
Hmmmm. I had not tested strings longer than 50 characters, but you
found a bug here:
(let (case-fold-search)
(replace-in-string "foo%sbar" "%S" " "))
=> "foo%sbar"
(let (case-fold-search)
(replace-in-string
"foo%sbar zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz" "%S"
" "))
=> "foo bar zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"
--
Didier Verna, didier(a)lrde.epita.fr,
http://www.lrde.epita.fr/~didier
EPITA / LRDE, 14-16 rue Voltaire Tel.+33 (1) 53 14 59 47
94276 Le Kremlin-BicĂȘtre, France Fax.+33 (1) 53 14 59 22 didier(a)xemacs.org