summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Wahl <marcowahlsoft@gmail.com>2016-09-28 12:07:56 (GMT)
committer Marco Wahl <marcowahlsoft@gmail.com>2016-09-28 12:07:56 (GMT)
commitece6e39dfc97346b9f10dcb6ae8003811f56082d (patch)
tree98f0d28e8b28ee28a3131217b0da2e61af5c7be0
parent9a7297a28142b9e279da5c4f1e259afda3bb5ea4 (diff)
downloadorg-mode-master.zip
org-mode-master.tar.gz
ob-tangle: Fix jump from tangle to orgHEADmaster
* lisp/ob-tangle.el (org-babel-tangle-jump-to-org): Fix the jump from a tangled part to the respective org in the case when an org-id defines the linking. The recent (buggy) behavior was to find the file which has the org-id as filename.
-rw-r--r--lisp/ob-tangle.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el
index 45fb863..5e1b953 100644
--- a/lisp/ob-tangle.el
+++ b/lisp/ob-tangle.el
@@ -48,6 +48,7 @@
(declare-function org-string-nw-p "org-macs" (s))
(declare-function org-trim "org" (s &optional keep-lead))
(declare-function outline-previous-heading "outline" ())
+(declare-function org-id-find "org-id" (id &optional markerp))
(defvar org-link-types-re)
@@ -575,7 +576,7 @@ which enable the original code blocks to be found."
(setq body (buffer-substring body-start end)))
(when (string-match "::" path)
(setq path (substring path 0 (match-beginning 0))))
- (find-file path)
+ (find-file (or (car (org-id-find path)) path))
(setq target-buffer (current-buffer))
;; Go to the beginning of the relative block in Org file.
(org-open-link-from-string link)