4

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.

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

1 Answer 1

1

You can pass additional header arguments by using double quotes around the :wrap argument: :wrap "systemd :tangle /path".

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.