From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim X Newsgroups: gmane.emacs.help Subject: Re: permissions on created files Date: Tue, 19 Sep 2006 13:11:08 +1000 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <87fyeoh7oz.fsf@lion.rapttech.com.au> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1158637228 23382 80.91.229.2 (19 Sep 2006 03:40:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 19 Sep 2006 03:40:28 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Sep 19 05:40:26 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GPWT7-0000r3-Qi for geh-help-gnu-emacs@m.gmane.org; Tue, 19 Sep 2006 05:40:22 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GPWT7-0002t4-Bx for geh-help-gnu-emacs@m.gmane.org; Mon, 18 Sep 2006 23:40:21 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!sn-xt-sjc-03!sn-xt-sjc-09!sn-post-sjc-01!supernews.com!corp.supernews.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:S7qNSL1qdF9eUjB9L2V2AVY87bA= Original-X-Complaints-To: abuse@supernews.com Original-Lines: 29 Original-Xref: shelby.stanford.edu gnu.emacs.help:141858 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:37480 Archived-At: Urs Thuermann writes: > When emacs creates a new file, it does so using mode 0666 modified by > the process umask, i.e. newly created files don't have the executable > bit set. I have search the Emacs docs (with C-h i) and have also > tried C-h a to find a way to change this. I'd like to change emacs' > behavior so that it uses 0777 instead 0666 when the file begins with > the two characters #!. Is that possible? I couldn't find anything > like that. > > > urs I think emacs just inherits the default umask from your environment. However, thre are some variables which can control the setting of executable bits on script files created within emacs. I'm not sure what version of emacs you are running, but a quick apropos in emacs 22 brings up the function executable-make-buffer-file-executable-if-script-p which sounds promising as a starting point. Tim -- tcross (at) rapttech dot com dot au