Hi,

The Emacs C++ mode is called c++-mode.  In babel C++ is C++.  
Hence, the following problematic case holds. 

With the block, (lowercase c)

  #+begin_src c++ 
   ...
  #+end_src

I can edit it in the c++-mode and get nice fontification, but I can't
execute it.

With (capital c)

  #+begin_src C++ 
   ...
  #+end_src

I can execute the block in Org, but I can't edit it in c++-mode.

I'm not very knowledgeable about Babel, so the best fix I could find
was adding

  (defalias 'C++-mode 'c++-mode)

to the top of ob-c.el (after requiring cc-mode).  Of course C++ could
also be renamed c++, but the correct name does in fact seem to use
capitals (cf. Wikipedia).

Ob-template didn't mention how to associate a language with a given
mode.

Cheers,
Rasmus

-- 
Got mashed potatoes. Ain't got no T-Bone. No T-Bone


Reply via email to