* Serach and replace in all buffers
@ 2006-01-22 16:57 AndyJB (sent by Nabble.com)
2006-01-22 19:40 ` Drew Adams
2006-01-22 19:57 ` Serach " Eli Zaretskii
0 siblings, 2 replies; 8+ messages in thread
From: AndyJB (sent by Nabble.com) @ 2006-01-22 16:57 UTC (permalink / raw)
[-- Attachment #1.1: Type: text/plain, Size: 523 bytes --]
Hi
Is there a way of searching and replacing across all open buffers? I know you can use a tags file to search across multiple files but that's not quite what I'm looking for - it's inconvenient having to regenerate the tags file all the time (why oh why isn't that automatic?) and doesn't necessarily correspond to which files are currently open.
Thanks
Andy
--
View this message in context: http://www.nabble.com/Serach-and-replace-in-all-buffers-t973310.html#a2520975
Sent from the Emacs - Help forum at Nabble.com.
[-- Attachment #1.2: Type: text/html, Size: 690 bytes --]
[-- Attachment #2: Type: text/plain, Size: 152 bytes --]
_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: Serach and replace in all buffers
2006-01-22 16:57 Serach and replace in all buffers AndyJB (sent by Nabble.com)
@ 2006-01-22 19:40 ` Drew Adams
2006-01-22 22:23 ` Search " AndyJB (sent by Nabble.com)
[not found] ` <mailman.2152.1137968793.26925.help-gnu-emacs@gnu.org>
2006-01-22 19:57 ` Serach " Eli Zaretskii
1 sibling, 2 replies; 8+ messages in thread
From: Drew Adams @ 2006-01-22 19:40 UTC (permalink / raw)
Is there a way of searching and replacing across all open buffers?
http://www.emacswiki.org/cgi-bin/wiki/CategorySearchAndReplace
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Serach and replace in all buffers
2006-01-22 16:57 Serach and replace in all buffers AndyJB (sent by Nabble.com)
2006-01-22 19:40 ` Drew Adams
@ 2006-01-22 19:57 ` Eli Zaretskii
2006-01-22 22:33 ` Search " AndyJB (sent by Nabble.com)
1 sibling, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2006-01-22 19:57 UTC (permalink / raw)
> Date: Sun, 22 Jan 2006 08:57:22 -0800 (PST)
> From: "AndyJB (sent by Nabble.com)" <lists@nabble.com>
> Cc:
>
> Is there a way of searching and replacing across all open buffers? I know you can use a tags file to search across multiple files but that's not quite what I'm looking for - it's inconvenient having to regenerate the tags file all the time (why oh why isn't that automatic?) and doesn't necessarily correspond to which files are currently open.
You don't need to regenerate the TAGS file unless you add or delete
files, functions, macros, or typedefs. And for the purpose of search
and replace, you don't need to regenerate unless some files were added
or deleted.
An alternative method of multi-file search and replace is the Q
command in Dired buffers. You mark those files in which you wish to
search and replace, and then press Q; the rest is just like with TAGS,
except that no TAGS file is needed.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Search and replace in all buffers
2006-01-22 19:57 ` Serach " Eli Zaretskii
@ 2006-01-22 22:33 ` AndyJB (sent by Nabble.com)
2006-01-24 17:07 ` Kevin Rodgers
0 siblings, 1 reply; 8+ messages in thread
From: AndyJB (sent by Nabble.com) @ 2006-01-22 22:33 UTC (permalink / raw)
[-- Attachment #1.1: Type: text/plain, Size: 1510 bytes --]
Eli Zaretskii wrote:
>
> You don't need to regenerate the TAGS file unless you add or delete
> files, functions, macros, or typedefs. And for the purpose of search
> and replace, you don't need to regenerate unless some files were added
> or deleted.
>
Exactly - which is just about every time I search! When I'm programming I'm adding new files and definitions constantly.
> An alternative method of multi-file search and replace is the Q
> command in Dired buffers. You mark those files in which you wish to
> search and replace, and then press Q; the rest is just like with TAGS,
> except that no TAGS file is needed.
Thanks - didn't know that. It looks useful.
Back in my Windows days I used an editor called TSE, and I wrote something for it that achieved much the same effect as find-tag and friends without the need to manually update the tags file. It maintained the equivalent of a TAGS file and dynamically updated it as you added new files and definitions. I rather miss it's convenience - maybe one day I'll miss it enough to write an Emacs equivalent :) I suspect that all that wouldbe needed would be to hook something in to rerun "etags" at the appropriate times, so it would be easier than what I wrote for TSE, where I had to implement the whoe etags style functionality. Unless someone else has already done it?
Andy B
--
View this message in context: http://www.nabble.com/Search-and-replace-in-all-buffers-t973310.html#a2525247
Sent from the Emacs - Help forum at Nabble.com.
[-- Attachment #1.2: Type: text/html, Size: 2263 bytes --]
[-- Attachment #2: Type: text/plain, Size: 152 bytes --]
_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Search and replace in all buffers
2006-01-22 22:33 ` Search " AndyJB (sent by Nabble.com)
@ 2006-01-24 17:07 ` Kevin Rodgers
0 siblings, 0 replies; 8+ messages in thread
From: Kevin Rodgers @ 2006-01-24 17:07 UTC (permalink / raw)
AndyJB (sent by Nabble.com) wrote:
> Back in my Windows days I used an editor called TSE, and I wrote
> something for it that achieved much the same effect as find-tag and
> friends without the need to manually update the tags file. It maintained
> the equivalent of a TAGS file and dynamically updated it as you added
> new files and definitions. I rather miss it's convenience - maybe one
> day I'll miss it enough to write an Emacs equivalent :) I suspect that
> all that wouldbe needed would be to hook something in to rerun "etags"
> at the appropriate times, so it would be easier than what I wrote for
> TSE, where I had to implement the whoe etags style functionality. Unless
> someone else has already done it?
It should be as simple as:
(add-hook 'c-mode-hook
(lambda ()
(add-hook 'local-write-file-hooks
(lambda ()
(shell-command "etags (your arguments here)")
;; Return nil to ensure that file gets written:
nil))))
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2006-01-24 17:07 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-22 16:57 Serach and replace in all buffers AndyJB (sent by Nabble.com)
2006-01-22 19:40 ` Drew Adams
2006-01-22 22:23 ` Search " AndyJB (sent by Nabble.com)
2006-01-23 0:31 ` AndyJB (sent by Nabble.com)
[not found] ` <mailman.2152.1137968793.26925.help-gnu-emacs@gnu.org>
2006-01-23 2:28 ` Giorgos Keramidas
2006-01-22 19:57 ` Serach " Eli Zaretskii
2006-01-22 22:33 ` Search " AndyJB (sent by Nabble.com)
2006-01-24 17:07 ` Kevin Rodgers
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.