emacs-devel
[Top][All Lists]
Advanced

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

Re: sh-script.el and magic numbers


From: Glenn Morris
Subject: Re: sh-script.el and magic numbers
Date: Sun, 19 Jan 2003 23:48:19 +0000
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/directory/emacs.html)

"Ehud Karni" wrote:

> The short answer is that the "#!" magic number should be a requirement.

I would disagree - it seems to me a matter of personal taste. It's not
essential, but it does no harm either. So I probably need the longer answer
as to why it should be a requirement. Though perhaps that is OT in
emacs-devel...

The main Emacs-related gripe I have about adding it is that I like to use

(add-hook 'after-save-hook 'executable-make-buffer-file-executable-if-script-p)

which makes files that contain #! magic executable on save. So if I put
#!/bin/bash in my ~/.bashrc, for example, Emacs insists on making it
executable, which annoys me, as it's not *meant* to be executed.

> You can use it in sourced files (both in sh/bash and csh/tcsh).

You can't *use* it. You can put it in the file and it doesn't do anything -
doesn't seem very useful to me.

I note that none of the system config files in the RedHat distribution I'm
currently using have it. 

> It is good programming practice to add it.

Why?





reply via email to

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