From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.help Subject: Re: Problems with mumamo in org-mode Date: Sat, 31 Oct 2009 23:16:01 +0100 Message-ID: References: <1ff1da4e-e76c-4555-bcd6-79fb92a39a74@v36g2000yqv.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1257027416 9877 80.91.229.12 (31 Oct 2009 22:16:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 31 Oct 2009 22:16:56 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: =?UTF-8?B?Tm9yZGzDtnc=?= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Oct 31 23:16:50 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 1N4MFc-00065c-VE for geh-help-gnu-emacs@m.gmane.org; Sat, 31 Oct 2009 23:16:49 +0100 Original-Received: from localhost ([127.0.0.1]:37776 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N4MFc-0007Nn-DF for geh-help-gnu-emacs@m.gmane.org; Sat, 31 Oct 2009 18:16:48 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N4MFG-0007NT-SY for help-gnu-emacs@gnu.org; Sat, 31 Oct 2009 18:16:26 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N4MFC-0007Mr-1e for help-gnu-emacs@gnu.org; Sat, 31 Oct 2009 18:16:26 -0400 Original-Received: from [199.232.76.173] (port=45324 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N4MFB-0007Mo-Qc for help-gnu-emacs@gnu.org; Sat, 31 Oct 2009 18:16:21 -0400 Original-Received: from mail-gx0-f224.google.com ([209.85.217.224]:55477) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N4MFB-0007H8-Hm for help-gnu-emacs@gnu.org; Sat, 31 Oct 2009 18:16:21 -0400 Original-Received: by gxk24 with SMTP id 24so10826421gxk.6 for ; Sat, 31 Oct 2009 15:16:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=E6zcscQ5BxMozkMMcj3Y8npQqeikfK76JkzjY1ncHs8=; b=tHBDPfVFwelQNgXT3vxNQXlF92J6Y7clphkrtLAbKQymfHn+OHM1pZvMIUoGotFF+7 53UsgIY/13kWfxdQkpyPZAATmfwC519dT9nxqaa4BQjaJq47s8RQ+YZs4QNjhLCqGx2u lH+t1WaPiwy6a8PILOEN/GGvedD6Wf8fTBTHE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=PHViVd7BOWvamvOH27GKDUI12L9KPQYTk3FLKjOwn/THKZKpcvjJQANO51UTG37CAb TMvWhdhyoFfkNHdevGaQP3B3m9ct4pOd1xAste2RCAHji3IKdV/D8ldiV4IOBzrvDppc V33bqBHTcdmE/NNOMHXEe6/8vB6hHjRV9hcM4= Original-Received: by 10.101.41.16 with SMTP id t16mr2448222anj.163.1257027381093; Sat, 31 Oct 2009 15:16:21 -0700 (PDT) In-Reply-To: <1ff1da4e-e76c-4555-bcd6-79fb92a39a74@v36g2000yqv.googlegroups.com> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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:69370 Archived-At: On Sat, Oct 31, 2009 at 9:05 PM, Nordl=C3=B6w wrote= : > 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=C3=B6w Hi Per, I have no idea about what you mean with "really buggy". If you find a bug can you please submit a normal bug report to nXhtml bug tracker at Launchpad so we can fix it? > code follows: > > > (defvar mumamo-org-modes > =C2=A0'(ruby-mode emacs-lisp-mode c-mode) > =C2=A0"Modes to include in org-files") > > (defvar mumamo-org-chunk-functions > =C2=A0nil > =C2=A0"The automatically defined mumamo-chunk-org-* functions for use > cramming other modes into org-mode. =C2=A0See `mumamo-org-modes' > `mumamo-quick-static-chunk'.") > > (setq mumamo-org-chunk-functions > =C2=A0 =C2=A0 =C2=A0(mapcar =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;for > =C2=A0 =C2=A0 =C2=A0 (lambda (mode) =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;each mode given > =C2=A0 =C2=A0 =C2=A0 =C2=A0 (let* ((m-str (symbol-name mode)) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(m-name (substring= m-str 0 (- (length m-str) 5)))) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (eval `(defun ,(intern (format "mumamo= -chunk-org-%S" mode)) > (pos min max) ;define org mode mumamo > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0,(fo= rmat "%s support inside org BEGIN END blocks" > mode) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(mum= amo-quick-static-chunk > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 pos= min max > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (fo= rmat "#+BEGIN_SRC %s" ,m-name) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (fo= rmat "#+END_SRC %s" ,m-name) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 t (= quote ,mode) nil))))) > =C2=A0 =C2=A0 =C2=A0 mumamo-org-modes)) > > (eval `(define-mumamo-multi-major-mode org-mumamo > =C2=A0 =C2=A0 =C2=A0 =C2=A0 ,(format "Turn on multiple major modes with m= ain major mode > org-mode.\n\n%s" > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(mapconcat = (lambda (el) (format "- %S" el)) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 mumamo-org-modes "\n")) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 ("Org Source Blocks Family" org-mode ,mumamo-= org-chunk- > functions))) >