From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: FR: source code Date: Tue, 08 Jan 2008 14:03:04 +0000 Message-ID: <87hchoh0tj.fsf@bzg.ath.cx> References: <87bq7w5zp0.fsf@shellarchive.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JCF2t-0008NY-6J for emacs-orgmode@gnu.org; Tue, 08 Jan 2008 09:03:11 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JCF2s-0008MJ-C8 for emacs-orgmode@gnu.org; Tue, 08 Jan 2008 09:03:10 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JCF2s-0008Lq-2V for emacs-orgmode@gnu.org; Tue, 08 Jan 2008 09:03:10 -0500 Received: from nf-out-0910.google.com ([64.233.182.186]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JCF2r-0007ju-LX for emacs-orgmode@gnu.org; Tue, 08 Jan 2008 09:03:09 -0500 Received: by nf-out-0910.google.com with SMTP id f5so661978nfh.26 for ; Tue, 08 Jan 2008 06:03:08 -0800 (PST) In-Reply-To: <87bq7w5zp0.fsf@shellarchive.co.uk> (Phil Jackson's message of "Tue, 08 Jan 2008 11:22:51 +0000") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Phil Jackson Cc: emacs-orgmode@gnu.org Phil Jackson 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: > > > ... > > > 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