From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martyn Jago Subject: Re: [babel][patch] C++ inconsistencies Date: Tue, 22 Feb 2011 22:07:42 +0000 Message-ID: <87y657k9jl.fsf@btinternet.com> References: <87d3mpzk0u.fsf@btinternet.com> <87vd0hxptu.fsf@btinternet.com> <87zkpr6our.fsf@gmail.com> <87k4gt33ve.fsf@btinternet.com> <87bp255mse.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from [140.186.70.92] (port=50919 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ps0Oj-00030g-PZ for emacs-orgmode@gnu.org; Tue, 22 Feb 2011 17:08:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ps0Oi-0000af-AB for emacs-orgmode@gnu.org; Tue, 22 Feb 2011 17:07:57 -0500 Received: from lo.gmane.org ([80.91.229.12]:52797) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ps0Oh-0000a7-Va for emacs-orgmode@gnu.org; Tue, 22 Feb 2011 17:07:56 -0500 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Ps0Og-0001ah-GY for emacs-orgmode@gnu.org; Tue, 22 Feb 2011 23:07:54 +0100 Received: from 88-96-171-142.dsl.zen.co.uk ([88.96.171.142]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 Feb 2011 23:07:54 +0100 Received: from martyn.jago by 88-96-171-142.dsl.zen.co.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 Feb 2011 23:07:54 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain "Eric Schulte" writes: > Martyn Jago writes: > >> "Eric Schulte" writes: >> >> [...] >> > Hi Martyn, > > That's great news. A just had trouble trying to apply your earlier > patch, could you reproduce the patch with > > git diff > cpp.patch > > then re-send the resulting patch as an attachment? > > Thanks -- Eric > >> Hi Eric Apologies, I'm still familiarising myself with Gnus but hopefully this will work. Also thanks for Babel, I think its got a great future! Regards Martyn --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=cpp.patch Content-Description: cpp.patch diff --git a/lisp/ob-C.el b/lisp/ob-C.el index da0e768..5aa750c 100644 --- a/lisp/ob-C.el +++ b/lisp/ob-C.el @@ -38,7 +38,7 @@ (declare-function org-entry-get "org" (pom property &optional inherit literal-nil)) -(add-to-list 'org-babel-tangle-lang-exts '("c++" . "cpp")) +(add-to-list 'org-babel-tangle-lang-exts '("C++" . "cpp")) (defvar org-babel-default-header-args:C '()) @@ -46,8 +46,8 @@ "Command used to compile a C source code file into an executable.") -(defvar org-babel-c++-compiler "g++" - "Command used to compile a c++ source code file into an +(defvar org-babel-C++-compiler "g++" + "Command used to compile a C++ source code file into an executable.") (defvar org-babel-c-variant nil @@ -56,15 +56,15 @@ is currently being evaluated.") (defun org-babel-execute:cpp (body params) "Execute BODY according to PARAMS. This function calls -`org-babel-execute:C'." - (org-babel-execute:C body params)) +`org-babel-execute:C++'." + (org-babel-execute:C++ body params)) -(defun org-babel-execute:c++ (body params) +(defun org-babel-execute:C++ (body params) "Execute a block of C++ code with org-babel. This function is called by `org-babel-execute-src-block'." (let ((org-babel-c-variant 'cpp)) (org-babel-C-execute body params))) -(defun org-babel-expand-body:c++ (body params) +(defun org-babel-expand-body:C++ (body params) "Expand a block of C++ code with org-babel according to it's header arguments (calls `org-babel-C-expand')." (let ((org-babel-c-variant 'cpp)) (org-babel-C-expand body params))) @@ -81,7 +81,7 @@ header arguments (calls `org-babel-C-expand')." (defun org-babel-C-execute (body params) "This function should only be called by `org-babel-execute:C' -or `org-babel-execute:c++'." +or `org-babel-execute:C++'." (let* ((tmp-src-file (org-babel-temp-file "C-src-" (cond @@ -98,7 +98,7 @@ or `org-babel-execute:c++'." (format "%s -o %s %s %s" (cond ((equal org-babel-c-variant 'c) org-babel-C-compiler) - ((equal org-babel-c-variant 'cpp) org-babel-c++-compiler)) + ((equal org-babel-c-variant 'cpp) org-babel-C++-compiler)) (org-babel-process-file-name tmp-bin-file) (mapconcat 'identity (if (listp flags) flags (list flags)) " ") --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --=-=-=--