2011/10/29 Tassilo Horn <address@hidden>
ishi soichi <address@hidden> writes:
`delete-file' wants exactly one file given as string, but the `subseq'
> the wildcard command does not seem work similarly in Emacs Lisp.
> (delete-file (subseq (file-expand-wildcards "~/Desktop/*") -1))
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)))
(What the world needs (I think) is not
(a Lisp (with fewer parentheses))
but (an English (with more.)))
Brian Hayes, http://tinyurl.com/3y9l2kf