emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: "Arthur A. Gleckler" <org@speechcode.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: using variables with :dir
Date: Sat, 05 Sep 2015 23:36:04 -0400	[thread overview]
Message-ID: <878u8kqkwr.fsf@kyleam.com> (raw)
In-Reply-To: <CALnw4L+cNzvXpKTqQg8dV2sn1a-qMgUEqOjDMtFbhAKQjLRsNQ@mail.gmail.com> (Arthur A. Gleckler's message of "Sat, 5 Sep 2015 20:08:55 -0700")

"Arthur A. Gleckler" <org@speechcode.com> writes:

> Is it possible to use variables with :dir?  For example, I've tried this,
> but no substitution of ${SRFI} seems to happen:
>
> #+BEGIN_SRC sh :dir ~/srfi/split/srfi-${SRFI} :results output silent
> :session local
>   git push
> #+END_SRC

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

--
Kyle

  reply	other threads:[~2015-09-06  3:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-06  3:08 using variables with :dir Arthur A. Gleckler
2015-09-06  3:36 ` Kyle Meyer [this message]
2015-09-06  4:17   ` Arthur A. Gleckler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878u8kqkwr.fsf@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=org@speechcode.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).