[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problems with mumamo in org-mode
From: |
Lennart Borgman |
Subject: |
Re: Problems with mumamo in org-mode |
Date: |
Fri, 6 Nov 2009 14:07:30 +0100 |
On Sat, Oct 31, 2009 at 11:16 PM, Lennart Borgman
<lennart.borgman@gmail.com> wrote:
> On Sat, Oct 31, 2009 at 9:05 PM, Nordlöw <per.nordlow@gmail.com> 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öw
>
>
> 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?
I have got no answer to this from Per. However it seems to work for me
(though I have not Per's code below though).
I have added org-mumamo-mode to the current version (2.01) of nXhtml.
This just handles #+BEGIN_HTML now, but I will add in the next
release.
>> 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)))
>>
>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Problems with mumamo in org-mode,
Lennart Borgman <=