0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-07-16 12:16:27 +00:00

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 b4b35fc92 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/
This commit is contained in:
Max Nikulin 2021-11-05 19:49:23 +07:00 committed by Ihor Radchenko
parent 543a23a57d
commit f7b8510283
No known key found for this signature in database
GPG key ID: 6470762A7DA11D8B

View file

@ -1668,7 +1668,9 @@ non-nil."
(abbreviate-file-name
(buffer-file-name (buffer-base-buffer)))
"::" (match-string 1))
link cpltxt))
link cpltxt
;; Do not append #CUSTOM_ID link below.
custom-id nil))
((and (featurep 'org-id)
(or (eq org-id-link-to-org-use-id t)
(and interactive?