0

I re-defined the function org-archive-subtree to call another function as described in the function below. I did this in spacemacs/user-config, now I can't call org-archive-subtree and C-h v (describe variable) can't find org-archive-subtree anymore. Why does the variable disappear?

(defun org-archive-subtree () (org-archive-subtree-hierarchical) )

Everything I did is described in this post: https://stackoverflow.com/a/35475878/5114384

3
  • What variable? In Emacs 26.1 at any rate there is no org-archive-subtree variable in org-archive.el – phils Nov 5 '18 at 8:27
  • Yes that is correct, it's not a variable at all so it won't show in describe variable. Running it gives the error "wrong type argument: commandp, org-archive-subtree" – Simon Nov 5 '18 at 14:00
  • A function is only a command if it contains an (interactive) form. Only commands can be called with M-x or bound to keys. – phils Nov 5 '18 at 19:03
1
  1. I did not "remove" defun. You cant look up functions with describe-variable.

  2. I solved it by adding this:

    (setq org-archive-default-command 'org-archive-subtree-hierarchical)

and using C-c C-x C-a instead of spacemacs defaults.

1
  • 1
    It looks like you've solved your problem. Please 'accept' your answer by clicking on the check mark. That will remove your question from the 'unanswered' list. – Tyler Jan 4 '19 at 20:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.