Jacob Gerlach <jacobgerl...@gmail.com> 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 <iostream> | | 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 <iostream> | | 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