From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: [RFC] Rewrite indentation functions Date: Fri, 02 May 2014 13:38:46 +0800 Message-ID: <87d2fwhh95.fsf@ericabrahamsen.net> References: <87oazjnf55.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60541) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wg68Q-0001YR-BX for emacs-orgmode@gnu.org; Fri, 02 May 2014 01:35:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wg68I-0001Mq-FH for emacs-orgmode@gnu.org; Fri, 02 May 2014 01:35:46 -0400 Received: from plane.gmane.org ([80.91.229.3]:56894) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wg68I-0001Mf-89 for emacs-orgmode@gnu.org; Fri, 02 May 2014 01:35:38 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Wg68H-00063P-BC for emacs-orgmode@gnu.org; Fri, 02 May 2014 07:35:37 +0200 Received: from 114.248.30.68 ([114.248.30.68]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 02 May 2014 07:35:37 +0200 Received: from eric by 114.248.30.68 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 02 May 2014 07:35:37 +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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Nicolas Goaziou writes: > Hello, > > I would like to install the following patches on master. Basically, they > consist of a full rewrite of all indentation related functions, with > explicit rules in docstrings, comprehensive test suites, and backed-up > by the parser. Wish I was competent to actually review this, but... In lieu of that, I'd be happy to run it and report errors. If you think a separate testing branch is warranted, that might be an idea. Otherwise I'd say let it drop and we'll pick up the pieces :) > The following changes in `org-indent-line' are expected: > > 1. Indentation of the first line of an element should be, when > applicable, relative to the /first line/ of the element before. > Therefore, in the following example > > Some long paragraph > with multiple line > > XAnother paragraph > > indenting line starting with "X" will align it with "Some", not > "with". This is consistent with plain lists > > - A list with some > long paragraph > > XAnother paragraph > > where last line should be indented like "-", not "long". > > 2. It should be possible to indent example block, verse block or > export block contents, as `org-indent-line' usually happens on > behalf of the user, who is assumed to know what he is doing. > > Though, this will not be the case in `org-indent-region', as > changes could happen without the user knowing about it (e.g., when > indenting a complete, mostly hidden, buffer). > > 3. It should be possible to indent fixed-width areas. > > `org-indent-region' also applies on hidden lines, with a few exceptions, > as explained above. Also, it should be a lot faster when > `org-src-tab-acts-natively' is non-nil, and complete without errors. It > could be made faster, but the main bottleneck in this function is now > `org-edit-src-code', which will need to be revamped at some point. > > Internally, `org-src-native-tab-command-maybe' is merged into > `org-indent-line' since this should be a core feature, not something > installed via a hook. > > > WDYT? > > > Regards,