Emacs tips learned and practiced in 2025 Week 16
- Replace contents in multiple files in Dired mode using
query-replace-regexp
, which is bound toQ
. - Replace multiple files names in Dired mode using
% R
. -
Copy multiple files to new files with the names generated by regular expression replacement in Dired mode using
% C
. N.B. This only works for regular files, not directories. For directories, I have to use Bash command:find . -maxdepth 1 -name "hmatrix-Tvmult*" -print | while read f; do cp -r "$f" "${f//Tvmult/Hvmult}"; done
- Open link directly from Konsole using emacsclient by editing the text editor command as
emacsclient +LINE:COLUMN PATH
(in Konsole profile: Mouse → Miscellaneous → Text Editor Command).