all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [BUG] org-mode #+SETUPFILE not working with properties [9.5.2 (release_9.5.2-378-g98588e @ /home/eros/src/org-mode/lisp/)]
@ 2022-04-27 15:19 Eros Zaupa
  2022-04-28 14:40 ` Ihor Radchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Eros Zaupa @ 2022-04-27 15:19 UTC (permalink / raw)
  To: emacs-orgmode

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

Given this file

    :PROPERTIES:
    :header-args:sh: :var A="this is a"
    :END:

    #+begin_src sh
    echo ${A}
    #+end_src

    #+RESULTS:
    : this is a

I would like to move the properties drawer to a separate file and import it
into the main one. To do so I'm using the `#SETUPFILE` property suggested
[here][1], but this doesn't seem to work.

***main.org***

    #+SETUPFILE: test.org

    #+begin_src sh
    echo ${A}
    #+end_src

    #+RESULTS:

***test.org***

    :PROPERTIES:
    :header-args:sh: :var A="this is a"
    :END:


  [1]: https://emacs.stackexchange.com/a/59059/36590

------------------------------------------------------------------------

Emacs  : GNU Emacs 28.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.33, cairo version 1.17.6)
 of 2022-04-04
Package: Org mode version 9.5.2 (release_9.5.2-378-g98588e @
/home/eros/src/org-mode/lisp/)

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

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

* Re: [BUG] org-mode #+SETUPFILE not working with properties [9.5.2 (release_9.5.2-378-g98588e @ /home/eros/src/org-mode/lisp/)]
  2022-04-27 15:19 [BUG] org-mode #+SETUPFILE not working with properties [9.5.2 (release_9.5.2-378-g98588e @ /home/eros/src/org-mode/lisp/)] Eros Zaupa
@ 2022-04-28 14:40 ` Ihor Radchenko
  2022-04-29 15:51   ` Cook, Malcolm
  2022-05-02 18:59   ` Nick Dokos
  0 siblings, 2 replies; 4+ messages in thread
From: Ihor Radchenko @ 2022-04-28 14:40 UTC (permalink / raw)
  To: Eros Zaupa; +Cc: emacs-orgmode

Eros Zaupa <eroszaupa@gmail.com> writes:

> I would like to move the properties drawer to a separate file and import it
> into the main one. To do so I'm using the `#SETUPFILE` property suggested
> [here][1], but this doesn't seem to work.

Confirmed.
Though I am not 100% sure.

Org is indeed ignoring top-level property drawer when parsing
#+SETUPFILE.

Dear All,
I think that parsing top-level property drawer is simply an omission
from the time we introduced top-level property drawers into syntax.

We may either implement this support or leave things as is and document
the current behaviour.

I would be in favour of implementing top-level drawer support in
SETUPFILE, but there might be alternative opinions. WDYT?

Dear Eros Zaupa,

> ***main.org***
>
>     #+SETUPFILE: test.org
>
>     #+begin_src sh
>     echo ${A}
>     #+end_src
>
>     #+RESULTS:
>
> ***test.org***
>
>     :PROPERTIES:
>     :header-args:sh: :var A="this is a"
>     :END:

To work around your issue, you can use keyword property syntax:

***test.org***

#+PROPERTY: header-args:sh :var A="this is a"

Best,
Ihor


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

* RE: [BUG] org-mode #+SETUPFILE not working with properties [9.5.2 (release_9.5.2-378-g98588e @ /home/eros/src/org-mode/lisp/)]
  2022-04-28 14:40 ` Ihor Radchenko
@ 2022-04-29 15:51   ` Cook, Malcolm
  2022-05-02 18:59   ` Nick Dokos
  1 sibling, 0 replies; 4+ messages in thread
From: Cook, Malcolm @ 2022-04-29 15:51 UTC (permalink / raw)
  To: Ihor Radchenko, Eros Zaupa; +Cc: emacs-orgmode@gnu.org

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

I agree.  There is no reason to think this should not work.  I have been down this road myself in wished it did.

From: Emacs-orgmode <emacs-orgmode-bounces+mec=stowers.org@gnu.org> On Behalf Of Ihor Radchenko
Sent: Thursday, April 28, 2022 9:41 AM
To: Eros Zaupa <eroszaupa@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [BUG] org-mode #+SETUPFILE not working with properties [9.5.2 (release_9.5.2-378-g98588e @ /home/eros/src/org-mode/lisp/)]

CAUTION: This email is from an External Source. Please use proper judgment and caution when opening attachments, clicking links, or responding to this email.


Eros Zaupa <eroszaupa@gmail.com<mailto:eroszaupa@gmail.com>> writes:

> I would like to move the properties drawer to a separate file and import it
> into the main one. To do so I'm using the `#SETUPFILE` property suggested
> [here][1], but this doesn't seem to work.

Confirmed.
Though I am not 100% sure.

Org is indeed ignoring top-level property drawer when parsing
#+SETUPFILE.

Dear All,
I think that parsing top-level property drawer is simply an omission
from the time we introduced top-level property drawers into syntax.

We may either implement this support or leave things as is and document
the current behaviour.

I would be in favour of implementing top-level drawer support in
SETUPFILE, but there might be alternative opinions. WDYT?

Dear Eros Zaupa,

> ***main.org***
>
> #+SETUPFILE: test.org
>
> #+begin_src sh
> echo ${A}
> #+end_src
>
> #+RESULTS:
>
> ***test.org***
>
> :PROPERTIES:
> :header-args:sh: :var A="this is a"
> :END:

To work around your issue, you can use keyword property syntax:

***test.org***

#+PROPERTY: header-args:sh :var A="this is a"

Best,
Ihor

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

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

* Re: [BUG] org-mode #+SETUPFILE not working with properties [9.5.2 (release_9.5.2-378-g98588e @ /home/eros/src/org-mode/lisp/)]
  2022-04-28 14:40 ` Ihor Radchenko
  2022-04-29 15:51   ` Cook, Malcolm
@ 2022-05-02 18:59   ` Nick Dokos
  1 sibling, 0 replies; 4+ messages in thread
From: Nick Dokos @ 2022-05-02 18:59 UTC (permalink / raw)
  To: emacs-orgmode

Ihor Radchenko <yantar92@gmail.com> writes:

> Eros Zaupa <eroszaupa@gmail.com> writes:
>
>> I would like to move the properties drawer to a separate file and import it
>> into the main one. To do so I'm using the `#SETUPFILE` property suggested
>> [here][1], but this doesn't seem to work.
>
> Confirmed.
> Though I am not 100% sure.
>
> Org is indeed ignoring top-level property drawer when parsing
> #+SETUPFILE.
>
> Dear All,
> I think that parsing top-level property drawer is simply an omission
> from the time we introduced top-level property drawers into syntax.
>
> We may either implement this support or leave things as is and document
> the current behaviour.
>
> I would be in favour of implementing top-level drawer support in
> SETUPFILE, but there might be alternative opinions. WDYT?

FWIW, I agree that it is a bug and it should be fixed.

-- 
Nick

"There are only two hard problems in computer science: cache invalidation, naming things, and off-by-one errors." -Martin Fowler



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

end of thread, other threads:[~2022-05-02 19:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-27 15:19 [BUG] org-mode #+SETUPFILE not working with properties [9.5.2 (release_9.5.2-378-g98588e @ /home/eros/src/org-mode/lisp/)] Eros Zaupa
2022-04-28 14:40 ` Ihor Radchenko
2022-04-29 15:51   ` Cook, Malcolm
2022-05-02 18:59   ` Nick Dokos

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.