I want to execute sudo command in org-babel like this:
#+begin_src shell :dir "/sudo::" :cache no make sudo make install #+end_src
It works fine. It use TRAMP /sudo: method.
But I need to execute sudo command relative under current working directory. As following block shows:
#+begin_src shell :dir "/sudo::data/code/quirc" :cache no make sudo make install #+end_src
But it does not work. It is under
/root instead of current working directory.
So how can I execute sudo command under a specific directory as in org-babel
Might add an advice to change TRAMP sudo method default directory to babel src block's directory? Don't know how to change this in TRAMP code. Have not found any
tramp-default-directory related variables.