* set :var to string inline code
@ 2018-12-01 22:53 Charles Millar
0 siblings, 0 replies; only message in thread
From: Charles Millar @ 2018-12-01 22:53 UTC (permalink / raw)
To: emacs-orgmode
[-- 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 --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-12-01 22:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-01 22:53 set :var to string inline code Charles Millar
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).