Browse Source

ob-tangle: fix link extraction for newer version of org-store-link

* lisp/ob-tangle.el (org-babel-tangle-collect-blocks): Brought the
  link extraction code into line with a newer version of the
  org-store-link function.
Eric Schulte 10 years ago
parent
commit
cd4ce49449
1 changed files with 5 additions and 3 deletions
  1. 5 3
      lisp/ob-tangle.el

+ 5 - 3
lisp/ob-tangle.el

@@ -295,9 +295,11 @@ code blocks by language."
           (unless (and language (not (string= language src-lang)))
 	    (let* ((info (org-babel-get-src-block-info))
 		   (params (nth 2 info))
-		   (link (progn (org-store-link nil)
-				(org-babel-clean-text-properties
-				 (car (pop org-stored-links)))))
+		   (link ((lambda (link)
+			    (and (string-match org-bracket-link-regexp link)
+				 (match-string 1 link)))
+			  (org-babel-clean-text-properties
+			   (org-store-link nil))))
 		   (source-name
 		    (intern (or (nth 4 info)
 				(format "%s:%d"