From d01445716d6e24548548ce7bffe3562b3427a602 Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Wed, 3 Aug 2022 20:25:17 +0200 Subject: [PATCH] Only suggest packages with VC metadata * package-vc.el (package-vc-fetch): Filter out packages without :vc information in the interactive specification. --- lisp/emacs-lisp/package-vc.el | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el index f2bd5072474..a6694edc9fc 100644 --- a/lisp/emacs-lisp/package-vc.el +++ b/lisp/emacs-lisp/package-vc.el @@ -41,6 +41,7 @@ (require 'package) (require 'lisp-mnt) (require 'vc) +(require 'seq) (defgroup package-vc nil "Manage packages from VC checkouts." @@ -190,9 +191,12 @@ be requested using REV." ;; Initialize the package system to get the list of package ;; symbols for completion. (package--archives-initialize) - (let* ((input (completing-read - "Fetch package source (name or URL): " - package-archive-contents)) + (let* ((packages (seq-filter + (lambda (pkg) + (alist-get :vc (package-desc-extras (cadr pkg)))) + package-archive-contents)) + (input (completing-read + "Fetch package source (name or URL): " packages)) (name (file-name-base input))) (list input (intern (string-remove-prefix "emacs-" name)))))) (package--archives-initialize) -- 2.39.5