From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Trying to write an elisp function to move subtree to end of file Date: Wed, 22 Sep 2010 01:58:37 -0400 Message-ID: <15875.1285135117@gamaville.dokosmarshall.org> References: Reply-To: nicholas.dokos@hp.com Return-path: Received: from [140.186.70.92] (port=54279 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OyIM8-0000O6-5w for emacs-orgmode@gnu.org; Wed, 22 Sep 2010 01:59:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OyIM6-0003rR-Rr for emacs-orgmode@gnu.org; Wed, 22 Sep 2010 01:59:00 -0400 Received: from vms173013pub.verizon.net ([206.46.173.13]:50450) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OyIM6-0003rC-Ot for emacs-orgmode@gnu.org; Wed, 22 Sep 2010 01:58:58 -0400 Received: from gamaville.dokosmarshall.org ([unknown] [173.76.32.106]) by vms173013.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0L94008CNWLPMUAP@vms173013.mailsrvcs.net> for emacs-orgmode@gnu.org; Wed, 22 Sep 2010 00:58:46 -0500 (CDT) In-reply-to: Message from Charles Cave of "Tue, 21 Sep 2010 23:42:11 -0000." List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Charles Cave Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org Charles Cave wrote: > I am writing an elisp function to move the subtree (at the point/cursor) > to the end of the file. The code from .elisp is shown > > I get an error message "Invalid function: (org-cut-subtree) > > (defun move-subtree-to-end () > (interactive) > (save-excursion ( > (org-cut-subtree) > (end-of-buffer) > (org-paste-subtree)) > ) > ) > (global-set-key (kbd "C-c e") 'move-subtree-to-end) > A few too many parens: try (defun move-subtree-to-end () (interactive) (save-excursion (org-cut-subtree) (end-of-buffer) (org-paste-subtree)) ) HTH, Nick > To give you background, my todo list/journal has been captured in > a date tree and I would like to move an item to the end of the buffer. > The reason for this will be explained in an upcoming article! > > Refiling is not applicable as (I don't think) the target can be defined. > > A date tree looks like: > > * 2010 > ** 2010-07 July... > ** 2010-08 August... > ** 2010-09 September > *** 2010-09-21 Tuesday > **** Headline of added entry > **** Headline of another entry > *** 2010-09-22 Wednesday > > > Thanks! > Charles > > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode >