unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* EShell bug?
@ 2003-06-22 17:08 Emilio Lopes
  0 siblings, 0 replies; only message in thread
From: Emilio Lopes @ 2003-06-22 17:08 UTC (permalink / raw)



[ I've already tried to poste this twice, but it doesn't
  seem it ever left the local news server. So my apologies
  if you see this posting twice. ]

GNU Emacs 21.3.1 (i386-msvc-nt4.0.1381) of 2003-03-28 on buffy

I've got EShell to directly execute Perl scripts on a Windows system
by using

   (add-to-list 'eshell-interpreter-alist '("\\.pl\\'" . eshell-invoke-perl)))

where the function `eshell-invoke-perl' simply calls the perl
interpreter with the script as argument:

   (defsubst eshell-invoke-perl (&rest args)
       "*Invoke Perl to run a Perl-Script."
       (throw 'eshell-replace-command
              (eshell-parse-command (eshell-search-path "perl") (cons "-S" args))))

It does work:

   e:/ecl $ hello.pl
   Hello World!

Nevertheless `which' can't identify "hello.pl" as a command:

   e:/ecl $ which hello
   which: no hello in (...)
   e:/ecl $ which hello.pl
   which: no hello.pl in (...)

Further, I would like to be able to type only "hello" to get my script
executed. This "trick" already works out of the box for DOS batch
files.

So I do

   (add-to-list 'eshell-binary-suffixes ".pl")

And since my Perl scripts don't have executable permissions I also set

   (setq eshell-force-execution t)

Indeed `which' seems to identify the script as executable now:

   e:/ecl $ which hello
   e:/batch/hello.pl
   e:/ecl $ which hello.pl
   e:/batch/hello.pl

But when I try to execute it I get:

   e:/ecl $ hello
   e:/batch/hello.pl: not an executable file

This looks like a bug to me. Am I missing something here?

 Emilio

-- 
Emilio C. Lopes <mailto:eclig(usenet-20030622)@gmx.net>
München <48°8'N, 11°34'E>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-06-22 17:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-22 17:08 EShell bug? Emilio Lopes

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).