From: aditya siram <aditya.siram@gmail.com>
To: Eric Schulte <schulte.eric@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [Babel] Getting Info On Empty Source Block Fails
Date: Tue, 17 Sep 2013 17:39:03 -0500 [thread overview]
Message-ID: <CAJrReyinS4wzQfHqP=kQHXbaN_Sb5n7BLrsd5+E2jz7avCDqqA@mail.gmail.com> (raw)
In-Reply-To: <87d2octzwy.fsf@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1958 bytes --]
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 <schulte.eric@gmail.com>wrote:
> 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
>
[-- Attachment #2: Type: text/html, Size: 3057 bytes --]
prev parent reply other threads:[~2013-09-17 22:44 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
2013-09-17 22:39 ` aditya siram [this message]
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='CAJrReyinS4wzQfHqP=kQHXbaN_Sb5n7BLrsd5+E2jz7avCDqqA@mail.gmail.com' \
--to=aditya.siram@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=schulte.eric@gmail.com \
/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).