-----BEGIN PGP SIGNED MESSAGE-----
Post by matt
This may be something that I need to do in the Windows registry, but...
How can I specify which files are executable. On a windows system there
are the normal ones like .exe, .bat, .com, etc. What I want to do is to
tell emacs that another type of file is executable, so that I can just
type the filename and have it execute like any other command.
I've seen this thread, and I think it went in the wrong direction.
(add-to-list 'executable-binary-suffixes ".new-ext")
does it help ?
I think you mean eshell-binary-suffixes. If I add that to my .emacs I
get an error on startup:
Symbol's value as variable is void: eshell-binary-suffixes
but evaluating it after eshell is loaded works. Unfortunately, that does
not fix the problem. At least not by itsself. After looking over
esh-ext.el again, I found another variable - eshell-force-execution -
which needs to be not-nil. Changing the value to t works. Here's what it
says in the file:
(defcustom eshell-force-execution nil
"*If non-nil, try to execute binary files regardless of permissions.
This can be useful on systems like Windows, where the operating system
doesn't happen to honor the permission bits in certain cases; or in
cases where you want to associate an interpreter with a particular
kind of script file, but the language won't let you but a '#!'
interpreter line in the file, and you don't want to make it executable
since nothing else but Eshell will be able to understand
I made all of the changes directly to esh-ext.el, byte-compiled, and
restarted emacs. After that, I had to make sure that there was the
"shabang" line in the .pl file(#!c:/perl/bin/perl.exe -w). I usually
don't add this in windows, because explorer takes care of the file
association, and it's not needed. Also, the -w is there(apart from being
good perl programming practice) because of the DOS carriage return
character. eshell - like a unix shell - will complain that it cannot
find perl.exe^M . The alternative is to run dos2unix on the file.
Thank for all the help.
Remove the X's to reply directly.