* Prelim Run this code first: #+begin_src emacs-lisp (require 'cl-lib) (defun awe-show-headers (&rest headers) (pp-to-string (save-excursion (goto-char org-babel-current-src-block-location) (cl-delete-if-not (lambda (pair) (memq (car pair) headers)) (nth 2 (org-babel-get-src-block-info 'light)))))) #+end_src #+RESULTS: : awe-show-headers * Case 1 ** The old way :PROPERTIES: :cache: foo :comments: bar :END: #+begin_src emacs-lisp (awe-show-headers :cache :comments) #+end_src #+RESULTS: : ((:comments . "bar yes") : (:cache . "foo no")) *** Subtree :PROPERTIES: :cache: quux :END: *Good*: we can inherit different header args from multiple levels in the hierarchy. #+begin_src emacs-lisp (awe-show-headers :cache :comments) #+end_src #+RESULTS: : ((:comments . "bar yes") : (:cache . "quux no")) ** The new way :PROPERTIES: :header-args: :cache foo :comments bar :END: #+begin_src emacs-lisp (awe-show-headers :cache :comments) #+end_src #+RESULTS: : ((:comments . "bar yes") : (:cache . "foo no")) *** Subtree :PROPERTIES: :header-args: :cache quux :END: *PROBLEM*: we don’t get =:comments foo= from parent headline (“The new way”) #+begin_src emacs-lisp (awe-show-headers :cache :comments) #+end_src #+RESULTS: : ((:comments . "yes") : (:cache . "quux no")) *** Subtree 2 :PROPERTIES: :header-args+: :cache quux :END: *PROBLEM*: we still don’t get =:comments foo= from parent headline even by using the + #+begin_src emacs-lisp (awe-show-headers :cache :comments) #+end_src #+RESULTS: : ((:comments . "yes") : (:cache . "quux no")) * Case 2 ** old way *** subtree :PROPERTIES: :var: awe-x=1 :END: #+name: call-me #+begin_src emacs-lisp (or (and (boundp 'awe-x) awe-x) "drat") #+end_src *** other subtree *Good*: the variable is bound from the site of definition, not call. #+call: call-me() #+RESULTS: : 1 ** new way *** subtree :PROPERTIES: :header-args: :var awe-x=1 :END: #+name: call-me-new #+begin_src emacs-lisp (or (and (boundp 'awe-x) awe-x) "drat") #+end_src *** other subtree *Bad*: the variable doesn’t get bound #+call: call-me-new() #+RESULTS: : drat