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: aditya siram
Subject: Re: [O] [Babel] Getting Info On Empty Source Block Fails
Date: Tue, 17 Sep 2013 17:39:03 -0500

I believe this may have been an instance of the regex being too greedy which is fixed by the patch I submitted.
-deech


On Fri, Sep 13, 2013 at 12:05 PM, Eric Schulte <address@hidden> wrote:
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]