From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ashwin Kafle Newsgroups: gmane.emacs.bugs Subject: bug#52507: [PATCH] Option for vc-delete-file to keep file on disk Date: Sun, 26 Dec 2021 16:12:13 +0000 Message-ID: <85tuevjqg2.fsf@ashwink.com.np> References: <20211215095324.18195-1-ashwin@ashwink.com.np> <86a6h13j4i.fsf@mail.linkov.net> <85o85hsr3b.fsf@ashwink.com.np> <861r2dzqrj.fsf@mail.linkov.net> <85fsqt67y1.fsf@ashwink.com.np> <8535mt67k8.fsf@ashwink.com.np> <86k0g4a875.fsf@mail.linkov.net> <85czljcund.fsf@ashwink.com.np> <85h7av9xf8.fsf@ashwink.com.np> <85e94803-dd45-8223-a0b8-9ae3ca8e268b@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35343"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 52507@debbugs.gnu.org, Ashwin Kafle , Juri Linkov To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 26 17:12:11 2021 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 1n1W83-00091S-ID for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 26 Dec 2021 17:12:11 +0100 Original-Received: from localhost ([::1]:54020 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n1W81-00077U-9D for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 26 Dec 2021 11:12:09 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:60888) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n1W7u-00077L-9W for bug-gnu-emacs@gnu.org; Sun, 26 Dec 2021 11:12:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58031) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n1W7t-0003p9-R2 for bug-gnu-emacs@gnu.org; Sun, 26 Dec 2021 11:12:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n1W7t-0001wk-Hr for bug-gnu-emacs@gnu.org; Sun, 26 Dec 2021 11:12:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ashwin Kafle Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 26 Dec 2021 16:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52507 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 52507-submit@debbugs.gnu.org id=B52507.16405350767414 (code B ref 52507); Sun, 26 Dec 2021 16:12:01 +0000 Original-Received: (at 52507) by debbugs.gnu.org; 26 Dec 2021 16:11:16 +0000 Original-Received: from localhost ([127.0.0.1]:41344 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n1W7A-0001vW-EO for submit@debbugs.gnu.org; Sun, 26 Dec 2021 11:11:16 -0500 Original-Received: from forward108o.mail.yandex.net ([37.140.190.206]:55804) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n1W78-0001vF-OQ for 52507@debbugs.gnu.org; Sun, 26 Dec 2021 11:11:16 -0500 Original-Received: from myt6-06c5907de372.qloud-c.yandex.net (myt6-06c5907de372.qloud-c.yandex.net [IPv6:2a02:6b8:c12:42ad:0:640:6c5:907d]) by forward108o.mail.yandex.net (Yandex) with ESMTP id 428375DD115D; Sun, 26 Dec 2021 19:11:07 +0300 (MSK) Original-Received: from myt6-ad03e4543bb0.qloud-c.yandex.net (myt6-ad03e4543bb0.qloud-c.yandex.net [2a02:6b8:c12:422d:0:640:ad03:e454]) by myt6-06c5907de372.qloud-c.yandex.net (mxback/Yandex) with ESMTP id w8CY1POEal-B6eimDFn; Sun, 26 Dec 2021 19:11:07 +0300 Authentication-Results: myt6-06c5907de372.qloud-c.yandex.net; dkim=pass Original-Received: by myt6-ad03e4543bb0.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id Qxgw6KHqcY-B5Pm1K7B; Sun, 26 Dec 2021 19:11:05 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) X-Yandex-Fwd: 2 In-Reply-To: <85e94803-dd45-8223-a0b8-9ae3ca8e268b@yandex.ru> (Dmitry Gutov's message of "Sun, 26 Dec 2021 17:57:07 +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:223151 Archived-At: Dmitry Gutov writes: > On 26.12.2021 18:51, Ashwin Kafle wrote: >> Dmitry Gutov writes: >> >>> On 26.12.2021 17:23, Ashwin Kafle wrote: >>>> Say you use the current vc-delete-file and then immediately restore it >>>> from backup (before commiting). VC will show the file as unregistered. >>>> I think this behavior of vc should be fixed instead. >>> What would you have it do instead? >> I think a better way would be to show two files in vc-dir one saying >> unregistered and one saying deleted. You mark the one saying deleted >> then commit that fileset which will not be present after being commited. > > All right. > > Well, it seems like it will add more cognitive load in the "common" > scenario -- where you end up deleting the file you said you want to > delete. > > And it will be a breaking change in the existing behavior/UI. If you delete from disk it behaves exactly like how it's doing right now. The only difference should be when you delete and immediately restore from backup and in that case, only vc-dir shows one extra file. I don't think it brakes any existing behavior. > >> That mechanism can also be used for git add -p as you can show staged >> file and unsatged file separately. > > Perhaps it we added a different UI for staging and committing from > staging area (like in Magit), it could both be presented better and > avoid bothering the existing users who like the simpler workflow. Yeah, it's probably a bit tricky for partial adds but for complete file deletions it should be no different at all.