From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Alfred M. Szmidt" Newsgroups: gmane.emacs.bugs Subject: bug#55310: 27.2; vc-revert: unhelpful error message when modified buffers exist Date: Sun, 08 May 2022 10:22:58 -0400 Message-ID: References: <87y1zcjljm.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37260"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 55310@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 08 16:26:25 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nnhrb-0009W9-Qi for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 08 May 2022 16:26:23 +0200 Original-Received: from localhost ([::1]:33652 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nnhra-0005XB-SS for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 08 May 2022 10:26:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40242) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nnhpM-0003Nz-3N for bug-gnu-emacs@gnu.org; Sun, 08 May 2022 10:24:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:32860) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nnhpK-0002qn-H4 for bug-gnu-emacs@gnu.org; Sun, 08 May 2022 10:24:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nnhpK-0005s4-DQ for bug-gnu-emacs@gnu.org; Sun, 08 May 2022 10:24:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Alfred M. Szmidt" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 08 May 2022 14:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55310 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 55310-submit@debbugs.gnu.org id=B55310.165201978622495 (code B ref 55310); Sun, 08 May 2022 14:24:02 +0000 Original-Received: (at 55310) by debbugs.gnu.org; 8 May 2022 14:23:06 +0000 Original-Received: from localhost ([127.0.0.1]:54990 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nnhoQ-0005ql-84 for submit@debbugs.gnu.org; Sun, 08 May 2022 10:23:06 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:46718) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nnhoO-0005q5-DE for 55310@debbugs.gnu.org; Sun, 08 May 2022 10:23:04 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:57066) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nnhoJ-0002lX-0u; Sun, 08 May 2022 10:22:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=Date:References:Subject:In-Reply-To:To:From: mime-version; bh=0aMcdm+GqDT5pARd8qXn08XYthH6KwPKXJS+mPNLt7c=; b=Te6DgRdBayg4 lq/66rjOzvqiZPKuyQd4MsW1XzRqmUVxOnrlj4ZzN4nzSVn9jVsENTd7XnQivc0oxqJTuJnqbQIwZ qp3p94DN6nybSYbiUwBW84CjxsisQYC/0PBeIRGr9zD/MI7y8V3B6YUrrY/PsDzyEsY3shKBoFF1V YTn8EbQgOoLO1HW32OSJGw6B2MdyjPSacJT1KqB8lFAX3bqqnDeZZAF8AXw0mF2qTqiXmPJAVfytE XpuNRPIrtZFLiQ+LdFPj4qUB3eJw/41flKRpKXoruAVd2lEpzhI1Z1KLECUPIm8mCb4qV4M+W0Z8+ Ak40eDXWfgWDjHJDcLfosQ==; Original-Received: from ams by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1nnhoI-0007PC-RC; Sun, 08 May 2022 10:22:58 -0400 In-Reply-To: <87y1zcjljm.fsf@gnus.org> (message from Lars Ingebrigtsen on Sun, 08 May 2022 13:44:45 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:231664 Archived-At: "Alfred M. Szmidt" 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 ... :-)