emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Add C-u behavior to <C-return>?


From: Nicolas Goaziou
Subject: Re: [O] Add C-u behavior to <C-return>?
Date: Tue, 27 Feb 2018 19:04:41 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Hello,

Kaushal Modi <address@hidden> writes:

> Lately, I have seen myself end up in a scenario where the point is at | as
> shown below, and I need to insert an Org heading at point.
>
> =====
> * heading
> - list item
> |
> content
> =====
>
> Currently, I cannot any way to insert heading at point while *not
> respecting* the content, when the point is *immediately* after a list item.
>
> C-return, C-u C-return, M-return, C-u M-return, none work.
>
> I see that C-u C-return is "free".
>
> C-return is bound to `org-insert-heading-respect-content ' whose definition
> is simply:
>
> (defun org-insert-heading-respect-content (&optional invisible-ok)
>   "Insert heading with `org-insert-heading-respect-content' set to t."
>   (interactive)
>   (org-insert-heading '(4) invisible-ok))
>
> Would a patch be accepted that passes nil as ARG to org-insert-heading,
> instead of '(4)?

My gut feeling is that we should first try to rationalize functions for
`M-RET' and `C-RET' along with all their prefix arguments. For example,
the behaviour you describe might be better served with `C-u M-RET', as
in "insert a headline right here, whatever that means".

I don't suggest to change `M-RET' itself, but I'm sure we can discuss
about what can be done with the other relative bindings.

I don't think C-RET is available in a terminal either. It may limit us
about what we can do with it.

Regards,

-- 
Nicolas Goaziou



reply via email to

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