unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* C-x C-w should be hip to current file permissions
@ 2002-11-11  7:15 Dan Jacobson
  0 siblings, 0 replies; only message in thread
From: Dan Jacobson @ 2002-11-11  7:15 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-11-11  7:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-11  7:15 C-x C-w should be hip to current file permissions Dan Jacobson

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).