From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Banel Subject: Re: Bug: Cannot set header-args :includes with multiple includes [8.2.7 (8.2.7-4-g880362-elpa /home/will/.emacs.d/elpa/org-20140616/)] Date: Wed, 03 Sep 2014 08:35:17 +0200 Message-ID: <5406B6A5.3090502@free.fr> References: 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]:43699) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XP4A3-00014B-Ov for emacs-orgmode@gnu.org; Wed, 03 Sep 2014 02:35:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XP4A2-0005Yg-TT for emacs-orgmode@gnu.org; Wed, 03 Sep 2014 02:35:19 -0400 Received: from smtp6-g21.free.fr ([2a01:e0c:1:1599::15]:24275) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XP4A2-0005YO-NY for emacs-orgmode@gnu.org; Wed, 03 Sep 2014 02:35:18 -0400 Received: from [IPv6:2a01:e35:2e21:def0:904:fe5:f9d5:fc64] (unknown [IPv6:2a01:e35:2e21:def0:904:fe5:f9d5:fc64]) by smtp6-g21.free.fr (Postfix) with ESMTP id 8D42082291 for ; Wed, 3 Sep 2014 08:35:17 +0200 (CEST) In-Reply-To: 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 Yes Will, there is a bug. I will look at it. In the meantime, as a workaround, you may move includes from header to bo= dy: #+BEGIN_SRC C++ #include #include using namespace std; int main() { printf("Hello "); cout << "world"; } #+END_SRC Thanks for reporting Thierry Le 03/09/2014 01:06, Will Everett a =C3=A9crit : > Will Everett spings.net> writes: >> I believe the :includes header argument is incorrectly parsing lists o= f > includes for c++. This snippet: >> #+BEGIN_SRC C++ :includes >> using namespace std; >> printf("Hello "); >> cout << "world"; >> #+END_SRC >> >> produces a compiler error: >> >> warning: extra tokens at end of #include directive >> #include >> >> Then, of course printf and cout are undeclared. It looks like the incl= ude > is just throwing all the includes onto one line when they should be bro= ken > up and each put on their own line. > >