Skip to content

Subtree properties are ignored when EXPORT_FILE_NAME is active #769

@afermg

Description

@afermg
#+OPTIONS: toc:nil author:nil 
#+TITLE: test
* subtree
:PROPERTIES:
:header-args: :results output :session test :exports both
:END:
#+begin_src sh
echo process in block 1: "$$"
#+end_src

#+begin_src sh
  echo process in block 2: "$$"
#+end_src

After C-c C-e O O (export subtree to file using ox-hugo), the output is

> +++
> title = "test"
> draft = false
> +++
> 
> ## subtree {#subtree}
> 
> ```sh
> echo process in block 1: "$$"
> ```
> 

But if we add the required :EXPORT_FILE_NAME: property:

#+OPTIONS: toc:nil author:nil 
#+TITLE: test
* subtree
:PROPERTIES:
:header-args: :results output :session test :exports both
:EXPORT_FILE_NAME: test_name
:END:
#+begin_src sh
echo process in block 1: "$$"
#+end_src

#+begin_src sh
  echo process in block 2: "$$"
#+end_src

Then it doesn't display the output.

> md
> +++
> title = "subtree"
> draft = false
> +++
> 
> ```sh
> echo process in block 1: "$$"
> ```
> 
> ```sh
> echo process in block 2: "$$"
> ```

The issue seems to be that the properties at the subtree level are being ignored when Hugo exports, but it is not exclusive to Hugo (when using Github flavoured markdown it does the same). If I add the properties manually to every code block then it works again as in the first example.

I understand that it is probably something in org-babel, but any pointers would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions