From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.bugs Subject: bug#28875: 25.3.50; set-default-file-modes ignores execution bits Date: Fri, 20 Oct 2017 09:53:19 +0200 Message-ID: <8760bajlw0.fsf@linux-m68k.org> References: <87vajd2a1v.fsf@gmail.com> <878tg6ecpx.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1508486060 9632 195.159.176.226 (20 Oct 2017 07:54:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 20 Oct 2017 07:54:20 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) Cc: 28875@debbugs.gnu.org To: Tino Calancha Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 20 09:54:10 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e5S85-0000lN-Rv for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Oct 2017 09:54:05 +0200 Original-Received: from localhost ([::1]:52549 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5S8D-0006Mu-3y for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Oct 2017 03:54:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37993) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5S87-0006Mc-Hr for bug-gnu-emacs@gnu.org; Fri, 20 Oct 2017 03:54:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e5S82-00085M-NG for bug-gnu-emacs@gnu.org; Fri, 20 Oct 2017 03:54:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42362) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e5S82-00085I-JH for bug-gnu-emacs@gnu.org; Fri, 20 Oct 2017 03:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e5S82-0001ea-8P for bug-gnu-emacs@gnu.org; Fri, 20 Oct 2017 03:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andreas Schwab Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Oct 2017 07:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28875 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28875-submit@debbugs.gnu.org id=B28875.15084860046305 (code B ref 28875); Fri, 20 Oct 2017 07:54:02 +0000 Original-Received: (at 28875) by debbugs.gnu.org; 20 Oct 2017 07:53:24 +0000 Original-Received: from localhost ([127.0.0.1]:51043 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e5S7P-0001dY-2Q for submit@debbugs.gnu.org; Fri, 20 Oct 2017 03:53:23 -0400 Original-Received: from mx2.suse.de ([195.135.220.15]:53601) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e5S7N-0001dP-9T for 28875@debbugs.gnu.org; Fri, 20 Oct 2017 03:53:21 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Original-Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 11420AAB2; Fri, 20 Oct 2017 07:53:20 +0000 (UTC) X-Yow: ...I think I'm having an overnight sensation right now!! In-Reply-To: <878tg6ecpx.fsf@gmail.com> (Tino Calancha's message of "Fri, 20 Oct 2017 12:10:18 +0900") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:138746 Archived-At: On Okt 20 2017, Tino Calancha wrote: > diff --git a/src/fileio.c b/src/fileio.c > index b7df38c857..d707bfc1c6 100644 > --- a/src/fileio.c > +++ b/src/fileio.c > @@ -3125,7 +3125,11 @@ symbolic notation, like the `chmod' command from GNU Coreutils. */) > DEFUN ("set-default-file-modes", Fset_default_file_modes, Sset_default_file_modes, 1, 1, 0, > doc: /* Set the file permission bits for newly created files. > The argument MODE should be an integer; only the low 9 bits are used. > -This setting is inherited by subprocesses. */) > +This setting is inherited by subprocesses. > + > +Note that some functions (e.g., `write-region') ignore the execution > +bits in MODE. In that case you need first to create the file, > +and then set the permisions with `set-file-modes'. */) The umask cannot broaden the permissions, only restrict them. The zero bits specify the bits that are always cleared from the mode, the one bits leave them unmodified. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."