summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Schulte <schulte.eric@gmail.com>2010-10-04 07:44:59 -0600
committerEric Schulte <schulte.eric@gmail.com>2010-10-04 07:45:38 -0600
commit8bac197bb3330a164b9306ffa1a0232115acc23b (patch)
tree7038d67dfb4f04c56d84dfbc956fb5aa2beb0431
parentb7372638bcfdc4b3bacaded4a9cf17a195cee473 (diff)
downloadorg-mode-8bac197bb3330a164b9306ffa1a0232115acc23b.tar.gz
ob-exp: removed spurious concatenation of "::" to the end of file names on export
Thanks to Giovanni Moretti for pointing out this issue * lisp/ob-exp.el (org-babel-exp-src-blocks): only append "::" to a file name in link construction if there is a heading to follow it.
-rw-r--r--lisp/ob-exp.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/ob-exp.el b/lisp/ob-exp.el
index 0a40f25..c1b2bf5 100644
--- a/lisp/ob-exp.el
+++ b/lisp/ob-exp.el
@@ -104,11 +104,11 @@ none ----- do not display either code or results upon export"
(org-babel-parse-header-arguments
(org-babel-clean-text-properties
(mapconcat #'identity (cdr (split-string raw-header)) " "))))
+ (heading (nth 4 (ignore-errors (org-heading-components))))
(link (org-make-link-string
- (concat
- org-current-export-file
- "::"
- (nth 4 (ignore-errors (org-heading-components))))))
+ (if heading
+ (concat org-current-export-file "::" heading)
+ org-current-export-file)))
(export-buffer (current-buffer)))
;; bail if we couldn't get any info from the block
(when info