GNU bug report logs - #73357
[PATCH] Make vc-clone interactive

Previous Next

Package: emacs;

Reported by: Aleksandr Vityazev <avityazev <at> disroot.org>

Date: Thu, 19 Sep 2024 13:19:01 UTC

Severity: normal

Tags: patch

Done: Sean Whitton <spwhitton <at> spwhitton.name>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Aleksandr Vityazev <avityazev <at> disroot.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 73357 <at> debbugs.gnu.org
Subject: bug#73357: [PATCH] Make vc-clone interactive
Date: Thu, 19 Sep 2024 19:38:24 +0300
[Message part 1 (text/plain, inline)]
On 2024-09-19 16:36, Eli Zaretskii wrote:

>> Date: Thu, 19 Sep 2024 16:18:16 +0300
>> From:  Aleksandr Vityazev via "Bug reports for GNU Emacs,
>>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>> 
>> Cloning is used quite often, so I would like to have an interactive
>> command. A patch is attached to the email. WDYT?
>
> Thanks, but making this function a command will take more than just
> adding the interactive form.  I think we need at least:
>
>   . mention that in interactive usage the command prompts for the
>     argument (why do we have to prompt for REV, btw?)

I clarified in the docstring. We can agree that we shouldn't prompt for REV
when cloning interactively, removed.

>   . announce the change in NEWS
Announced but did not mark the news with +++ or ---.
>   . maybe update the user manual
maybe if I have to, I'll do it.
>   . maybe make the command fall back to 'checkout' method if 'clone'
>     is not supported

it's worth thinking about, because I can't say for sure right now if
it's worth it. And how to do this when vc-checkout requires a file as an
argument.

>> +    (when (file-directory-p directory)
>> +      (if (called-interactively-p 'interactive)
>> +          (find-file directory)
>> +        directory))))
>
> This changes the value returned by the function from what it did
> before, no?

If the function is called from the code, it returns nil or the
directory, just like in the previous version. Or am I missing
something?

V2 patch:

[0001-Make-vc-clone-interactive.patch (text/x-patch, attachment)]
[Message part 3 (text/plain, inline)]
-- 
Best regards,
Aleksandr Vityazev

This bug report was last modified 210 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.