Ed Hirgelt <ehirg...@gmail.com> 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)?


_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to