From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Arthur A. Gleckler" Subject: Re: using variables with :dir Date: Sat, 5 Sep 2015 21:17:56 -0700 Message-ID: References: <878u8kqkwr.fsf@kyleam.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113543200912ad051f0c6c80 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34597) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYRPI-0003Bw-7w for emacs-orgmode@gnu.org; Sun, 06 Sep 2015 00:18:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZYRPF-0001Ke-2P for emacs-orgmode@gnu.org; Sun, 06 Sep 2015 00:18:20 -0400 Received: from mail-qg0-f47.google.com ([209.85.192.47]:33340) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYRPE-0001KU-Ub for emacs-orgmode@gnu.org; Sun, 06 Sep 2015 00:18:16 -0400 Received: by qgev79 with SMTP id v79so43339537qge.0 for ; Sat, 05 Sep 2015 21:18:16 -0700 (PDT) In-Reply-To: <878u8kqkwr.fsf@kyleam.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Kyle Meyer Cc: emacs-orgmode@gnu.org --001a113543200912ad051f0c6c80 Content-Type: text/plain; charset=UTF-8 On Sat, Sep 5, 2015 at 8:36 PM, Kyle Meyer wrote: > There may be a better way, but this seems to work. > > #+begin_src sh :dir (substitute-in-file-name "$HOME/.emacs.d/") :results > output > ls | tail -2 > #+end_src > > #+RESULTS: > : tramp > : url > > Thanks. While that does substitute for $HOME, it doesn't substitute for $SRFI, which isn't in Emacs's process environment. I've found a way to work around it. I don't use :dir at all: #+BEGIN_SRC sh :results output silent cd ~/srfi/split/srfi-${SRFI}/ git push #+END_SRC --001a113543200912ad051f0c6c80 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On S= at, Sep 5, 2015 at 8:36 PM, Kyle Meyer <kyle@kyleam.com> wrote= :
=C2=A0
There may be a better way, but this = seems to work.

#+begin_src sh :dir (substitute-in-file-name "$HOME/.emacs.d/") := results output
=C2=A0 ls | tail -2
#+end_src

#+RESULTS:
: tramp
: url

Thanks.=C2=A0 While that does substitute for= $HOME, it doesn't substitute for $SRFI, which isn't in Emacs's= process environment.

I've found a way to work= around it.=C2=A0 I don't use :dir<= /font> at all:=C2=A0

#+BEGIN_SRC sh :results output silent
=C2=A0 cd ~/srfi/split/srfi-${SRFI}/
=C2=A0 git push
#+END_SRC=
--001a113543200912ad051f0c6c80--