summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2022-09-23 11:20:54 -0400
committerSacha Chua <sacha@sachachua.com>2022-09-23 11:20:54 -0400
commit58faa1f548b9a2a01592dc6d82bb94425e6e9466 (patch)
tree56dca1a4de1448c9977af8f4e9e19b297c9d0077
parent119a654f08fc335f3f894db22e22d45288e13243 (diff)
downloademacsconf-el-58faa1f548b9a2a01592dc6d82bb94425e6e9466.tar.xz
emacsconf-el-58faa1f548b9a2a01592dc6d82bb94425e6e9466.zip
Add link type
-rw-r--r--emacsconf.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/emacsconf.el b/emacsconf.el
index 5737616..3dadca7 100644
--- a/emacsconf.el
+++ b/emacsconf.el
@@ -111,6 +111,16 @@
(setq value (or value (org-read-property-value prop)))
(org-entry-put (point) prop value))))
+
+(defun emacsconf-complete-slug ()
+ (emacsconf-get-slug-from-string (emacsconf-complete-talk)))
+
+(with-eval-after-load 'org
+ (org-link-set-parameters
+ "emacsconf"
+ :follow #'emacsconf-go-to-talk
+ :complete (lambda () (concat "emacsconf:" (emacsconf-complete-slug)))))
+
(defun emacsconf-complete-talk ()
(let ((choices (with-current-buffer (find-file-noselect emacsconf-org-file)
(save-excursion