From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Org Mode List <emacs-orgmode@gnu.org>
Subject: [babel] small patch (inline src blocks cannot start at bol)
Date: Mon, 29 Aug 2011 23:21:12 +0200 [thread overview]
Message-ID: <87obz7j4mv.fsf@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 266 bytes --]
Hello,
For now inline src blocks cannot start at bol. In the following example,
only the first inline block is recognized.
This src_emacs-lisp{(1+ 1)} is ok.
src_emacs-lisp{"This"} isn't.
The small following patch should fix that.
Regards,
--
Nicolas Goaziou
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-ob-allow-inline-src-blocks-to-start-at-bol.patch --]
[-- Type: text/x-patch, Size: 845 bytes --]
From 98ec0a9d86f1b4f35be0530e2d8afb97861a91c0 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <n.goaziou@gmail.com>
Date: Mon, 29 Aug 2011 23:13:40 +0200
Subject: [PATCH] ob: allow inline src blocks to start at bol
* lisp/ob.el (org-babel-inline-src-block-regexp): Allow regexp to
start at bol.
---
lisp/ob.el | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lisp/ob.el b/lisp/ob.el
index 5d91ac3..9d80056 100644
--- a/lisp/ob.el
+++ b/lisp/ob.el
@@ -143,7 +143,7 @@ remove code block execution from the C-c C-c keybinding."
(defvar org-babel-inline-src-block-regexp
(concat
;; (1) replacement target (2) lang
- "[^-[:alnum:]]\\(src_\\([^ \f\t\n\r\v]+\\)"
+ "\\(?:^\\|[^-[:alnum:]]\\)\\(src_\\([^ \f\t\n\r\v]+\\)"
;; (3,4) (unused, headers)
"\\(\\|\\[\\(.*?\\)\\]\\)"
;; (5) body
--
1.7.6.1
next reply other threads:[~2011-08-29 21:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-29 21:21 Nicolas Goaziou [this message]
2011-08-29 22:17 ` [babel] small patch (inline src blocks cannot start at bol) Eric Schulte
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=87obz7j4mv.fsf@gmail.com \
--to=n.goaziou@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).