Browse Source

ob-exp.el: Enable removal of {{{results(...)}}}

* ob-exp.el (org-babel-exp-do-export): `clean' lambda form removes inline
  results wrapped in `results{{{(' and `)}}}' by calling
  `org-babel-remove-inline-result'.
Charles Berry 10 years ago
parent
commit
f301ac8e9f
1 changed files with 3 additions and 1 deletions
  1. 3 1
      lisp/ob-exp.el

+ 3 - 1
lisp/ob-exp.el

@@ -315,7 +315,9 @@ The function respects the value of the :exports header argument."
   (let ((silently (lambda () (let ((session (cdr (assoc :session (nth 2 info)))))
 			       (when (not (and session (equal "none" session)))
 				 (org-babel-exp-results info type 'silent)))))
-	(clean (lambda () (unless (eq type 'inline) (org-babel-remove-result info)))))
+	(clean (lambda () (if (eq type 'inline)
+			      (org-babel-remove-inline-result)
+			    (org-babel-remove-result info)))))
     (case (intern (or (cdr (assoc :exports (nth 2 info))) "code"))
       ('none (funcall silently) (funcall clean) "")
       ('code (funcall silently) (funcall clean) (org-babel-exp-code info type))