From: Carsten Dominik <carsten.dominik@gmail.com>
To: User <spamfilteraccount@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Re: Automatic indentation of org tree
Date: Mon, 3 Aug 2009 06:36:17 +0200 [thread overview]
Message-ID: <0658D056-C67F-4659-97E7-85D6E8360CEA@gmail.com> (raw)
In-Reply-To: <loom.20090728T192345-122@post.gmane.org>
On Jul 28, 2009, at 9:32 PM, User wrote:
> Bastien <bastienguerry <at> googlemail.com> writes:
>>
>> I tested your code but there are several problems: it is not usable
>> on
>> big files,
>
> The size of the file shouldn't matter, since only lines in the
> current window are indented. Probably, some trivial bug remained
> in it which my tests didn't cover.
Thanks for being interested in this functionality which I wanted
to have for a very long time, and which I have tried to
implement several times in the past, without success.
Bastien is right that your solution is not working in large files.
The reason for this is outline folding. The current window can
contain an arbitrary number of lines if these are hidden under
a headline. If you try your solution on such file, you will see
the large delay caused by the indentation. In addition,
the huge number of markers produced to track the overlays will
bog down any editing attempts.
In fact, your package has just the same problems as my org-indent.el
that has been in the contrib directory for some time.
Incidentally, I have worked during my vacation on a solution that uses
text properties (line-prefix and wrap-prefix) and hooks into font-lock.
The reason why it uses font-lock is because the only the display
engine is
fast enough to figure out which text will be indeed be displayed.
The reason why I am using text properties is because they do not seem
to use markers and do not slow down editing even if the entire buffer
has the properties attached.
I am also using a different approach for the headline stars, by
enforcing hidestars, and indenting the headline half as much as
the text lines to implement a complete clean view with a single
command (or startup option....)
This solution is for Emacs 23 only, but I believe it is more stable,
so I am shipping it now with Org.
If anyone wants to try before the next release, put
#+STARTUP: indent
into a file after pulling the latest git version.
- Carsten
>
>> and even on small files the auto-indentation is confusing.
>> For example, stars get indented while there should not.
>
> It's a matter of taste. I didn't find it confusing. But it's
> trivial to change it to avoid indenting header lines.
>
>> I guess this is still work-in-progress -- hope you'll find ways
>> to fix the problems above!
>
> It's a proof-of-concept package, but I think the underlining
> concept is solid. If someone motivated spends a little time on it
> then I'm sure the problems can be ironed out quickly.
>
>
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
next prev parent reply other threads:[~2009-08-03 4:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-27 20:04 Automatic indentation of org tree User
2009-07-27 20:47 ` Bastien
2009-07-28 4:25 ` User
2009-07-28 12:05 ` Bastien
2009-07-28 19:32 ` User
2009-07-29 5:41 ` Bastien
2009-08-03 4:36 ` Carsten Dominik [this message]
2009-08-03 16:49 ` Eric S Fraga
2009-08-04 15:08 ` Carsten Dominik
2009-08-04 17:49 ` Eric S Fraga
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0658D056-C67F-4659-97E7-85D6E8360CEA@gmail.com \
--to=carsten.dominik@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=spamfilteraccount@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.