From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?iso-8859-1?Q?Gustav_Wikstr=F6m?= Subject: Re: [RFC] Org document concept + document property drawers Date: Sun, 1 Sep 2019 15:25:28 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:46614) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i4RjS-0002VF-JM for emacs-orgmode@gnu.org; Sun, 01 Sep 2019 11:25:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i4RjR-0007xG-0Z for emacs-orgmode@gnu.org; Sun, 01 Sep 2019 11:25:34 -0400 Received: from mail-eopbgr50136.outbound.protection.outlook.com ([40.107.5.136]:49334 helo=EUR03-VE1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i4RjQ-0007wN-Mj for emacs-orgmode@gnu.org; Sun, 01 Sep 2019 11:25:32 -0400 In-Reply-To: Content-Language: en-US List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: "emacs-orgmode@gnu.org" Cc: Carsten Dominik , Nicolas Goaziou 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=20 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 :Tes= ttag: :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=20 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=F6m > Sent: den 31 augusti 2019 20:50 > To: emacs-orgmode@gnu.org > Cc: Nicolas Goaziou ; Carsten Dominik > > Subject: [RFC] Org document concept + document property drawers >=20 > Hi! >=20 > 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. >=20 > Patch 0001 introduces the document element into org-element.el, and > some restructuring related to that. >=20 > 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. >=20 > Waiting for your comments! >=20 > Kind regards Gustav