From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Nordl=F6w?= Newsgroups: gmane.emacs.help Subject: Problems with mumamo in org-mode Date: Sat, 31 Oct 2009 13:05:48 -0700 (PDT) Organization: http://groups.google.com Message-ID: <1ff1da4e-e76c-4555-bcd6-79fb92a39a74@v36g2000yqv.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1257021648 26787 80.91.229.12 (31 Oct 2009 20:40:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 31 Oct 2009 20:40:48 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Oct 31 21:40:41 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1N4Kka-0005fC-EJ for geh-help-gnu-emacs@m.gmane.org; Sat, 31 Oct 2009 21:40:40 +0100 Original-Received: from localhost ([127.0.0.1]:55015 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N4KkZ-0005hh-W0 for geh-help-gnu-emacs@m.gmane.org; Sat, 31 Oct 2009 16:40:40 -0400 Original-Path: news.stanford.edu!usenet.stanford.edu!postnews.google.com!v36g2000yqv.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 44 Original-NNTP-Posting-Host: 81.170.219.22 Original-X-Trace: posting.google.com 1257019548 20554 127.0.0.1 (31 Oct 2009 20:05:48 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Sat, 31 Oct 2009 20:05:48 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: v36g2000yqv.googlegroups.com; posting-host=81.170.219.22; posting-account=ytJKAgoAAAA1tg4ScoRszebXiIldA5vg User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/532.3 (KHTML, like Gecko) Chrome/4.0.226.0 Safari/532.3,gzip(gfe),gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:174288 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:69369 Archived-At: I would like to syntax highlight source code snippets in org-mode.el I have used mumamo for this purpose with org-mode.el but I have found it really buggy. Is mmm-mode more stable/mature? Thanks in advance, Nordl=F6w code follows: (defvar mumamo-org-modes '(ruby-mode emacs-lisp-mode c-mode) "Modes to include in org-files") (defvar mumamo-org-chunk-functions nil "The automatically defined mumamo-chunk-org-* functions for use cramming other modes into org-mode. See `mumamo-org-modes' `mumamo-quick-static-chunk'.") (setq mumamo-org-chunk-functions (mapcar ;for (lambda (mode) ;each mode given (let* ((m-str (symbol-name mode)) (m-name (substring m-str 0 (- (length m-str) 5)))) (eval `(defun ,(intern (format "mumamo-chunk-org-%S" mode)) (pos min max) ;define org mode mumamo ,(format "%s support inside org BEGIN END blocks" mode) (mumamo-quick-static-chunk pos min max (format "#+BEGIN_SRC %s" ,m-name) (format "#+END_SRC %s" ,m-name) t (quote ,mode) nil))))) mumamo-org-modes)) (eval `(define-mumamo-multi-major-mode org-mumamo ,(format "Turn on multiple major modes with main major mode org-mode.\n\n%s" (mapconcat (lambda (el) (format "- %S" el)) mumamo-org-modes "\n")) ("Org Source Blocks Family" org-mode ,mumamo-org-chunk- functions)))