emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Schulte <schulte.eric@gmail.com>
To: aditya siram <aditya.siram@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [Babel] Getting Info On Empty Source Block Fails
Date: Fri, 13 Sep 2013 11:05:49 -0600	[thread overview]
Message-ID: <87d2octzwy.fsf@gmail.com> (raw)
In-Reply-To: <CAJrReyidtYQSkKs5TnxLF8cKTESnApmeHoR0kFo3Bk7vHLcX1w@mail.gmail.com> (aditya siram's message of "Fri, 13 Sep 2013 09:31:40 -0500")

aditya siram <aditya.siram@gmail.com> 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	other threads:[~2013-09-13 17:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-13 14:31 [Babel] Getting Info On Empty Source Block Fails aditya siram
2013-09-13 17:05 ` Eric Schulte [this message]
2013-09-17 22:39   ` aditya siram

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d2octzwy.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=aditya.siram@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).