[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#52508: [PATCH] Option for vc-delete-file to keep file on disk
From: |
Ashwin Kafle |
Subject: |
bug#52508: [PATCH] Option for vc-delete-file to keep file on disk |
Date: |
Wed, 15 Dec 2021 18:07:27 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Eli Zaretskii <eliz@gnu.org> writes:
[...]
>> I've created the attached patch to have vc-delete file to keep files on
>> disk using a prefix argument. I've only tested it for vc-git.
>
> Thanks, sounds useful.
>
> A few minor comments below, mainly to the documentation parts:
[...]
Thanks, now fixed and attached.
>
>> - (let ((backup-inhibited nil))
>> + (let ((backup-inhibited nil)
>> + ;; if you don't set this, then for some reason, the file is never
>> brought back
>> + (backup-by-copying t))
>
> Wouldn't it be better to understand why this mystery happens?
Yeah, a backup function should bring back the original file. That is
indeed weird. But I can't read much elisp yet to be of help in here.
In this case, backup-by-copying seems to be the better method for
backups since the intention is to not touch the original files at all.
Reading the docstring of backup-buffer, backup-by-rename doesn't look
fit for this use case.
0001-Option-for-vc-delete-file-to-keep-file-on-disk.patch
Description: Text Data