Hi, Please, tell me how I may to do "Search and Replace" simultaneously in all buffers and then do "Save" for all buffers simultaneously. That is like open a few files make the same changes in all opened file and save all this files. -- With best regards.
> Please, tell me how I may to do "Search and Replace" simultaneously in > all buffers and then do "Save" for all buffers simultaneously. That is > like open a few files make the same changes in all opened file and save > all this files.
Either `tags-query-replace' or the `Q' command in Dired will allow you to search and replace in multiple files. "C-x s" will save many files at ones.
In article <3C0B3094.CDEA7...@is.elta.co.il>, e...@is.elta.co.il says...
> Leon wrote:
> > Please, tell me how I may to do "Search and Replace" simultaneously in > > all buffers and then do "Save" for all buffers simultaneously. That is > > like open a few files make the same changes in all opened file and save > > all this files.
> Either `tags-query-replace' or the `Q' command in Dired will allow you to > search and replace in multiple files. "C-x s" will save many files at ones.
Hi, I have try to do that: - open two text files in Emacs, did `tags-query- replace' and got message "Visit tags table: (default TAGS) d:/DOCs/UNIX/". What is it? -- With best regards.
Leon wrote: > Hi, > Please, tell me how I may to do "Search and Replace" simultaneously in > all buffers and then do "Save" for all buffers simultaneously. That is > like open a few files make the same changes in all opened file and save > all this files.
> > Either `tags-query-replace' or the `Q' command in Dired will allow you to > > search and replace in multiple files. "C-x s" will save many files at ones.
> Hi, > I have try to do that: - open two text files in Emacs, did `tags-query- > replace' and got message "Visit tags table: (default TAGS) > d:/DOCs/UNIX/". What is it?
tags-query-replace needs a TAGS file. You create it with the etags utility (it's part of the Emacs distribution). But it sounds like you are working with documents, not program sources, in which case this command is not for you. Try `Q' in Dired instead.
In general, if you are unfamiliar with the commands which you are suggested to use, I suggest to read the documentation of those commands. Blindly invoking them without some minimal understanding what they do is not a good idea, IMHO.
> > Hi, > > Please, tell me how I may to do "Search and Replace" simultaneously in > > all buffers and then do "Save" for all buffers simultaneously. That is > > like open a few files make the same changes in all opened file and save > > all this files.
> To save a load of changed files in one go use > C-u C-x C-s
> Barney
Thank you, that works. But all files have to be placed in the same directory. How I can do "Search and Replace" for files from different directories? They all is open in Emacs. I am looking for something as "Search and Replace in all buffers". Please, help! -- With best regards.
> > > Either `tags-query-replace' or the `Q' command in Dired will allow you to > > > search and replace in multiple files. "C-x s" will save many files at ones.
> > Hi, > > I have try to do that: - open two text files in Emacs, did `tags-query- > > replace' and got message "Visit tags table: (default TAGS) > > d:/DOCs/UNIX/". What is it?
> tags-query-replace needs a TAGS file. You create it with the etags utility > (it's part of the Emacs distribution). But it sounds like you are working > with documents, not program sources, in which case this command is not for > you. Try `Q' in Dired instead.
> In general, if you are unfamiliar with the commands which you are suggested > to use, I suggest to read the documentation of those commands. Blindly > invoking them without some minimal understanding what they do is not a good > idea, IMHO.
Thank you, that works. But all files have to be placed in the same directory. How I can do "Search and Replace" for files from different directories? They all is open in Emacs. I am looking for something as "Search and Replace in all buffers". Please, help! -- With best regards.
Leon <leoni...@visto.com> wrote in message <news:MPG.16754591c3e14a9398971a@news.ericsson.se>... > Hi, > Please, tell me how I may to do "Search and Replace" simultaneously in > all buffers and then do "Save" for all buffers simultaneously. That is > like open a few files make the same changes in all opened file and save > all this files.
There are other ways (like tags facilities), but I like to use Colin Walters' ibuffer package. You can mark buffers and then do operations on them (like replace regexps, save them, etc).
> > Please, tell me how I may to do "Search and Replace" simultaneously in
> > all buffers and then do "Save" for all buffers simultaneously. That is
> > like open a few files make the same changes in all opened file and save
> > all this files.
> There are other ways (like tags facilities), but I like to use > Colin Walters' ibuffer package. You can mark buffers and then > do operations on them (like replace regexps, save them, etc).
Thank you very much, that works great, but I have to do 'load-library' to load ibuffer. I do not understand what is wrong with my .emacs: ************************************************************ ;;; -*- Emacs-Lisp -*- (setq load-path (cons (expand-file-name "~/emacs") load-path))
;; Load ibuffer.el --- operate on buffers like dired (global-font-lock-mode 1) (require 'ibuffer) (setq ibuffer-formats '((mark modified read-only " " (name 16 16) " " (size 6 -1 :right) " " (mode 16 16 :center) " " (process 8 -1) " " filename) (mark " " (name 16 -1) " " filename)) ibuffer-elide-long-columns t ibuffer-eliding-string "&") ;;; (require 'color-theme) (color-theme-jsc-light) (custom-set-variables '(font-lock-maximum-decoration t) '(font-lock-support-mode (quote lazy-lock-mode)) '(global-font-lock-mode t nil (font-lock)) '(speedbar-mode-specific-contents-flag t) '(speedbar-show-unknown-files t)) (custom-set-faces) (setq x-select-enable-clipboard t) (setq initial-frame-alist '((cursor-type . bar))) (set-scroll-bar-mode 'right) (require 'cua) (CUA-mode t) (require 'pc-keys) ***************************************************************** Here is ~/emacs: -rw-rw-rw- 1 LEKU root 4031 maj 6 1998 blinking-cursor.el -rw-rw-rw- 1 LEKU root 452809 okt 23 23:37 color-theme.el -rw-rw-rw- 1 LEKU root 14119 dec 10 1998 cua-mode.el -rw-rw-rw- 1 LEKU root 98302 nov 2 09:12 cua.el -rw-rw-rw- 1 LEKU root 33559 maj 6 1998 filladapt.el -rw-rw-rw- 1 LEKU root 136074 dec 4 10:03 ibuffer.el -rw-rw-rw- 1 LEKU root 119082 dec 4 10:46 ibuffer.elc -rw-rw-rw- 1 LEKU root 5836 mar 25 1996 pc-keys.el -rw-rw-rw- 1 LEKU root 8311 okt 31 13:41 plex-mode-init.el
Leon <leoni...@visto.com> writes: > Thank you, that works. But all files have to be placed in the same > directory. > How I can do "Search and Replace" for files from different directories?
M-x find-dired RET is one of the commands which allows you to have more than one directory in a dired buffer.
`i' (from dired) is another.
> They all is open in Emacs. I am looking for something as "Search and > Replace in all buffers".
> > Thank you, that works. But all files have to be placed in the same > > directory. > > How I can do "Search and Replace" for files from different directories?
> M-x find-dired RET is one of the commands which allows you to have > more than one directory in a dired buffer.
> `i' (from dired) is another.
> > They all is open in Emacs. I am looking for something as "Search and > > Replace in all buffers".
> > > Please, tell me how I may to do "Search and Replace" simultaneously in
> > > all buffers and then do "Save" for all buffers simultaneously. That is
> > > like open a few files make the same changes in all opened file and save
> > > all this files.
> > There are other ways (like tags facilities), but I like to use > > Colin Walters' ibuffer package. You can mark buffers and then > > do operations on them (like replace regexps, save them, etc).
Sorry, that was a stupid mistake. -- With best regards.
>> There are other ways (like tags facilities), but I like to use >> Colin Walters' ibuffer package. You can mark buffers and then >> do operations on them (like replace regexps, save them, etc). >> >> You can reach this package at >> >> http://www.cis.ohio-state.edu/~walters >> >> Leon> Thank you very much, that works great, but I have to do Leon> 'load-library' to load ibuffer. I do not understand what is Leon> wrong with my .emacs:
Leon> ;; Load ibuffer.el --- operate on buffers like dired Leon> (require 'ibuffer)
Does manually eval the (require 'ibuffer) sentence work?
Maybe you have to check that you don't have a .emacs.elc file.