[Orgmode] Re: indentation for section headings vs bulleted lists

2011-02-20 Thread Nicolas
Hello,

Linus Arver linusar...@gmail.com writes:

 Again, I'm very curious why org-mode's indenting code treats bulleted
 lists differently than section headings.

This is due to a combination of org-indent-mode and visual-line-mode.
Actually, it's a a two-parts problem. 

Firstly, org-indent-mode only works by sections. That means the whole
section gets the same indent prefix, whatever can be inside. Thus, lists
cannot be treated differently for now.

Secondly, org-indent-mode is not indenting anything: it only fakes it.
While this is fine for headings, this causes problems with lists, which
are depending on real indentation.

Anyway, I'm on it. I'll post a patch as soon as I find and implement a
decent way to solve this.


Regards,

-- 
Nicolas

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: indentation for section headings vs bulleted lists

2011-02-20 Thread Carsten Dominik


On Feb 20, 2011, at 1:19 PM, Nicolas wrote:


Hello,

Linus Arver linusar...@gmail.com writes:


Again, I'm very curious why org-mode's indenting code treats bulleted
lists differently than section headings.


This is due to a combination of org-indent-mode and visual-line-mode.
Actually, it's a a two-parts problem.

Firstly, org-indent-mode only works by sections. That means the whole
section gets the same indent prefix, whatever can be inside. Thus,  
lists

cannot be treated differently for now.

Secondly, org-indent-mode is not indenting anything: it only fakes it.
While this is fine for headings, this causes problems with lists,  
which

are depending on real indentation.

Anyway, I'm on it. I'll post a patch as soon as I find and implement a
decent way to solve this.


Hi Nicolas,
while it might be posible to add additional line-prefix stuff to
plain lists, you need to be careful about performance.
I wrote several (I believe 4) different versions of
org-indent-mode before behavior was reasonably consistent
and fast enough.

Cheers

- Carsten


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: indentation for section headings vs bulleted lists

2011-02-20 Thread Nicolas
Hello,

Carsten Dominik carsten.domi...@gmail.com writes:

 while it might be posible to add additional line-prefix stuff to plain
 lists, you need to be careful about performance.

Yes, this is my main concern actually. When I speak about a decent
solution, I'm really thinking about a sufficiently reactive one,
provided such a thing exists.

As far as I can tell, line-prefix is fine as it is. Lists just need to
take it as real indentation before processing. Alas, wrap-prefix is the
real problem.

A solution would be to distinguish if org-indent-refresh-section is
called with point in a list or not. In the former case, it would skip
lists when changing warp-prefix in the section. In the latter situation,
it would only set warp-prefix for the list at point.

But then, hooks like org-after-demote-entry-hook would need to call
org-indent-refresh-section with an argument telling it to redefine
warp-prefix for everything in section, lists included. After all, a
small delay is acceptable for interactive use.

Does it sound decent?


Regards,

-- 
Nicolas

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: indentation for section headings vs bulleted lists

2011-02-20 Thread Linus Arver
On Sun, Feb 20, 2011 at 01:19:43PM +0100, Nicolas wrote:
 Firstly, org-indent-mode only works by sections. That means the whole
 section gets the same indent prefix, whatever can be inside. Thus, lists
 cannot be treated differently for now.

While I am not technically knowledgeable with org-mode's internals, it
surprises me that lists and section headings are treated differently for
org-indent-mode. I guess I won't be able to use lists for a while...
(I suppose the other option is to use real indentation, manually, to
break up a long list line into smaller chunks, but that solution to me
is just ugly and hacky. It would be great to get uniform behavior for
both sections as well as lists.)

 Secondly, org-indent-mode is not indenting anything: it only fakes it.
 While this is fine for headings, this causes problems with lists, which
 are depending on real indentation.

I did not know that lists were dependant on real indentation. Now I
know.

 Anyway, I'm on it. I'll post a patch as soon as I find and implement a
 decent way to solve this.
 
 
 Regards,
 
 -- 
 Nicolas

Thanks for taking up the challenge, Nicolas!

-Linus

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode