emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rasmus <rasmus@gmx.us>
To: emacs-orgmode@gnu.org
Subject: [ob][bug] C++-mode is unknown
Date: Sat, 13 Jul 2013 15:12:36 +0200	[thread overview]
Message-ID: <87ehb2fvsr.fsf@pank.lan> (raw)

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	other threads:[~2013-07-13 13:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-13 13:12 Rasmus [this message]
2013-07-13 13:23 ` [ob][bug] C++-mode is unknown 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ehb2fvsr.fsf@pank.lan \
    --to=rasmus@gmx.us \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).