[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 543a23a57d 3/6: Revert "lisp/ol.el: Fix bug when st
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org 543a23a57d 3/6: Revert "lisp/ol.el: Fix bug when storing links" |
Date: |
Tue, 13 Sep 2022 09:58:02 -0400 (EDT) |
branch: externals/org
commit 543a23a57d2947cd01c906d134ae9c5c8d0907c4
Author: Max Nikulin <manikulin@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>
Revert "lisp/ol.el: Fix bug when storing links"
This reverts commit b4b35fc92d6ea8eb2ac061b8ccf026e9b4ebfe33.
Avoid duplication of CUSTOM_ID links.
---
lisp/ol.el | 17 +++++------------
1 file changed, 5 insertions(+), 12 deletions(-)
diff --git a/lisp/ol.el b/lisp/ol.el
index 20b085682d..7401db952d 100644
--- a/lisp/ol.el
+++ b/lisp/ol.el
@@ -1659,8 +1659,9 @@ non-nil."
((and (buffer-file-name (buffer-base-buffer)) (derived-mode-p
'org-mode))
(org-with-limited-levels
- (cond
- ;; Store a link using the target at point.
+ (setq custom-id (org-entry-get nil "CUSTOM_ID"))
+ (cond
+ ;; Store a link using the target at point
((org-in-regexp "[^<]<<\\([^<>]+\\)>>[^>]" 1)
(setq cpltxt
(concat "file:"
@@ -1668,15 +1669,6 @@ non-nil."
(buffer-file-name (buffer-base-buffer)))
"::" (match-string 1))
link cpltxt))
- ;; Store a link using the CUSTOM_ID property.
- ((setq custom-id (org-entry-get nil "CUSTOM_ID"))
- (setq cpltxt
- (concat "file:"
- (abbreviate-file-name
- (buffer-file-name (buffer-base-buffer)))
- "::#" custom-id)
- link cpltxt))
- ;; Store a link using (and perhaps creating) the ID property.
((and (featurep 'org-id)
(or (eq org-id-link-to-org-use-id t)
(and interactive?
@@ -1685,13 +1677,14 @@ non-nil."
'create-if-interactive-and-no-custom-id)
(not custom-id))))
(and org-id-link-to-org-use-id (org-entry-get nil "ID"))))
+ ;; 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)
"")))
(error
- ;; Probably before first headline, link only to file.
+ ;; Probably before first headline, link only to file
(concat "file:"
(abbreviate-file-name
(buffer-file-name (buffer-base-buffer))))))))
- [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 <=
- [elpa] externals/org 4fc2c8dd89 6/6: org-store-link: Default to empty description for target/custom-id links, ELPA Syncer, 2022/09/13
- [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