From: ishi soichi <soichi777@gmail.com>
To: Drew Adams <drew.adams@oracle.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: delete-file using wildcard
Date: Sun, 30 Oct 2011 05:30:59 +0900 [thread overview]
Message-ID: <CAEjRLuSmzh8gug=v_oJpirzY+RrNimKR-Q7-DJOvBVDAvCstoA@mail.gmail.com> (raw)
In-Reply-To: <4F4638449BDD48829B817613BC251B5B@us.oracle.com>
[-- Attachment #1: Type: text/plain, Size: 1491 bytes --]
Thanks for many solutions.
I appreciate it!
soichi
2011/10/29 Drew Adams <drew.adams@oracle.com>
> > I would like to delete files in a directory.
> > When doing so with Linux command, we usually do, rm *
> > at that directory.
> > the wildcard command does not seem work similarly in Emacs Lisp.
> > (delete-file (subseq (file-expand-wildcards "~/Desktop/*") -1))
> > doesn't work. Could anyone help me out?
>
> Others have provided some solutions. To do it interactively, Dired is your
> friend, as Jambunathan suggested.
>
> Another interactive solution is `icicle-delete-file'. It's a multi-command
> version of `delete-file', which means that you can act on (delete, in this
> case)
> any number of files and directories with the same command invocation.
>
> For your example, just do this: M-x icicle-delete-file TAB C-!
>
> You can type a pattern to match, before hitting TAB (or S-TAB, if the
> pattern is
> a regexp). The key `C-!' means act on *all* matching candidates.
> Whatever file
> names currently match your minibuffer input (they are shown in
> *Completions*),
> those files are deleted. Or use `C-mouse-2' or `C-RET' to act on only one
> candidate at a time.
>
> Change your input (pattern) to act on different files. You can also
> change to
> another directory, using `C-c C-d'. All during the same command
> invocation.
> Use C-g to end the command (or RET to act on one final candidate).
>
> http://www.emacswiki.org/emacs/Icicles_-_Multi-Commands#toc3
>
>
[-- Attachment #2: Type: text/html, Size: 2010 bytes --]
prev parent reply other threads:[~2011-10-29 20:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-29 7:54 delete-file using wildcard ishi soichi
2011-10-29 8:12 ` Jambunathan K
2011-10-29 8:48 ` Tassilo Horn
2011-10-29 8:50 ` Tassilo Horn
2011-10-29 8:57 ` ishi soichi
2011-10-29 9:03 ` Peter Dyballa
2011-10-29 14:16 ` Drew Adams
2011-10-29 20:30 ` ishi soichi [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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAEjRLuSmzh8gug=v_oJpirzY+RrNimKR-Q7-DJOvBVDAvCstoA@mail.gmail.com' \
--to=soichi777@gmail.com \
--cc=drew.adams@oracle.com \
--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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).