From: Jambunathan K <kjambunathan@gmail.com>
To: ishi soichi <soichi777@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: delete-file using wildcard
Date: Sat, 29 Oct 2011 13:42:43 +0530 [thread overview]
Message-ID: <8162j8nrlw.fsf@gmail.com> (raw)
In-Reply-To: <CAEjRLuSQ_WNfgmzRAS4U6os9asi_s5dNMyDbxm67x-ePk8kNJg@mail.gmail.com> (ishi soichi's message of "Sat, 29 Oct 2011 16:54:15 +0900")
May be you should use dired.
1. C-x C-f ~/tmp RET
2. * % \.pdf$
3. t
4. k
5. t
6. D
1 => visit directory in dired
2 => mark all pdf files. Uses emacs style regexps
3 => toggle mark. this marks all non-pdf files
4 => kill mark. Removes the display of files marked in 3
5 => toggle mark. this marks all pdf files. This shows (just) the files that you
will be operating upon
6 => Delete the chosen files
Steps 3,4 and 5 are optional.
Use with caution.
> I have a question about Emacs Lisp, which I believe is simple enough
> for most of you.
>
>
> 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?
>
> soichi
>
>
--
next prev parent reply other threads:[~2011-10-29 8:12 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 [this message]
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
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=8162j8nrlw.fsf@gmail.com \
--to=kjambunathan@gmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=soichi777@gmail.com \
/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.