all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu>
Cc: emacs-devel@gnu.org
Subject: Re: write-file could carry permissions
Date: Tue, 13 May 2003 10:12:52 -0400	[thread overview]
Message-ID: <200305131412.h4DECqJo012114@rum.cs.yale.edu> (raw)
In-Reply-To: E19FOsm-0005F4-00@fencepost.gnu.org

>     $ chmod +x something
>     $ emacs something
>     C-x C-w somethingelse
>     $ ls -l #shows that the executable permissions were not carried along,
>     as a convenience...
> 
> If you write the buffer into a different file, I don't see why the
> permissions would be the same.  However, this suggested to me that
> maybe Emacs should always set the executable bit when you edit a file
> in Shell Script mode.  Is there any reason that would be bad?

As someone already pointed out,
we have make-buffer-file-executable-if-script-p and I recommend everybody
add it to his after-save-hook.

As for making all sh-script mode buffer executable, I strongly
oppose this idea, since many script files are never meant to be executed,
but only sourced (this is the case for .bashrc kind of things for example,
but also for many other files when you write an extensive script and
split it into modules/libraries/...).

Another reason why I oppose this idea is because the after-save-hook
setting above is a much better solution which also covers awk scripts,
prl scripts, foo scripts, bar scripts, ...


	Stefan

      parent reply	other threads:[~2003-05-13 14:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-11 22:48 write-file could carry permissions Dan Jacobson
2003-05-13  1:47 ` Richard Stallman
2003-05-13  4:39   ` Thien-Thi Nguyen
2003-05-13 10:28     ` Ehud Karni
2003-05-13  7:13   ` Dan Jacobson
2003-05-13 14:12   ` Stefan Monnier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200305131412.h4DECqJo012114@rum.cs.yale.edu \
    --to=monnier+gnu/emacs@rum.cs.yale.edu \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.