From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:5f26::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id OOy0HIKOfmUHDQAAkFu2QA (envelope-from ) for ; Sun, 17 Dec 2023 07:00:34 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id EEzYFoKOfmXckgAAqHPOHw (envelope-from ) for ; Sun, 17 Dec 2023 07:00:34 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=alphapapa.net header.s=dreamhost header.b=ArChekeg; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=none; arc=pass ("mailchannels.net:s=arc-2022:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1702792834; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=TRjg1PyV5ibNrmDP/VuhnZwX9sB3iePd8x1W2dPO3HU=; b=HDUtpXzfeuU2Q1haabwz8jZEIiG2yR9lRN6j+PyKgiPDXOSlC+gna7Wa370eUUiS0I+URQ lc2WwehKn/OroM4bwEmhXwLT0d30loMDv7gCBVHf4NfUMM5pV60RcEQ/cixYKJE9g8BFAM 0/fLyiIAGwVAZAPypPk2CjT++Fc99rrJHgLEJ7+ULQFdLQv1U/OvbOIL0CHUjWcFq7qnPT 5I0+BJy5YuXZeeCcULFxYZnfoWnLFn7IMrciLWvLAPvlJUmL7kkQKGTKz5Ks+x39UJVCuL cvgnY87i4WcLJPyT6W+E1Y0B0gq527+fgsr72rBfuLp/cG2BWVxOx5Nztt9MkA== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=alphapapa.net header.s=dreamhost header.b=ArChekeg; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=none; arc=pass ("mailchannels.net:s=arc-2022:i=1") ARC-Seal: i=2; s=key1; d=yhetil.org; t=1702792834; a=rsa-sha256; cv=pass; b=nt3GgtWtl/pWgFnZpW6KBXsLZxkBvVgTADjX3kSj0sNyWRuI7ZZI0ZHWl/2ltreZt3t8iZ VCBGmMWAA+Q+C6bqkQ6faRuRU/BzeackxONuBBiOyBiHL/yRF3AUarrcLq0XrkZ7pKgDrq XBlc9d9NFVNfTMQ2NrQhrpXBfUReEngwhXJw0B0l42MnNgHTdcYNj4KT4plqDVmGDt+h0V Oo9eRLfTUBbYUOAAvGb60SBraMWB+MZ/RYSBWjCH9XxajkcVqd2T/pLa2yvP7OCnBC/LNw w98zra954YazzJFugNpsHt+ynL0PuGPZZF7zHDF+2JY7J+poV/UKWAPkBuhuNg== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 20B2269BC4 for ; Sun, 17 Dec 2023 07:00:33 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rEkBb-0005rf-I2; Sun, 17 Dec 2023 00:59:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rEkBY-0005rR-5x for emacs-orgmode@gnu.org; Sun, 17 Dec 2023 00:59:34 -0500 Received: from slateblue.cherry.relay.mailchannels.net ([23.83.223.168]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rEkBW-0000n2-HJ; Sun, 17 Dec 2023 00:59:31 -0500 X-Sender-Id: dreamhost|x-authsender|adam@alphapapa.net Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 79F038153E; Sun, 17 Dec 2023 05:59:13 +0000 (UTC) Received: from pdx1-sub0-mail-a258.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 098D78152F; Sun, 17 Dec 2023 05:59:13 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1702792753; a=rsa-sha256; cv=none; b=GxdlgnX7Qp6gHmm6S0d4xhq/QBiGOZmJFB7IiV/2bK+lRb+6hIl0p1ciwJE4QFpiqb9Ip4 LBGRYGx+TUhF66gQIJtr9ICls5H3e5xX98wMxgliaw4RYoNQ0Q5hqlAotcef+gQhZFjRFK ygrIVWuaK90l5rwUkCh/oQ014Hc8Kffcn74icNsxqnDiLK5XgGjt9Z/bsxlEUS+BNxwbvk TkmnYREsUMyxi1BnKYox+xEMkplYWJUBs8sicZER1DkrDXidNDRKS3nhhrktodU592GrhT 8k3GoJz7ZFDI87PLpppjI7talmryh0opAgp+ApxVQFM89DsL4csmXVNIYXOXvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1702792753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=TRjg1PyV5ibNrmDP/VuhnZwX9sB3iePd8x1W2dPO3HU=; b=6PNaYbjbg2GHMhOTswTe8Nv4BdeYAeJeVFcUmFRC4H5+dJam+gtnbgYQQCv+HnP4Q6Xb9P TNVzJgem0/gGrO+iNYL23k2J9+25Uu+hgZTwkM6n2PPFgVmJSD/JOHIZO9d585cilDTDCx G+pTGd+jYERFABoUg+PJVJmmtKMuhwqrDqWYh8XyC4z8MlwB8YL+83bPt5fLWSkj14qNE0 tIknMntwrq5Tt4Xkmp+ub3dULnfvm+B0WLfV0vsU81w1acd789kaxR9Dnv0aBvPeVRPi7I hUH3cFraTqQjXE+PxvYtwuADejepIVUKXs8jemmWJH74S0pUS3iPYobcc6KY/g== ARC-Authentication-Results: i=1; rspamd-d8b88b4b9-cg25x; auth=pass smtp.auth=dreamhost smtp.mailfrom=adam@alphapapa.net X-Sender-Id: dreamhost|x-authsender|adam@alphapapa.net X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|adam@alphapapa.net X-MailChannels-Auth-Id: dreamhost X-Snatch-Madly: 04dcba341c4c7765_1702792753305_819309040 X-MC-Loop-Signature: 1702792753305:3435699400 X-MC-Ingress-Time: 1702792753305 Received: from pdx1-sub0-mail-a258.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.113.243.205 (trex/6.9.2); Sun, 17 Dec 2023 05:59:13 +0000 Received: from [10.66.0.42] (unknown [91.193.232.98]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: adam@alphapapa.net) by pdx1-sub0-mail-a258.dreamhost.com (Postfix) with ESMTPSA id 4StC2S2BNrzPX; Sat, 16 Dec 2023 21:59:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alphapapa.net; s=dreamhost; t=1702792752; bh=TRjg1PyV5ibNrmDP/VuhnZwX9sB3iePd8x1W2dPO3HU=; h=Date:Subject:To:Cc:From:Content-Type:Content-Transfer-Encoding; b=ArChekeggIML16det7vy/TmFJQKNAAg/nmXhjU6E0MutH020Hy94IDgojvPDYWnzK iQYw1NPxCI3/oOTBdufb6kBYczhcz0Yc7TynXb5Gpq89P8trKMvbU1N0tuOQQjwHIL jUxeYgF6GLoZ8ogALxtZTBT0q9lPZPcuNJjYQ8rJH5+zbRDLO8PUV4zMyM04FZjllZ FTv53QSwuogrTSafLulh7kDOBb7cMEJKJlu+kkdgfgk2KUwmpoooUKXZVocLcvaXsz ugTTaHwqkI37YmaVQQkNgo1Xwhl4QwtORmaiUilm58VEhCgN3ZwtTtfZf/rOMFTVFw CMLoimombhblw== Message-ID: <28721f9f-cab7-4960-96ac-5e109f3834f2@alphapapa.net> Date: Sat, 16 Dec 2023 23:59:10 -0600 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Provide org-insert-subitem To: Bastien Guerry , Ihor Radchenko Cc: emacs-orgmode@gnu.org References: <875zg9trjo.fsf@bzg.fr> <0d03a623-14a5-4f65-8f12-bf749f934449@alphapapa.net> <87v897qxgw.fsf@localhost> <87wmtngt3x.fsf@bzg.fr> Content-Language: en-US From: Adam Porter In-Reply-To: <87wmtngt3x.fsf@bzg.fr> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: neutral client-ip=23.83.223.168; envelope-from=adam@alphapapa.net; helo=slateblue.cherry.relay.mailchannels.net X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NEUTRAL=0.779, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -8.87 X-Spam-Score: -8.87 X-Migadu-Queue-Id: 20B2269BC4 X-Migadu-Scanner: mx10.migadu.com X-TUID: PQsHTDstmX5h Hi Bastien, Ihor, On 12/9/23 11:53, Bastien Guerry wrote: > Hi Adam, > > Ihor Radchenko writes: > >> Adam Porter 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-" 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- " 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