From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Kaushal Modi <kaushal.modi@gmail.com>
Cc: emacs-org list <emacs-orgmode@gnu.org>
Subject: Re: Add C-u behavior to <C-return>?
Date: Tue, 27 Feb 2018 19:04:41 +0100 [thread overview]
Message-ID: <87efl6joli.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <CAFyQvY28Pb_z9mpXg0mipvUTg-kaWEeijH1GCZ9537FDhSUHHg@mail.gmail.com> (Kaushal Modi's message of "Tue, 27 Feb 2018 16:42:51 +0000")
Hello,
Kaushal Modi <kaushal.modi@gmail.com> 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
prev parent reply other threads:[~2018-02-27 18:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-27 16:42 Add C-u behavior to <C-return>? Kaushal Modi
2018-02-27 18:04 ` Nicolas Goaziou [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87efl6joli.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=emacs-orgmode@gnu.org \
--cc=kaushal.modi@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.