[Top][All Lists]

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

C-x C-w should be hip to current file permissions

From: Dan Jacobson
Subject: C-x C-w should be hip to current file permissions
Date: 11 Nov 2002 15:15:41 +0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

I edited an existing shell script [mode 744] and used C-x C-w to write
it into a new file.  I notice that that files modes were just my plain
umask modes and I had to take the time to make it executable.

And what if I had been editing a 600 file, would a C-x C-w version
become 644 spilling my beans?

Info says: `C-x C-w' (`write-file').  It is precisely
equivalent to `set-visited-file-name' followed by `C-x C-s'.  `C-x C-s'
used on a buffer that is not visiting a file has the same effect as
`C-x C-w'; that is, it reads a file name, marks the buffer as visiting
that file, and saves it there.

So there's more to consider.  Anyway C-h k C-x C-w should give a clear
statement about what happens to permissions, and so should Info.
http://jidanni.org/ Taiwan(04)25854780

reply via email to

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