emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Kaushal Modi <kaushal.modi@gmail.com>
Cc: emacs-org list <emacs-orgmode@gnu.org>
Subject: Re: Order of tangled blocks reversed?
Date: Thu, 11 Oct 2018 00:05:25 +0200	[thread overview]
Message-ID: <875zy9cva2.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <CAFyQvY1pKF3pt2Vm-L_gJgrzNQDhySmq4-j3ZXqK1WAt7bSX6Q@mail.gmail.com> (Kaushal Modi's message of "Sun, 7 Oct 2018 02:56:22 -0400")

Hello,

Kaushal Modi <kaushal.modi@gmail.com> 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

  reply	other threads:[~2018-10-10 22:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-07  6:56 Order of tangled blocks reversed? Kaushal Modi
2018-10-10 22:05 ` Nicolas Goaziou [this message]
2018-10-10 22:15   ` Kaushal Modi

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=875zy9cva2.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=kaushal.modi@gmail.com \
    /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).