bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#52507: [PATCH] Option for vc-delete-file to keep file on disk


From: Juri Linkov
Subject: bug#52507: [PATCH] Option for vc-delete-file to keep file on disk
Date: Wed, 15 Dec 2021 18:53:01 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)

forcemerge 52507 52508
thanks

> -  (interactive (list (read-file-name "VC delete file: " nil
> -                                     (when (vc-backend buffer-file-name)
> -                                       buffer-file-name)
> -                                     t)))
> +  (interactive "f\nP")

I wonder why no prompt?  You can add `current-prefix-arg' to the
interactive list to keep the existing prompt.

> +     (let ((backup-inhibited nil)
> +              ;; if you don't set this, then for some reason, the file is 
> never brought back
> +              (backup-by-copying t))

I remember having the same problem while improving `vc-rename-file'.
To solve the problem, it required adding `vc-file-clearprops'.
Maybe it could here as well?

> -    (vc-resynch-buffer file nil t)))
> +    (vc-resynch-buffer file keep-file t)))

It seems vc-resynch-window already uses `vc-file-clearprops'
when `keep-file' is specified, but also on some more conditions.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]