emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] org-insert-heading rewritten from scratch


From: Nicolas Goaziou
Subject: Re: [O] org-insert-heading rewritten from scratch
Date: Tue, 03 Sep 2013 15:58:31 +0200

Carsten Dominik <address@hidden> writes:

> I am still not clear about this.  In your earlier mail you made this example:
>
>> Well same as above: I think it eats blank lines where it shouldn't. It
>> the following cases:
>> 
>>  * H1
>> 
>>  ** H2
>> 
>>     H
>>  X
>> 
>> and
>> 
>>  * H1
>> 
>>  * H2
>> 
>>    H
>> 
>>  X  
>> 
>> I don't think there's any reason for M-RET to eat blank line before
>> point with either `org-blank-before-new-entry' set to `auto' or t. It
>> should know that a blank line is expected before the new entry and
>> therefore should create the headline at point.
>
> WIth `auto', there will be an empty line before the next entry in both
> cases. In both cases it looks at the H2 headline and sees the empty
> line before it. Are you saying the behaviour should be different in
> both cases?

Yes, it should.

As you point out, in both cases the algorithm knows that there should be
a blank line before the new entry (with the assumption that behaviour is
set to `auto'). In the first case, if it inserts the headline at point,
there will be none, so it has to add one. In the second case, there is
no need to add one since creating it at point will fulfill the
requirement (which is "a blank line before new headline").

Re-reading myself, I agree that my quoted explanations are a bit
confusing. I hope this should clarify my point.


Regards,

-- 
Nicolas Goaziou



reply via email to

[Prev in Thread] Current Thread [Next in Thread]