Browse Source

fixed bug: DONE adding blank line when source-block produces no output

Eric Schulte 16 years ago
parent
commit
945200790a
2 changed files with 6 additions and 5 deletions
  1. 1 1
      lisp/org-babel.el
  2. 5 4
      org-babel.org

+ 1 - 1
lisp/org-babel.el

@@ -545,7 +545,7 @@ relies on `org-babel-insert-result'."
   (interactive)
   (save-excursion
     (goto-char (org-babel-where-is-src-block-result t)) (forward-line 1)
-    (delete-region (point) (org-babel-result-end))))
+    (delete-region (save-excursion (move-beginning-of-line 0) (point)) (org-babel-result-end))))
 
 (defun org-babel-result-end ()
   "Return the point at the end of the current set of results"

+ 5 - 4
org-babel.org

@@ -2819,7 +2819,7 @@ dot("$(2a,0)$",(2,0),N+E);
 *** DONE sh
 
 
-* Bugs [32/41]
+* Bugs [33/41]
 ** TODO Python session evaluation bug
    The following block evaluates correctly with :session none
    (set :results to output), but fails with session-based evaluation
@@ -2859,7 +2859,6 @@ dot("$(2a,0)$",(2,0),N+E);
 :     ^
 : SyntaxError: invalid syntax
 
-
 ** PROPOSED require users to explicitly turn on each language
 As we continue to add more languages to org-babel, many of which will
 require new major-modes we need to re-think how languages are added to
@@ -3069,13 +3068,15 @@ identical: output results in raw stdout contents, whereas value
 converts it to elisp, perhaps to a table if it looks tabular. This is
 the same for the other languages. [Dan]
    
-** TODO adding blank line when source-block produces no output
+** DONE adding blank line when source-block produces no output
 
 #+srcname: show-org-babel-trim
-#+begin_src sh 
+#+begin_src sh
 find . \( -path \*/SCCS -o -path \*/RCS -o -path \*/CVS -o -path \*/MCVS -o -path \*/.svn -o -path \*/.git -o -path \*/.hg -o -path \*/.bzr -o -path \*/_MTN -o -path \*/_darcs -o -path \*/\{arch\} \) -prune -o  -type f \( -iname \*.el \) -exec grep -i -nH -e org-babel-trim {} \;
 #+end_src
 
+#+resname:
+
 ** DONE Allow source blocks to be recognised when #+ are not first characters on the line
    I think Carsten has recently altered the core so that #+ can have
    preceding whitespace, at least for literal/code examples. org-babel