[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] [RFC] Rewrite indentation functions
From: |
Nicolas Goaziou |
Subject: |
[O] [RFC] Rewrite indentation functions |
Date: |
Wed, 30 Apr 2014 15:03:18 +0200 |
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.
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,
--
Nicolas Goaziou
0001-Rewrite-org-indent-line.patch
Description: Text Data
0002-Rewrite-org-indent-region.patch
Description: Text Data
0003-Rewrite-org-indent-drawer-and-org-indent-block.patch
Description: Text Data
- [O] [RFC] Rewrite indentation functions,
Nicolas Goaziou <=