From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: [ob][bug] C++-mode is unknown Date: Sat, 13 Jul 2013 15:12:36 +0200 Message-ID: <87ehb2fvsr.fsf@pank.lan> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37719) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uxzd6-0001Zx-6X for emacs-orgmode@gnu.org; Sat, 13 Jul 2013 09:12:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uxzd5-0000Fn-Ak for emacs-orgmode@gnu.org; Sat, 13 Jul 2013 09:12:52 -0400 Received: from plane.gmane.org ([80.91.229.3]:58352) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uxzd5-0000Fc-4X for emacs-orgmode@gnu.org; Sat, 13 Jul 2013 09:12:51 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Uxzd2-0006OZ-Gu for emacs-orgmode@gnu.org; Sat, 13 Jul 2013 15:12:48 +0200 Received: from 93.182.144.2 ([93.182.144.2]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 13 Jul 2013 15:12:48 +0200 Received: from rasmus by 93.182.144.2 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 13 Jul 2013 15:12:48 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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