2011/10/29 Tassilo Horn
<tassilo@member.fsf.org>
ishi soichi <soichi777@gmail.com> writes:
Hi!
> the wildcard command does not seem work similarly in Emacs Lisp.
>
> (delete-file (subseq (file-expand-wildcards "~/Desktop/*") -1))
`delete-file' wants exactly one file given as string, but the `subseq'
form returns a *list* with exactly one file name, i.e., the last file
matching the given wildcard.
This should do the trick:
(delete-file (nth 0 (subseq (file-expand-wildcards "~/Desktop/*") -1)))
Bye,
Tassilo
--
(What the world needs (I think) is not
(a Lisp (with fewer parentheses))
but (an English (with more.)))
Brian Hayes, http://tinyurl.com/3y9l2kf