From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Eric Schulte <eric.schulte@gmx.com>
Cc: emacs-orgmode@gnu.org, cberry@tajo.ucsd.edu
Subject: Re: [New Latex Exporter][BABEL][BUG] lists and inline src
Date: Thu, 20 Sep 2012 14:13:28 +0200 [thread overview]
Message-ID: <87vcf8dh93.fsf@gmail.com> (raw)
In-Reply-To: <878vc57et0.fsf_-_@gmx.com> (Eric Schulte's message of "Wed, 19 Sep 2012 17:50:35 -0600")
Hello,
Eric Schulte <eric.schulte@gmx.com> writes:
> Does this problem present itself when you execute the inline code block
> interactively, or only when using the new latex exporter? If the later
> then it is a latex exporter bug and not a Babel bug. I've updated the
> subject line so that hopefully the latex export experts will notice this
> message.
Indeed, the parser doesn't understand:
- src_emacs-lisp{(+ 1 2)}
That's a bug. The problem is related to
`org-babel-inline-src-block-regexp', which is used by the parser. More
accurately, at the beginning of that regexp, there is:
"\\(?:^\\|[^-[:alnum:]]\\)\\(src_"
Item contents start at the "s" from "src" but the regexp cannot match
from there. So, is "[^-[:alnum:]]" (and, therefore,
"\\(?:^\\|[^-[:alnum:]]\\)") really necessary? Why couldn't an user be
able to write an inline-src-block in the middle of something (for
example with raw results)?
If checking the character before the inline-src-block object is
mandatory, I'll have to rely on an hack in org-element.el, along the
lines of:
#+begin_src emacs-lisp
(save-excursion
(unless (bolp) (backward-char))
(re-search-forward org-babel-inline-src-block-regexp nil limit)
...)
#+end_src
Obviously, I'd rather have the first part of the regexp removed.
What do you think?
Regards,
--
Nicolas Goaziou
next prev parent reply other threads:[~2012-09-20 12:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-18 21:48 [BABEL][BUG] lists and inline src cberry
2012-09-19 7:31 ` Bastien
2012-09-19 15:45 ` cberry
2012-09-19 23:50 ` [New Latex Exporter][BABEL][BUG] " Eric Schulte
2012-09-20 12:13 ` Nicolas Goaziou [this message]
2012-09-20 14:28 ` Eric Schulte
2012-09-20 17:07 ` Nicolas Goaziou
2012-09-20 17:26 ` Eric Schulte
2012-09-20 19:27 ` Nicolas Goaziou
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=87vcf8dh93.fsf@gmail.com \
--to=n.goaziou@gmail.com \
--cc=cberry@tajo.ucsd.edu \
--cc=emacs-orgmode@gnu.org \
--cc=eric.schulte@gmx.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).