[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] FR: source code
From: |
Bastien |
Subject: |
Re: [Orgmode] FR: source code |
Date: |
Tue, 08 Jan 2008 14:03:04 +0000 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.0 (gnu/linux) |
Phil Jackson <address@hidden> writes:
> This may well be beyond the scope of Org but the only thing that keeps
> me from switching everything from Muse to Org is the lack of a method to
> 'embed' source code into a document ala:
>
> <src lang="shell-script">
> ...
> </src>
>
> Is this something that might be possible in the future?
Yes. For now we have #+BEGIN_EXAMPLE (info "(org)Quoted examples"), but
it's just another way of converting part of the text in fixed-width font
when exporting (like C-c : does.)
Maybe this could evolve in
#+BEGIN_EXAMPLE lang:shell-script
...
#+END_EXAMPLE
So that the exporters know how to fontify the content of such parts, and
so that #+BEGIN_EXAMPLE is really different than C-c :
BTW, we had a discussion earlier with Carsten on whether the #+BEGIN*
directives formed a consistent class. I suggested to distinguish
between #+BEGIN_[export_language] and #+BEGIN_[type_of_region]. I
further suggested that we could have:
#+IF_HTML / #+ENDIF_HTML
#+IF_LaTeX / #+ENDIF_LaTeX
#+IF_TXT / #+ENDIF_TXT
and
#+BEGIN_EXAMPLE / #+END_EXAMPLE
#+BEGIN myblock
But maybe we shouldn't be the strict about the semantic, at least not at
the cost of simplicity.
What people think?
--
Bastien