summaryrefslogtreecommitdiffstats
path: root/emacsconf.el
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2025-09-21 13:45:36 -0400
committerSacha Chua <sacha@sachachua.com>2025-09-21 13:45:36 -0400
commitf4ff6e2e46e5933d4405074cd1b8dc044e44239c (patch)
treeaa66dcdb3d27b41d3d2cf2a4a1cd10e95445ac29 /emacsconf.el
parenta76f18ba6a03e684aa0901b4c7646dac2ff17677 (diff)
downloademacsconf-el-f4ff6e2e46e5933d4405074cd1b8dc044e44239c.tar.xz
emacsconf-el-f4ff6e2e46e5933d4405074cd1b8dc044e44239c.zip
emacsconf-org-insert-description
Diffstat (limited to 'emacsconf.el')
-rw-r--r--emacsconf.el6
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))