emacs-orgmode
[Top][All Lists]
Advanced

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

[Orgmode] Re: adding new plain lists item changes previous one it it end


From: Gregor Zattler
Subject: [Orgmode] Re: adding new plain lists item changes previous one it it ends in a number on a single lijne followed by a dot
Date: Fri, 4 Feb 2011 17:16:28 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

Hi Nicolas,

* Nicolas Goaziou <address@hidden> [02. Feb. 2011]:
>>>>>> Gregor Zattler writes:
> 
>> adding a new list item via M-RET (org-insert-heading) may change
>> text in a previous list item, if this ends in a number on a single
>> line followed by a dot:
> 
>> ------------------------------- 
>> - Several astonishing things happened in 
>>   2007. 
>> - And then there was another item. 
>> - X
>> -------------------------------
> 
>> Note that " 2007." has changed to " 1." in line 2.
> 
> Yes, and unfortunately, I don't see any solution here. It isn't really
> a bug: a line starting with white space, followed by a number sticked
> to a dot is exactly the definition, regexp wise, of a list item (as
> explained in `org-plain-list-ordered-item-terminator' doc-string).

I understand that blank-number-dot starts a plain list item.
But in my example the numbered list would be second level whilst
the unordered list would be first level (of indentation).
Org-mode rightly inserts a dash but why does it fiddle with
another list item of different (second) level when inserting an
new first level item?  Is this necessary to in order to insert
the next dashed item?  

That's different to your example:

> As a side-note, this problem isn't specific to recent versions of Org.
> For example, in 6.33, use M-RET at X in the following example:
> 
>> ------------------------------- 
>> - Several astonishing things happened in 
>>   2007. And then there was another item.X
>> -------------------------------

I see the problem but here the cursor is at a second level item.
Therefore it is not astonishing that org-mode produces another
one with M-RET.


In my case I could see the change of "2007." to "1."  because
it was so near it was also on the display.  But this may happen
with list items which are not displayed and therefore one would
not recognise the damage... 



> There are two workarounds I can think of, at the moment:
> 
> 1. Use (setq org-plain-list-ordered-item-terminator ?)). But that will
>    affect every ordered list.

I'll do this.  Thank you and the other commentators for your help.

Ciao; Gregor



reply via email to

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