summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2022-10-02 07:48:58 -0400
committerSacha Chua <sacha@sachachua.com>2022-10-02 07:48:58 -0400
commit3981af462451dd7526dacfb506e77c573eaf9503 (patch)
tree8634f428a6ac30141cc71ce68ff1f1d6e6a93503
parent7d2ae4f2b3040c2bfdb74f3a7e69a55a8eb3e484 (diff)
downloademacsconf-el-3981af462451dd7526dacfb506e77c573eaf9503.tar.xz
emacsconf-el-3981af462451dd7526dacfb506e77c573eaf9503.zip
Allow completion to draw from info
-rw-r--r--emacsconf.el18
1 files changed, 8 insertions, 10 deletions
diff --git a/emacsconf.el b/emacsconf.el
index d95ce0d..2907632 100644
--- a/emacsconf.el
+++ b/emacsconf.el
@@ -134,16 +134,14 @@
:export #'emacsconf-export-slug))
-(defun emacsconf-complete-talk ()
- (let ((choices (with-current-buffer (find-file-noselect emacsconf-org-file)
- (save-excursion
- (delq nil
- (org-map-entries
- (lambda ()
- (when (org-entry-get (point) "SLUG")
- (concat (org-entry-get (point) "SLUG") " - "
- (org-entry-get (point) "ITEM") " - "
- (org-entry-get (point) "NAME"))))))))))
+(defun emacsconf-complete-talk (&optional info)
+ (let ((choices
+ (mapcar (lambda (o)
+ (string-join
+ (delq nil
+ (mapcar (lambda (f) (plist-get o f)) '(:slug :title :speakers :irc)))
+ " - "))
+ (or info (emacsconf-get-talk-info)))))
(completing-read
"Talk: "
(lambda (string predicate action)