emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Provide org-insert-subitem


From: Dmitrii Korobeinikov
Subject: Re: Provide org-insert-subitem
Date: Sun, 2 Feb 2020 16:11:50 +0600

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 this:

  (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 <M-RET> then <M-right> seems swift and handy enough.

Sometimes that would have to be <M-RET> <M-RET> <M-right> 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

вс, 2 февр. 2020 г. в 13:49, Bastien <address@hidden>:
>
> Hi Dmitrii,
>
> Dmitrii Korobeinikov <address@hidden> 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 <M-RET> then <M-right> seems swift and handy enough.
>
> WDYT?
>
> --
>  Bastien



reply via email to

[Prev in Thread] Current Thread [Next in Thread]