forked from mirrors/org-mode
ID links: Honor `org-link-frame-setup'.
This commit is contained in:
parent
34683b03e0
commit
98998abc0d
|
@ -1,3 +1,7 @@
|
|||
2009-08-02 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org-id.el (org-id-open): Honor `org-link-frame-setup'.
|
||||
|
||||
2009-08-01 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org-exp.el (org-export-as-org): Insert the "-source" string
|
||||
|
|
|
@ -577,11 +577,22 @@ optional argument MARKERP, return the position as a new marker."
|
|||
(defun org-id-open (id)
|
||||
"Go to the entry with id ID."
|
||||
(org-mark-ring-push)
|
||||
(let ((m (org-id-find id 'marker)))
|
||||
(let ((m (org-id-find id 'marker))
|
||||
cmd)
|
||||
(unless m
|
||||
(error "Cannot find entry with ID \"%s\"" id))
|
||||
;; Use a buffer-switching command in analogy to finding files
|
||||
(setq cmd
|
||||
(or
|
||||
(cdr
|
||||
(assq
|
||||
(cdr (assq 'file org-link-frame-setup))
|
||||
'((find-file . switch-to-buffer)
|
||||
(find-file-other-window . switch-to-buffer-other-window)
|
||||
(find-file-other-frame . switch-to-buffer-other-frame))))
|
||||
switch-to-buffer-other-window))
|
||||
(if (not (equal (current-buffer) (marker-buffer m)))
|
||||
(switch-to-buffer-other-window (marker-buffer m)))
|
||||
(funcall cmd (marker-buffer m)))
|
||||
(goto-char m)
|
||||
(move-marker m nil)
|
||||
(org-show-context)))
|
||||
|
|
Loading…
Reference in New Issue