From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adam Porter Subject: Re: [RFC] Org document concept + document property drawers Date: Sun, 01 Sep 2019 00:20:48 -0500 Message-ID: <87blw4lhhr.fsf@alphapapa.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:36012) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i4IIN-0008Tu-MJ for emacs-orgmode@gnu.org; Sun, 01 Sep 2019 01:21:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i4IIM-00031X-Nx for emacs-orgmode@gnu.org; Sun, 01 Sep 2019 01:20:59 -0400 Received: from 195-159-176-226.customer.powertech.no ([195.159.176.226]:44642 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i4IIM-000309-Ha for emacs-orgmode@gnu.org; Sun, 01 Sep 2019 01:20:58 -0400 Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1i4IIJ-0016ER-Vu for emacs-orgmode@gnu.org; Sun, 01 Sep 2019 07:20:55 +0200 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 Gustav Wikström writes: > 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! This is a very interesting idea, and I don't want to dismiss your work, but I am concerned about how much third-party code will likely break by changing the results returned by org-element for parsing an Org buffer. I haven't thoroughly studied all of the code in your patches, so I may be wrong, but I think the breakage could be extensive. For example, simple operations like destructuring the results of org-element parsing functions may be broken. Have you done any investigation into this issue? Maybe there should be a transitional period in which the existing org-element parsing functions would work as before, and the new document-level elements would be returned by a new org-element document-level parsing function. Frankly, if there is breakage,the transition would probably take a few years, because there is a lot of code out there that has worked for years and may not be updated or replaced for years.