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 14:31:38 +0000 Message-ID: <858rw7cu9h.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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13314"; 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 15:31:13 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 1n1UYL-0003KD-PI for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 26 Dec 2021 15:31:13 +0100 Original-Received: from localhost ([::1]:42822 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n1UYK-0000ot-Lt for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 26 Dec 2021 09:31:12 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:48558) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n1UYC-0000oi-2t for bug-gnu-emacs@gnu.org; Sun, 26 Dec 2021 09:31:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57077) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n1UYA-0007aJ-9Z for bug-gnu-emacs@gnu.org; Sun, 26 Dec 2021 09:31:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n1UYA-00051R-7Q for bug-gnu-emacs@gnu.org; Sun, 26 Dec 2021 09:31:02 -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 14:31:02 +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.164052904119275 (code B ref 52507); Sun, 26 Dec 2021 14:31:02 +0000 Original-Received: (at 52507) by debbugs.gnu.org; 26 Dec 2021 14:30:41 +0000 Original-Received: from localhost ([127.0.0.1]:40390 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n1UXp-00050o-D4 for submit@debbugs.gnu.org; Sun, 26 Dec 2021 09:30:41 -0500 Original-Received: from forward102o.mail.yandex.net ([37.140.190.182]:56662) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n1UXl-00050Y-VN for 52507@debbugs.gnu.org; Sun, 26 Dec 2021 09:30:39 -0500 Original-Received: from iva8-c786f07cfd6d.qloud-c.yandex.net (iva8-c786f07cfd6d.qloud-c.yandex.net [IPv6:2a02:6b8:c0c:7211:0:640:c786:f07c]) by forward102o.mail.yandex.net (Yandex) with ESMTP id DEEA26FF81A5; Sun, 26 Dec 2021 17:30:30 +0300 (MSK) Original-Received: from iva6-2d18925256a6.qloud-c.yandex.net (iva6-2d18925256a6.qloud-c.yandex.net [2a02:6b8:c0c:7594:0:640:2d18:9252]) by iva8-c786f07cfd6d.qloud-c.yandex.net (mxback/Yandex) with ESMTP id rae4y1No8f-UUeG7RS9; Sun, 26 Dec 2021 17:30:30 +0300 Authentication-Results: iva8-c786f07cfd6d.qloud-c.yandex.net; dkim=pass Original-Received: by iva6-2d18925256a6.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id 1KXsNS9vlA-USPWIwvg; Sun, 26 Dec 2021 17:30:29 +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: (Dmitry Gutov's message of "Mon, 20 Dec 2021 02:46:29 +0300") 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:223144 Archived-At: Dmitry Gutov writes: >> Then after this, the user can manually rename the unregistered backup >> by removing ~ from the file name. >> So it seems that you want to automate the last part, i.e. >> to try automatically rename the file from its backup copy >> after all changes were committed? > > So a "restore from backup" step indeed could be a solution for this problem. For current vc, restore from backup would only work after a commit which i don't think is desirable much as you could go days without a commit and 'C-u C-x v x' saying it will not delete the file would be wrong. I don't know vc-internals but vc-git using git's --porcelain as juri said is probably a much better idea.