From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Order of tangled blocks reversed? Date: Thu, 11 Oct 2018 00:05:25 +0200 Message-ID: <875zy9cva2.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60482) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gAMcb-0004Ew-5u for emacs-orgmode@gnu.org; Wed, 10 Oct 2018 18:06:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gAMcJ-0000b3-5K for emacs-orgmode@gnu.org; Wed, 10 Oct 2018 18:06:16 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:60619) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gAMcD-0000Cx-MZ for emacs-orgmode@gnu.org; Wed, 10 Oct 2018 18:06:06 -0400 In-Reply-To: (Kaushal Modi's message of "Sun, 7 Oct 2018 02:56:22 -0400") 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: Kaushal Modi Cc: emacs-org list Hello, Kaushal Modi writes: > I was playing with Org Tangle header-args inheritance and came up with > this example: > > ===== > > #+property: header-args :tangle yes > > At Org level 0. > > * Heading 1 > :PROPERTIES: > :header-args: :tangle foo.el > :END: > At Org level 1. > > #+name: block1 > #+begin_src emacs-lisp > > (message "this will be tangled to property_drawer2.el") > #+end_src > ** Heading 1.1 > :PROPERTIES: > :header-args:emacs-lisp: :tangle no > :END: > At Org level 2. > > Only the emacs-lisp block will *not* be tangled from this subtree. > > #+name: block2 > #+begin_src emacs-lisp > > (message "this block will *not* be tangled") > #+end_src > > But the below Nim block will tangle fine (though incorrectly to the > foo.el file!). It isn't incorrect. You specified "foo.el". Use ":tangle yes" if you want to let Org decide about the extension. > Though, the below /block3/ appears *above* /block1/ in > the tangled file foo.el. > > #+name: block3 > #+begin_src nim > > echo "this block will be tangled to property_drawer2.nim" > #+end_src > ===== > > Tangling this (C-c C-v t) gives this foo.el file: > > ===== > echo "this block will be tangled to property_drawer2.nim" > > (message "this will be tangled to property_drawer2.el") > ===== > > Ignoring that Nim code gets inserted into the Emacs-Lisp file because > of incorrect :tangle header-args under Heading 1, why is the block3 > code appearing above block1? > > Is this a bug? It is. Fixed. Thank you. Regards, -- Nicolas Goaziou