From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Re: Basic Literate Program Date: Fri, 11 Jul 2014 00:28:28 +0200 Message-ID: <87r41s4zn7.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44269) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5Mpe-00044J-LM for emacs-orgmode@gnu.org; Thu, 10 Jul 2014 18:28:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X5MpX-0006UM-6q for emacs-orgmode@gnu.org; Thu, 10 Jul 2014 18:28:50 -0400 Received: from plane.gmane.org ([80.91.229.3]:55762) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5MpX-0006Tw-0d for emacs-orgmode@gnu.org; Thu, 10 Jul 2014 18:28:43 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1X5MpV-0001Ce-Ue for emacs-orgmode@gnu.org; Fri, 11 Jul 2014 00:28:41 +0200 Received: from e178189242.adsl.alicedsl.de ([85.178.189.242]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 11 Jul 2014 00:28:41 +0200 Received: from tjolitz by e178189242.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 11 Jul 2014 00:28:41 +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 Jacob Gerlach writes: > - On a related note, are there any tools to take org content from > outside the SRC blocks and tangle it into comments in the C++ files? When I call M-: (outorg-convert-org-to-outshine) on this Org-mode buffer: ,---- | * ORG SCRATCH | | ** A bit C++ | | This program displays a string | and then it exits | | This program justs displays a string and exits, variation 2 | #+begin_src c | #include | | int main() { | std::cout << "Hello World!"; | std::cout << std::endl; | | return 0; | } | #+end_src | | #+results: | : Hello World! `---- I get ,---- | /* * ORG SCRATCH */ | | /* ** A bit C++ */ | | /* This program displays a string */ | /* and then it exits */ | | /* This program justs displays a string and exits, variation 2 */ | #include | | int main() { | std::cout << "Hello World!"; | std::cout << std::endl; | | return 0; | } | | /* #+results: */ | /* : Hello World! */ `---- This uses C, because thats in my org-babel-load-languages, should work with C++ too. Some modes need a little fix due to inconsistent mode naming, e.g. ESS[R]: ,---- | ;; special case R-mode | (if (eq mode 'ess-mode) | (funcall 'R-mode) | (funcall mode))) `---- maybe C++ needs this kind of special handling too, let me know if it does not work out-of-the-box. -- cheers, Thorsten