0

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
    #+END_SRC

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

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, privacy policy and cookie policy

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