emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] babel: ob-C with Visual C++ and compilation-mode


From: Ernesto Durante
Subject: Re: [O] babel: ob-C with Visual C++ and compilation-mode
Date: Mon, 18 Aug 2014 13:19:43 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.92 (gnu/linux)

Thierry Banel <address@hidden> writes:

> Le 15/08/2014 19:22, Ernesto Durante a écrit :
>
> True.
> And to achieve that the :includes header tag was added:
> #+BEGIN_SRC C++ :includes <stdio.h>
>
> (Because otherwise a #include statement would end up in the main() function)
>
> 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. 

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 ? 

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]