bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#11156: 24.0.95; require-final-newline and read-only files


From: martin rudalics
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





reply via email to

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