From: "Drew Adams" <drew.adams@oracle.com>
To: "'harven'" <harven@free.fr>, <help-gnu-emacs@gnu.org>
Subject: RE: File System Traversal Map/Collect
Date: Sun, 1 Jun 2008 12:41:41 -0700 [thread overview]
Message-ID: <003501c8c41f$84792020$0200a8c0@us.oracle.com> (raw)
In-Reply-To: <b5d1a813-fb82-4d43-a5b2-b35cc3a2d4c8@y21g2000hsf.googlegroups.com>
> > I am trying to construct a general file system traversal function
> > which operates (map/collect) on each file using a function as
> > argument. Such a function could be query-replace-regexp()
> > specializing it to the functions found in findr.el.
>
> M-x find-name-dired then the M and Q command in the resulting
> Dired buffer allows to make a query replacement on a
> bunch of files. The command find-name-dired makes use of the
> unix find command though, so it is perhaps not so useful with
> respect to what you want to achieve.
>
> There is also an extension called icicles which
> seems to be able to do what you want -- apply
> a function to a bunch of files, without relying on
> some unix find command. Have a look at the wiki.
In addition to what I mentioned in my previous reply -
If you just want to do what `query-replace-regexp' does, instead of mapping an
arbitrary function over files, then you can use `icicle-search'. You can use it
with a saved set of file names, which you can create using `icicle-locate-file',
as I mentioned previously.
You can replace the current search hit at any time, which gives you behavior
similar to `query-replace' but without requiring you to visit each occurrence
and answer whether or not you want to replace it. You can visit only the hits
you want, and replacement of any given hit is only on demand (`C-S-RET').
You can also change the replacement string at any time, and it can be anything
that is allowed as a replacement by 'query-replace-regexp', which includes Lisp
sexp evaluation via `\,'.
Doc: http://www.emacswiki.org/cgi-bin/wiki/Icicles_-_Search-And-Replace
prev parent reply other threads:[~2008-06-01 19:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-31 23:03 File System Traversal Map/Collect Nordlöw
2008-06-01 17:20 ` harven
2008-06-01 18:57 ` Drew Adams
2008-06-01 19:41 ` Drew Adams [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='003501c8c41f$84792020$0200a8c0@us.oracle.com' \
--to=drew.adams@oracle.com \
--cc=harven@free.fr \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.