From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.devel Subject: Re: org-src.el begin_src/end_src fontification may have been broken recently Date: Thu, 09 Jun 2011 19:20:24 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87lixak053.fsf@lifelogs.com> References: <87aaebbndz.fsf@lifelogs.com> <87mxi8xq6y.fsf@lifelogs.com> <874o4ebtq0.fsf_-_@lifelogs.com> <87vcwpsa6y.fsf@lifelogs.com> <871uzccr2k.fsf@lifelogs.com> <87lixji1mz.fsf@lifelogs.com> <87r57beyqk.fsf@lifelogs.com> <4DE90C32.7090105@swipnet.se> <871uzag6js.fsf@lifelogs.com> <4DE9228A.1010504@swipnet.se> <4DEC9C9C.2010001@swipnet.se> <877h8yfzs2.fsf@lifelogs.com> <87zkltr617.fsf_-_@lifelogs.com> Reply-To: emacs-devel@gnu.org NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1307665261 11717 80.91.229.12 (10 Jun 2011 00:21:01 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 10 Jun 2011 00:21:01 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 10 02:20:58 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QUpT6-0006vn-OM for ged-emacs-devel@m.gmane.org; Fri, 10 Jun 2011 02:20:56 +0200 Original-Received: from localhost ([::1]:36817 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUpT5-0007oe-Ut for ged-emacs-devel@m.gmane.org; Thu, 09 Jun 2011 20:20:56 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:35669) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUpSr-0007oT-Eb for emacs-devel@gnu.org; Thu, 09 Jun 2011 20:20:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QUpSq-0000yG-Fu for emacs-devel@gnu.org; Thu, 09 Jun 2011 20:20:41 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:39257) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUpSq-0000y9-7C for emacs-devel@gnu.org; Thu, 09 Jun 2011 20:20:40 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QUpSo-0006p9-Iu for emacs-devel@gnu.org; Fri, 10 Jun 2011 02:20:38 +0200 Original-Received: from 38.98.147.130 ([38.98.147.130]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 10 Jun 2011 02:20:38 +0200 Original-Received: from tzz by 38.98.147.130 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 10 Jun 2011 02:20:38 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 51 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 38.98.147.130 X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Mail-Copies-To: never User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:UUFOXj4CmpPot25QHVl6K9B0A6w= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:140338 Archived-At: --=-=-= Content-Type: text/plain On Tue, 07 Jun 2011 10:54:28 -0500 Ted Zlatanov 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 expression: "^\\([ \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 happen. 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. Thanks Ted --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=org-src-fontification.patch === 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))) (cond ((member dc1 '("html:" "ascii:" "latex:" "docbook:")) ;; a single line of backend-specific content --=-=-=--