[Top][All Lists]

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

RE: [h-e-w] Running scripts via call-process...

From: Eli Daniel
Subject: RE: [h-e-w] Running scripts via call-process...
Date: Thu, 27 Mar 2003 11:20:15 -0500

I believe the problem is that call-process winds up call the Win32
StartProcess API.  Windows has a set of file extensions that it believes are
executable (.exe, .bat, .com; maybe a few others).  If the thing you pass to
StartProcess is not one of these, it won't run it, even if you can run the
file by typing its name at a command prompt.

Running your shell script is a lot like trying to run a Word document; while
Windows has an application associated with it (so something happens when you
double-click its icon or type its name at a prompt), the thing itself is not
actually executable.

I think what you need to do is to actually execute the windows shell (which
is an executable, of course) with the appropriate arguments so that it
invokes your script.  On Windows 2000 the command line to actually run would
be something like "cmd /c".  I'm not sure what the correct
invocation of call-process is to achieve this.


> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden On
> Behalf Of Jody Klymak
> Sent: Thursday, March 27, 2003 11:08 AM
> To: address@hidden
> Subject: [h-e-w] Running scripts via call-process...
> Hi all,
> I got as snippet of code from John Wiegley's site that calls some perl
> scripts.  I've found that I can't call anything script like using
> call-process:
> (defun test ()
>   (interactive)
>   (call-process "c:/jklymak/"))
> always gives:
> test: Searching for program: permission denied, c:/jklymak/
> How can I trick ntemacs into running this anyways?  The script,
>, runs fine from cygwin.
> My set-up is pretty standard and works fine for executables (i.e.
> pdflatex.exe)
>   (setq w32-quote-process-args ?\")
>   (setq shell-file-name "bash")
>   (setq process-coding-system-alist '(("bash" . undecided-unix)))
>   (setenv "SHELL" shell-file-name)
>   (setq explicit-shell-file-name shell-file-name)
>   (setq explicit-bash-args '("--login" "-i")) ; see shell.el
>   (setq shell-command-switch "-c")
>   (add-hook 'comint-output-filter-functions 'comint-strip-ctrl-m)
>   (setq exec-path (cons "c:/cygwin/bin/" exec-path))
>   (setq exec-path (cons "c:/cygwin/usr/local/bin/" exec-path))
>   (setq exec-path (cons "c:/cygwin/usr/bin/" exec-path))
> Thanks for any help.
> Cheers,  Jody
> --
> Jody Klymak                           104 Ocean Admin Bldg., OSU
> mailto:address@hidden   Corvallis OR, 97330

reply via email to

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