Pārlūkot izejas kodu

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.
Eric Schulte 15 gadi atpakaļ
vecāks
revīzija
8bac197bb3
1 mainītis faili ar 4 papildinājumiem un 4 dzēšanām
  1. 4 4
      lisp/ob-exp.el

+ 4 - 4
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