From mboxrd@z Thu Jan 1 00:00:00 1970 From: Noorul Islam K M Subject: Re: Trying to write an elisp function to move subtree to end of file Date: Wed, 22 Sep 2010 10:52:11 +0530 Message-ID: <87mxrawdx8.fsf@noorul.maa.corp.collab.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=52383 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OyHoA-0001Q2-22 for emacs-orgmode@gnu.org; Wed, 22 Sep 2010 01:23:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OyHo8-0007td-SH for emacs-orgmode@gnu.org; Wed, 22 Sep 2010 01:23:54 -0400 Received: from mail-iw0-f169.google.com ([209.85.214.169]:55719) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OyHo8-0007tR-PM for emacs-orgmode@gnu.org; Wed, 22 Sep 2010 01:23:52 -0400 Received: by iwn33 with SMTP id 33so308089iwn.0 for ; Tue, 21 Sep 2010 22:23:51 -0700 (PDT) In-Reply-To: (Charles Cave's message of "Tue, 21 Sep 2010 23:42:11 +0000 (UTC)") 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: emacs-orgmode@gnu.org Charles Cave writes: > 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) > > 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. I wonder why this is not an option. Can you please elaborate a bit? Thanks and Regards Noorul