GNU bug report logs - #55310
27.2; vc-revert: unhelpful error message when modified buffers exist

Previous Next

Package: emacs;

Reported by: "Alfred M. Szmidt" <ams <at> gnu.org>

Date: Sun, 8 May 2022 07:42:02 UTC

Severity: normal

Tags: patch

Found in version 27.2

Fixed in version 31.1

Done: Sean Whitton <spwhitton <at> spwhitton.name>

Bug is archived. No further changes may be made.

Full log


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

From: "Alfred M. Szmidt" <ams <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 55310 <at> debbugs.gnu.org
Subject: Re: bug#55310: 27.2; vc-revert: unhelpful error message when
 modified buffers exist
Date: Sun, 08 May 2022 10:22:58 -0400
   "Alfred M. Szmidt" <ams <at> gnu.org> writes:

   > When doing vc-revert in a vc-dir buffer, and when one has a bunch of
   > open files, one somtimes gets the unhelpful message:
   >
   >   vc-revert: Please kill or save all modified buffers before reverting
   >
   > Nicer would be prompting the user to kill/save those buffers, or list them.

   I don't think we want to have an interface that offers to kill buffers
   in a loop -- it sounds like something that's really error-prone, which
   is why that code is the way it is, I think.  (To make the user make the
   decision themselves explicitly.)

We already support such mechanism I think in several other places,
like ibuffer, etc.   


My main problem is really that it is impossible to know _which_
buffers are modified, if you have several hundred open in several
different projects -- in addition to the fact that the error message
is just wrong ("all buffers" -- it is just some buffers, that are
marked).

Idea (ideas are cheap): maybe if one could add some sort of
high-light, or something in vc-dired that shows that this or that file
has a open buffer that is unmodified, and then the error could be the
same but just saying that one should check the highlighted buffers.


   So I think leaving it the way it is is the best option here, since this
   command is one of the most potentially destructive ones we have in
   Emacs.  Anybody have an opinion here?

The destructiveness of vc-revert also depends on the version control
system, fossil provides a undo mechanism.  But doing delete on files
in dired is far worse ...  :-)




This bug report was last modified 70 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.