help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Execute permission on Windows XP emacs 22.1


From: Pete Gillin
Subject: Execute permission on Windows XP emacs 22.1
Date: Mon, 9 Jul 2007 10:14:27 +0100
User-agent: Mutt/1.5.9i

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]