From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Matt Newsgroups: gmane.emacs.help Subject: Re: eshell - win32 - executable files Date: Mon, 20 Jan 2003 20:23:20 GMT Organization: AT&T Broadband Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <3E2C5AB8.5010004@XXnetscape.net> References: <3E29A4AD.2080101@XXnetscape.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1043094298 27255 80.91.224.249 (20 Jan 2003 20:24:58 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 20 Jan 2003 20:24:58 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18aiTY-00075R-00 for ; Mon, 20 Jan 2003 21:24:56 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18aiTv-0008EE-04 for gnu-help-gnu-emacs@m.gmane.org; Mon, 20 Jan 2003 15:25:19 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!wn14feed!worldnet.att.net!204.127.198.204!attbi_feed4!attbi.com!sccrnsc04.POSTED!not-for-mail User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 X-Accept-Language: en-us, en Original-Newsgroups: gnu.emacs.help Original-Lines: 62 Original-NNTP-Posting-Host: 12.234.129.60 Original-X-Complaints-To: abuse@attbi.com Original-X-Trace: sccrnsc04 1043094200 12.234.129.60 (Mon, 20 Jan 2003 20:23:20 GMT) Original-NNTP-Posting-Date: Mon, 20 Jan 2003 20:23:20 GMT Original-Xref: shelby.stanford.edu gnu.emacs.help:109248 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:5772 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:5772 Ehud Karni wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Sat, 18 Jan 2003 22:01:50 GMT, matt wrote: > >>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. > > Try to modify the 'executable-binary-suffixes' list like this: > (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 `eshell-interpreter-alist'." :type 'boolean :group 'eshell-ext) 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. -- Matt -- Remove the X's to reply directly.