Guangliang Yang wrote:
$ ls -l
total 4
-rw------- 1 gxa4g7 gxa4g7 179 2011-11-08 14:50 a.py
$ emacs a.py
$ ls -l
total 4
-rw-r--r-- 1 gxa4g7 gxa4g7 179 2011-11-08 14:50 a.py
I cannot reproduce this. I tried:
bash> umask
0022
bash> touch a.py; chmod 600 a.py; ls -l a.py
-rw------- 1 gm gm 0 Nov 7 23:47 a.py
bash> emacs-23.1 -Q a.py&
Then in Emacs, type some text in a.py and save it with C-x C-s.
The file's permissions are unchanged.
Please give a complete recipe starting from `emacs -Q', and include the
details from M-x report-emacs-bug about your system and Emacs.