3

For example, I have an src code block which can generate another code block:

#+BEGIN_SRC sh :results code :wrap systemd
systemctl --user cat rslsync.service
#+END_SRC

#+RESULTS:
#+BEGIN_systemd
# /usr/lib/systemd/user/rslsync.service
[Unit]
Description=Resilio Sync service
After=network.target

[Service]
Type=simple
User=rslsync
Group=rslsync
ConditionPathExists=/run/media/stardiviner/Collections
ExecStart=/usr/bin/rslsync --nodaemon --config /etc/rslsync.conf
Restart=on-abort

[Install]
WantedBy=multi-user.target
#+END_systemd

I wish to append header argument :tangle "/sudo::/usr/lib/systemd/user/rslsync.service" to upper result code block.

  • :wrap "systemd :tangle /path" works for me. – mutbuerger May 11 '17 at 4:40
  • @mutbuerger Thanks, this solved my question. Can you post an answer. So I can pick your answer as my choice? – stardiviner May 11 '17 at 4:44
1

You can pass additional header arguments with :wrap systemd :tangle /path.

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.