Re: Accessing properties in code blocks

2020-01-10 Thread sergio ruiz
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  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=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



signature.asc
Description: Message signed with OpenPGP


Re: Accessing properties in code blocks

2020-01-09 Thread Mike Gauland

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=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



Re: Accessing properties in code blocks

2020-01-09 Thread sergio ruiz
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=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



signature.asc
Description: Message signed with OpenPGP


Re: Accessing properties in code blocks

2020-01-09 Thread Mike Gauland

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 
#+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




Accessing properties in code blocks

2020-01-09 Thread sergio ruiz
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 
#+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=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



signature.asc
Description: Message signed with OpenPGP