Windows 10, Emacs 25.1, Helm
Edit simultaneously all buffers. Add text "
customer/" to the node
"bodyFileName"in all buffers.
After edit save all buffers,
Is it possible?
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.Sign up to join this community
Maybe you can try to to use multi-occur-in-this-mode. To do that process as follows:
C-x fthen *.json)
M-x multi-occur-in-this-modethen enter your search string ("bodyFileName" for instance)
C-x %for instance. For each json buffer where a match occurs you will be prompted for modification.
Update Omar is right, I have
multi-occur-in-this-mode function in my Emacs config for so long.... that I completely forgot that it is not a built-in function but a function described in Mastering Emacs.
(eval-when-compile (require 'cl)) (defun get-buffers-matching-mode (mode) "Returns a list of buffers where their major-mode is equal to MODE" (let ((buffer-mode-matches '())) (dolist (buf (buffer-list)) (with-current-buffer buf (if (eq mode major-mode) (add-to-list 'buffer-mode-matches buf)))) buffer-mode-matches)) (defun multi-occur-in-this-mode () "Show all lines matching REGEXP in buffers with this major mode." (interactive) (multi-occur (get-buffers-matching-mode major-mode) (car (occur-read-primary-args))))