* bug#11549: auto-revert doesn't revert file permissions as revert-buffer does
@ 2012-05-23 23:40 Barry OReilly
2021-06-02 6:24 ` bug#11412: 24.0.95; auto-revert-mode doesn't revert buffer when file becomes writeable Lars Ingebrigtsen
0 siblings, 1 reply; 3+ messages in thread
From: Barry OReilly @ 2012-05-23 23:40 UTC (permalink / raw)
To: 11549
To reproduce this bug minimally:
Use a .emacs with only:
(global-auto-revert-mode 1)
(setq revert-without-query (quote (".*")))
Create foo.py:
# aaa
# bbb
Set permissions on foo.py:
-r-xr-xr-- 1 boreilly ccgoesr 13 May 22 09:12 foo.py
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>
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.
I would think if revert-buffer updates permissions that auto-revert would too.
An information dump from report-emacs-bug follows.
In GNU Emacs 23.4.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.10.4)
of 2012-03-19 on [cut]
Windowing system distributor `The X.Org Foundation', version 11.0.70101000
configured using `configure '--prefix=[cut]/sw/emacs-install' '--with-gif=no''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: @im=none
locale-coding-system: utf-8-unix
default enable-multibyte-characters: t
Major mode: Python
Minor modes in effect:
global-auto-revert-mode: t
tooltip-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
<help-echo> <help-echo> <down> <down> <down> i <help-echo>
<help-echo> <down-mouse-1> <drag-mouse-1> <down-mouse-1>
<mouse-movement> <mouse-movement> <drag-mouse-1> <help-echo>
<down-mouse-1> <mouse-1> M-x r e p o r t - e m a c
s - b u g <return>
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Note: file is write protected
Buffer is read-only: #<buffer foo.py>
Load-path shadows:
None found.
Features:
(shadow sort mail-extr message sendmail regexp-opt ecomplete rfc822 mml
mml-sec password-cache mm-decode mm-bodies mm-encode mailcap mail-parse
rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util
netrc time-date mm-util mail-prsvr gmm-utils wid-edit mailheader canlock
sha1 hex-util hashcash mail-utils emacsbug python-21 python easymenu
comint ring autorevert tooltip ediff-hook vc-hooks lisp-float-type
mwheel x-win x-dnd font-setting tool-bar dnd fontset image fringe
lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar
mldrag mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev loaddefs button minibuffer faces cus-face files text-properties
overlay md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
system-font-setting font-render-setting gtk x-toolkit x multi-tty emacs)
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#11412: 24.0.95; auto-revert-mode doesn't revert buffer when file becomes writeable
2012-05-23 23:40 bug#11549: auto-revert doesn't revert file permissions as revert-buffer does Barry OReilly
@ 2021-06-02 6:24 ` Lars Ingebrigtsen
2021-07-02 11:17 ` Lars Ingebrigtsen
0 siblings, 1 reply; 3+ messages in thread
From: Lars Ingebrigtsen @ 2021-06-02 6:24 UTC (permalink / raw)
To: Barry OReilly; +Cc: 11412, 11549
Barry OReilly <gundaetiapo@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@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
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#11412: 24.0.95; auto-revert-mode doesn't revert buffer when file becomes writeable
2021-06-02 6:24 ` bug#11412: 24.0.95; auto-revert-mode doesn't revert buffer when file becomes writeable Lars Ingebrigtsen
@ 2021-07-02 11:17 ` Lars Ingebrigtsen
0 siblings, 0 replies; 3+ messages in thread
From: Lars Ingebrigtsen @ 2021-07-02 11:17 UTC (permalink / raw)
To: Barry OReilly; +Cc: 11412, 11549
Lars Ingebrigtsen <larsi@gnus.org> writes:
> This is apparently a feature added in 2004:
>
> commit 90e118abf2dcc4aca4d7a7642247fa488554351e
> Author: Luc Teirlinck <teirllm@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?
Nobody had an opinion, and I think this is working as designed, and I'm
closing this bug report. If I misunderstood the issue, please respond
to the debbugs address and we'll reopen.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-07-02 11:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-23 23:40 bug#11549: auto-revert doesn't revert file permissions as revert-buffer does Barry OReilly
2021-06-02 6:24 ` bug#11412: 24.0.95; auto-revert-mode doesn't revert buffer when file becomes writeable Lars Ingebrigtsen
2021-07-02 11:17 ` Lars Ingebrigtsen
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).