help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: non-interactive shell


From: B. T. Raven
Subject: Re: non-interactive shell
Date: Sun, 23 Mar 2008 12:34:25 -0600
User-agent: Thunderbird 2.0.0.12 (Windows/20080213)

Eli Zaretskii wrote:
Date: Sat, 22 Mar 2008 19:27:04 -0600
From: "B. T. Raven" <nihil@nihilo.net>

Apparently it's not possible to make a new directory with:

  (shell-command (concat "md " path))

where path is some string like

"\\a\\b\\c"

It works for me.  What happened on your machine, and which version of
Emacs did you use?

w32 22.1 but I was having trouble with knowing when Emacs would translate / into \ when needed. After studying directory-file-name and file-directory-name and some other functions new to me, I did get it to work.


Is it possible at all to make a directory under the default-directory with elisp and using a variable rather than a literal string.

Of course, it is.  But I'd suggest to use Emacs primitives instead of
an external command:

  (make-directory path t)



That one is new to me too. I'll use it but if I add parents arg I will have to learn how to handle the "Cancel" error. I could have found it with C-h a but I didn't think the function I needed would be among the commands. Is there a way to do apropos with C-h f ? Anyway since I have cygwin df on this w2000 machine and I recently learned here about file-system-info on the "Dired hd drives list" thread I was trying to write a quick and dirty "Sneakernet" and backup program, polysave ["Save current buffer to other filesystems (i.e. flash drives, cd's, dvds, floppy) if they are mounted and with same relative path."]

Thanks, Eli; it (sort of) works now, for what it's worth.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]