How can I tangle all source blocks write protected? The first line of this example is ignored instead of being applied to all blocks as expected:

    #+PROPERTY: header-args:conf :comments link :tangle-mode (identity #o444)

    * Fail: File is NOT write-protected
    #+BEGIN_SRC sh :tangle .NotWorkingReadOnlyDotFile
    echo helloHello

    * Pass: File IS write-protected
    #+BEGIN_SRC sh :tangle .WorkingReadOnlyDotFile :tangle-mode (identity #o444)
    echo helloHello

1 Answer 1


You're using header-args:conf to set options for conf blocks, for all sh blocks, use

#+PROPERTY: header-args:sh :tangle-mode (identity #o444)

for all blocks, use

#+PROPERTY: header-args :tangle-mode (identity #o444)

See also (info "(org) Header arguments in Org mode properties").


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.