From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ernesto Durante Subject: Re: babel: ob-C with Visual C++ and compilation-mode Date: Mon, 18 Aug 2014 13:19:43 +0200 Message-ID: <87vbpq6o4w.fsf@gmail.com> References: <878un4ut6c.fsf@gmail.com> <53E91C32.4000002@free.fr> <87lhqt6b0w.fsf@gmail.com> <53EA8F2B.7010205@free.fr> <87zjf8cdjk.fsf@gmail.com> <53ED1EB0.3030500@free.fr> <87lhqp7jnp.fsf@gmail.com> <53F08FE3.20506@free.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54000) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XJKyi-0006sM-AB for emacs-orgmode@gnu.org; Mon, 18 Aug 2014 07:20:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XJKyZ-0000lj-9U for emacs-orgmode@gnu.org; Mon, 18 Aug 2014 07:19:56 -0400 Received: from mail-wi0-x235.google.com ([2a00:1450:400c:c05::235]:59945) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XJKyZ-0000lb-2N for emacs-orgmode@gnu.org; Mon, 18 Aug 2014 07:19:47 -0400 Received: by mail-wi0-f181.google.com with SMTP id bs8so3475768wib.2 for ; Mon, 18 Aug 2014 04:19:46 -0700 (PDT) Received: from localhost.localdomain (col74-1-88-183-113-172.fbx.proxad.net. [88.183.113.172]) by mx.google.com with ESMTPSA id id6sm33453072wjb.17.2014.08.18.04.19.44 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Aug 2014 04:19:45 -0700 (PDT) In-Reply-To: <53F08FE3.20506@free.fr> (Thierry Banel's message of "Sun, 17 Aug 2014 13:20:03 +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 Thierry Banel writes: > Le 15/08/2014 19:22, Ernesto Durante a =C3=A9crit : > > True. > And to achieve that the :includes header tag was added: > #+BEGIN_SRC C++ :includes > > (Because otherwise a #include statement would end up in the main() functi= on) > > For me this is already a questionable distortion of C++. > > The Emacs C++-mode does no attempt at hiding parts of a C++ file. > It just display the file as it is, and that is good. > Yes, you are right. > > This is far too complex for me. > I will just write down the main() function rather than learning this > extension. > > But of course, I am just one user among others. > You are another user and you feel the need for this extension, > and this should be taken into account. > Try the extension for yourself, then share it, and see if others like it. Yes, you are right. I think the problem we are trying to integrate C++/C like Lisp,Python,Haskell or programming languages which can rely on a session to share their content. In a way, the idea of Babel originated from such a session oriented languages.=20 C++ is very different. We cannot inject codes through a online session. It's really a non sense. C++ is constructed around the idea of a project (or a Makefile). A typical C++ project holds header files + source files + a main file. As you have pointed out, the current C++ mode, is very specialized for dealing with a main file. It's right name should be something like :mainC++ . So how to deal with a C++ project ?=20 I enjoy programming in Qt and I have been trying to integrate into Babel, a= Qmake project. I finally end up by creating three specialized C++ mode: qheader, qsource and qmain. It was frustating because I couldn't reuse the standard C++ mode and in some way the core API in ob-C. It's my personal conclusion that orgmode gives a new light on C++/Qmake project by making it more accessible more easy to grasp. Does it make sense to you ? > Thanks for all the ideas you submitted. > Please stay involved. > Thierry Thank you. Best Ernesto