From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id KADZA7uF0F6tcAAA0tVLHw (envelope-from ) for ; Fri, 29 May 2020 03:47:07 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id WAtrO7qF0F7sEAAAB5/wlQ (envelope-from ) for ; Fri, 29 May 2020 03:47:06 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6BF8694029E for ; Fri, 29 May 2020 03:47:06 +0000 (UTC) Received: from localhost ([::1]:47764 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jeVz7-0002ys-Cw for larch@yhetil.org; Thu, 28 May 2020 23:47:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40936) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jeVq9-0004JK-Ny for emacs-orgmode@gnu.org; Thu, 28 May 2020 23:37:49 -0400 Received: from mout-p-101.mailbox.org ([2001:67c:2050::465:101]:53744) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1jeVq7-0000lj-Tm; Thu, 28 May 2020 23:37:48 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 49Y9Hn3C6JzKmWR; Fri, 29 May 2020 05:37:41 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id jbOBpA49CxfY; Fri, 29 May 2020 05:37:37 +0200 (CEST) Subject: Re: Possible fix for :includes header argument in org-babel C source blocks To: =?UTF-8?Q?K=c3=a9vin_Le_Gouguec?= , Kyle Meyer References: <21b0cd85-d678-2fe6-3c22-e41abc6cf242@guttersohn.org> <87wo51jo5w.fsf@gnu.org> <875zchyq7y.fsf@gmail.com> <87imggx045.fsf@kyleam.com> <875zcgwjo7.fsf@gmail.com> <87blm8v09s.fsf@gmail.com> From: Brandon Guttersohn Message-ID: Date: Thu, 28 May 2020 22:37:32 -0500 MIME-Version: 1.0 In-Reply-To: <87blm8v09s.fsf@gmail.com> Content-Type: multipart/alternative; boundary="------------1614927936F517BC52499DC0" Content-Language: en-US X-Rspamd-Queue-Id: 102021754 X-Rspamd-Score: -4.50 / 15.00 / 15.00 Received-SPF: pass client-ip=2001:67c:2050::465:101; envelope-from=brandon@guttersohn.org; helo=mout-p-101.mailbox.org X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, HTML_MESSAGE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Mailman-Approved-At: Thu, 28 May 2020 23:46:41 -0400 X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bastien , emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: 1.49 X-TUID: dk+Q81WQwieW This is a multi-part message in MIME format. --------------1614927936F517BC52499DC0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Hey Kévin, Apologies for the regression, and thank you for fixing it. I neglected to run the tests before suggesting that fix -- I'll try not to do that again.. I can at least confirm that the patch wasn't intended to change how C-header-files are specified in the org-babel-block-header. The goal was only to change how the headers are formatted in the generated C-language file during execution, and only for headers which were not wrapped in <>'s. Your fix looks right to me. On 5/28/20 5:09 AM, Kévin Le Gouguec wrote: > Kévin Le Gouguec writes: > >> That leads me to believe that the coercion was an unintended side-effect >> of (format …). > Never mind, the ORG-NEWS entry for 9.1 shows an example of unquoted > header, so I guess it is intentional. > > Here is a patch to fix the regression: > > > And here is a patch to add a test for the unquoted-single-header case, > since otherwise it's hard to tell whether this behaviour is intentional: > > > (Is the Org source for the C/C++/D Babel syntax[1] committed somewhere, > BTW? I could not find it in the Org repo.) > > > I'd like to say that all tests pass now, but I'm getting failures on > master (even without my changes) for two other tests: > >> FAILED ob-tangle/jump-to-org >> FAILED test-org-attach/dir > > [1] https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-C.html --------------1614927936F517BC52499DC0 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit
Hey Kévin,

Apologies for the regression, and thank you for fixing it. I neglected to run the tests before suggesting that fix -- I'll try not to do that again..

I can at least confirm that the patch wasn't intended to change how C-header-files are specified in the org-babel-block-header. The goal was only to change how the headers are formatted in the generated C-language file during execution, and only for headers which were not wrapped in <>'s. Your fix looks right to me.

On 5/28/20 5:09 AM, Kévin Le Gouguec wrote:
Kévin Le Gouguec <kevin.legouguec@gmail.com> writes:

That leads me to believe that the coercion was an unintended side-effect
of (format …).
Never mind, the ORG-NEWS entry for 9.1 shows an example of unquoted
header, so I guess it is intentional.

Here is a patch to fix the regression:


And here is a patch to add a test for the unquoted-single-header case,
since otherwise it's hard to tell whether this behaviour is intentional:


(Is the Org source for the C/C++/D Babel syntax[1] committed somewhere,
BTW?  I could not find it in the Org repo.)


I'd like to say that all tests pass now, but I'm getting failures on
master (even without my changes) for two other tests:

  FAILED  ob-tangle/jump-to-org
  FAILED  test-org-attach/dir

[1] https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-C.html
--------------1614927936F517BC52499DC0--