From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: [Babel] Getting Info On Empty Source Block Fails Date: Fri, 13 Sep 2013 11:05:49 -0600 Message-ID: <87d2octzwy.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50199) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VKWoF-0005Jj-Ez for emacs-orgmode@gnu.org; Fri, 13 Sep 2013 13:05:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VKWoA-0001AZ-0r for emacs-orgmode@gnu.org; Fri, 13 Sep 2013 13:05:31 -0400 Received: from mail-pd0-x22b.google.com ([2607:f8b0:400e:c02::22b]:60681) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VKWo9-0001AS-Pb for emacs-orgmode@gnu.org; Fri, 13 Sep 2013 13:05:25 -0400 Received: by mail-pd0-f171.google.com with SMTP id g10so1478649pdj.30 for ; Fri, 13 Sep 2013 10:05:24 -0700 (PDT) In-Reply-To: (aditya siram's message of "Fri, 13 Sep 2013 09:31:40 -0500") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: aditya siram Cc: emacs-orgmode@gnu.org aditya siram 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