From: Philip Kaludercic <philipk@posteo.net>
To: Joseph Turner <joseph@breatheoutbreathe.in>
Cc: 66393@debbugs.gnu.org
Subject: bug#66393: [PATCH] Make package-vc-install-from-checkout NAME argument optional
Date: Sun, 08 Oct 2023 15:43:37 +0000 [thread overview]
Message-ID: <87o7h9ktli.fsf@posteo.net> (raw)
In-Reply-To: <87o7haw9zj.fsf@breatheoutbreathe.in> (Joseph Turner's message of "Sat, 07 Oct 2023 11:40:44 -0700")
Joseph Turner <joseph@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@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)
next prev parent reply other threads:[~2023-10-08 15:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-07 18:40 bug#66393: [PATCH] Make package-vc-install-from-checkout NAME argument optional Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-08 15:43 ` Philip Kaludercic [this message]
2023-10-08 20:50 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-08 21:35 ` Philip Kaludercic
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o7h9ktli.fsf@posteo.net \
--to=philipk@posteo.net \
--cc=66393@debbugs.gnu.org \
--cc=joseph@breatheoutbreathe.in \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.