[-- Attachment #1.1: Type: text/plain, Size: 959 bytes --] I realized this is related to my previous post, but if i could do this, it would save alot of work. I would like to access the values of the properties inside the (shell) code block. Thanks! * Report section :PROPERTIES: :url: http://www.googole.com :END: I'd like to have several sections like this. Each section woudl have different values for the same property. They would make different calls to respective url. something like #+BEGIN_SRC shell curl <url_property_here> #+END_SRC where the result of that call woudl be whatever i get from that running curl on that url. ---- peace, sergio photographer, journalist, visionary Public Key: https://pgp.key-server.io/pks/lookup?op=get&search=0x69B08F58923AB3A2 #BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV @sergio_101@mastodon.social https://sergio101.com http://www.codeandmusic.com http://www.twitter.com/sergio_101 http://www.facebook.com/sergio101 [-- Attachment #1.2: Type: text/html, Size: 3995 bytes --] [-- Attachment #2: Message signed with OpenPGP --] [-- Type: application/pgp-signature, Size: 833 bytes --]
On 10/01/2020 9:23 am, sergio ruiz wrote:
> * Report section
> :PROPERTIES:
> :url: http://www.googole.com
> :END:
>
> I'd like to have several sections like this. Each section woudl have
> different values for the same property. They would make different
> calls to respective url. something like
>
> #+BEGIN_SRC shell
> curl <url_property_here>
> #+END_SRC
>
You can use elisp code to look up the property you want to pass as a
variable:
#+BEGIN_SRC shell :var url=(org-macro--get-property "url" "")
curl $url
#+END_SRC
[-- Attachment #1.1: Type: text/plain, Size: 800 bytes --] I am getting: eval: Symbol’s function definition is void: org-macro--get-property I am using: Org mode version 9.1.9 (release_9.1.9-65-g5e4542 @ /Applications/Emacs.app/Contents/Resources/lisp/org/) Mark set Is this a newer function? Thanks! > You can use elisp code to look up the property you want to pass as a variable: > > #+BEGIN_SRC shell :var url=(org-macro--get-property "url" "") > curl $url > #+END_SRC > > ---- peace, sergio photographer, journalist, visionary Public Key: https://pgp.key-server.io/pks/lookup?op=get&search=0x69B08F58923AB3A2 #BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV @sergio_101@mastodon.social https://sergio101.com http://www.codeandmusic.com http://www.twitter.com/sergio_101 http://www.facebook.com/sergio101 [-- Attachment #1.2: Type: text/html, Size: 3662 bytes --] [-- Attachment #2: Message signed with OpenPGP --] [-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #1: Type: text/plain, Size: 959 bytes --] Looking at git, it seems that was introduced in 9.2. On 10/01/2020 10:32 am, sergio ruiz wrote: > I am getting: > > eval: Symbol’s function definition is void: org-macro--get-property > > I am using: > > Org mode version 9.1.9 (release_9.1.9-65-g5e4542 @ > /Applications/Emacs.app/Contents/Resources/lisp/org/) > Mark set > > Is this a newer function? > > Thanks! > > > >> You can use elisp code to look up the property you want to pass as a >> variable: >> >> #+BEGIN_SRC shell :var url=(org-macro--get-property "url" "") >> curl $url >> #+END_SRC >> >> > > ---- > peace, > sergio > photographer, journalist, visionary > > Public Key: > https://pgp.key-server.io/pks/lookup?op=get&search=0x69B08F58923AB3A2 > #BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV > @sergio_101@mastodon.social <mailto:sergio_101@mastodon.social> > https://sergio101.com > http://www.codeandmusic.com > http://www.twitter.com/sergio_101 > http://www.facebook.com/sergio101 > [-- Attachment #2: Type: text/html, Size: 5967 bytes --]
[-- Attachment #1.1: Type: text/plain, Size: 668 bytes --] Ah. I am running the org-mode that came with my emacs. I tried updating it, but ran into version problems. I will see if there is another emacs-lisp way to get that info. Thanks! > On Jan 9, 2020, at 6:26 PM, Mike Gauland <mikelygee@gmail.com> wrote: > > Looking at git, it seems that was introduced in 9.2. ---- peace, sergio photographer, journalist, visionary Public Key: https://pgp.key-server.io/pks/lookup?op=get&search=0x69B08F58923AB3A2 #BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV @sergio_101@mastodon.social https://sergio101.com http://www.codeandmusic.com http://www.twitter.com/sergio_101 http://www.facebook.com/sergio101 [-- Attachment #1.2: Type: text/html, Size: 3740 bytes --] [-- Attachment #2: Message signed with OpenPGP --] [-- Type: application/pgp-signature, Size: 833 bytes --]