From: Dmitrii Korobeinikov <dim1212k@gmail.com>
To: Bastien <bzg@gnu.org>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Provide org-insert-subitem
Date: Sun, 2 Feb 2020 16:11:50 +0600 [thread overview]
Message-ID: <CA+Yh0SS-Uv4Kz7g521MuRwVfHNT6F4YmzEbv4CJMoeEn1i81xQ@mail.gmail.com> (raw)
In-Reply-To: <87tv49bf9e.fsf@gnu.org>
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 <bzg@gnu.org>:
>
> Hi Dmitrii,
>
> Dmitrii Korobeinikov <dim1212k@gmail.com> 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
next prev parent reply other threads:[~2020-02-02 10:12 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 [this message]
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
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=CA+Yh0SS-Uv4Kz7g521MuRwVfHNT6F4YmzEbv4CJMoeEn1i81xQ@mail.gmail.com \
--to=dim1212k@gmail.com \
--cc=bzg@gnu.org \
--cc=emacs-orgmode@gnu.org \
/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).