emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: org-babel-tangle sometimes does not respect header-args property [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.1/lisp/org/)]
@ 2018-06-10  5:42 Gennady Uraltsev
  0 siblings, 0 replies; 6+ messages in thread
From: Gennady Uraltsev @ 2018-06-10  5:42 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 4375 bytes --]

Running =(org-babel-tangle)= from inside a =src= block ignores
=header-args= properties
Consider the following org-mode file set for tangling.
This code should run the command =org-babel-tangle= #+BEGIN_SRC
emacs-lisp  :results silent
(org-babel-tangle)
#+END_SRC
that should tangle the stuff in the next header.

** Observed behaviour
Running the first code block tangles only the first code block below
Running =org-babel-tangle= tangles both code blocks below


** Expected behaviour
Running the above code block or =org-babel-tangle= tangles both code
blocks below


* Code to tangle
** Because of =:tangle= parameter
This block gets tangled both by executing =org-babel-tangle= from the
=src= code block or directly via M-x.

  #+BEGIN_SRC emacs-lisp :tangle yes
  (message "This should be tangled because of :tangle parameter")
  #+END_SRC



** Because of properties
  :PROPERTIES:
  :header-args:  :tangle yes   :END:

This block gets tangled only by executing =org-babel-tangle=  directly
via M-x but it *doesn't* get tangled by executing =org-babel-tangle=
from the =src= code block.

  #+BEGIN_SRC emacs-lisp
  (message "This should be tangled because of property list")
  #+END_SRC



--------------------------

Emacs  : GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
 of 2018-05-29
Package: Org mode version 9.1.9 (release_9.1.9-65-g5e4542 @
/usr/share/emacs/26.1/lisp/org/)

current state:
==============
(setq
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
		     org-src-mode-configure-edit-buffer)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-mode-hook '(#[0 "\300\301\302\303\304$\207"
		   [add-hook change-major-mode-hook org-show-block-all append
		    local]
		   5]
		 #[0 "\300\301\302\303\304$\207"
		   [add-hook change-major-mode-hook org-babel-show-result-all
		    append local]
		   5]
		 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3
"\n\n(fn ENTRY)"]
 org-babel-pre-tangle-hook '(save-buffer)
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe
		      org-babel-header-arg-expand)
 org-occur-hook '(org-first-headline-recenter)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
		  org-cycle-show-empty-lines
		  org-optimize-window-after-visibility-change)
 org-speed-command-hook '(org-speed-command-activate
			  org-babel-speed-command-activate)
 org-confirm-shell-link-function 'yes-or-no-p
 org-link-parameters '(("id" :follow org-id-open)
		       ("rmail" :follow org-rmail-open :store
			org-rmail-store-link)
		       ("mhe" :follow org-mhe-open :store org-mhe-store-link)
		       ("irc" :follow org-irc-visit :store org-irc-store-link)
		       ("info" :follow org-info-open :export org-info-export
			:store org-info-store-link)
		       ("gnus" :follow org-gnus-open :store
			org-gnus-store-link)
		       ("docview" :follow org-docview-open :export
			org-docview-export :store org-docview-store-link)
		       ("bibtex" :follow org-bibtex-open :store
			org-bibtex-store-link)
		       ("bbdb" :follow org-bbdb-open :export org-bbdb-export
			:complete org-bbdb-complete-link :store
			org-bbdb-store-link)
		       ("w3m" :store org-w3m-store-link) ("file+sys")
		       ("file+emacs") ("doi" :follow org--open-doi-link)
		       ("elisp" :follow org--open-elisp-link)
		       ("file" :complete org-file-complete-link)
		       ("ftp" :follow
			(lambda (path) (browse-url (concat "ftp:" path))))
		       ("help" :follow org--open-help-link)
		       ("http" :follow
			(lambda (path) (browse-url (concat "http:" path))))
		       ("https" :follow
			(lambda (path) (browse-url (concat "https:" path))))
		       ("mailto" :follow
			(lambda (path) (browse-url (concat "mailto:" path))))
		       ("news" :follow
			(lambda (path) (browse-url (concat "news:" path))))
		       ("shell" :follow org--open-shell-link))
 )


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Bug: org-babel-tangle sometimes does not respect header-args property [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.1/lisp/org/)]
@ 2018-06-23 13:34 Gennady Uraltsev
  2018-06-26  9:44 ` Nicolas Goaziou
  0 siblings, 1 reply; 6+ messages in thread
From: Gennady Uraltsev @ 2018-06-23 13:34 UTC (permalink / raw)
  To: emacs-orgmode

Running =(org-babel-tangle)= from inside a =src= block ignores
=header-args= properties
Consider the following org-mode file set for tangling.

This code should run the command =org-babel-tangle=
#+BEGIN_SRC emacs-lisp  :results silent
(org-babel-tangle)
#+END_SRC
that should tangle the stuff in the next header.

** Observed behaviour
Running the first code block tangles only the first code block below
Running =org-babel-tangle= tangles both code blocks below


** Expected behaviour
Running the above code block or =org-babel-tangle= tangles both code
blocks below


* Code to tangle
** Because of =:tangle= parameter
This block gets tangled both by executing =org-babel-tangle= from the
=src= code block or directly via M-x.

  #+BEGIN_SRC emacs-lisp :tangle yes
  (message "This should be tangled because of :tangle parameter")
  #+END_SRC



** Because of properties
  :PROPERTIES:
  :header-args:  :tangle yes
  :END:

This block gets tangled only by executing =org-babel-tangle=  directly
via M-x but it *doesn't* get tangled by executing =org-babel-tangle=
from the =src= code block.

  #+BEGIN_SRC emacs-lisp
  (message "This should be tangled because of property list")
  #+END_SRC




--------------------------

Emacs  : GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
 of 2018-05-29
Package: Org mode version 9.1.9 (release_9.1.9-65-g5e4542 @
/usr/share/emacs/26.1/lisp/org/)

current state:
==============
(setq
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
		     org-src-mode-configure-edit-buffer)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-mode-hook '(#[0 "\300\301\302\303\304$\207"
		   [add-hook change-major-mode-hook org-show-block-all append
		    local]
		   5]
		 #[0 "\300\301\302\303\304$\207"
		   [add-hook change-major-mode-hook org-babel-show-result-all
		    append local]
		   5]
		 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-bibtex-headline-format-function #[257 "\300\x01\236A\207" [:title] 3
"\n\n(fn ENTRY)"]
 org-babel-pre-tangle-hook '(save-buffer)
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe
		      org-babel-header-arg-expand)
 org-occur-hook '(org-first-headline-recenter)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
		  org-cycle-show-empty-lines
		  org-optimize-window-after-visibility-change)
 org-speed-command-hook '(org-speed-command-activate
			  org-babel-speed-command-activate)
 org-confirm-shell-link-function 'yes-or-no-p
 org-link-parameters '(("id" :follow org-id-open)
		       ("rmail" :follow org-rmail-open :store
			org-rmail-store-link)
		       ("mhe" :follow org-mhe-open :store org-mhe-store-link)
		       ("irc" :follow org-irc-visit :store org-irc-store-link)
		       ("info" :follow org-info-open :export org-info-export
			:store org-info-store-link)
		       ("gnus" :follow org-gnus-open :store
			org-gnus-store-link)
		       ("docview" :follow org-docview-open :export
			org-docview-export :store org-docview-store-link)
		       ("bibtex" :follow org-bibtex-open :store
			org-bibtex-store-link)
		       ("bbdb" :follow org-bbdb-open :export org-bbdb-export
			:complete org-bbdb-complete-link :store
			org-bbdb-store-link)
		       ("w3m" :store org-w3m-store-link) ("file+sys")
		       ("file+emacs") ("doi" :follow org--open-doi-link)
		       ("elisp" :follow org--open-elisp-link)
		       ("file" :complete org-file-complete-link)
		       ("ftp" :follow
			(lambda (path) (browse-url (concat "ftp:" path))))
		       ("help" :follow org--open-help-link)
		       ("http" :follow
			(lambda (path) (browse-url (concat "http:" path))))
		       ("https" :follow
			(lambda (path) (browse-url (concat "https:" path))))
		       ("mailto" :follow
			(lambda (path) (browse-url (concat "mailto:" path))))
		       ("news" :follow
			(lambda (path) (browse-url (concat "news:" path))))
		       ("shell" :follow org--open-shell-link))
 )

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

* Bug: org-babel-tangle sometimes does not respect header-args property [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.1/lisp/org/)]
@ 2018-06-23 15:50 Gennady Uraltsev
  2018-06-23 20:07 ` Henry Blevins
  2018-06-23 20:09 ` Nicolas Goaziou
  0 siblings, 2 replies; 6+ messages in thread
From: Gennady Uraltsev @ 2018-06-23 15:50 UTC (permalink / raw)
  To: emacs-orgmode

Running =(org-babel-tangle)= from inside a =src= block ignores
=header-args= properties
Consider the following org-mode file set for tangling.

This code should run the command =org-babel-tangle=
#+BEGIN_SRC emacs-lisp  :results silent
(org-babel-tangle)
#+END_SRC
that should tangle the stuff in the next header.

** Observed behaviour
Running the first code block tangles only the first code block below
Running =org-babel-tangle= tangles both code blocks below


** Expected behaviour
Running the above code block or =org-babel-tangle= tangles both code
blocks below


* Code to tangle
** Because of =:tangle= parameter
This block gets tangled both by executing =org-babel-tangle= from the
=src= code block or directly via M-x.

  #+BEGIN_SRC emacs-lisp :tangle yes
  (message "This should be tangled because of :tangle parameter")
  #+END_SRC



** Because of properties
  :PROPERTIES:
  :header-args:  :tangle yes
  :END:

This block gets tangled only by executing =org-babel-tangle=  directly
via M-x but it *doesn't* get tangled by executing =org-babel-tangle=
from the =src= code block.

  #+BEGIN_SRC emacs-lisp
  (message "This should be tangled because of property list")
  #+END_SRC




--------------------------

Emacs  : GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
 of 2018-05-29
Package: Org mode version 9.1.9 (release_9.1.9-65-g5e4542 @
/usr/share/emacs/26.1/lisp/org/)

current state:
==============
(setq
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
		     org-src-mode-configure-edit-buffer)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-mode-hook '(#[0 "\300\301\302\303\304$\207"
		   [add-hook change-major-mode-hook org-show-block-all append
		    local]
		   5]
		 #[0 "\300\301\302\303\304$\207"
		   [add-hook change-major-mode-hook org-babel-show-result-all
		    append local]
		   5]
		 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-bibtex-headline-format-function #[257 "\300\x01\236A\207" [:title] 3
"\n\n(fn ENTRY)"]
 org-babel-pre-tangle-hook '(save-buffer)
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe
		      org-babel-header-arg-expand)
 org-occur-hook '(org-first-headline-recenter)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
		  org-cycle-show-empty-lines
		  org-optimize-window-after-visibility-change)
 org-speed-command-hook '(org-speed-command-activate
			  org-babel-speed-command-activate)
 org-confirm-shell-link-function 'yes-or-no-p
 org-link-parameters '(("id" :follow org-id-open)
		       ("rmail" :follow org-rmail-open :store
			org-rmail-store-link)
		       ("mhe" :follow org-mhe-open :store org-mhe-store-link)
		       ("irc" :follow org-irc-visit :store org-irc-store-link)
		       ("info" :follow org-info-open :export org-info-export
			:store org-info-store-link)
		       ("gnus" :follow org-gnus-open :store
			org-gnus-store-link)
		       ("docview" :follow org-docview-open :export
			org-docview-export :store org-docview-store-link)
		       ("bibtex" :follow org-bibtex-open :store
			org-bibtex-store-link)
		       ("bbdb" :follow org-bbdb-open :export org-bbdb-export
			:complete org-bbdb-complete-link :store
			org-bbdb-store-link)
		       ("w3m" :store org-w3m-store-link) ("file+sys")
		       ("file+emacs") ("doi" :follow org--open-doi-link)
		       ("elisp" :follow org--open-elisp-link)
		       ("file" :complete org-file-complete-link)
		       ("ftp" :follow
			(lambda (path) (browse-url (concat "ftp:" path))))
		       ("help" :follow org--open-help-link)
		       ("http" :follow
			(lambda (path) (browse-url (concat "http:" path))))
		       ("https" :follow
			(lambda (path) (browse-url (concat "https:" path))))
		       ("mailto" :follow
			(lambda (path) (browse-url (concat "mailto:" path))))
		       ("news" :follow
			(lambda (path) (browse-url (concat "news:" path))))
		       ("shell" :follow org--open-shell-link))
 )

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

* Re: Bug: org-babel-tangle sometimes does not respect header-args property [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.1/lisp/org/)]
  2018-06-23 15:50 Bug: org-babel-tangle sometimes does not respect header-args property [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.1/lisp/org/)] Gennady Uraltsev
@ 2018-06-23 20:07 ` Henry Blevins
  2018-06-23 20:09 ` Nicolas Goaziou
  1 sibling, 0 replies; 6+ messages in thread
From: Henry Blevins @ 2018-06-23 20:07 UTC (permalink / raw)
  To: Gennady Uraltsev; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 6154 bytes --]

I did some additional testing, and found some interesting results that
appear to
point to the =org-babel-get-src-block-info= function as the culprit.
Depending on
whether this function is evaluated directly, or executed in source blocks in
different locations through this file, the function returns different
results.

Running this block does indeed result in an incorrectly tangled file.
However,
jumping down to the nearly identical block named =correct-tangle= at the
end of
the file and running it generates a correctly tangled file.

#+BEGIN_SRC emacs-lisp :results silent
(org-babel-tangle)
#+END_SRC

Digging into the function, the problem seems to stem from the value
returned by
=org-babel-get-src-block-info=. Running the following block, we see that the
=:tangle= property is ="no"= for the blocks that should be tangled due to
the header
property list.

Note the correct value of ="yes"= for the =correct-block-info= source block
towards
the end of the file.

#+BEGIN_SRC emacs-lisp :results pp
  (let (blocks)
    (org-babel-map-src-blocks (buffer-file-name)
      (push (org-babel-get-src-block-info 'light)
            blocks))
    blocks)
#+END_SRC

#+RESULTS:
#+begin_example
(("emacs-lisp" "(org-babel-tangle)"
  ((:results . "silent")
   (:exports . "code")
   (:lexical . "no")
   (:tangle . "no")
   (:hlines . "no")
   (:noweb . "no")
   (:cache . "no")
   (:session . "none"))
  "" nil 5378 "(ref:%s)")
 ("emacs-lisp" "(let (blocks)\n  (org-babel-map-src-blocks
(buffer-file-name)\n    (push (org-babel-get-src-block-info 'light)\n
    blocks))\n  blocks) "
  ((:results . "pp replace")
   (:exports . "code")
   (:lexical . "no")
   (:tangle . "no")
   (:hlines . "no")
   (:noweb . "no")
   (:cache . "no")
   (:session . "none"))
  "" nil 3102 "(ref:%s)")
 ("emacs-lisp" "(message \"This should be tangled because of property
list\")"
  ((:results . "replace")
   (:exports . "code")
   (:lexical . "no")
   (:tangle . "no")
   (:hlines . "no")
   (:noweb . "no")
   (:cache . "no")
   (:session . "none"))
  "" nil 2850 "(ref:%s)")
 ("emacs-lisp" "(message \"This should be tangled because of :tangle
parameter\")"
  ((:results . "replace")
   (:exports . "code")
   (:tangle . "yes")
   (:lexical . "no")
   (:hlines . "no")
   (:noweb . "no")
   (:cache . "no")
   (:session . "none"))
  "" nil 2649 "(ref:%s)")
 ("emacs-lisp" "(let (blocks)\n  (org-babel-map-src-blocks
(buffer-file-name)\n    (push (org-babel-get-src-block-info 'light)\n
    blocks))\n  blocks) "
  ((:results . "pp replace")
   (:exports . "code")
   (:lexical . "no")
   (:tangle . "no")
   (:hlines . "no")
   (:noweb . "no")
   (:cache . "no")
   (:session . "none"))
  "" nil 975 "(ref:%s)")
 ("emacs-lisp" "(org-babel-tangle)"
  ((:results . "silent")
   (:exports . "code")
   (:lexical . "no")
   (:tangle . "no")
   (:hlines . "no")
   (:noweb . "no")
   (:cache . "no")
   (:session . "none"))
  "" nil 563 "(ref:%s)"))
#+end_example


* Code to tangle
** Because of =:tangle= parameter

   #+BEGIN_SRC emacs-lisp :tangle yes
     (message "This should be tangled because of :tangle parameter")
   #+END_SRC

** Because of properties
   :PROPERTIES:
   :header-args: :tangle yes
   :END:

   #+BEGIN_SRC emacs-lisp
     (message "This should be tangled because of property list")
   #+END_SRC

   The following block, when executed, results in the correct values for
each
   source blocks =:tangle= property.

   #+name correct-block-info
   #+BEGIN_SRC emacs-lisp :results pp
     (let (blocks)
       (org-babel-map-src-blocks (buffer-file-name)
         (push (org-babel-get-src-block-info 'light)
               blocks))
       blocks)
   #+END_SRC

   #+RESULTS:
   #+begin_example
   (("emacs-lisp" "(org-babel-tangle)"
     ((:results . "silent")
      (:exports . "code")
      (:tangle . "yes")
      (:lexical . "no")
      (:hlines . "no")
      (:noweb . "no")
      (:cache . "no")
      (:session . "none"))
     "" nil 3281 "(ref:%s)")
    ("emacs-lisp" "(let (blocks)\n  (org-babel-map-src-blocks
(buffer-file-name)\n    (push (org-babel-get-src-block-info 'light)\n
    blocks))\n  blocks) "
     ((:results . "pp replace")
      (:exports . "code")
      (:tangle . "yes")
      (:lexical . "no")
      (:hlines . "no")
      (:noweb . "no")
      (:cache . "no")
      (:session . "none"))
     "" nil 2987 "(ref:%s)")
    ("emacs-lisp" "(message \"This should be tangled because of property
list\")"
     ((:results . "replace")
      (:exports . "code")
      (:tangle . "yes")
      (:lexical . "no")
      (:hlines . "no")
      (:noweb . "no")
      (:cache . "no")
      (:session . "none"))
     "" nil 2850 "(ref:%s)")
    ("emacs-lisp" "(message \"This should be tangled because of :tangle
parameter\")"
     ((:results . "replace")
      (:exports . "code")
      (:tangle . "yes")
      (:lexical . "no")
      (:hlines . "no")
      (:noweb . "no")
      (:cache . "no")
      (:session . "none"))
     "" nil 2649 "(ref:%s)")
    ("emacs-lisp" "(let (blocks)\n  (org-babel-map-src-blocks
(buffer-file-name)\n    (push (org-babel-get-src-block-info 'light)\n
    blocks))\n  blocks) "
     ((:results . "pp replace")
      (:exports . "code")
      (:tangle . "yes")
      (:lexical . "no")
      (:hlines . "no")
      (:noweb . "no")
      (:cache . "no")
      (:session . "none"))
     "" nil 975 "(ref:%s)")
    ("emacs-lisp" "(org-babel-tangle)"
     ((:results . "silent")
      (:exports . "code")
      (:tangle . "yes")
      (:lexical . "no")
      (:hlines . "no")
      (:noweb . "no")
      (:cache . "no")
      (:session . "none"))
     "" nil 563 "(ref:%s)"))
   #+end_example

   Running the following block tangles correctly

   #+name correct-tangle
   #+BEGIN_SRC emacs-lisp :results silent
     (org-babel-tangle)
   #+END_SRC

   I apologize if this is difficult to read.

   To summarize, my findings indicate that =org-babel-get-src-block-info= is
   incorrectly processing or merging the properties of each block depending
on
   how, or where, it is run.

   I unfortunately don't have time right now to untangle this fully, but I
hope
   this helps.

   Best Regards,

   Henry Blevins

[-- Attachment #2: Type: text/html, Size: 14447 bytes --]

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

* Re: Bug: org-babel-tangle sometimes does not respect header-args property [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.1/lisp/org/)]
  2018-06-23 15:50 Bug: org-babel-tangle sometimes does not respect header-args property [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.1/lisp/org/)] Gennady Uraltsev
  2018-06-23 20:07 ` Henry Blevins
@ 2018-06-23 20:09 ` Nicolas Goaziou
  1 sibling, 0 replies; 6+ messages in thread
From: Nicolas Goaziou @ 2018-06-23 20:09 UTC (permalink / raw)
  To: Gennady Uraltsev; +Cc: emacs-orgmode

Hello,

Gennady Uraltsev <gennady.uraltsev@gmail.com> writes:

> Running =(org-babel-tangle)= from inside a =src= block ignores
> =header-args= properties
> Consider the following org-mode file set for tangling.
>
> This code should run the command =org-babel-tangle=
>
> #+BEGIN_SRC emacs-lisp  :results silent
> (org-babel-tangle)
> #+END_SRC
>
> that should tangle the stuff in the next header.
>
> ** Observed behaviour
> Running the first code block tangles only the first code block below
> Running =org-babel-tangle= tangles both code blocks below
>
>
> ** Expected behaviour
> Running the above code block or =org-babel-tangle= tangles both code
> blocks below
>
>
> * Code to tangle
> ** Because of =:tangle= parameter
> This block gets tangled both by executing =org-babel-tangle= from the
> =src= code block or directly via M-x.
>
>   #+BEGIN_SRC emacs-lisp :tangle yes
>   (message "This should be tangled because of :tangle parameter")
>   #+END_SRC
>
>
>
>
> ** Because of properties
>   :PROPERTIES:
>   :header-args:  :tangle yes
>   :END:
>
> This block gets tangled only by executing =org-babel-tangle=  directly
> via M-x but it *doesn't* get tangled by executing =org-babel-tangle=
> from the =src= code block.
>
>   #+BEGIN_SRC emacs-lisp
>   (message "This should be tangled because of property list")
>   #+END_SRC

FWIW, I cannot reproduce your issue, i.e., both blocks are tangled.

Regards,

-- 
Nicolas Goaziou

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

* Re: Bug: org-babel-tangle sometimes does not respect header-args property [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.1/lisp/org/)]
  2018-06-23 13:34 Gennady Uraltsev
@ 2018-06-26  9:44 ` Nicolas Goaziou
  0 siblings, 0 replies; 6+ messages in thread
From: Nicolas Goaziou @ 2018-06-26  9:44 UTC (permalink / raw)
  To: Gennady Uraltsev; +Cc: emacs-orgmode

Hello,

Gennady Uraltsev <gennady.uraltsev@gmail.com> writes:

> Running =(org-babel-tangle)= from inside a =src= block ignores
> =header-args= properties
> Consider the following org-mode file set for tangling.
>
> This code should run the command =org-babel-tangle=
>
> #+BEGIN_SRC emacs-lisp  :results silent
> (org-babel-tangle)
> #+END_SRC
>
> that should tangle the stuff in the next header.
>
> ** Observed behaviour
> Running the first code block tangles only the first code block below
> Running =org-babel-tangle= tangles both code blocks below
>
>
> ** Expected behaviour
> Running the above code block or =org-babel-tangle= tangles both code
> blocks below
>
>
> * Code to tangle
> ** Because of =:tangle= parameter
> This block gets tangled both by executing =org-babel-tangle= from the
> =src= code block or directly via M-x.
>
>   #+BEGIN_SRC emacs-lisp :tangle yes
>   (message "This should be tangled because of :tangle parameter")
>   #+END_SRC
>
>
>
>
> ** Because of properties
>   :PROPERTIES:
>   :header-args:  :tangle yes
>   :END:
>
> This block gets tangled only by executing =org-babel-tangle=  directly
> via M-x but it *doesn't* get tangled by executing =org-babel-tangle=
> from the =src= code block.
>
>   #+BEGIN_SRC emacs-lisp
>   (message "This should be tangled because of property list")
>   #+END_SRC

I cannot reproduce your issue. You may want to double check your
configuration.

Regards,

-- 
Nicolas Goaziou

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

end of thread, other threads:[~2018-06-26  9:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-23 15:50 Bug: org-babel-tangle sometimes does not respect header-args property [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.1/lisp/org/)] Gennady Uraltsev
2018-06-23 20:07 ` Henry Blevins
2018-06-23 20:09 ` Nicolas Goaziou
  -- strict thread matches above, loose matches on Subject: below --
2018-06-23 13:34 Gennady Uraltsev
2018-06-26  9:44 ` Nicolas Goaziou
2018-06-10  5:42 Gennady Uraltsev

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