emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: emacs-orgmode@gnu.org
Subject: Re: [RFC] Rewrite indentation functions
Date: Fri, 02 May 2014 13:38:46 +0800	[thread overview]
Message-ID: <87d2fwhh95.fsf@ericabrahamsen.net> (raw)
In-Reply-To: 87oazjnf55.fsf@gmail.com

Nicolas Goaziou <n.goaziou@gmail.com> 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,

  parent reply	other threads:[~2014-05-02  5:35 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-30 13:03 [RFC] Rewrite indentation functions Nicolas Goaziou
2014-04-30 17:08 ` Vikas Rawal
2014-04-30 18:59   ` Sebastien Vauban
2014-05-01 19:11 ` Nicolas Goaziou
2014-05-02  5:38 ` Eric Abrahamsen [this message]
2014-05-02  7:32   ` Nicolas Goaziou
2014-05-02 10:01     ` Eric Abrahamsen
2014-05-03  7:47     ` Eric Abrahamsen
2014-05-03  8:47       ` Eric Abrahamsen
2014-05-03 11:47         ` Nicolas Goaziou
2014-05-04  3:25           ` Eric Abrahamsen
2014-05-04  3:30           ` Eric Abrahamsen
2014-05-04 19:45             ` Nicolas Goaziou
2014-05-04  3:39           ` Eric Abrahamsen
2014-05-05  9:30             ` Nicolas Goaziou
2014-05-06  9:41 ` Bastien
2014-05-07  0:51   ` Eric Abrahamsen
2014-05-07 15:40   ` Nicolas Goaziou

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=87d2fwhh95.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=emacs-orgmode@gnu.org \
    /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).