unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Execute permission on Windows XP emacs 22.1
@ 2007-07-09  9:14 Pete Gillin
  2007-07-09 12:19 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Pete Gillin @ 2007-07-09  9:14 UTC (permalink / raw)
  To: help-gnu-emacs

OS: Windows XP Pro / SP2
Emacs: This is GNU Emacs 22.1.1 (i386-mingw-nt5.1.2600) of 2007-06-02
on RELEASE

Can anyone explain to me why emacs refuses to create files without
"Read and Execute" permission set (for the creating user)? I tried
things like the following in my startup file, to set the value and
allow me to inspect it immediately after setting (by looking at the
variable) and at runtime (by running the insert function).

(set-default-file-modes ?\644)

(setq my-default-file-modes (number-to-string (default-file-modes)))

(defun insert-default-file-modes ()
  "inserts current value of default-file-modes"
  (interactive)
  (insert (number-to-string (default-file-modes))))

Both ways of checking the value agree, and suggest that the value I
have tried to set has been immediately ORed with 177 (octal). In the
above case, when I've tried to set 644, the value actually set is 777.
And looking at the file properties confirms that "Read and Execute" is
set for the creating user whatever modes I've asked for. Which is
unhelpful, frankly.

Thanks,

Pete.

P.S. I know that the normal behaviour on Windows is to make everything
executable by default --- but I don't see why emacs should insist on
doing this when I've explicitly asked it not to. The reason this
bothers me (if you're curious) is that I'm using the Subversion
version control system (the cygwin client) and when I add a file which
has "Read and Execute" locally, it automatically sets the repository
property svn:executable and so (if I forget to unset it) we get the
executable bit set on all working copies (including linux where it
matters more).

P.P.S. The behaviour seemed to be even odder on emacs 21.3, but I
didn't investigate thoroughly.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-07-09 15:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-09  9:14 Execute permission on Windows XP emacs 22.1 Pete Gillin
2007-07-09 12:19 ` Eli Zaretskii
2007-07-09 13:46   ` Pete Gillin
2007-07-09 14:42     ` Eli Zaretskii
2007-07-09 15:03       ` Pete Gillin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).