emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Included global properties not inherited: bug or feature?
@ 2019-12-06 10:55 Jarmo Hurri
  2019-12-06 20:41 ` Nicolas Goaziou
  0 siblings, 1 reply; 3+ messages in thread
From: Jarmo Hurri @ 2019-12-06 10:55 UTC (permalink / raw)
  To: emacs-orgmode


Greetings.

It seems that when a file with global properties is included, the global
properties are not inherited. Is this a bug or a feature?

Consider the two files inlined below:

# ---------------------------------- file 'included.org' -------------------
#+property: MY_INCLUDED_PROPERTY some included value
# --------------------------------------------------------------------------

# -------------- file which includes ---------------------------------------

#+include: included.org :only-contents nil
#+property: MY_INLINE_PROPERTY some inline value

src_elisp[:exports results :results raw]{(org-entry-get nil "MY_INCLUDED_PROPERTY" t)} nil

src_elisp[:exports results :results raw]{(org-entry-get nil "MY_INLINE_PROPERTY" t)} some inline value
# --------------------------------------------------------------------------

As you can see from the results of evaluation of elisp blocks, the
included global property is not available in the including file. Note
that the documentation for #include states that there is a special
property :only-contents for including only contents, not properties. To
play it safe, I have set this property to 'nil' above.

https://orgmode.org/manual/Include-files.html

Based on this documentation, I was expecting global properties to be
available by default in including files.

I find current behaviour inconvenient, because I want to set common
global properties for a large number of files, and I can not currently
do this via an included file.

What is the verdict?

I am running
Org mode version 9.3 (release_9.3-34-g2eee3c)
GNU Emacs 26.2

Jarmo

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

end of thread, other threads:[~2019-12-07  6:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-06 10:55 Included global properties not inherited: bug or feature? Jarmo Hurri
2019-12-06 20:41 ` Nicolas Goaziou
2019-12-07  6:28   ` Jarmo Hurri

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