From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Re: [ANN] Convert Org-mode file to Source-code file Date: Fri, 21 Jun 2013 11:00:46 +0200 Message-ID: <87ehbvbzy9.fsf@gmail.com> References: <87wqppbpmk.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46217) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UpxDP-0008Jt-6Q for emacs-orgmode@gnu.org; Fri, 21 Jun 2013 05:01:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UpxDJ-0008Ht-Hm for emacs-orgmode@gnu.org; Fri, 21 Jun 2013 05:01:07 -0400 Received: from plane.gmane.org ([80.91.229.3]:57705) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UpxDJ-0008Hb-7L for emacs-orgmode@gnu.org; Fri, 21 Jun 2013 05:01:01 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UpxDG-0008PX-Bl for emacs-orgmode@gnu.org; Fri, 21 Jun 2013 11:00:58 +0200 Received: from e178058009.adsl.alicedsl.de ([85.178.58.9]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 21 Jun 2013 11:00:58 +0200 Received: from tjolitz by e178058009.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 21 Jun 2013 11:00:58 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Charles Berry writes: > Thorsten Jolitz gmail.com> writes: > >> >> Hi List, >> >> it is now possible to convert existing Org-mode files with >> source-blocks into machine-executable source-code files, using the >> following function from `outorg.el': >> >> #+begin_src emacs-lisp >> (defun outorg-convert-org-file-to-source-code >> (&optional mode infile outfile BATCH) > > > With this buffer > > ,---- > | > | > | * head1 > | > | abc > | > | > | #+NAME: test-src > | #+BEGIN_SRC R > | ls() > | #+END_SRC > `---- > > it fails with > > Debugger entered--Lisp error: (void-variable > outorg-code-buffer-beg-of-subtree-marker) > (set-marker outorg-code-buffer-beg-of-subtree-marker nil) > outorg-reset-global-vars() > outorg-copy-edits-and-exit() > ... > > in the backtrace. This should be fixed now, thanks for reporting. > The tmp buffer looks right, though > > ,---- > | > | > | ## * head1 > | > | ## abc > | > | > | ## #+NAME: test-src > | ls() > `---- Please note that I renamed ,--------------------------------------- | outorg-convert-org-file-to-source-code `--------------------------------------- to ,------------------------------- | outorg-convert-org-to-outshine `------------------------------- because that better reflects its purpose. This ,-------------- | ## * head1 `-------------- is actually the decisive part of the output, since the converted source-code file will have (if outshine is activated) the look&feel of the original Org-mode file, only that now the text parts are 'caged' behind comments while in the Org file the source code was 'caged' in special blocks. -- cheers, Thorsten