unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Ashwin Kafle <ashwin@ashwink.com.np>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 52507@debbugs.gnu.org, Ashwin Kafle <ashwin@ashwink.com.np>
Subject: bug#52507: [PATCH] Option for vc-delete-file to keep file on disk
Date: Thu, 16 Dec 2021 11:26:44 +0000	[thread overview]
Message-ID: <85lf0kdc3v.fsf@ashwink.com.np> (raw)
In-Reply-To: <817fe109-8afe-62fc-e80e-f3d0ef4e4889@yandex.ru> (Dmitry Gutov's message of "Thu, 16 Dec 2021 13:03:43 +0300")

Dmitry Gutov <dgutov@yandex.ru> writes:

> On 16.12.2021 10:12, Ashwin Kafle wrote:
>> But this would mean that every vc-backend will have to be changed,
>> immediately.
>
> Not really: since the arg is optional, we can make sure to only add it
> when it's non-nil, and otherwise call the backends with 1 argument.

But then the user will get error about wrong number of arguments if the
backend doesn't support it.

>
>> Also, having every vc-backend accept and check keep-on-disk will result
>> on a lot of duplicate code that can simply be avoided.
>
> That's a valid argument, I suppose. Depends on whether many other
> backends (VCSes) know how to delete files without deleting them on
> disk.
>
> OTOH, it would be handy to let those that don't declare explicitly
> their inability to do that (by not supporting the second argument).

I think it would be better to check if the file exists after calling vc
backends.  If it doesn't and keep-files is non-nil, we can restore from the
backup(which is always happening).  That will make all vc backends
compatible without any change.

If other backends support deletion only from the index, then they should
do that as it preserves file-modes and such.





  reply	other threads:[~2021-12-16 11:26 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-15  9:53 bug#52507: [PATCH] Option for vc-delete-file to keep file on disk Ashwin Kafle
2021-12-15 16:53 ` Juri Linkov
2021-12-15 17:41   ` Ashwin Kafle
2021-12-15 18:06     ` Juri Linkov
2021-12-15 18:26       ` Ashwin Kafle
2021-12-15 18:34         ` Ashwin Kafle
2021-12-16 17:01           ` Juri Linkov
2021-12-19 23:46             ` Dmitry Gutov
2021-12-23 17:20               ` Juri Linkov
2021-12-24  0:48                 ` Dmitry Gutov
2021-12-26 17:43                   ` Juri Linkov
2021-12-26 19:12                     ` Dmitry Gutov
2021-12-26 14:31               ` Ashwin Kafle
2021-12-26 14:23             ` Ashwin Kafle
2021-12-26 15:38               ` Dmitry Gutov
2021-12-26 15:51                 ` Ashwin Kafle
2021-12-26 15:57                   ` Dmitry Gutov
2021-12-26 16:12                     ` Ashwin Kafle
2021-12-26 16:28                       ` Dmitry Gutov
2021-12-26 17:03                         ` Ashwin Kafle
2021-12-27  0:03                           ` Dmitry Gutov
2021-12-27  4:08                             ` Ashwin Kafle
2021-12-28  0:53                               ` Dmitry Gutov
2022-09-08 14:17                                 ` bug#52508: " Lars Ingebrigtsen
2021-12-26 17:41               ` bug#52507: " Juri Linkov
2021-12-27 17:58               ` Juri Linkov
2021-12-15 22:59 ` Dmitry Gutov
2021-12-16  7:12   ` Ashwin Kafle
2021-12-16 10:03     ` Dmitry Gutov
2021-12-16 11:26       ` Ashwin Kafle [this message]
2021-12-16 11:27         ` Dmitry Gutov
2021-12-16 14:07           ` bug#52507: [PATCH v3] " Ashwin Kafle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=85lf0kdc3v.fsf@ashwink.com.np \
    --to=ashwin@ashwink.com.np \
    --cc=52507@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).