spacemacs 使用org-mode 的 org-refile 不能用



Description org-refile does not work.

使用org-refile时 出现下面的信息
Getting targets…done
Copied: Subtree(s) with 22 characters
org-copy-subtree: Invalid function: org-preserve-local-variables

Expected behaviour: :heart::smile:
refile could be used

System Info :computer:

  • OS: darwin
  • Emacs: 25.3.1
  • Spacemacs: 0.200.13
  • Spacemacs branch: master (rev. c7a103a)
  • Graphic display: t
  • Distribution: spacemacs
  • Editing style: vim
  • Completion: helm
  • Layers: ‘‘‘elisp (markdown (ibuffer :variables ibuffer-group-buffers-by ’projects) (chinese :variables chinese-enable-youdao-dict t) auto-completion emacs-lisp (python :variables python-sort-imports-on-save t python-enable-yapf-format-on-save t) django org syntax-checking) ‘‘‘

my org config:

(with-eval-after-load 'org

  (setq org-agenda-files '("~/org/gtd/"

  (setq org-capture-templates '(("t" "Todo [inbox]" entry
                                (file+headline "~/org/gtd/" "Tasks")
                                "* TODO %i%?")
                                ("T" "Tickler" entry
                                (file+headline "~/org/gtd/" "Tickler")
                                "* %i%? \n %U")))

  (setq org-refile-targets
          '((nil :maxlevel . 3)
          (org-agenda-files :maxlevel . 3)))

  (setq org-refile-use-outline-path 'file)

  (setq org-outline-path-complete-in-steps nil)

  (setq org-todo-keywords '((sequence "TODO(t)" "WAITING(w)" "|" "DONE(d)" "CANCELLED(c)")))

  1. 在github上已经有了相关的Issue, #11788 #11801

  2. 解决方案如下:

cd ~/.emacs.d/elpa/
find org*/*.elc -print0 | xargs -0 rm


  1. 除了org-refile,org-archive-subtree也会同样报错,我试了一下上面的解决方案,可以解决我的问题了.