From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dmitrii Korobeinikov Subject: Re: Provide org-insert-subitem Date: Sun, 2 Feb 2020 16:11:50 +0600 Message-ID: References: <87tv49bf9e.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:43269) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iyCEm-0001vf-5J for emacs-orgmode@gnu.org; Sun, 02 Feb 2020 05:12:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iyCEh-00071x-1t for emacs-orgmode@gnu.org; Sun, 02 Feb 2020 05:12:15 -0500 In-Reply-To: <87tv49bf9e.fsf@gnu.org> 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-mx.org@gnu.org Sender: "Emacs-orgmode" To: Bastien Cc: emacs-orgmode Hi, Bastien, > `org-insert-subheading' and `org-insert-todo-subheading' are not used > anywhere in Org's code. Do you them? How? I use them as intended: for convenience. Basically, I have a binding for th= is: (defun my/insert-heading () (interactive) (end-of-line) (cond ((string-match (rx (and bol (0+ white) "- [")) (thing-at-point 'line t)) (command-execute 'org-insert-todo-heading)) ((string-match (rx (and bol (0+ white) "-")) (thing-at-point 'line t)) (command-execute 'org-insert-item)) (t (if (my/org-heading-collapsed-p) (evil-open-below 1)) (command-execute 'org-insert-heading) (evil-normal-state)))) and a similar function for sub-things. This makes it very easy to insert (sub)headings/items/todo-items, all with just two bindings. > Hitting then seems swift and handy enough. Sometimes that would have to be when the items in the list are seperated with a newline. That's an awful lot of combinations for such a basic task, which I do quite often. > WDYT? To me, these functions seem fundamental enough to warrant the according out-of-the-box experience. Best, Dmitrii =D0=B2=D1=81, 2 =D1=84=D0=B5=D0=B2=D1=80. 2020 =D0=B3. =D0=B2 13:49, Bastie= n : > > Hi Dmitrii, > > Dmitrii Korobeinikov writes: > > > In short: > > org-insert-heading -> org-insert-subheading > > org-insert-todo-heading -> org-insert-todo-subheading > > org-insert-item -> ? > > > > Maybe should provide org-insert-subitem for consistency? > > `org-insert-subheading' and `org-insert-todo-subheading' are not used > anywhere in Org's code. Do you them? How? > > I'm more inclined to delete these commands since they have no binding > than to add an `org-insert-subitem'. > > Hitting then seems swift and handy enough. > > WDYT? > > -- > Bastien