From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Ehud Karni" Newsgroups: gmane.emacs.devel Subject: Re: write-file could carry permissions Date: Tue, 13 May 2003 13:28:23 +0300 Organization: Mivtach-Simon Insurance agencies Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200305131028.h4DASNvS015888@beta.mvs.co.il> References: <87ptmpm75y.fsf@jidanni.org> Reply-To: ehud@unix.mvs.co.il NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-8 Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1052822394 13262 80.91.224.249 (13 May 2003 10:39:54 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 13 May 2003 10:39:54 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue May 13 12:39:51 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19FXBi-0003Py-00 for ; Tue, 13 May 2003 12:39:14 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19FXIZ-0002Za-00 for ; Tue, 13 May 2003 12:46:19 +0200 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 19FXBC-000506-02 for emacs-devel@quimby.gnus.org; Tue, 13 May 2003 06:38:42 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 19FX6b-0003bp-00 for emacs-devel@gnu.org; Tue, 13 May 2003 06:33:57 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 19FX4a-0003Bc-00 for emacs-devel@gnu.org; Tue, 13 May 2003 06:31:53 -0400 Original-Received: from [192.114.178.12] (helo=unix.mvs.co.il) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19FX2F-0002wS-00; Tue, 13 May 2003 06:29:28 -0400 Original-Received: from beta.mvs.co.il (beta [10.253.0.3]) by unix.mvs.co.il (8.11.6/8.11.6) with ESMTP id h4DASds24617; Tue, 13 May 2003 13:28:40 +0300 Original-Received: from beta.mvs.co.il (localhost [127.0.0.1]) by beta.mvs.co.il (8.12.5/8.12.5) with ESMTP id h4DAScTV015895; Tue, 13 May 2003 13:28:39 +0300 Original-Received: (from root@localhost) by beta.mvs.co.il (8.12.5/8.12.5/Submit) id h4DASNvS015888; Tue, 13 May 2003 13:28:23 +0300 Original-To: ttn@glug.org In-reply-to: (message from Thien-Thi Nguyen on 13 May 2003 00:39:27 -0400) X-Mailer: Emacs 21.3.1 rmail (send-msg 1.108) Original-cc: rms@gnu.org Original-cc: jidanni@dman.ddts.net X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:13824 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:13824 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 13 May 2003 00:39:27 -0400, Thien-Thi Nguyen 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-----