emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-meta-return and lists
@ 2010-11-03 19:40 Tom Short
  2010-11-03 20:07 ` Nicolas Goaziou
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Short @ 2010-11-03 19:40 UTC (permalink / raw)
  To: emacs-orgmode

With the new list handling mechanism in v7.02, org-meta-return acts
differently for me following lists. If I hit M-RET with the cursor in
the (blank) row or two after a list, it adds another list item.
Before, I'd get a new heading (what I want), and I'd only get another
list item if the cursor is still on a line with a list when I hit
M-RET..

Based on looking at the source of org-insert-heading and
org-in-item-p, I can reduce the behavior to within one empty row after
a list by setting org-empty-line-terminates-plain-lists to t. Anyone
know how I can go back to the previous behavior?

* heading
  - list item A
  - list item B
    <- When I hit M-RET here, I'd like a new heading.

- Tom

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: org-meta-return and lists
  2010-11-03 19:40 org-meta-return and lists Tom Short
@ 2010-11-03 20:07 ` Nicolas Goaziou
  2010-11-03 21:50   ` Anthony Lander
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Goaziou @ 2010-11-03 20:07 UTC (permalink / raw)
  To: Tom Short; +Cc: emacs-orgmode

Hello,

>>>>> Tom Short writes:

> With the new list handling mechanism in v7.02, org-meta-return acts
> differently for me following lists. If I hit M-RET with the cursor
> in the (blank) row or two after a list, it adds another list item.
> Before, I'd get a new heading (what I want), and I'd only get
> another list item if the cursor is still on a line with a list when
> I hit M-RET..

> Based on looking at the source of org-insert-heading and
> org-in-item-p, I can reduce the behavior to within one empty row
> after a list by setting org-empty-line-terminates-plain-lists to t.
> Anyone know how I can go back to the previous behavior?

Just use C-u M-RET to enforce an heading, wherever point is.

Regards,

-- Nicolas

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: org-meta-return and lists
  2010-11-03 20:07 ` Nicolas Goaziou
@ 2010-11-03 21:50   ` Anthony Lander
  2010-11-03 21:56     ` Tom Short
  0 siblings, 1 reply; 4+ messages in thread
From: Anthony Lander @ 2010-11-03 21:50 UTC (permalink / raw)
  To: Tom Short, Nicolas Goaziou; +Cc: emacs-orgmode Mode

Hi Tom,


On 10-Nov-3, at 4:07 PM, Nicolas Goaziou wrote:

> Hello,
>
>>>>>> Tom Short writes:
>
>> With the new list handling mechanism in v7.02, org-meta-return acts
>> differently for me following lists. If I hit M-RET with the cursor
>> in the (blank) row or two after a list, it adds another list item.
>> Before, I'd get a new heading (what I want), and I'd only get
>> another list item if the cursor is still on a line with a list when
>> I hit M-RET..
>
> Just use C-u M-RET to enforce an heading, wherever point is.

In order to avoid a prefix key, I did the following in my .emacs:

(defun my-org-mode-hook ()
   (define-key org-mode-map (kbd "<C-M-return>") (lambda ()  
(interactive) (org-insert-heading 1 nil))))
(add-hook 'org-mode-hook 'my-org-mode-hook)

I do not know how to get it back to the old behaviour (which I liked  
as well).

   -Anthony

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: org-meta-return and lists
  2010-11-03 21:50   ` Anthony Lander
@ 2010-11-03 21:56     ` Tom Short
  0 siblings, 0 replies; 4+ messages in thread
From: Tom Short @ 2010-11-03 21:56 UTC (permalink / raw)
  To: Anthony Lander; +Cc: emacs-orgmode

On Wed, Nov 3, 2010 at 5:50 PM, Anthony Lander <anthonylander@yahoo.com> wrote:
> Hi Tom,
>
>
> In order to avoid a prefix key, I did the following in my .emacs:
>
> (defun my-org-mode-hook ()
>  (define-key org-mode-map (kbd "<C-M-return>") (lambda () (interactive)
> (org-insert-heading 1 nil))))
> (add-hook 'org-mode-hook 'my-org-mode-hook)
>

Thanks, Anthony. That's better. - Tom

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-11-04  1:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-03 19:40 org-meta-return and lists Tom Short
2010-11-03 20:07 ` Nicolas Goaziou
2010-11-03 21:50   ` Anthony Lander
2010-11-03 21:56     ` Tom Short

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).