From: "Berry, Charles" via "General discussions about Org-mode." <email@example.com>
To: Joost Kremers <firstname.lastname@example.org>
Cc: "email@example.com" <firstname.lastname@example.org>
Subject: Re: :tangle header argument not picked up in #+PROPERTY line or :PROPERTIES: block
Date: Sun, 29 Mar 2020 20:41:21 +0000 [thread overview]
Message-ID: <63056638-1FBC-495A-BAD0-31ACC44EEFBC@health.ucsd.edu> (raw)
> On Mar 29, 2020, at 1:13 PM, Joost Kremers <email@example.com> wrote:
> On Sun, Mar 29 2020, Berry, Charles via General discussions about Org-mode. wrote:
>>> On Mar 28, 2020, at 3:00 PM, Joost Kremers <firstname.lastname@example.org> wrote:
>>> Is this expected behaviour? Am I doing something wrong?
>> IIUC what you did, then yes and yes.
>> This is the accepted idiom:
>> #+PROPERTY: header-args :tangle yes
What we really need is an ECM rather than snippets of code.
This ECM works for me:
,* try python
:header-args:python: :tangle yes
producing a file of the same name with the .py extension with one line containing "a+b".
I am on release Org mode version 9.3.6 (release_9.3.6-442-g97f0f1 ), but this also work on release_9.3-34-g2eee3c
p.s. `M-x org-lint' may reveal some issues with your file that might not be obvious to the eye.
> I have tried:
> #+PROPERTY: header-args:python :tangle yes :dir /home/joost/tmp/dlpy
> which AFAICT is the syntax shown in the info node you mentioned. I have also tried a file name instead of =yes=, both with and without quotes, but it doesn't work.
> What I really want is to have a property block with the =:tangle= arg under each top-level header, like so:
> :header-args:python: :tangle out1.py
> because I want the code below each top-level header to be tangled to a separate file. Again, AFAICT this is the syntax described in the info manual.
> Hmm, experimenting a bit more I find that if I leave out the =python= part, it works:
> :header-args: :tangle out1.py
> But the info manual gives this example:
> :header-args:clojure: :session *clojure-1*
> The same is true for the #+PROPERTY block at the top of the file: leave out the =python=, it works. Isn't it possible to restrict tangling to source blocks of a particular language? (Or, more specifically what I want: to specify different tangling targets for different language? I wanted to have both python and bash code blocks under one header and have them tangled to different files...)
> Joost Kremers
> Life has its moments
next prev parent reply other threads:[~2020-03-29 20:41 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-28 22:00 :tangle header argument not picked up in #+PROPERTY line or :PROPERTIES: block Joost Kremers
2020-03-29 17:45 ` Berry, Charles via General discussions about Org-mode.
2020-03-29 20:13 ` Joost Kremers
2020-03-29 20:41 ` Berry, Charles via General discussions about Org-mode. [this message]
2020-03-29 22:07 ` Joost Kremers
2020-03-29 22:41 ` Joost Kremers
2020-03-29 23:44 ` Ken Mankoff
2020-03-30 22:23 ` Joost Kremers
2020-03-31 1:08 ` Berry, Charles via General discussions about Org-mode.
2020-03-31 20:04 ` Joost Kremers
2020-03-31 15:14 ` Ken Mankoff
2020-03-31 19:54 ` Joost Kremers
2020-03-31 1:01 Thomas S. Dye
2020-04-01 19:07 ` Joost Kremers
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:
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* 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
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).