From: "Ehud Karni" <ehud@unix.mvs.co.il>
Cc: emacs-devel@gnu.org
Subject: Re: write-file could carry permissions
Date: Tue, 13 May 2003 13:28:23 +0300 [thread overview]
Message-ID: <200305131028.h4DASNvS015888@beta.mvs.co.il> (raw)
In-Reply-To: <jkllxbtq80.fsf@glug.org> (message from Thien-Thi Nguyen on 13 May 2003 00:39:27 -0400)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 13 May 2003 00:39:27 -0400, Thien-Thi Nguyen <ttn@glug.org> wrote:
>
> 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?
>
> if you write a file in a directory where some cron-driven script
> walker sees it, it is better if that file is not executable unless
> you explicitly make it so. (principle of least surprise according
> to the sysadmin.)
>
> on the other hand, there's no problem w/ emacs providing a
> convenient way to effect this decision (e.g., a write-file hook
> subject to y-or-n-p).
There is an autoloaded function supplied in current emacs (21.3) that
does that - `executable-make-buffer-file-executable-if-script-p' in
progmode/executable.el. Just add it to `after-save-hook'.
BTW. Beside Thien-Thi reservation about cron confusion, there is also
the problem of trying to change file mode on remote system (ange-ftp)
that usually fails (remote chmod not supported).
Ehud.
- --
Ehud Karni Tel: +972-3-7966-561 /"\
Mivtach - Simon Fax: +972-3-7966-667 \ / ASCII Ribbon Campaign
Insurance agencies (USA) voice mail and X Against HTML Mail
http://www.mvs.co.il FAX: 1-815-5509341 / \
mailto:ehud@unix.mvs.co.il Better Safe Than Sorry
-----BEGIN PGP SIGNATURE-----
Comment: use http://www.keyserver.net/ to get my key (and others)
iD8DBQE+wMjHLFvTvpjqOY0RApHKAJ9wk3cZPHx5R8/73iXEf4NFwg+pxQCfX9Ed
RN/VHFQueZXC6pXBz05xtRQ=
=2x+H
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2003-05-13 10:28 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 [this message]
2003-05-13 7:13 ` Dan Jacobson
2003-05-13 14:12 ` Stefan Monnier
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=200305131028.h4DASNvS015888@beta.mvs.co.il \
--to=ehud@unix.mvs.co.il \
--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.