From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexandre Duret-Lutz Subject: #+PROPERTY: header-args:C++ will not work Date: Mon, 15 Apr 2019 14:53:34 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:35728) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hG17N-0000Sc-Vo for emacs-orgmode@gnu.org; Mon, 15 Apr 2019 08:53:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hG17M-0006cD-TH for emacs-orgmode@gnu.org; Mon, 15 Apr 2019 08:53:49 -0400 Received: from mail-qk1-x735.google.com ([2607:f8b0:4864:20::735]:46022) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hG17M-0006bd-Ba for emacs-orgmode@gnu.org; Mon, 15 Apr 2019 08:53:48 -0400 Received: by mail-qk1-x735.google.com with SMTP id z76so9689540qkb.12 for ; Mon, 15 Apr 2019 05:53:47 -0700 (PDT) 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" To: emacs-orgmode@gnu.org Hi, I'm currently simplifying some documentation that evaluates a lot of sh/python/C++ blocks by defining the :results and :exports flags commonly used in header-args properties like so: #+PROPERTY: header-args:sh :results verbatim :exports both #+PROPERTY: header-args:python :results output :exports both #+PROPERTY: header-args:C++ :results verbatim :exports both Unfortunately, this does not work for C++ blocks. Looking at the contents of org-file-properties in a file with the above lines shows org-file-properties is a variable defined in =E2=80=98org.el=E2=80=99. Its value is (("header-args:C+" . ":results verbatim :exports both") ("header-args:python" . ":results output :exports both") ("header-args:sh" . ":results verbatim :exports both")) Note how C++ is truncated to C+. The documentation states: 1. Language-specific header arguments are also read from properties =E2=80=98header-args:=E2=80=99 where is the language identifie= r. (https://orgmode.org/manual/Using-Header-Arguments.html#Code-block-specific= -header-arguments) 2. If you want to add to the value of an existing property, append a =E2=80=98+=E2=80=99 to the property name. (https://orgmode.org/manual/Property-Syntax.html#Property-Syntax) Unfortunately it seems statement 2 breaks statement 1 when LANG ends with '+', and header-args:C++ is understood as appending header-args:C+. I currently work around this problem by using header-args:C+++ instead, but this only works assuming that property header-args:C++ has not been set by other means. I there other way to assign (not append) some value to the header-args property from the some org file? --=20 Alexandre Duret-Lutz