emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

replace-regexp bug?


From: Katsumi Yamaoka
Subject: replace-regexp bug?
Date: Fri, 21 May 2004 20:29:47 +0900
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux)

Hi,

I got a bug report in the fj.editor.emacs newsgroup.  Ryuhei Funatsu
wrote that he often uses the replace-regexp command in order to insert
the same text in all the beginning of lines as follows:

M-x replace-regexp
Replace regexp: ^ with: FOO

However, it sometimes fails.  I could also reproduce the problem using
the following program:

(let ((buffer (get-buffer-create "*testing*"))
      i)
  (pop-to-buffer buffer)
  (erase-buffer)
  (while (not (search-forward "\000" nil t))
    (erase-buffer)
    (setq i 1)
    (while (<= i 1000)
      (insert (format "%05d\n" i))
      (setq i (1+ i)))
    (goto-char (point-min))
    (replace-regexp "^" ".")
    (goto-char (point-min))))

Could you try it?  You will probably see the first letter is replaced
with ^@ in some lines like the following:

.00031
.00032
address@hidden
.00034
.00035

Although I don't know why it occurs, it suggests there is a bug in the
Emacs core.

Regards,
-- 
Katsumi Yamaoka <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]