[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [h-e-w] sending filenames from command-line
From: |
Dave Humphries |
Subject: |
RE: [h-e-w] sending filenames from command-line |
Date: |
Wed, 7 Jun 2006 08:11:58 +1000 |
Have you tried escaping them eg C:\\sys\\emacs... ?
Dave
-----Original Message-----
From: address@hidden
[mailto:address@hidden
On Behalf Of address@hidden
Sent: Wednesday, 7 June 2006 7:08 AM
To: help-emacs-windows
Subject: [h-e-w] sending filenames from command-line
I'm trying to write a DOSKEY macro such that from a CMD.EXE window I can
say:
C:\>dired path
and the macro will invoke gnudoit (or gnuclientw with the -e option) to
get Emacs to
load dired on the specified path.
This is what I started with:
(I'm using the 23.0.0.1 ntemacs.sourceforge.net build and it's gnuclient
which
supports the -s and -e parameters)
dired=c:\sys\emacs\bin\gnuclientw.exe -sqe "(progn (raise-frame) (dired
(\"%CD%\")))"
BUT, of course the expansion of %CD% in the command prompt results in
stuff with
backslashes:
c:\sys\emacs\lisp
which, when passed to Emacs get cooked and ends up like "c:
ys^[macs:isp".
I thought "I need to do an 'expand-file-name' or
'convert-standard-filename' or something
like that around the %CD%". I found a quick "convert backslashes to
forward slashes"
function and tried that, but nothing I've tried has worked - probably
because the string
is getting cooked before the elisp expression is evaluated. Is there
some
way to better
quote it in the doskey macro to protect it from cooking until the elisp
can be evaluated?
Thanks,
Rob Davenport