Skip to content

Commit f7b8510

Browse files
maxnikulinyantar92
authored andcommitted
ol.el: Skip #CUSTOM_ID when <<target>> link is stored
* list/ol.el (org-store-link): Suppress storing of "file:file.org::#custom_id" link when point is <<target>>. CUSTOM_ID link is stored as additional option, so new chunk of code introduced by b4b35fc is not necessary. It prevented adding of "file:file.org::*Heading" link and caused duplication of "file:file.org::#custom_id" link. Reported-by: Fr Ml <fr_ml@t-online.de> Link: https://orgmode.org/list/aadb23f3-c0fe-19aa-be79-50e51d16c41a@t-online.de/
1 parent 543a23a commit f7b8510

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lisp/ol.el

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1668,7 +1668,9 @@ non-nil."
16681668
(abbreviate-file-name
16691669
(buffer-file-name (buffer-base-buffer)))
16701670
"::" (match-string 1))
1671-
link cpltxt))
1671+
link cpltxt
1672+
;; Do not append #CUSTOM_ID link below.
1673+
custom-id nil))
16721674
((and (featurep 'org-id)
16731675
(or (eq org-id-link-to-org-use-id t)
16741676
(and interactive?

0 commit comments

Comments
 (0)