[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: org-src.el begin_src/end_src fontification may have been broken rece

From: Ted Zlatanov
Subject: Re: org-src.el begin_src/end_src fontification may have been broken recently
Date: Thu, 09 Jun 2011 19:20:24 -0500
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux)

On Tue, 07 Jun 2011 10:54:28 -0500 Ted Zlatanov <address@hidden> wrote: 

TZ> Recently (I haven't been able to find the commit that did it) org-src.el
TZ> fontification broke.  I get an error that ":-mode" could not be
TZ> executed.

Tha attached patch fixes the problem, which is that the fontification
language is now in position 8 instead of 7, and position 7 has ":".  The
fix is purely a patch, not really addressing why position 7 now has ":"
when it was the language before (there have been no commits to org.el
that could have caused this bug, AFAICT).  So something in this regular

"^\\([ \t]*#\\+\\(\\([a-zA-Z]+:?\\| \\|$\\)\\(_\\([a-zA-Z]+\\)\\)?\\)[ 
\t]*\\(\\([^ \t\n]*\\)[ \t]*\\(.*\\)\\)\\)"

broke between May 28 or so and today.  Which is why I made the fix as I
did, so it would keep working in places where the breakage doesn't

I'd really appreciate it if someone could review and maybe commit this
patch on the Emacs side (or I can commit it if necessary).  I don't
think it's an org-mode issue, but it could be breaking other people's
setups too because it triggers during fontification.


=== modified file 'lisp/org/org.el'
--- lisp/org/org.el     2011-05-23 17:57:17 +0000
+++ lisp/org/org.el     2011-06-10 00:13:14 +0000
@@ -5109,6 +5109,9 @@
              (dc1 (downcase (match-string 2)))
              (dc3 (downcase (match-string 3)))
              end end1 quoting block-type)
+          ;; fix for the case where lang ends up in position 8
+          (when (and lang (equal ":" lang) (match-string 8))
+            (setq lang (match-string 8)))
           ((member dc1 '("html:" "ascii:" "latex:" "docbook:"))
            ;; a single line of backend-specific content

reply via email to

[Prev in Thread] Current Thread [Next in Thread]