Given the following is intended to generate C++ code:

#+BEGIN_SRC python :exports both :results output code
print "struct Whatever{};"

The result is inserted as follows:

#+BEGIN_SRC python
struct Whatever{};

Which is clearly not formatted as C++. How could I get it so that org generates the following:

struct Whatever{};


1 Answer 1


Figured it out:

#BEGIN_SRC python :exports both :results output code :wrap "SRC c++"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.