[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 10e22f5 1/3: ol: Inserting help links ask for descr
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org 10e22f5 1/3: ol: Inserting help links ask for description again |
Date: |
Tue, 27 Apr 2021 16:57:10 -0400 (EDT) |
branch: externals/org
commit 10e22f57f7da4f3e3a67d1ef2f9aa031449c96fb
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Commit: Nicolas Goaziou <mail@nicolasgoaziou.fr>
ol: Inserting help links ask for description again
* lisp/ol.el (org-store-link): Allow a store function to
set :description to nil without falling back to link value.
(org-link--store-help): Set :description to nil.
---
lisp/ol.el | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/lisp/ol.el b/lisp/ol.el
index 70f351a..62ea6d2 100644
--- a/lisp/ol.el
+++ b/lisp/ol.el
@@ -1339,7 +1339,9 @@ PATH is a symbol name, as a string."
;; function instead.
(search-forward "runs the command " (line-end-position) t)
(read (current-buffer)))))
- (org-link-store-props :type "help" :link (format "help:%s" symbol)))))
+ (org-link-store-props :type "help"
+ :link (format "help:%s" symbol)
+ :description nil))))
(org-link-set-parameters "help"
:follow #'org-link--open-help
@@ -1501,8 +1503,11 @@ non-nil."
results-alist)))
t))))
(setq link (plist-get org-store-link-plist :link))
- (setq desc (or (plist-get org-store-link-plist :description)
- link)))
+ ;; If store function actually set `:description' property, use
+ ;; it, even if it is nil. Otherwise, fallback to link value.
+ (setq desc (if (plist-member org-store-link-plist :description)
+ (plist-get org-store-link-plist :description)
+ link)))
;; Store a link from a remote editing buffer.
((org-src-edit-buffer-p)