emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kaushal Modi <kaushal.modi@gmail.com>
To: emacs-org list <emacs-orgmode@gnu.org>
Subject: Add C-u behavior to <C-return>?
Date: Tue, 27 Feb 2018 16:42:51 +0000	[thread overview]
Message-ID: <CAFyQvY28Pb_z9mpXg0mipvUTg-kaWEeijH1GCZ9537FDhSUHHg@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1103 bytes --]

Hello,

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)?

-----

I am aware that M-return does what I want if I first manully insert
newlines after a list to "break" the list (by first moving the point as
shown below).

=====
* heading
- list item


| (now do M-return)
content
=====

But still, having C-u C-return binding would be nicer..
-- 

Kaushal Modi

[-- Attachment #2: Type: text/html, Size: 1527 bytes --]

             reply	other threads:[~2018-02-27 16:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-27 16:42 Kaushal Modi [this message]
2018-02-27 18:04 ` Add C-u behavior to <C-return>? Nicolas Goaziou

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFyQvY28Pb_z9mpXg0mipvUTg-kaWEeijH1GCZ9537FDhSUHHg@mail.gmail.com \
    --to=kaushal.modi@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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 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).