Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] parse the content of outline level 0 #28

Open
jarofromel opened this issue Sep 25, 2024 · 2 comments
Open

[Feature request] parse the content of outline level 0 #28

jarofromel opened this issue Sep 25, 2024 · 2 comments

Comments

@jarofromel
Copy link
Contributor

Hello,
some of my org files have some content before the first headline:

#+title:       file title      
#+date:       [2024-09-12 Thu 17:19]
#+subtitle: file subtitle with short description

summary of the file, notes/todos relevant to the content of the whole file

* first headline

Now everything above the first heading ends inside the column outline_preamble of the table outlines.
I would say the content before the first heading is "officialy" approved from the org-mode 9.6 and it is named as the level 0:

3.3.7. Property drawers allowed before first headline
Property drawers are now allowed before the first headline.
Org mode is moving more towards making things before the first headline behave just as if it was at outline level 0.

I have read your comment and I understand the reasoning related to finding the proper schema for properties on the top level. I think there are three ways of properties/attributes/metadata declaration on the level zero and they are not equivalent to my knowledge (Setting Properties for org-mode whole buffers).

--------------------------------------1st
#+title:      file title
#+filetags: tag1:tag2

--------------------------------------2nd
:PROPERTIES:
:YEAR: 2015        
:END:

--------------------------------------3rd
#+PROPERTY:  YEAR 2015

But it seems to me that the other content fits quite good as the level zero to the current schema of org-sql tables (at least that is my naive point of view). Hey I know it is not for free so the label 'feature request'.

My other argument is that it used to be quite a niche (to have content on the top level) but it seems to me there is a rising community of users around org-roam or denote who use it rudimentary (many small level zero like org-mode files rather than several files with dense headings). These are potential users of org-sql. I myself use both denote and the classical org style with headings.

Thanks for potentially considering this.

@ndwarshuis
Copy link
Owner

I think there are three ways of properties/attributes/metadata declaration on the level zero and they are not equivalent to my knowledge

How are 2 and 3 different? They both provide a toplevel "YEAR" property to any headline in the buffer if queried with org-entry-get.

But it seems to me that the other content fits quite good as the level zero to the current schema of org-sql tables.

I'm not sure what you mean by this

it seems to me there is a rising community of users around org-roam or denote who use it rudimentary (many small level zero like org-mode files rather than several files with dense headings)

Good to know, I didn't realize this.

I don't have lots of time to prioritize writing code for this now but if you want to continue this feel free to do so.

@jarofromel
Copy link
Contributor Author

jarofromel commented Sep 30, 2024

I think there are three ways of properties/attributes/metadata declaration on the level zero and they are not equivalent to my knowledge

How are 2 and 3 different? They both provide a toplevel "YEAR" property to any headline in the buffer if queried with org-entry-get.

You are right they are just different ways to tell the same.

But it seems to me that the other content fits quite good as the level zero to the current schema of org-sql tables.

I'm not sure what you mean by this

By that I meant other elements like links, timestamps, paragraphs, bullet lists, clocks. By including the top level into the table headlines and saying it is the ordinary headline (with value 0 in the column level) its direct children elements (other than headlines) can be included in other tables as well.

it seems to me there is a rising community of users around org-roam or denote who use it rudimentary (many small level zero like org-mode files rather than several files with dense headings)

Good to know, I didn't realize this.

I don't have lots of time to prioritize writing code for this now but if you want to continue this feel free to do so.

I understand, thanks for the answers. I am not an experienced in elisp but at least I can try, the issue you mentioned is good hint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants