From mboxrd@z Thu Jan 1 00:00:00 1970 From: Neil Jerram Subject: Re: [RFC] Remove Org Struct mode Date: Sun, 20 Aug 2017 15:56:30 +0100 Message-ID: <249345ef-03e3-3385-d8a9-cfe78d8fbff3@ossau.homelinux.net> References: <87mv6ul4u6.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46884) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1djReb-0006qh-1V for emacs-orgmode@gnu.org; Sun, 20 Aug 2017 10:56:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1djReW-0007zj-6f for emacs-orgmode@gnu.org; Sun, 20 Aug 2017 10:56:41 -0400 Received: from smtp-out-1.talktalk.net ([62.24.135.65]:40534) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1djReV-0007z9-WB for emacs-orgmode@gnu.org; Sun, 20 Aug 2017 10:56:36 -0400 Received: from [192.168.0.5] (unknown [213.205.251.113]) by arudy.520b.com (Postfix) with ESMTPSA id 732EC3805B for ; Sun, 20 Aug 2017 15:46:55 +0100 (BST) In-Reply-To: <87mv6ul4u6.fsf@nicolasgoaziou.fr> 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 I have been using org-mode for a few years now, but have never yet noticed org-struct mode. So removing org-struct would be no loss for me (and possibly a gain, if it eased ongoing org-mode maintenance and development). OTOH I certainly do use and appreciate orgtbl minor mode, and it would be a big disadvantage for me if that function disappeared. I've no objection in principle, though, to reorganizing _how_ that function is provided. Regards - Neil On 20/08/17 14:57, Nicolas Goaziou wrote: > Hello, > > I would like to remove Org Struct minor mode from Org code base. Here is > the rationale: > > 1. It is broken. It might look like using Org in another buffer, but it > is not. In particular, it just cannot cope with lists, indentation, > filling in, e.g., Message mode, as soon as we try something > non-trivial. Really, that's a poor-man's Org mode. > > 2. Its implementation is very hackish. In particular, it is not modular > at all. It rewrites some core functions according to the major mode > in use. For example `org-fill-function' tries to handle specially > text in a Message mode buffer, basically short-circuiting regular > behaviour. There no support for other major modes. If we want some, > we need to hard-code it. > > 3. Due to previous point, some basic Org functions are sub-optimal > because they preserve compatibility with Org Struct mode. For example > `org-forward-heading-same-level' must process every headline past the > current one and check their level until an appropriate one is found. > It would be faster to go looking for the next headline according to > the number of stars we want. > > 4. It is somewhat outside Org mode's scope to provide such a feature. It > is tempting to provide everything we can think of, but we should > focus on the main task: handle Org files, i.e., files written in Org > compatible syntax. > > 5. There are alternatives. E.g., outshine.el, outline-minor-mode, ... > > I _do_ use `orgstruct++-mode'. But it is broken beyond repair. > Alternatives, which do not need to pay a technical debt, are certainly > better, or, at least, a saner ground for improvement. > > I'm not opposed to an Org struct mode living in ELPA. But, as pointed > out, it is difficult to extract from code base without rewriting it > completely. If alternatives are serious enough, that would be > re-inventing the wheel, too. > > The only thing that would be missing, AFAIK, is plain list handling. > However, I'm quite certain it is possible to re-use most code from > "org-list.el", using a dumbed down `org-list-struct' function. Indeed, > currently, `org-list-struct' requires to know about inlinetasks, > drawers, blocks... i.e., most of the Org syntax. This is not an option > in foreign buffers. Once `org-list-struct' (and maybe `org-in-item-p') > are simplified, other functions in "org-list.el" can be used as is. > > I'm not talking about OrgTbl mode (yet). OrgTbl mode is different: it > doesn't suffer from points 1, 3 end 5. It is easier to extract it as an > external library, which someone should ultimately do. > > To sum it up, I offer to remove `orgstruct-mode' (and > `orgstruct++-mode') from the code base. I can also offer my help to > anyone willing to extract some `list-minor-mode' and `table-minor-mode' > from Org. > > WDYT? > > > Regards, >