From: Alexandre Duret-Lutz <adl@lrde.epita.fr>
To: emacs-orgmode@gnu.org
Subject: #+PROPERTY: header-args:C++ will not work
Date: Mon, 15 Apr 2019 14:53:34 +0200 [thread overview]
Message-ID: <CA+Xfj9TmrvUvxucSLqNEOGo4ERUTq_0e=Mn9fj+6uwpaVeDwbw@mail.gmail.com> (raw)
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 ‘org.el’.
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
‘header-args:<LANG>’ where <LANG> is the language identifier.
(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
‘+’ 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?
--
Alexandre Duret-Lutz
next reply other threads:[~2019-04-15 12:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-15 12:53 Alexandre Duret-Lutz [this message]
2019-04-15 14:08 ` #+PROPERTY: header-args:C++ will not work Alexandre Duret-Lutz
2019-04-23 8:28 ` Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CA+Xfj9TmrvUvxucSLqNEOGo4ERUTq_0e=Mn9fj+6uwpaVeDwbw@mail.gmail.com' \
--to=adl@lrde.epita.fr \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).