1
0
Fork 0

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’.
This commit is contained in:
Tom Willemse 2019-02-18 23:50:33 -08:00
parent e1827eb7f5
commit 614c0d7dbb

View file

@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org> ;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local ;; Keywords: local
;; Version: 20190218230337 ;; Version: 20190218233951
;; This program is free software; you can redistribute it and/or modify ;; 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 ;; 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 (list
(read-string "Title: ") (read-string "Title: ")
(read-string "Text: ") (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--update-file "elpa.rss"
"<description>" "<description>"
(package--make-rss-entry title description archive-url)) (package--make-rss-entry title description archive-url))