From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gregor Zattler Subject: 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 Message-ID: <20110204161628.GC19946@shi.workgroup> References: <20110202192020.GF5402@shi.workgroup> <87bp2u6stl.wl%n.goaziou@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=36503 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PlOLD-0000ag-QI for emacs-orgmode@gnu.org; Fri, 04 Feb 2011 11:17:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PlOLC-0005UN-3d for emacs-orgmode@gnu.org; Fri, 04 Feb 2011 11:16:59 -0500 Received: from mailout-de.gmx.net ([213.165.64.23]:47729) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1PlOLB-0005TL-MB for emacs-orgmode@gnu.org; Fri, 04 Feb 2011 11:16:58 -0500 Content-Disposition: inline In-Reply-To: <87bp2u6stl.wl%n.goaziou@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode Hi Nicolas, * Nicolas Goaziou [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