emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Adam Porter <adam@alphapapa.net>
To: Bastien Guerry <bzg@gnu.org>, Ihor Radchenko <yantar92@posteo.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: Provide org-insert-subitem
Date: Sat, 16 Dec 2023 23:59:10 -0600	[thread overview]
Message-ID: <28721f9f-cab7-4960-96ac-5e109f3834f2@alphapapa.net> (raw)
In-Reply-To: <87wmtngt3x.fsf@bzg.fr>

Hi Bastien, Ihor,

On 12/9/23 11:53, Bastien Guerry wrote:
> Hi Adam,
> 
> Ihor Radchenko <yantar92@posteo.net> writes:
> 
>> Adam Porter <adam@alphapapa.net> writes:
>>
>>> Well, it's been a few years since I forgot to bump this thread. [0]  :)
>>> I just rediscovered it after wondering why the command
>>> org-insert-subheading still doesn't have a default binding.  May we
>>> revisit this?  I find myself wanting to insert a subheading almost every
>>> day, and I have to "M-x org-insert-subheading RET".
>>>
>>> Of course I could bind it myself, and in one of my configs I have, but I
>>> still think it deserves a default binding, even if it were to be a
>>> "smart" command that worked like org-table-copy-down when in a table and
>>> does org-insert-subheading otherwise (because I still think that "S-RET"
>>> is an obviously appropriate binding for this command).
>>>
>>> What do you think?  =)
>>
>> I think that it still makes sense, even after all these years ;)
> 
> +1!  Thanks for reviving this thread.
> 
> I would suggest a larger set of enhancements here:
> 
> - S-RET on a heading copies down the heading.
> 
>    For that we would need a new command `org-clone-subtree' bound to
>    S-RET that would immediately copy the heading at point. This command
>    would accept a universal argument to allow for a number a clones and
>    two universal arguments for adding a time shift.
> 
>    `org-clone-subtree-with-time-shift' would continue to be bound to
>    `C-c C-x c' but would be really a call to `org-clone-subtree'
> 
> - S-RET on a list item calls `org-insert-subitem`, a new command.
> 
> - C-M-RET on a heading calls `org-insert-subheading', the existing
>    command.
> 
> - C-M-RET on a list item calls `org-insert-subitem', a new command.
> 
> S-RET already "copy down" a table cells, so I'm really suggesting a
> generalization of the current keybinding.
> 
> I like C-M-RET better than S-RET because inserting a subheading is
> like a "subkey" or inserting a heading.
> 
> These improvements seem consistent.  WDYT?

Not that I necessarily object, but that seems like a lot of new things 
to me.  The immediate, simple benefit I seek is provided by this code in 
my config now, binding it to "S-<return>" in org-mode-map:

   (defun ap/org-shift-return (&optional arg)
     "Call `org-insert-subheading' or `org-table-copy-down'."
     (interactive "p")
     (cond ((org-at-table-p)
            (org-table-copy-down arg))
           (t
            (org-insert-subheading arg))))

The "C-M-RET" binding doesn't feel quite right to me.  Using "shift" 
feels like a mnemonic for "sub", whereas "C-M" seems like it should do 
something much less frequently used, since it requires two modifiers.

Ihor also made some good points in his message about the combinations of 
commands to insert before/after, with/without TODO, etc, and that 
"M-<RET> <TAB>" is already a quick way to insert a subheading (I wasn't 
aware of the option `org-cycle-level-after-item/entry-creation').  So 
maybe this idea of mine isn't as important as I thought.  :)

Thanks,
Adam


  parent reply	other threads:[~2023-12-17  6:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-22  9:04 Provide org-insert-subitem Dmitrii Korobeinikov
2020-02-02  7:49 ` Bastien
2020-02-02 10:11   ` Dmitrii Korobeinikov
2020-02-02 17:43   ` Adam Porter
2020-02-12  8:33     ` Bastien
2020-02-12 21:28       ` Adam Porter
2020-02-13  5:13         ` Corwin Brust
2020-02-13  8:04         ` Bastien
2020-02-13 18:45           ` Adam Porter
2020-02-14 10:02             ` Bastien
2023-12-08  2:51               ` Adam Porter
2023-12-09 14:09                 ` Ihor Radchenko
2023-12-09 17:53                   ` Bastien Guerry
2023-12-14 15:00                     ` Ihor Radchenko
2023-12-25  9:14                       ` Bastien
2023-12-25  9:40                         ` Ihor Radchenko
2023-12-17  5:59                     ` Adam Porter [this message]
2023-12-25  9:21                       ` Bastien

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=28721f9f-cab7-4960-96ac-5e109f3834f2@alphapapa.net \
    --to=adam@alphapapa.net \
    --cc=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@posteo.net \
    /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).