From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Problem with archiving Date: Mon, 02 Mar 2009 21:24:44 -0500 Message-ID: <8931.1236047084@gamaville.dokosmarshall.org> References: Reply-To: nicholas.dokos@hp.com Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LeKKI-0001eG-CT for emacs-orgmode@gnu.org; Mon, 02 Mar 2009 21:25:46 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LeKKF-0001e4-Tr for emacs-orgmode@gnu.org; Mon, 02 Mar 2009 21:25:45 -0500 Received: from [199.232.76.173] (port=42139 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LeKKF-0001dw-M6 for emacs-orgmode@gnu.org; Mon, 02 Mar 2009 21:25:43 -0500 Received: from qmta01.westchester.pa.mail.comcast.net ([76.96.62.16]:41719) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LeKKF-0007j5-ES for emacs-orgmode@gnu.org; Mon, 02 Mar 2009 21:25:43 -0500 In-Reply-To: Message from Ed Hirgelt of "Mon, 02 Mar 2009 11:11:57 PST." 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: Ed Hirgelt Cc: emacs-orgmode@gnu.org Ed Hirgelt wrote: > Using the latest from git: when I try to archive a subtree with C-c > $, I get > > org-archive-subtree: Wrong type argument: number-or-marker-p, nil > > Archive is going to the default location, in my case Tasks.org_archive > in the > same directory. This also failed with a newly created file. > Here's a little more information on what goes wrong: ---- foo.org ----- * foo ** bar ** baz ------------------ C-c $ (on the * foo line) then gives: Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil) org-get-valid-level(0 nil) org-archive-subtree(nil) call-interactively(org-archive-subtree nil nil) the suspect line in org-archive.el being: ... ;; Paste (org-paste-subtree (org-get-valid-level level (and heading 1))) ... heading was evaluated to "" and then set to nil, so (and heading 1) evaluates to nil (it probably should evaluate to 0?), which is used in org-get-valid-level as a number to be added to the level. Should (and heading 1) become (if heading 1 0)?