GNU bug report logs - #35166
27.0.50; Buffer state inconsistent after vc-retrieve-tag

Previous Next

Package: emacs;

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


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Mauro Aranda <maurooaranda <at> gmail.com>
To: bug-gnu-emacs <bug-gnu-emacs <at> gnu.org>
Subject: 27.0.50; Buffer state inconsistent after vc-retrieve-tag
Date: Fri, 5 Apr 2019 18:41:34 -0300
[Message part 1 (text/plain, inline)]
Hello.

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.  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
But I think the user could at least be warned about this, in the manual
(perhaps in the VC Branches section).

After reading [1], I tested the workflow with auto-revert-mode set to 't',
and
it works as expected, based on the information in the following messages
to [1].

Trying out simple solutions for myself, I answered "no" to the prompt
that VC puts: "Update any affected buffers? (yes or no)".  I wouldn't
answer no in the workflow I described, but I answered "no" just for the
sake of it.  I ended up with the buffer being updated, and again with
View mode enabled, but not with buffer-read-only set to 't'.
So I wonder, what is the effect of answering "yes" or "no"?  What does
it update, and what does it not?  I couldn't find such information in
the VC section of the manual.

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.

Best regards,
Mauro.
[Message part 2 (text/html, inline)]

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.