From 58faa1f548b9a2a01592dc6d82bb94425e6e9466 Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Fri, 23 Sep 2022 11:20:54 -0400 Subject: Add link type --- emacsconf.el | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'emacsconf.el') 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 -- cgit v1.2.3