From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joost Kremers Subject: Re: :tangle header argument not picked up in #+PROPERTY line or :PROPERTIES: block Date: Sun, 29 Mar 2020 22:13:57 +0200 Message-ID: <878sji2a2i.fsf@fastmail.fm> References: <87imiof8d3.fsf@fastmail.fm> <77D76CC7-D45E-40A4-9D67-97057256B1E5@ucsd.edu> Mime-Version: 1.0 Content-Type: text/plain; format=flowed Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:44816) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jIeJp-0007u7-IL for emacs-orgmode@gnu.org; Sun, 29 Mar 2020 16:14:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jIeJo-0004hf-DX for emacs-orgmode@gnu.org; Sun, 29 Mar 2020 16:14:05 -0400 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:58911) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jIeJo-0004ax-0Y for emacs-orgmode@gnu.org; Sun, 29 Mar 2020 16:14:04 -0400 In-reply-to: <77D76CC7-D45E-40A4-9D67-97057256B1E5@ucsd.edu> 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-mx.org@gnu.org Sender: "Emacs-orgmode" To: "Berry, Charles" Cc: emacs-orgmode@gnu.org On Sun, Mar 29 2020, Berry, Charles via General discussions about Org-mode. wrote: >> On Mar 28, 2020, at 3:00 PM, Joost Kremers >> 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 I have tried: #+begin_example #+PROPERTY: header-args:python :tangle yes :dir /home/joost/tmp/dlpy #+end_example 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: #+begin_example :PROPERTIES: :header-args:python: :tangle out1.py :END: #+begin_example 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: #+begin_example :PROPERTIES: :header-args: :tangle out1.py :END: #+begin_example But the info manual gives this example: #+begin_example :PROPERTIES: :header-args:clojure: :session *clojure-1* :END: #+begin_example 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 -- Joost Kremers Life has its moments