<div dir="ltr"><div><div><div><div>> Aside: ob-sh is now ob-shell.<br><br></div>That's good to know. Is there a difference in functionality, or is it just a rename and will the old name be deprecated?<br><br>> Personally, those long lines babel lines are too complex for me, so I like to use the header keywords.<br><br></div>That's a good tip, something new I learned.<br><br></div>I'm trying to have snippets with similar options in the same section, so I can declare some common options only once at the top of the section. That does make the lines a bit shorter.<br><br></div><div>e.g.<br></div><div><span style="font-family:monospace,monospace"><br></span></div><span style="font-family:monospace,monospace">* server-side things<br></span><div><div><span style="font-family:monospace,monospace"> :PROPERTIES:<br> :dir: /ssh:....:...<br> :results: scalar<br> :END:<br><br></span></div><div><span style="font-family:monospace,monospace"> #+BEGIN_SRC shell :var foo=bar<br></span></div><div><span style="font-family:monospace,monospace"> qux<br> #+END_SRC<br><br></span></div><div><span style="font-family:monospace,monospace"><br></span></div><div><span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif">One thing that I miss though is using relative locations, especially in combination with tramp, e.g. if I have<br></font></span><br><span style="font-family:monospace,monospace"> :PROPERTIES:<br> :dir: /ssh:root@server1:/var/web<br> :results: scalar<br> :END:<br><br></span></div><br><div><span style="font-family:arial,helvetica,sans-serif">Then I'd like to say, now on that server do sudo</span><span style="font-family:monospace,monospace"><br></span></div><span style="font-family:monospace,monospace"><br></span><div><span style="font-family:monospace,monospace"> #+BEGIN_SRC shell :dir </span><span style="font-family:monospace,monospace">/sudo:www-data@server1:</span></div><div><br><div><span style="font-family:arial,helvetica,sans-serif">But instead I need to repeat the whole thing (which makes sense, I guess the most specific `:dir` takes preference)<br></span><span style="font-family:monospace,monospace"></span><br><span style="font-family:monospace,monospace"></span></div><div><span style="font-family:monospace,monospace"> #+BEGIN_SRC shell :dir </span><span style="font-family:monospace,monospace">/ssh:root@server1|sudo:www-data@server1:</span></div><div><span style="font-family:monospace,monospace"><br></span><br><div><span style="font-family:arial,helvetica,sans-serif">This would be even more useful with tangle </span><br><br><span style="font-family:monospace,monospace"></span></div><div><span style="font-family:monospace,monospace">* test<br>:PROPERTIES:<br>:dir: /ssh:root@lambdaisland.com:/root<br>:END:<br><br>#+BEGIN_SRC shell :tangle ./foo-bar-test<br>foo-bar-test<br>#+END_SRC</span><span style="font-family:monospace,monospace"></span><br><span style="font-family:monospace,monospace"></span></div></div></div><div><br><br><span style="font-family:arial,helvetica,sans-serif">But unfortunately that just creates a local file. </span><br><br><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 11 May 2016 at 14:35, Rasmus <span dir="ltr"><<a href="mailto:rasmus@gmx.us" target="_blank">rasmus@gmx.us</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks for the link. Tramp is pretty cool.<br>
<span class=""><br>
> #+NAME: build-new-uberjar<br>
> #+BEGIN_SRC sh :var VERSION=current-version :dir /<br>
><br>
> <a href="mailto:ssh%3Aroot@lambdaisland.com">ssh:root@lambdaisland.com</a>|sudo:web@lambdaisland.com:/var/web/app :results<br>
> scalar<br>
<br>
</span>Aside: ob-sh is now ob-shell.<br>
<br>
Personally, those long lines babel lines are too complex for me, so I like<br>
to use the header keywords.<br>
<br>
#+header: :var version="1"<br>
#+header: :dir "/tmp"<br>
#+header: :results table<br>
#+begin_src shell<br>
echo $version, $(pwd)<br>
#+end_src<br>
<br>
#+RESULTS:<br>
| 1 | /tmp |<br>
<span class="HOEnZb"><font color="#888888"><br>
Rasmus<br>
<br>
--<br>
This is the kind of tedious nonsense up with which I will not put<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
emacs-berlin mailing list<br>
<a href="mailto:emacs-berlin@emacs-berlin.org">emacs-berlin@emacs-berlin.org</a><br>
<a href="https://mailb.org/mailman/listinfo/emacs-berlin" rel="noreferrer" target="_blank">https://mailb.org/mailman/listinfo/emacs-berlin</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><a href="https://twitter.com/plexus" target="_blank">@plexus</a> | <a href="http://arnebrasseur.net" target="_blank">arnebrasseur.net</a> <br></div></div></div></div></div>
</div>