From mboxrd@z Thu Jan 1 00:00:00 1970 From: Max Mikhanosha Subject: Re: Insert TODO Item at Bottom Date: Sun, 21 Oct 2012 14:59:30 -0400 Message-ID: <87fw57ps6l.wl%max@openchat.com> References: <87objznyr7.fsf@quasar.esben-stien.name> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from eggs.gnu.org ([208.118.235.92]:58473) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQ0kH-0000Ft-Qv for emacs-orgmode@gnu.org; Sun, 21 Oct 2012 14:59:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TQ0kG-0002UZ-Nx for emacs-orgmode@gnu.org; Sun, 21 Oct 2012 14:59:33 -0400 Received: from openchat.com ([75.99.81.170]:47682 helo=momoland.openchat.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQ0kG-0002UV-JT for emacs-orgmode@gnu.org; Sun, 21 Oct 2012 14:59:32 -0400 In-Reply-To: <87objznyr7.fsf@quasar.esben-stien.name> 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.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Esben Stien Cc: emacs-orgmode@gnu.org 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 ** TODO Some item some text ** TODO Another item ** TODO (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))