all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Problems with mumamo in org-mode
@ 2009-10-31 20:05 Nordlöw
  2009-10-31 22:16 ` Lennart Borgman
  0 siblings, 1 reply; 3+ messages in thread
From: Nordlöw @ 2009-10-31 20:05 UTC (permalink / raw
  To: help-gnu-emacs

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

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)))


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problems with mumamo in org-mode
  2009-10-31 20:05 Problems with mumamo in org-mode Nordlöw
@ 2009-10-31 22:16 ` Lennart Borgman
  2009-11-06 13:07   ` Lennart Borgman
  0 siblings, 1 reply; 3+ messages in thread
From: Lennart Borgman @ 2009-10-31 22:16 UTC (permalink / raw
  To: Nordlöw; +Cc: help-gnu-emacs

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?



> 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)))
>




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problems with mumamo in org-mode
  2009-10-31 22:16 ` Lennart Borgman
@ 2009-11-06 13:07   ` Lennart Borgman
  0 siblings, 0 replies; 3+ messages in thread
From: Lennart Borgman @ 2009-11-06 13:07 UTC (permalink / raw
  To: Nordlöw; +Cc: help-gnu-emacs

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)))
>>
>




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-11-06 13:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-31 20:05 Problems with mumamo in org-mode Nordlöw
2009-10-31 22:16 ` Lennart Borgman
2009-11-06 13:07   ` Lennart Borgman

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.