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: Tue, 12 Aug 2014 16:24:47 +0200 Message-ID: <87lhqt6b0w.fsf@gmail.com> References: <878un4ut6c.fsf@gmail.com> <53E91C32.4000002@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]:55427) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHD0V-0006yI-Pi for emacs-orgmode@gnu.org; Tue, 12 Aug 2014 10:25:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XHD0M-0000hL-OA for emacs-orgmode@gnu.org; Tue, 12 Aug 2014 10:24:59 -0400 Received: from mail-we0-x22b.google.com ([2a00:1450:400c:c03::22b]:43164) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHD0M-0000hG-GU for emacs-orgmode@gnu.org; Tue, 12 Aug 2014 10:24:50 -0400 Received: by mail-we0-f171.google.com with SMTP id p10so10146463wes.16 for ; Tue, 12 Aug 2014 07:24:49 -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 u3sm56774139wif.12.2014.08.12.07.24.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Aug 2014 07:24:48 -0700 (PDT) In-Reply-To: <53E91C32.4000002@free.fr> (Thierry Banel's message of "Mon, 11 Aug 2014 21:40:34 +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 04/08/2014 18:16, Ernesto Durante a =C3=A9crit : >> One suggestion. It will be nice to put the error buffer in >> compilation-mode, this way errors are highlighted and we can jump >> directly into the source code. I modified org-babel-eval to launch the >> compilation mode in case of errors. I also removed the read-only >> attribute, else the buffer content of org-babel-error-buffer-name cannot >> be erased. > The compilation mode is a very good idea ! > I tried it. > >> >> Clearly, it's not a good patch because org-babel-eval seems to be >> a core function in babel. Maybe for ob-C, this function should be >> replaced by a new function.=20 > It works well for C++, D, Dot > It fails for Perl, R, Elisp > But when it fails, it does not do any harm: the behavior is as before. > So... I vote for your patch. Hi Thierry, Thanks you but I don't know who is responsible to apply the patch. As you are a contributor and author of ob-C, maybe you know how to proceed.= =20 I have identified a minor bug. When a source code block has the mode cpp, we cannot expand the code or more precisely the code is not expanded in the correct way because the following function is missing=20=20 (defun org-babel-expand-body:cpp (body params) "Execute BODY according to PARAMS.This function calls `org-babel-expand-b= ody:C++'." (org-babel-expand-body:C++ body params)) Best Ernesto