Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
"Search and Replace" in a few files simultaneously
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  15 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Leon  
View profile  
 More options Dec 3 2001, 2:22 am
Newsgroups: comp.emacs, gnu.emacs.help
From: Leon <leoni...@visto.com>
Date: Mon, 3 Dec 2001 08:18:02 +0100
Local: Mon, Dec 3 2001 2:18 am
Subject: "Search and Replace" in a few files simultaneously
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.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Eli Zaretskii  
View profile  
 More options Dec 3 2001, 2:54 am
Newsgroups: comp.emacs, gnu.emacs.help
From: Eli Zaretskii <e...@is.elta.co.il>
Date: Mon, 03 Dec 2001 09:58:12 +0200
Local: Mon, Dec 3 2001 2:58 am
Subject: Re: "Search and Replace" in a few files simultaneously

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.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Leon  
View profile  
 More options Dec 3 2001, 3:12 am
Newsgroups: comp.emacs, gnu.emacs.help
From: Leon <leoni...@visto.com>
Date: Mon, 3 Dec 2001 09:11:10 +0100
Local: Mon, Dec 3 2001 3:11 am
Subject: Re: "Search and Replace" in a few files simultaneously
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.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Barney Dalton  
View profile  
 More options Dec 3 2001, 5:06 am
Newsgroups: comp.emacs, gnu.emacs.help
From: Barney Dalton <barnaby.dal...@radioscape.com>
Date: Mon, 03 Dec 2001 09:59:37 +0000
Local: Mon, Dec 3 2001 4:59 am
Subject: Re: "Search and Replace" in a few files simultaneously

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.

Have a look at:

http://www.emacswiki.org/cgi-bin/wiki.pl?SearchAndReplaceAcrossMultip...

To save a load of changed files in one go use
C-u C-x C-s

Barney


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Eli Zaretskii  
View profile  
 More options Dec 3 2001, 6:36 am
Newsgroups: comp.emacs, gnu.emacs.help
From: Eli Zaretskii <e...@is.elta.co.il>
Date: Mon, 03 Dec 2001 13:39:47 +0200
Local: Mon, Dec 3 2001 6:39 am
Subject: Re: "Search and Replace" in a few files simultaneously

Leon wrote:

> > 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.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Leon  
View profile  
 More options Dec 4 2001, 3:03 am
Newsgroups: comp.emacs, gnu.emacs.help
From: Leon <leoni...@visto.com>
Date: Tue, 4 Dec 2001 09:02:21 +0100
Local: Tues, Dec 4 2001 3:02 am
Subject: Re: "Search and Replace" in a few files simultaneously
In article <3C0B4D09.7000...@radioscape.com>,
barnaby.dal...@radioscape.com says...

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.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Leon  
View profile  
 More options Dec 4 2001, 3:03 am
Newsgroups: comp.emacs, gnu.emacs.help
From: Leon <leoni...@visto.com>
Date: Tue, 4 Dec 2001 09:02:51 +0100
Local: Tues, Dec 4 2001 3:02 am
Subject: Re: "Search and Replace" in a few files simultaneously
In article <3C0B6483.D4A2F...@is.elta.co.il>, e...@is.elta.co.il says...

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.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Juan León Lahoz García  
View profile  
 More options Dec 4 2001, 3:34 am
Newsgroups: comp.emacs, gnu.emacs.help
From: juan-leon.la...@tecsidel.es (Juan León Lahoz García)
Date: 4 Dec 2001 00:34:55 -0800
Local: Tues, Dec 4 2001 3:34 am
Subject: Re: "Search and Replace" in a few files simultaneously

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).

You can reach this package at

  http://www.cis.ohio-state.edu/~walters

--
Leon


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Leon  
View profile  
 More options Dec 4 2001, 5:12 am
Newsgroups: comp.emacs, gnu.emacs.help
From: Leon <leoni...@visto.com>
Date: Tue, 4 Dec 2001 11:11:43 +0100
Local: Tues, Dec 4 2001 5:11 am
Subject: Re: "Search and Replace" in a few files simultaneously
In article <9a141636.0112040034.1dfe1...@posting.google.com>, juan-
leon.la...@tecsidel.es says...

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

Please, help!
--
With best regards.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kai Großjohann  
View profile  
 More options Dec 4 2001, 6:49 am
Newsgroups: comp.emacs, gnu.emacs.help
From: Kai.Grossjoh...@CS.Uni-Dortmund.DE (Kai Großjohann)
Date: Tue, 04 Dec 2001 12:45:07 +0100
Local: Tues, Dec 4 2001 6:45 am
Subject: Re: "Search and Replace" in a few files simultaneously

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".

There is ibuffer.el which can do this.

http://www.anc.ed.ac.uk/~stephen/emacs/ell.html has a pointer, I guess.

kai
--
Simplification good!  Oversimplification bad!  (Larry Wall)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Leon  
View profile  
 More options Dec 4 2001, 7:10 am
Newsgroups: comp.emacs, gnu.emacs.help
From: Leon <leoni...@visto.com>
Date: Tue, 4 Dec 2001 13:10:12 +0100
Local: Tues, Dec 4 2001 7:10 am
Subject: Re: "Search and Replace" in a few files simultaneously
In article <vafk7w3i4zg....@lucy.cs.uni-dortmund.de>,
Kai.Grossjoh...@CS.Uni-Dortmund.DE says...

Thanks, but that ibuffer.el is identical with my.
--
With best regards.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kai Großjohann  
View profile  
 More options Dec 4 2001, 7:34 am
Newsgroups: comp.emacs, gnu.emacs.help
From: Kai.Grossjoh...@CS.Uni-Dortmund.DE (Kai Großjohann)
Date: Tue, 04 Dec 2001 13:19:54 +0100
Local: Tues, Dec 4 2001 7:19 am
Subject: Re: "Search and Replace" in a few files simultaneously

Leon <leoni...@visto.com> writes:
> In article <vafk7w3i4zg....@lucy.cs.uni-dortmund.de>,

>> There is ibuffer.el which can do this.

>> http://www.anc.ed.ac.uk/~stephen/emacs/ell.html has a pointer, I guess.

> Thanks, but that ibuffer.el is identical with my.

Hm.  And you can't mark several buffers with `m' and then do
query-replace on them with `Q'?

kai
--
Simplification good!  Oversimplification bad!  (Larry Wall)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Leon  
View profile  
 More options Dec 4 2001, 8:03 am
Newsgroups: comp.emacs, gnu.emacs.help
From: Leon <leoni...@visto.com>
Date: Tue, 4 Dec 2001 14:02:19 +0100
Local: Tues, Dec 4 2001 8:02 am
Subject: Re: "Search and Replace" in a few files simultaneously
In article <vaf1yibi3dh....@lucy.cs.uni-dortmund.de>,
Kai.Grossjoh...@CS.Uni-Dortmund.DE says...
> Leon <leoni...@visto.com> writes:

> > In article <vafk7w3i4zg....@lucy.cs.uni-dortmund.de>,

> >> There is ibuffer.el which can do this.

> >> http://www.anc.ed.ac.uk/~stephen/emacs/ell.html has a pointer, I guess.

> > Thanks, but that ibuffer.el is identical with my.

> Hm.  And you can't mark several buffers with `m' and then do
> query-replace on them with `Q'?

> kai

Sorry, that was a stupid mistake.
--
With best regards.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Leon  
View profile  
 More options Dec 4 2001, 8:04 am
Newsgroups: comp.emacs, gnu.emacs.help
From: Leon <leoni...@visto.com>
Date: Tue, 4 Dec 2001 14:03:37 +0100
Local: Tues, Dec 4 2001 8:03 am
Subject: Re: "Search and Replace" in a few files simultaneously
In article <MPG.1676bfc7911d0d9f989...@news.ericsson.se>,
leoni...@visto.com says...

Sorry, that was a stupid mistake.
--
With best regards.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Juan Leon Lahoz Garcia  
View profile  
 More options Dec 4 2001, 8:46 am
Newsgroups: comp.emacs, gnu.emacs.help
From: Juan Leon Lahoz Garcia <juan-leon.la...@tecsidel.es>
Date: 04 Dec 2001 13:29:35 +0100
Local: Tues, Dec 4 2001 7:29 am
Subject: Re: "Search and Replace" in a few files simultaneously

>>>>> "Leon" == Leon  <leoni...@visto.com> writes:

    >> 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.

--
Leon


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »