emacs-orgmode
[Top][All Lists]
Advanced

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

[Orgmode] Strange behavior of M-RET with new list improvements


From: Anthony Lander
Subject: [Orgmode] Strange behavior of M-RET with new list improvements
Date: Tue, 7 Sep 2010 07:25:14 -0400

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



reply via email to

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