July 04th, 2009

Using dired-do-query-replace-regexp to rename read-only files

Written by Dave BarkerTopics: Howto, Emacs

If you use dired-do-query-replace-regexp to replace things in read-only files the bell will sound and the batch replace will stop. Here’s a quick workaround, cheers to bojohan in #emacs for helping me with this:

M-x set-variable RET inhibit-read-only RET t RET

Then do your replace again and finally set the variable back to nil again!