From 614c0d7dbb8bb1e0cc7b27f1a69f1022400b1e9e Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Mon, 18 Feb 2019 23:50:33 -0800 Subject: [PATCH] =?UTF-8?q?Use=20the=20result=20of=20the=20=E2=80=98comple?= =?UTF-8?q?ting-read=E2=80=99=20to=20get=20the=20archive?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of asking for the URL of the archive, ask for the name, and get the URL by looking through ‘package-archives’. --- oni-package.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/oni-package.el b/oni-package.el index fe4ebba..dfbed53 100644 --- a/oni-package.el +++ b/oni-package.el @@ -4,7 +4,7 @@ ;; Author: Tom Willemse ;; Keywords: local -;; Version: 20190218230337 +;; Version: 20190218233951 ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -63,7 +63,8 @@ DESCRIPTION is the text of the news item." (list (read-string "Title: ") (read-string "Text: ") - (completing-read "Archive URL: " (mapcar 'cdr package-archives)))) + (alist-get (completing-read "Archive: " (mapcar 'car package-archives)) + package-archives nil nil #'string-equal))) (package--update-file "elpa.rss" "" (package--make-rss-entry title description archive-url))