From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Lander Subject: Strange behavior of M-RET with new list improvements Date: Tue, 7 Sep 2010 07:25:14 -0400 Message-ID: <448D9DB2-71DE-4B9B-BF5B-B575735D794D@yahoo.com> References: <87ocdzw7gq.wl%n.goaziou@gmail.com> <43BA920D-4EA2-4C51-B941-33A60D097EB3@gmail.com> <87hbi6uprt.fsf@fastmail.fm> <87y6bhajrm.wl%n.goaziou@gmail.com> <87wrr1aexq.wl%n.goaziou@gmail.com> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=38713 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OswIf-0007IU-Pc for emacs-orgmode@gnu.org; Tue, 07 Sep 2010 07:25:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OswIe-0000KS-Li for emacs-orgmode@gnu.org; Tue, 07 Sep 2010 07:25:17 -0400 Received: from smtp101.prem.mail.ac4.yahoo.com ([76.13.13.40]:46705) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1OswIe-0000KC-IJ for emacs-orgmode@gnu.org; Tue, 07 Sep 2010 07:25:16 -0400 In-Reply-To: <87wrr1aexq.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: Org Mode List Hi Nicolas & list, I've noticed some strange behavior with the new list code when pressing M-RET: Firstly, if I have a construct like this: <------------- *** Some heading - Bullet - Bullet - Bullet | <------------- With the cursor at |, M-RET correctly adds another list item (indented, and started with -). But now there is no way to make a new heading with M-RET, except to terminate the list with a blank line, and then press M-RET (even though list followed immediately by headline is a valid terminated list). Previously, if the cursor was at the beginning of the line after the last bullet, M-RET would produce a new heading: <------------- *** Some heading - Bullet - Bullet - Bullet | <------------- (press M-RET) <------------- *** Some heading - Bullet - Bullet - Bullet *** | <------------- With the new code, it produces an indented list item with -. Is there any way to get the old behaviour back? Perhaps a good compromise is that M-RET at bol produces a heading, even if logically that spot could continue a list? (You can continue the list with M-RET on the last line of the list). The second problem is with folded headlines. Org mode behaves correctly, but the result is surprising for the user. If you have the headline above, but folded, with the cursor at the end of the line, like this: <------------- *** Some heading...| <------------- pressing RET to open a new line, followed by M-RET (presumably to make a new heading) results in the following: <------------- *** Some heading... - Bullet - | <------------- So Org is trying to make a new list item, because the previous line is a list item, even though it's folded. I believe that since only a heading is visible, that should be interpreted to mean that the user wants a new heading. I am not sure why the heading displays partially folded, and partially opened, but refolding and reopening with TAB shows that the structure is correct. Thanks, -Anthony