From 1fb5a5e071141e47d551202eeca5776185ca8461 Mon Sep 17 00:00:00 2001 From: Max Nikulin Date: Fri, 5 Nov 2021 19:49:23 +0700 Subject: [PATCH 2/3] ol.el: Skip #CUSTOM_ID when <> link is stored * list/ol.el (org-store-link): Suppress storing of "file:file.org::#custom_id" link when point is <>. 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 Link: https://orgmode.org/list/aadb23f3-c0fe-19aa-be79-50e51d16c41a@t-online.de/ --- lisp/ol.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/ol.el b/lisp/ol.el index 6fe50ed60..5e1f1f2d2 100644 --- a/lisp/ol.el +++ b/lisp/ol.el @@ -1622,7 +1622,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? -- 2.25.1