org.el (org-store-link): Don't add a search string when storing a link from a radio target
* org.el (org-store-link): Don't add a search string when storing a link from a radio target. (org-open-at-point): Jump to the radio link (<<<radio>>>), not to the simple target (<<target>>).
This commit is contained in:
parent
60aa1682ce
commit
1e3cb91ccb
|
@ -9466,8 +9466,8 @@ active region."
|
||||||
((and (buffer-file-name (buffer-base-buffer)) (derived-mode-p 'org-mode))
|
((and (buffer-file-name (buffer-base-buffer)) (derived-mode-p 'org-mode))
|
||||||
(setq custom-id (org-entry-get nil "CUSTOM_ID"))
|
(setq custom-id (org-entry-get nil "CUSTOM_ID"))
|
||||||
(cond
|
(cond
|
||||||
;; Store a link using the radio target at point
|
;; Store a link using the target at point
|
||||||
((org-in-regexp "<<\\(.*?\\)>>")
|
((org-in-regexp "[^<]<<\\([^<>]+\\)>>[^>]" 1)
|
||||||
(setq cpltxt
|
(setq cpltxt
|
||||||
(concat "file:"
|
(concat "file:"
|
||||||
(abbreviate-file-name
|
(abbreviate-file-name
|
||||||
|
@ -10329,7 +10329,10 @@ application the system uses for this file type."
|
||||||
(or (previous-single-property-change pos 'org-linked-text)
|
(or (previous-single-property-change pos 'org-linked-text)
|
||||||
(point-min))
|
(point-min))
|
||||||
(or (next-single-property-change pos 'org-linked-text)
|
(or (next-single-property-change pos 'org-linked-text)
|
||||||
(point-max))))
|
(point-max)))
|
||||||
|
;; Ensure we will search for a <<<radio>>> link, not
|
||||||
|
;; a simple reference like <<ref>>
|
||||||
|
path (concat "<" path))
|
||||||
(throw 'match t))
|
(throw 'match t))
|
||||||
|
|
||||||
(save-excursion
|
(save-excursion
|
||||||
|
|
Loading…
Reference in New Issue