From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Moe Subject: Re: [BUG] adding new plain lists item changes previous one it it ends in a number on a single lijne followed by a dot Date: Thu, 03 Feb 2011 11:11:45 +0100 Message-ID: <4D4A7F61.4010202@christianmoe.com> References: <20110202192020.GF5402@shi.workgroup> <87bp2u6stl.wl%n.goaziou@gmail.com> Reply-To: mail@christianmoe.com Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=36342 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pkw85-0005pa-8s for emacs-orgmode@gnu.org; Thu, 03 Feb 2011 05:09:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pkw84-0001Zv-68 for emacs-orgmode@gnu.org; Thu, 03 Feb 2011 05:09:33 -0500 Received: from mars.hitrost.net ([91.185.211.18]:25689) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pkw83-0001VX-Mi for emacs-orgmode@gnu.org; Thu, 03 Feb 2011 05:09:32 -0500 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: Nicolas Goaziou Cc: emacs-orgmode Hi, For once, I have to disagree: Numbers at the beginning of the line inadvertently starting a list item is a bug. It means you can mess up your exported document (it doesn't just happen at M-RET) by just writing a perfectly normal text, and there is no easy-to-remember escape. (I really don't like the invisible-space workaround -- it's hard to remember how to insert it, and it's a bizarre trick to have to tell newcomers.) ReStructuredText provides a backslash-escape for this, even though its more rigid structure reduces the chances of the error happening. Could we borrow that trick, or would it conflict with something else? E.g. ------------------------------- - Several astonishing things happened in \2007. - And then there was another item. - X ------------------------------- Yours, Christian On 2/2/11 10:16 PM, Nicolas Goaziou wrote: > Hello, > >>>>>> 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). > That's why removing the dot solves the problem. > 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. > 2. Insert some invisible char (non-breaking space " ") in front of the > item, or just after the dot. But this requires manual changes every > time the problem arises. > > > 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 >> ------------------------------- > > 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 >