GNU bug report logs - #66393
[PATCH] Make package-vc-install-from-checkout NAME argument optional

Previous Next

Package: emacs;

Reported by: Joseph Turner <joseph <at> breatheoutbreathe.in>

Date: Sat, 7 Oct 2023 18:43:01 UTC

Severity: normal

Tags: patch

Done: Philip Kaludercic <philipk <at> posteo.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 66393 in the body.
You can then email your comments to 66393 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to philipk <at> posteo.net, bug-gnu-emacs <at> gnu.org:
bug#66393; Package emacs. (Sat, 07 Oct 2023 18:43:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Joseph Turner <joseph <at> breatheoutbreathe.in>:
New bug report received and forwarded. Copy sent to philipk <at> posteo.net, bug-gnu-emacs <at> gnu.org. (Sat, 07 Oct 2023 18:43:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Joseph Turner <joseph <at> breatheoutbreathe.in>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Make package-vc-install-from-checkout NAME argument optional
Date: Sat, 07 Oct 2023 11:40:44 -0700
[Message part 1 (text/plain, inline)]
Tags: patch

The purpose of this change is to simplify the noninteractive usage of package-vc-install-from-checkout.

[0001-Make-package-vc-install-from-checkout-NAME-argument-.patch (text/patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#66393; Package emacs. (Sun, 08 Oct 2023 15:45:02 GMT) Full text and rfc822 format available.

Message #8 received at 66393 <at> debbugs.gnu.org (full text, mbox):

From: Philip Kaludercic <philipk <at> posteo.net>
To: Joseph Turner <joseph <at> breatheoutbreathe.in>
Cc: 66393 <at> debbugs.gnu.org
Subject: Re: bug#66393: [PATCH] Make package-vc-install-from-checkout NAME
 argument optional
Date: Sun, 08 Oct 2023 15:43:37 +0000
Joseph Turner <joseph <at> breatheoutbreathe.in> writes:

> Tags: patch
>
> The purpose of this change is to simplify the noninteractive usage of package-vc-install-from-checkout.
>
> From cfdd990c6e00decff370e5f224d60862c13be309 Mon Sep 17 00:00:00 2001
> From: Joseph Turner <joseph <at> breatheoutbreathe.in>
> Date: Sat, 7 Oct 2023 11:38:43 -0700
> Subject: [PATCH] Make package-vc-install-from-checkout NAME argument optional
>
> * lisp/emacs-lisp/package-vc.el (package-vc-install-from-checkout):
> Allow nil NAME; update documentation.
> ---
>  lisp/emacs-lisp/package-vc.el | 12 +++++-------
>  1 file changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el
> index c7a30736e32..e47deca6d7a 100644
> --- a/lisp/emacs-lisp/package-vc.el
> +++ b/lisp/emacs-lisp/package-vc.el
> @@ -841,18 +841,16 @@ for the last released version of the package."
>      (find-file directory)))
>  
>  ;;;###autoload
> -(defun package-vc-install-from-checkout (dir name)
> +(defun package-vc-install-from-checkout (dir &optional name)
>    "Set up the package NAME in DIR by linking it into the ELPA directory.
> +NAME defaults to the base name of DIR.
>  Interactively, prompt the user for DIR, which should be a directory
>  under version control, typically one created by `package-vc-checkout'.
>  If invoked interactively with a prefix argument, prompt the user
> -for the NAME of the package to set up.  Otherwise infer the package
> -name from the base name of DIR."
> +for the NAME of the package to set up."
>    (interactive (let ((dir (read-directory-name "Directory: ")))
> -                 (list dir
> -                       (if current-prefix-arg
> -                           (read-string "Package name: ")
> -                         (file-name-base (directory-file-name dir))))))
> +                 (list dir (when current-prefix-arg

This looks fine, I'm just going to replace the `when' with a `and', ok?

> +                             (read-string "Package name: ")))))
>    (unless (vc-responsible-backend dir)
>      (user-error "Directory %S is not under version control" dir))
>    (package-vc--archives-initialize)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#66393; Package emacs. (Sun, 08 Oct 2023 20:52:02 GMT) Full text and rfc822 format available.

Message #11 received at 66393 <at> debbugs.gnu.org (full text, mbox):

From: Joseph Turner <joseph <at> breatheoutbreathe.in>
To: Philip Kaludercic <philipk <at> posteo.net>
Cc: 66393 <at> debbugs.gnu.org
Subject: Re: bug#66393: [PATCH] Make package-vc-install-from-checkout NAME
 argument optional
Date: Sun, 08 Oct 2023 13:50:40 -0700
Philip Kaludercic <philipk <at> posteo.net> writes:

> Joseph Turner <joseph <at> breatheoutbreathe.in> writes:
>
>> Tags: patch
>>
>> The purpose of this change is to simplify the noninteractive usage of package-vc-install-from-checkout.
>>
>> From cfdd990c6e00decff370e5f224d60862c13be309 Mon Sep 17 00:00:00 2001
>> From: Joseph Turner <joseph <at> breatheoutbreathe.in>
>> Date: Sat, 7 Oct 2023 11:38:43 -0700
>> Subject: [PATCH] Make package-vc-install-from-checkout NAME argument optional
>>
>> * lisp/emacs-lisp/package-vc.el (package-vc-install-from-checkout):
>> Allow nil NAME; update documentation.
>> ---
>>  lisp/emacs-lisp/package-vc.el | 12 +++++-------
>>  1 file changed, 5 insertions(+), 7 deletions(-)
>>
>> diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el
>> index c7a30736e32..e47deca6d7a 100644
>> --- a/lisp/emacs-lisp/package-vc.el
>> +++ b/lisp/emacs-lisp/package-vc.el
>> @@ -841,18 +841,16 @@ for the last released version of the package."
>>      (find-file directory)))
>>
>>  ;;;###autoload
>> -(defun package-vc-install-from-checkout (dir name)
>> +(defun package-vc-install-from-checkout (dir &optional name)
>>    "Set up the package NAME in DIR by linking it into the ELPA directory.
>> +NAME defaults to the base name of DIR.
>>  Interactively, prompt the user for DIR, which should be a directory
>>  under version control, typically one created by `package-vc-checkout'.
>>  If invoked interactively with a prefix argument, prompt the user
>> -for the NAME of the package to set up.  Otherwise infer the package
>> -name from the base name of DIR."
>> +for the NAME of the package to set up."
>>    (interactive (let ((dir (read-directory-name "Directory: ")))
>> -                 (list dir
>> -                       (if current-prefix-arg
>> -                           (read-string "Package name: ")
>> -                         (file-name-base (directory-file-name dir))))))
>> +                 (list dir (when current-prefix-arg
>
> This looks fine, I'm just going to replace the `when' with a `and', ok?

Sure!

>> +                             (read-string "Package name: ")))))
>>    (unless (vc-responsible-backend dir)
>>      (user-error "Directory %S is not under version control" dir))
>>    (package-vc--archives-initialize)





Reply sent to Philip Kaludercic <philipk <at> posteo.net>:
You have taken responsibility. (Sun, 08 Oct 2023 21:36:02 GMT) Full text and rfc822 format available.

Notification sent to Joseph Turner <joseph <at> breatheoutbreathe.in>:
bug acknowledged by developer. (Sun, 08 Oct 2023 21:36:02 GMT) Full text and rfc822 format available.

Message #16 received at 66393-done <at> debbugs.gnu.org (full text, mbox):

From: Philip Kaludercic <philipk <at> posteo.net>
To: Joseph Turner <joseph <at> breatheoutbreathe.in>
Cc: 66393-done <at> debbugs.gnu.org
Subject: Re: bug#66393: [PATCH] Make package-vc-install-from-checkout NAME
 argument optional
Date: Sun, 08 Oct 2023 21:35:18 +0000
Joseph Turner <joseph <at> breatheoutbreathe.in> writes:

> Tags: patch
>
> The purpose of this change is to simplify the noninteractive usage of
> package-vc-install-from-checkout.

Thanks, pushed with slight modifications.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 06 Nov 2023 12:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 284 days ago.

Previous Next


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