* Using multiple modes in org-mode to highlight source-code
@ 2008-11-20 10:40 Nordlöw
2008-12-25 23:59 ` Lennart Borgman
0 siblings, 1 reply; 2+ messages in thread
From: Nordlöw @ 2008-11-20 10:40 UTC (permalink / raw)
To: help-gnu-emacs
Has anyone succeeded in using multiple modes (using either mumamo.el,
mmm-mode or two-mode-mode.el) to enable font-locking of code-snippets
in org-mode? Currently only emacs lisp is supported by org-mode. But I
believe more languages will be added in the future.
Example snippet that should be highlighted in org-mode:
[[elisp:(setq x 1)]]
sub-mode begin pattern: "[[elisp:"
sub-mode end pattern: "]]"
I guess we could trigger on the pattern "[[LANG:" and activate LANG-
mode in that region.
We could make this work
/Nordlöw
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Using multiple modes in org-mode to highlight source-code
2008-11-20 10:40 Using multiple modes in org-mode to highlight source-code Nordlöw
@ 2008-12-25 23:59 ` Lennart Borgman
0 siblings, 0 replies; 2+ messages in thread
From: Lennart Borgman @ 2008-12-25 23:59 UTC (permalink / raw)
To: Nordlöw; +Cc: help-gnu-emacs
On Thu, Nov 20, 2008 at 11:40 AM, Nordlöw <per.nordlow@gmail.com> wrote:
> Has anyone succeeded in using multiple modes (using either mumamo.el,
> mmm-mode or two-mode-mode.el) to enable font-locking of code-snippets
> in org-mode? Currently only emacs lisp is supported by org-mode. But I
> believe more languages will be added in the future.
>
> Example snippet that should be highlighted in org-mode:
>
> [[elisp:(setq x 1)]]
>
> sub-mode begin pattern: "[[elisp:"
> sub-mode end pattern: "]]"
>
> I guess we could trigger on the pattern "[[LANG:" and activate LANG-
> mode in that region.
>
> We could make this work
Have you tried to do this with MuMaMo? You could probably use
mumamo-quick-static-chunk for this. (You must define a new multi major
mode too, using define-mumamo-multi-major-mode.)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-12-25 23:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-20 10:40 Using multiple modes in org-mode to highlight source-code Nordlöw
2008-12-25 23:59 ` Lennart Borgman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).