GNU bug report logs -
#35166
27.0.50; Buffer state inconsistent after vc-retrieve-tag
Previous Next
Reported by: Mauro Aranda <maurooaranda <at> gmail.com>
Date: Fri, 5 Apr 2019 21:43:02 UTC
Severity: minor
Tags: confirmed
Found in version 27.0.50
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Mauro Aranda <maurooaranda <at> gmail.com> writes:
> Suppose the following workflow for exploring code, under version
> control:
> 1. Start emacs: emacs -Q.
> 2. Visit a directory in Dired mode, e.g. C-x d "emacs/lisp/eshell".
> 3. Navigate to a file, and type 'v'.
> 4. While exploring, one may wish to switch branch, so type:
> C-x v r BRANCH-NAME
>
> I find the following to be inconsistent:
>
> 'vc-retrieve-tag' makes an effort to preserve the modes in the file.
> So it preserves View mode. But the file is no longer read-only.
I can confirm that this behaviour is still present in Emacs 28.
> This way, the buffer ends up being writable, but with View mode
> enabled, and I find it a little confusing. I understand if that is to
> respect 'revert-buffer' design, as I infer from this message: [1]
> https://lists.gnu.org/archive/html/emacs-devel/2004-09/msg00002.html
I think this was changed in:
commit 90e118abf2dcc4aca4d7a7642247fa488554351e
Author: Luc Teirlinck <teirllm <at> auburn.edu>
AuthorDate: Fri Sep 3 22:28:10 2004 +0000
(auto-revert-handler): Bind `buffer-read-only' locally around the call
to `revert-buffer'.
Reversion now preserves buffer-readedness, if I understand correctly.
> Please, consider either improving what 'vc-retrieve-tag' does, regarding the
> previous state of the buffer, or improving the documentation about this
> behavior. Or, if you think I'm plain wrong, please explain me the
> reasons, since I would like to understand more of it.
I think it would make sense for `vc-retrieve-tag' to preserve the
readedness of the buffer. Anybody got any comments here?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 2 years and 364 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.