emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* BEGIN_SRC
@ 2009-08-20 21:27 Kyle Sexton
  2009-08-20 21:36 ` BEGIN_SRC Eric Schulte
  2009-08-20 22:41 ` BEGIN_SRC Bernt Hansen
  0 siblings, 2 replies; 4+ messages in thread
From: Kyle Sexton @ 2009-08-20 21:27 UTC (permalink / raw)
  To: org-mode

Is it possible to have BEGIN_SRC use the mode for the programming
language within it's block? 

For example:

#+BEGIN_SRC emacs-lisp
; Treat this block with emacs-lisp-mode
#+END_SRC

My first thought is that this would require mmm-mode.  Anyone doing
something similar?


-- 
Kyle Sexton

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

* Re: BEGIN_SRC
  2009-08-20 21:27 BEGIN_SRC Kyle Sexton
@ 2009-08-20 21:36 ` Eric Schulte
  2009-08-20 22:41 ` BEGIN_SRC Bernt Hansen
  1 sibling, 0 replies; 4+ messages in thread
From: Eric Schulte @ 2009-08-20 21:36 UTC (permalink / raw)
  To: Kyle Sexton; +Cc: org-mode

Hi Kyle,

I tried this with MuMaMo-minor-mode a while back.  There is discussion
and some code available in the old email threads, see [1] and [2].

Unfortunately MuMaMo-minor-mode fought with Org-mode and the result was
too buggy to really use.  I believe the author of MuMaMo has been
intending a rewrite for some time now, so maybe after that occurs this
would be worth another try.

Best -- Eric

Kyle Sexton <ks@mocker.org> writes:

> Is it possible to have BEGIN_SRC use the mode for the programming
> language within it's block? 
>
> For example:
>
> #+BEGIN_SRC emacs-lisp
> ; Treat this block with emacs-lisp-mode
> #+END_SRC
>
> My first thought is that this would require mmm-mode.  Anyone doing
> something similar?

Footnotes: 
[1]  http://article.gmane.org/gmane.emacs.orgmode/8112/

[2]  http://article.gmane.org/gmane.emacs.orgmode/12399/

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

* Re: BEGIN_SRC
  2009-08-20 21:27 BEGIN_SRC Kyle Sexton
  2009-08-20 21:36 ` BEGIN_SRC Eric Schulte
@ 2009-08-20 22:41 ` Bernt Hansen
  2009-08-21  0:43   ` BEGIN_SRC Kyle Sexton
  1 sibling, 1 reply; 4+ messages in thread
From: Bernt Hansen @ 2009-08-20 22:41 UTC (permalink / raw)
  To: Kyle Sexton; +Cc: org-mode

Kyle Sexton <ks@mocker.org> writes:

> Is it possible to have BEGIN_SRC use the mode for the programming
> language within it's block? 
>
> For example:
>
> #+BEGIN_SRC emacs-lisp
> ; Treat this block with emacs-lisp-mode
> #+END_SRC
>
> My first thought is that this would require mmm-mode.  Anyone doing
> something similar?

You probably know this already but just in case... you can use C-c '
inside the block and it switches to that mode with just the contents of
the block.  C-c ' gets out again.

-Bernt

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

* Re: BEGIN_SRC
  2009-08-20 22:41 ` BEGIN_SRC Bernt Hansen
@ 2009-08-21  0:43   ` Kyle Sexton
  0 siblings, 0 replies; 4+ messages in thread
From: Kyle Sexton @ 2009-08-21  0:43 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: org-mode

At Thu, 20 Aug 2009 18:41:05 -0400,
Bernt Hansen <bernt@norang.ca> wrote:
> 
> Kyle Sexton <ks@mocker.org> writes:
> 
> > Is it possible to have BEGIN_SRC use the mode for the programming
> > language within it's block? 
> >
> > For example:
> >
> > #+BEGIN_SRC emacs-lisp
> > ; Treat this block with emacs-lisp-mode
> > #+END_SRC
> >
> > My first thought is that this would require mmm-mode.  Anyone doing
> > something similar?
> 

Bernt,

Didn't know that trick and it's perfect for what I'm trying to do.

Thanks a bunch!

-- 
Kyle Sexton

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

end of thread, other threads:[~2009-08-21  0:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-20 21:27 BEGIN_SRC Kyle Sexton
2009-08-20 21:36 ` BEGIN_SRC Eric Schulte
2009-08-20 22:41 ` BEGIN_SRC Bernt Hansen
2009-08-21  0:43   ` BEGIN_SRC Kyle Sexton

Code repositories for project(s) associated with this public inbox

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

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