emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [Babel] Getting Info On Empty Source Block Fails


From: Eric Schulte
Subject: Re: [O] [Babel] Getting Info On Empty Source Block Fails
Date: Fri, 13 Sep 2013 11:05:49 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

aditya siram <address@hidden> writes:

> Hi all,
> `org-babel-get-src-block-info` on an empty block fails.
>
> Given:
> #+BEGIN_SRC c
> #+END_SRC
> #+BEGIN_SRC c
> non-empty
> #+END_SRC
>
> Running `org-babel-get-src-block-info` with point at the beginning of the
> first line gives:
> ("c" "#+END_SRC
>
> #+BEGIN_SRC c
> non-empty" ((:colname-names) (:rowname-names) (:result-params "replace")
> (:result-type . value) (:comments . "") (:shebang . "") (:cache . "no")
> (:padline . "") (:noweb . "no") (:tangle . "no") (:exports . "code")
> (:results . "replace") ...) "" nil 0 8)
>
> The problem is somewhere in `org-babel-src-block-regex` but I didn't want
> to mess with it because it touches all parts of org-babel and I'm not sure
> what else would break.
>
> Any advice on how to fix this is appreciated.
> -deech

This works for me.  With the point on the first "#" in

> #+BEGIN_SRC c
> #+END_SRC


I get

,----[C-c C-v I]
| Lang: c
| Header Arguments:
|       :cache          no
|       :exports        code
|       :hlines         no
|       :noweb          yes
|       :padnewline     yes
|       :results        replace
|       :session        none
|       :tangle         no
| 
| [back]
`----

and

,----[M-: (org-babel-get-src-block-info)]
| ("c" "" ((:colname-names) (:rowname-names) (:result-params "replace")
|          (:result-type . value) (:comments . "") (:shebang . "")
|          (:cache . "no") (:padline . "") (:noweb . "yes") (:tangle . "no")
|          (:exports . "code") (:results . "replace") ...) "" nil 0 882)
`----

Cheers,

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D



reply via email to

[Prev in Thread] Current Thread [Next in Thread]