emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Gustav Wikström" <gustav@whil.se>
To: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Cc: Carsten Dominik <dominik@uva.nl>,
	Nicolas Goaziou <mail@nicolasgoaziou.fr>
Subject: Re: [RFC] Org document concept + document property drawers
Date: Sun, 1 Sep 2019 15:25:28 +0000	[thread overview]
Message-ID: <HE1PR02MB303355E7CFA73A78B7171D30DABF0@HE1PR02MB3033.eurprd02.prod.outlook.com> (raw)
In-Reply-To: <HE1PR02MB30335B0720ABF7B9780A305FDABC0@HE1PR02MB3033.eurprd02.prod.outlook.com>

Hi again,

Nicolas requested a more thorough introduction to the patch so here it
comes.

To start with, this relates to the topic presented here:
- https://lists.gnu.org/archive/html/emacs-orgmode/2019-06/msg00000.html 

The first patch deals with formalities. It introduces one new greater
element called "document". Parsers and everything around it are
modified to work with this new concept. No new functionality is
introduced. I'd call this patch an "enabler" since it allows us to
(hopefully) reason better about intended behaviors and such moving
forward, but doesn't really do anything. As an example I for one
wouldn't mind to take it even one step further by introducing
"project" as another concept[1]. But that is for another day.

The second patch introduces property-drawers on document level. No
existing code will stop working, i.e. property keywords and all other
keywords will behave just as today.

The first five lines in the following example will work just as
property drawers inside headings with this patch. All commands and
functions that work with "regular" property-drawers are updated to
work also with this document level drawer.

#+begin_src org
  :PROPERTIES:
  :DIR: ~/
  :ID: 730e0151-8e34-4dd9-b978-187c3c81e6b4
  :CATEGORY: Test
  :END:

  Section 1 before first headline.

  ,* TODO Headline 1
  Section 1 in first headline.

  ,** TODO Sub-headline 1                                              :Testtag:
  :PROPERTIES:
  :DIR:      _2018/1809 Spark/
  :CATEGORY: Test-cat
  :END:
#+end_src

I wouldn't be surprised if I've managed to hide a few bugs in the
code. But all tests, and a couple of new ones as well, signal an OK.

Thoughts? Comments?

Kind regards 
Gustav

[1] Sidenote: We already define projects today when we declare that
multiple files together are seen as our "agendas" for example. Or when
we configure publishing. But we lack a common framework for what a
"project" is in our code.

> -----Original Message-----
> From: Gustav Wikström
> Sent: den 31 augusti 2019 20:50
> To: emacs-orgmode@gnu.org
> Cc: Nicolas Goaziou <mail@nicolasgoaziou.fr>; Carsten Dominik
> <dominik@uva.nl>
> Subject: [RFC] Org document concept + document property drawers
> 
> Hi!
> 
> I'm continuing on my proposal to introduce a "document" element in
> org-mode and the idea of seeing everything before the first headline
> as the base level 0 outline for a file. I've attached two patches that
> I'd like some public review of before pushing to master.
> 
> Patch 0001 introduces the document element into org-element.el, and
> some restructuring related to that.
> 
> Patch 0002 makes it possible to use property drawers at the document
> level. I've hopefully covered all related commands to make this work.
> And I've added a bunch of tests to guard against future regressions.
> 
> Waiting for your comments!
> 
> Kind regards Gustav

  parent reply	other threads:[~2019-09-01 15:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-31 18:49 [RFC] Org document concept + document property drawers Gustav Wikström
2019-09-01  5:20 ` Adam Porter
2019-09-01 10:38 ` Nicolas Goaziou
2019-09-01 14:41   ` Gustav Wikström
2019-09-06 20:09     ` Nicolas Goaziou
2019-09-29  9:39       ` Gustav Wikström
2019-09-01 15:25 ` Gustav Wikström [this message]
2019-09-01 16:11   ` Adam Porter
  -- strict thread matches above, loose matches on Subject: below --
2019-09-01 16:08 Gustav Wikström
2019-09-01 16:26 ` Adam Porter
2019-09-01 18:51 Gustav Wikström
2019-09-01 19:12 Gustav Wikström
2019-09-01 19:17 Gustav Wikström

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=HE1PR02MB303355E7CFA73A78B7171D30DABF0@HE1PR02MB3033.eurprd02.prod.outlook.com \
    --to=gustav@whil.se \
    --cc=dominik@uva.nl \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail@nicolasgoaziou.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).