emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Subtree-specific variables
@ 2015-05-09  2:41 Joon Ro
  2015-05-09  8:56 ` Nicolas Goaziou
  0 siblings, 1 reply; 6+ messages in thread
From: Joon Ro @ 2015-05-09  2:41 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 247 bytes --]

Hi,
I was wondering if there is a way to have subtree-specific variables?
I have been using #+MACRO: but it seems it is a buffer-wide thing.
For example, it would be great if I can use a property value in org-mode bodies.
Best,Joon 		 	   		  

[-- Attachment #2: Type: text/html, Size: 587 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Subtree-specific variables
  2015-05-09  2:41 Subtree-specific variables Joon Ro
@ 2015-05-09  8:56 ` Nicolas Goaziou
  2015-05-10  0:21   ` Joon Ro
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Goaziou @ 2015-05-09  8:56 UTC (permalink / raw)
  To: Joon Ro; +Cc: emacs-orgmode@gnu.org

Hello,

Joon Ro <joon.ro@outlook.com> writes:

> I was wondering if there is a way to have subtree-specific variables?

Usually, you get subtree specific variables with node properties,
appending "EXPORT_" to them, e.g.

  * Subtree root
  :PROPERTIES:
  :EXPORT_AUTHOR: Not me
  :END:

> I have been using #+MACRO: but it seems it is a buffer-wide thing.

The suggestion above doesn't apply to MACRO keyword, mainly because
properties' values are only one line long.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Subtree-specific variables
  2015-05-09  8:56 ` Nicolas Goaziou
@ 2015-05-10  0:21   ` Joon Ro
  2015-05-10  7:09     ` Nicolas Goaziou
  0 siblings, 1 reply; 6+ messages in thread
From: Joon Ro @ 2015-05-10  0:21 UTC (permalink / raw)
  To: Nicolas Goaziou, emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 637 bytes --]

> 
> Usually, you get subtree specific variables with node properties,
> appending "EXPORT_" to them, e.g.
> 
>   * Subtree root
>   :PROPERTIES:
>   :EXPORT_AUTHOR: Not me
>   :END:
> 
> > I have been using #+MACRO: but it seems it is a buffer-wide thing.
> 
> The suggestion above doesn't apply to MACRO keyword, mainly because
> properties' values are only one line long.
> 

Thank you for the reply. I'm aware of EXPORT_ stuff, but I'm actually looking for something like this:
* Subtree root
:PROPERTIES:
:EXPORT_Variable: Test:END: 
{{{Variable}}}
Would something like this be possible?
Best,Joon
 		 	   		  

[-- Attachment #2: Type: text/html, Size: 1091 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Subtree-specific variables
  2015-05-10  0:21   ` Joon Ro
@ 2015-05-10  7:09     ` Nicolas Goaziou
  2015-05-10 17:01       ` Joon Ro
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Goaziou @ 2015-05-10  7:09 UTC (permalink / raw)
  To: Joon Ro; +Cc: emacs-orgmode@gnu.org

Joon Ro <joon.ro@outlook.com> writes:

> Thank you for the reply. I'm aware of EXPORT_ stuff, but I'm actually looking for something like this:
> * Subtree root
> :PROPERTIES:
> :EXPORT_Variable: Test:END: 
> {{{Variable}}}
> Would something like this be possible?
> Best,Joon

It is:

  {{{property(EXPORT_Variable)}}}

Regards,

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Subtree-specific variables
  2015-05-10  7:09     ` Nicolas Goaziou
@ 2015-05-10 17:01       ` Joon Ro
  2015-05-10 17:05         ` Joon Ro
  0 siblings, 1 reply; 6+ messages in thread
From: Joon Ro @ 2015-05-10 17:01 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 625 bytes --]

 > * Subtree root
> > :PROPERTIES:
> > :EXPORT_Variable: Test> > :END: 
> > {{{Variable}}}
> > Would something like this be possible?
> > Best,Joon
> 
> It is:
> 
>   {{{property(EXPORT_Variable)}}}
> 

Thank you so much! This will be very useful. 
One related question - I'm including another subtree (I'm using 8.3beta) using
   #+INCLUDE: "playground.org::*Contents" :only-contents t
but it seems I cannot access the property of the parent heading inside the included subtree. (Using {{{property(EXPORT_Variable)}}} to access the parent property). Is this not possible?
Thank you so much,Joon
 		 	   		  

[-- Attachment #2: Type: text/html, Size: 1104 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Subtree-specific variables
  2015-05-10 17:01       ` Joon Ro
@ 2015-05-10 17:05         ` Joon Ro
  0 siblings, 0 replies; 6+ messages in thread
From: Joon Ro @ 2015-05-10 17:05 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 925 bytes --]

Oh, I forgot to turn on org-use-property-inheritance. Now it works in the included subtree as well. Thank you so much!From: joon.ro@outlook.com
To: mail@nicolasgoaziou.fr
CC: emacs-orgmode@gnu.org
Subject: RE: Subtree-specific variables
Date: Sun, 10 May 2015 12:01:23 -0500




 > * Subtree root
> > :PROPERTIES:
> > :EXPORT_Variable: Test> > :END: 
> > {{{Variable}}}
> > Would something like this be possible?
> > Best,Joon
> 
> It is:
> 
>   {{{property(EXPORT_Variable)}}}
> 

Thank you so much! This will be very useful. 
One related question - I'm including another subtree (I'm using 8.3beta) using
   #+INCLUDE: "playground.org::*Contents" :only-contents t
but it seems I cannot access the property of the parent heading inside the included subtree. (Using {{{property(EXPORT_Variable)}}} to access the parent property). Is this not possible?
Thank you so much,Joon
 		 	   		   		 	   		  

[-- Attachment #2: Type: text/html, Size: 1813 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-05-10 17:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-09  2:41 Subtree-specific variables Joon Ro
2015-05-09  8:56 ` Nicolas Goaziou
2015-05-10  0:21   ` Joon Ro
2015-05-10  7:09     ` Nicolas Goaziou
2015-05-10 17:01       ` Joon Ro
2015-05-10 17:05         ` Joon Ro

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).