GNU bug report logs - #11156
24.0.95; require-final-newline and read-only files

Previous Next

Package: emacs;

Reported by: Christopher Schmidt <christopher <at> ch.ristopher.com>

Date: Mon, 2 Apr 2012 21:53:01 UTC

Severity: minor

Found in version 24.0.95

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: 11156 <at> debbugs.gnu.org
Subject: bug#11156: 24.0.95; require-final-newline and read-only files
Date: Sat, 14 Apr 2012 20:56:57 +0200
>> cd /tmp
>> echo -n rms > rms
>> chmod u=r rms
>> emacs -q
>> eval: (setq require-final-newline 'visit)
>> C-x C-f /tmp/rms RET
>>
>> There is a new buffer but no window displays it.  The
>> *Messages*-buffer contains `find-file-noselect-1: Buffer is read-only:
>> #<buffer rms>'
>
> It is annoying that one needs to manually switch to the buffer after
> finding a read-only file.  But, more important, find-file-hook is not
> run.  This breaks lots of packages and makes this issue a severe one for
> me.

`after-find-file' shouldn't try adding a newline if `buffer-read-only'
is non-nil.  And the values 'visit and 'visit-save should be documented
in the Elisp manual.

martin




This bug report was last modified 12 years and 319 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.