File tree Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -1659,24 +1659,16 @@ non-nil."
16591659
16601660 ((and (buffer-file-name (buffer-base-buffer )) (derived-mode-p 'org-mode ))
16611661 (org-with-limited-levels
1662- (cond
1663- ; ; Store a link using the target at point.
1662+ (setq custom-id (org-entry-get nil " CUSTOM_ID" ))
1663+ (cond
1664+ ; ; Store a link using the target at point
16641665 ((org-in-regexp " [^<]<<\\ ([^<>]+\\ )>>[^>]" 1 )
16651666 (setq cpltxt
16661667 (concat " file:"
16671668 (abbreviate-file-name
16681669 (buffer-file-name (buffer-base-buffer )))
16691670 " ::" (match-string 1 ))
16701671 link cpltxt))
1671- ; ; Store a link using the CUSTOM_ID property.
1672- ((setq custom-id (org-entry-get nil " CUSTOM_ID" ))
1673- (setq cpltxt
1674- (concat " file:"
1675- (abbreviate-file-name
1676- (buffer-file-name (buffer-base-buffer )))
1677- " ::#" custom-id)
1678- link cpltxt))
1679- ; ; Store a link using (and perhaps creating) the ID property.
16801672 ((and (featurep 'org-id )
16811673 (or (eq org-id-link-to-org-use-id t )
16821674 (and interactive?
@@ -1685,13 +1677,14 @@ non-nil."
16851677 'create-if-interactive-and-no-custom-id )
16861678 (not custom-id))))
16871679 (and org-id-link-to-org-use-id (org-entry-get nil " ID" ))))
1680+ ; ; Store a link using the ID at point
16881681 (setq link (condition-case nil
16891682 (prog1 (org-id-store-link )
16901683 (setq desc (or (plist-get org-store-link-plist
16911684 :description )
16921685 " " )))
16931686 (error
1694- ; ; Probably before first headline, link only to file.
1687+ ; ; Probably before first headline, link only to file
16951688 (concat " file:"
16961689 (abbreviate-file-name
16971690 (buffer-file-name (buffer-base-buffer ))))))))
You can’t perform that action at this time.
0 commit comments