diff options
-rw-r--r-- | emacsconf.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/emacsconf.el b/emacsconf.el index b2889f2..35233f6 100644 --- a/emacsconf.el +++ b/emacsconf.el @@ -479,10 +479,16 @@ FILENAME specifies an extra string to add to the file prefix if needed." (format "[%s](%s \"%s\")" desc path (plist-get talk :title))) (_ path)))) +(defun emacsconf-org-insert-description (link desc) + (unless desc + (when (string-match "emacsconf:\\(.+\\)" link) + (plist-get (emacsconf-search-talk-info (match-string 1 link)) :title)))) + (with-eval-after-load 'org (org-link-set-parameters "emacsconf" :follow #'emacsconf-go-to-talk + :insert-description #'emacsconf-org-insert-description :complete (lambda () (concat "emacsconf:" (emacsconf-complete-slug))) :export #'emacsconf-export-slug)) |