emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [ob][bug] C++-mode is unknown
@ 2013-07-13 13:12 Rasmus
  2013-07-13 13:23 ` Rasmus
  2013-07-13 13:38 ` [ob][bug] C++-mode is unknown Eric Schulte
  0 siblings, 2 replies; 11+ messages in thread
From: Rasmus @ 2013-07-13 13:12 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-07-14 17:35 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-13 13:12 [ob][bug] C++-mode is unknown Rasmus
2013-07-13 13:23 ` Rasmus
2013-07-13 21:53   ` export to markdown Rill
2013-07-13 22:08     ` Suvayu Ali
     [not found]       ` <51E1D61E.9050502@yahoo.com>
2013-07-14  7:49         ` Suvayu Ali
2013-07-14 17:35           ` Rill
2013-07-13 13:38 ` [ob][bug] C++-mode is unknown Eric Schulte
2013-07-13 14:41   ` Rasmus
2013-07-13 17:59     ` Rasmus
2013-07-13 18:39       ` Eric Schulte
2013-07-13 18:59         ` Rasmus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).