From: Charles Millar <millarc@verizon.net>
To: emacs-orgmode@gnu.org
Subject: set :var to string inline code
Date: Sat, 1 Dec 2018 17:53:41 -0500 [thread overview]
Message-ID: <9a880e50-859d-5a39-6e07-997e2892326d@verizon.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 2051 bytes --]
Hi,
I have recutils data base and from that I want to use inline source code
to generate a list of names, addresses, etc. for instance the following
inline code when exported in latex
src_sh[:results raw :results replace :exports results :eval yes]{recsel
-t InterestedParties -e "IPName='Charles Millar'" -P IPPrintName Millar.rec}
src_sh[:results raw :results replace :exports results :eval yes]{recsel
-t InterestedParties -e "IPName='Charles Millar'" -P IPAddress1 Millar.rec}
src_sh[:results raw :results replace :exports results :eval yes]{recsel
-t InterestedParties -e "IPName='Charles Millar'" -P IPPAddress2 Millar.rec}
will give
Charles Millar
123 XYZ Street
Apt 678
However, there are (as there should be) many records in the database and
rather than set each and every IPName= to a specific field I want to use
something like the following
#+name: iponeshell
#+begin_src sh :results raw :exports results
iponeassign="Charles Millar"
echo "$iponeassign"
#+end_src
#+RESULTS: iponeshell
Charles Millar
src_sh[:results raw :results replace :var IPOne='iponeshell' :eval
yes]{recsel -t InterestedParties -e "IPName=IPOne" -P IPPrintName
Millar.rec}
src_sh[:results raw :results replace :var IPOne='iponeshell' :eval
yes]{recsel -t InterestedParties -e "IPName=IPOne" -P IPAddress1
Millar.rec}
src_sh[:results raw :results replace :var IPOne='iponeshell' :eval
yes]{recsel -t InterestedParties -e "IPName=IPOne" -P IPAddress2
Millar.rec}
The above example evaluates, but there is no output. I have tried
:exports results as well as diggernet variations of dounle and sing
quotes, at both where I define var and at the expression selection
within recsel.
I believe that this is bash issue so I have also tries to use $ with the
:var and recsel selection expression.
Any help would be gretly appreciated.
Charlie Millar
src_sh[:results raw :results replace :var IPOne=iponeshell :exports
results :eval yes]{recsel -t InterestedParties -e "IPName='Charles
Millar'" -P IPPrintName StreichertCatherine.rec}
I am
[-- Attachment #2: Type: text/html, Size: 3474 bytes --]
reply other threads:[~2018-12-01 22:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=9a880e50-859d-5a39-6e07-997e2892326d@verizon.net \
--to=millarc@verizon.net \
--cc=emacs-orgmode@gnu.org \
/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).