I want to maintain a single org file which contained a plethora of different init files (.bashrc, .profile, .tmux etc that type of thing). Here's a portion:-
#+PROPERTY: header-args :tangle yes :comments no * bashrc :PROPERTIES: :header-args+: :tangle "./DotFiles/.bashrc" :END: ** bashrc 1 #+begin_src shell # -*- mode: read-only -*- # ~/.bashrc: executed by bash(1) for non-login shells. # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) # for examples
Now when I tangle (
C-c C-v t), the bashrc is correctly tangled and written to
./DotFiles/.bashrc. Notice the first line inside the
# -*- mode: read-only -*-
Now, this works in that when I open that .bashrc in emacs then it's readonly, a subtle reminder that I need to edit the master org-file.
Currently I need to add that to each and every dotfile section I have in my master org file. Is there a way to specify a global "first line" in each exported file? I would have thought a
header-args: :comments "# -*- mode: read-only -*-"
would do that but alas not. Is there cleaner way to do this than the way I'm currently doing it?