GNU bug report logs -
#11412
24.0.95; auto-revert-mode doesn't revert buffer when file becomes writeable
Previous Next
Reported by: Eric Hanchrow <eric.hanchrow <at> gmail.com>
Date: Sat, 5 May 2012 15:27:01 UTC
Severity: wishlist
Tags: moreinfo
Merged with 11549
Found in version 24.0.95
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #10 received at 11412 <at> debbugs.gnu.org (full text, mbox):
Barry OReilly <gundaetiapo <at> gmail.com> writes:
> Open foo.py in Emacs.
>
> In a terminal:
> chmod u+w foo.py
>
> Wait several seconds, inserting text yields error:
> Buffer is read-only: #<buffer foo.py>
(I'm going through old bug reports that unfortunately got no response at
the time.)
This has been fixed in the years since this was reported.
> Open foo.py with vim and add text:
> # aaa blah
> # bbb
>
> The blah string appears in Emacs. Insertion still fails with error:
> Buffer is read-only: #<buffer foo.py>
>
> Do: M-x revert-buffer
>
> Insertion now works.
This is apparently a feature added in 2004:
commit 90e118abf2dcc4aca4d7a7642247fa488554351e
Author: Luc Teirlinck <teirllm <at> auburn.edu>
AuthorDate: Fri Sep 3 22:28:10 2004 +0000
;; Bind buffer-read-only in case user has done C-x C-q, so as
;; not to forget that. This gives undesirable results when
;; the file's mode changes, but that is less common.
(let ((buffer-read-only buffer-read-only))
...
(revert-buffer 'ignore-auto 'dont-ask 'preserve-modes))))
So auto-reversion doesn't touch the buffer-readedness in case the user
has set it manually. So I'm not sure whether we should change this
behaviour here. Anybody got an opinion?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 3 years and 321 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.