aboutsummaryrefslogtreecommitdiffstats
path: root/oni-package.el
diff options
context:
space:
mode:
authorGravatar Tom Willemse2019-02-18 23:50:33 -0800
committerGravatar Tom Willemse2019-02-18 23:50:33 -0800
commit614c0d7dbb8bb1e0cc7b27f1a69f1022400b1e9e (patch)
treefa2ea88011a364381740e43b99352781ff624135 /oni-package.el
parente1827eb7f5017974bf7000f130c2fbfec6882ee7 (diff)
downloademacs-config-614c0d7dbb8bb1e0cc7b27f1a69f1022400b1e9e.tar.gz
emacs-config-614c0d7dbb8bb1e0cc7b27f1a69f1022400b1e9e.zip
Use the result of the ‘completing-read’ to get the archive
Instead of asking for the URL of the archive, ask for the name, and get the URL by looking through ‘package-archives’.
Diffstat (limited to 'oni-package.el')
-rw-r--r--oni-package.el5
1 files 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 <tom@ryuslash.org>
;; 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"
"<description>"
(package--make-rss-entry title description archive-url))