org-mode language and header args should be excluded from chunk

Bug #625843 reported by Dan Davison on 2010-08-28
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Would it be possible to modify the chunk-finding procedure for Org-mode src blocks so that the language and header args are excluded from the chunk? I had a quick go (below) but it seemed to cause problems. Org src blocks have the form

#+begin_src LANG [switches] [babel header args]

so everything until the end-of-line should be matched as a chunk beginning and should be excluded from the chunk itself.

I'm excited to see the Org-mode support in mumamo -- thanks very much for working on this.


diff --git a/util/mumamo-fun.el b/util/mumamo-fun.el
index eb3c5c2..29bfb16 100644
--- a/util/mumamo-fun.el
+++ b/util/mumamo-fun.el
@@ -2886,7 +2886,7 @@ See `mumamo-find-possible-chunk' for POS, MIN and MAX."
 (defun mumamo-search-fw-org-src-start (pos max)
   "Helper for `mumamo-chunk-org-src'.
 POS is where to start search and MAX is where to stop."
- (let ((where (mumamo-chunk-start-fw-str pos max "#+BEGIN_SRC")))
+ (let ((where (mumamo-chunk-start-fw-re pos max "#\\+BEGIN_SRC[^\n]+\n")))
     (when where
       (let ((exc-mode (let ((here (point)))
                         (goto-char where)

lborgman (lennart-borgman) wrote :

Thanks for the suggestion, Dan. I have committed a change that should fix this. Should be in next release.

Changed in nxhtml:
importance: Undecided → Medium
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers