emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Order of tangled blocks reversed?
@ 2018-10-07  6:56 Kaushal Modi
  2018-10-10 22:05 ` Nicolas Goaziou
  0 siblings, 1 reply; 3+ messages in thread
From: Kaushal Modi @ 2018-10-07  6:56 UTC (permalink / raw)
  To: emacs-org list

Hello,

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!). 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?

Org mode version 9.1.14 (release_9.1.14-933-gfe72a0 @
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/)


--
Kaushal Modi

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-10-10 22:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-07  6:56 Order of tangled blocks reversed? Kaushal Modi
2018-10-10 22:05 ` Nicolas Goaziou
2018-10-10 22:15   ` Kaushal Modi

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).