Re: Noweb Function's body without evaluation

2023-04-04 Thread Ihor Radchenko
suarezmigu...@icloud.com writes: > #+name: getClientInstanceNameNew > #+begin_src shell :session something :var connection="admin@10.0.3.149" :var > client="example_client" :var apacheDir="/etc/apache/vhosts" > <> > client=$client > apacheDir=$apacheDir > grep $client $apacheDir/* > #+end_src >

Re: Noweb Function's body without evaluation

2023-04-03 Thread suarezmiguelc
Wow, works!, thank you very much. Now, I have a more specific example. #+name: initSSH #+begin_src shell :var connection=“admin@10.0.3.200" :noweb yes ssh -t miguel@172.28.3.249 "sudo -u admin ssh -t $connection 'sudo su'" #+end_src #+name: getClientInstanceNameNew #+begin_src shell :session

Re: Noweb Function's body without evaluation

2023-04-02 Thread Ihor Radchenko
suarezmigu...@icloud.com writes: > I use heavily org-mode for Literate DevOps, so I have a lot of shell commands > that connect through SSH and do some things later, for example: > > #+name: initSSH > #+begin_src shell :var connection=“admin@somehost" > ssh -t miguel@host "sudo -u someuser ssh

Re: Noweb Function's body without evaluation

2023-03-16 Thread suarezmiguelc
Hello Ken, thank you for your message, After reading the very interesting get_property function, I found that even though I will probably use it for some cases, it doesn’t apply directly, to my case. For more examples, if I have 1 source code block: >> #+name: greeting >> #+begin_src sh :var

Re: Noweb Function's body without evaluation

2023-03-15 Thread Ken Mankoff
Hi, I'm not sure that I understand your issue or needs from the provided examples, but I wonder if the example I provide here would be helpful. It bypasses :var an lets you inject a PROPERTY value anywhere. It is also language agnostic. You can use it to execute commands (that are set as

Noweb Function's body without evaluation

2023-03-15 Thread suarezmiguelc
Hello Org-mode community. I’m using Emacs Doom Framework, specifically: Emacs 28.2 (build 1, aarch64-apple-darwin22.3.0, Carbon Version 169 AppKit 2299.4) of 2023-02-23. I use heavily org-mode for Literate DevOps, so I have a lot of shell commands that connect through SSH and do some things