Hi Gabriel, This seems like it is probably a bug given that everything else about archive headings is disabled. In the meantime, depending on how many blocks you are dealing with you could hack around this by using the following header argument. #+header: :tangle (unless-archived "/ssh:host:/path/to/file") The implementation of unless-archived is below along with a demo org file. Best! Tom
* Bootstrap This is a giant hack which only works because the state of Emacs when resolving the tangle header is sitting on the block in question which I'm guessing is an implementation detail. #+begin_src elisp (defun unless-archived (path) (save-excursion (if (let ((heading (outline-previous-heading)) archived) (while (and (not archived) heading) (let ((element (org-element-at-point))) (setq archived (org-element-property :archivedp element))) (setq heading (ignore-errors (outline-up-heading 1))) (message "%s" heading)) archived) "no" path))) #+end_src * sysadmin ** some server I don't use anymore :ARCHIVE: *** distractor heading *** tangled code in here #+header: :tangle (unless-archived "/ssh:localhost:/tmp/some-file.sh") #+begin_src bash "yes this tangles when archived" #+end_src