From: Francis Litterio <flitterio@gmail.com>
To: bug-gnu-emacs@gnu.org
Subject: bug#956: In CVS Emacs, replace-regexp doesn't honor inhibit-read-only.
Date: Wed, 10 Sep 2008 11:44:32 -0400 [thread overview]
Message-ID: <i5i6fxo82dej.fsf@gmail.com> (raw)
In CVS Emacs, replace-regexp doesn't honor inhibit-read-only. To
reproduce, evaluate this form:
(let ((inhibit-read-only t))
(with-current-buffer (get-buffer-create "zzz")
(insert "fooxxxbar")
(replace-regexp "x+" "z" nil (point-min) (point-max))))
You will see this error: Buffer is read-only: #<buffer zzz>
This may be caused by this code in function perform-replace (in
lisp/replace.el):
(let ((inhibit-read-only
query-replace-skip-read-only))
The docstring for query-replace-skip-read-only says:
*Non-nil means `query-replace' and friends ignore read-only matches.
which does not seem to match how it is used in that let form, especially
since replace-regexp is not interactive like query-replace.
--
Fran
next reply other threads:[~2008-09-10 15:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <873ak78wy8.fsf@cyd.mit.edu>
2008-09-10 15:44 ` Francis Litterio [this message]
2008-09-10 22:25 ` bug#956: marked as done (In CVS Emacs, replace-regexp doesn't honor inhibit-read-only.) Emacs bug Tracking System
[not found] <mailman.18916.1221064061.18990.bug-gnu-emacs@gnu.org>
2008-09-11 1:43 ` bug#956: In CVS Emacs, replace-regexp doesn't honor inhibit-read-only Francis Litterio
[not found] ` <mailman.18955.1221098864.18990.bug-gnu-emacs@gnu.org>
2008-09-11 19:33 ` Francis Litterio
2008-09-12 0:43 ` Chong Yidong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=i5i6fxo82dej.fsf@gmail.com \
--to=flitterio@gmail.com \
--cc=956@emacsbugs.donarmstrong.com \
--cc=bug-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.