From: Max Mikhanosha <max@openchat.com>
To: Esben Stien <b0ef@esben-stien.name>
Cc: emacs-orgmode@gnu.org
Subject: Re: Insert TODO Item at Bottom
Date: Sun, 21 Oct 2012 14:59:30 -0400 [thread overview]
Message-ID: <87fw57ps6l.wl%max@openchat.com> (raw)
In-Reply-To: <87objznyr7.fsf@quasar.esben-stien.name>
At Fri, 19 Oct 2012 01:31:24 +0200,
Esben Stien wrote:
>
> I add a TODO item with M-S-RET, but is there any way to insert the new
> TODO item at the bottom of the current node or is there any way to
> navigate quickly to the last TODO item of the current node?.
>
> I often run C-c a s to search, but I end up at the top and I always have
> to "scroll" down to the last TODO item; this is wasting my life
This is what I use, the commands insert the new todo at the beginning
of the current subtree, and in the end..
For example if you are currently editing the org document shown below,
and are at the "point before" position, then corresponding commands
will add the two items at the top and the bottom.. Get rid of viper
part if you not using viper.
* Project
** TODO <point after>
** TODO Some item
some text <point before>
** TODO Another item
** TODO <point after>
(defun my-org-end-of-parent ()
"Go to the end of the parent of the current headline, return parent headline level"
(org-back-to-heading t)
(org-up-heading-safe)
(let ((level (org-outline-level)))
(org-end-of-subtree t t)
(or (bolp) (insert "\n"))
(org-back-over-empty-lines)
(org-reveal nil)
level))
(defun my-org-insert-todo-heading-end (arg)
"Insert TODO heading at the end of the current project"
(interactive "p")
(let ((parent-level (my-org-end-of-parent)))
(when parent-level
(end-of-line 0)
(org-reveal nil)
(org-insert-todo-heading-respect-content)
(viper-change-state-to-insert))))
(defun my-org-insert-todo-heading-start (arg)
"Insert TODO heading at the end of the current project"
(interactive "p")
(org-back-to-heading t)
(org-up-heading-safe)
(outline-next-heading)
(beginning-of-line)
(org-reveal)
(org-insert-todo-heading-respect-content)
(viper-change-state-to-insert))
next prev parent reply other threads:[~2012-10-21 18:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-18 23:31 Insert TODO Item at Bottom Esben Stien
2012-10-19 9:01 ` Sebastien Vauban
2012-10-19 17:28 ` Jeremiah Dodds
2012-10-19 18:07 ` John Hendy
2012-10-21 18:59 ` Max Mikhanosha [this message]
2012-10-21 23:23 ` Esben Stien
2012-12-22 17:48 ` Bastien
2014-03-11 23:56 ` Esben Stien
2014-03-12 0:20 ` Esben Stien
2014-03-12 16:52 ` Bastien
2014-03-12 22:24 ` Esben Stien
2014-03-13 11:29 ` Bastien
2014-03-13 7:53 ` James Harkins
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=87fw57ps6l.wl%max@openchat.com \
--to=max@openchat.com \
--cc=b0ef@esben-stien.name \
--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).