From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Add C-u behavior to ? Date: Tue, 27 Feb 2018 19:04:41 +0100 Message-ID: <87efl6joli.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39534) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eqjcM-00072s-DK for emacs-orgmode@gnu.org; Tue, 27 Feb 2018 13:04:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eqjcL-0001F5-Gy for emacs-orgmode@gnu.org; Tue, 27 Feb 2018 13:04:46 -0500 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:34687) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eqjcL-0001EY-BL for emacs-orgmode@gnu.org; Tue, 27 Feb 2018 13:04:45 -0500 In-Reply-To: (Kaushal Modi's message of "Tue, 27 Feb 2018 16:42:51 +0000") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Kaushal Modi Cc: emacs-org list Hello, Kaushal Modi 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