[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] [ob][bug] C++-mode is unknown
From: |
Rasmus |
Subject: |
[O] [ob][bug] C++-mode is unknown |
Date: |
Sat, 13 Jul 2013 15:12:36 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
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
- [O] [ob][bug] C++-mode is unknown,
Rasmus <=
Re: [O] [ob][bug] C++-mode is unknown, Eric Schulte, 2013/07/13