From: Dan Jacobson <jidanni@dman.ddts.net>
Subject: C-x C-w should be hip to current file permissions
Date: 11 Nov 2002 15:15:41 +0800 [thread overview]
Message-ID: <8765v4y3tu.fsf@jidanni.org> (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
reply other threads:[~2002-11-11 7:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8765v4y3tu.fsf@jidanni.org \
--to=jidanni@dman.ddts.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).