From 1b02bf1214f478c09283a2affbd66efbb9815752 Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Thu, 12 Feb 2026 18:24:47 +0100 Subject: [PATCH] Ensure package contents for package suggestions * lisp/emacs-lisp/package.el (package--autosugest-prompt): Query archives if the package being described is not listed in package-archive-contents'. --- lisp/emacs-lisp/package.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 44da3ab94e1..e2d35f20eb5 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -4578,7 +4578,12 @@ so you have to select which to install!)" nl)) (package--autosuggest-install-and-enable (car sugs)) (quit-window))) - " (" (buttonize "about" #'describe-package pkg) + " (" + (buttonize "about" + (lambda (_) + (unless (assq pkg package-archive-contents) + (package-read-all-archive-contents)) + (describe-package pkg))) ", matches ") (dolist (sug sugs) (unless (eq (char-before) ?\s)