[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 4fc2c8dd89 6/6: org-store-link: Default to empty de
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org 4fc2c8dd89 6/6: org-store-link: Default to empty description for target/custom-id links |
Date: |
Tue, 13 Sep 2022 09:58:03 -0400 (EDT) |
branch: externals/org
commit 4fc2c8dd89bfbe9f6ad7620c1b4d6def4114489b
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>
org-store-link: Default to empty description for target/custom-id links
* lisp/ol.el (org-store-link): Use empty description by default (ask user).
---
lisp/ol.el | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/lisp/ol.el b/lisp/ol.el
index b97af3dbc8..f3f6e04ef5 100644
--- a/lisp/ol.el
+++ b/lisp/ol.el
@@ -1567,10 +1567,8 @@ non-nil."
t))))
(setq link (plist-get org-store-link-plist :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)))
+ ;; it, even if it is nil. Otherwise, fallback to nil (ask user).
+ (setq desc (plist-get org-store-link-plist :description)))
;; Store a link from a remote editing buffer.
((org-src-edit-buffer-p)
@@ -1687,9 +1685,7 @@ non-nil."
;; Store a link using the ID at point
(setq link (condition-case nil
(prog1 (org-id-store-link)
- (setq desc (or (plist-get org-store-link-plist
- :description)
- "")))
+ (setq desc (plist-get org-store-link-plist
:description)))
(error
;; Probably before first headline, link only to file
(concat "file:"
@@ -1751,8 +1747,7 @@ non-nil."
;; We're done setting link and desc, clean up
(when (consp link) (setq cpltxt (car link) link (cdr link)))
- (setq link (or link cpltxt)
- desc (or desc cpltxt))
+ (setq link (or link cpltxt))
(cond ((not desc))
((equal desc "NONE") (setq desc nil))
(t (setq desc (org-link-display-format desc))))
- [elpa] externals/org updated (0432f4fe6b -> 4fc2c8dd89), ELPA Syncer, 2022/09/13
- [elpa] externals/org 4d8c6fbf7a 1/6: org-up-heading-safe: Consider inlinetasks, ELPA Syncer, 2022/09/13
- [elpa] externals/org 543a23a57d 3/6: Revert "lisp/ol.el: Fix bug when storing links", ELPA Syncer, 2022/09/13
- [elpa] externals/org 4fc2c8dd89 6/6: org-store-link: Default to empty description for target/custom-id links,
ELPA Syncer <=
- [elpa] externals/org f7b8510283 4/6: ol.el: Skip #CUSTOM_ID when <<target>> link is stored, ELPA Syncer, 2022/09/13
- [elpa] externals/org c3d6672cfd 5/6: ol.el: Avoid links like "[[target][file:~/org/test.org::target]]", ELPA Syncer, 2022/09/13
- [elpa] externals/org 2737128aa7 2/6: org-back-to-heading: Use cache, ELPA Syncer, 2022/09/13