Org-mode 执行 org-refile 报错 “Invalid function: …”
Published on Feb 24, 2020
问题
前段时间升级了本机的 Org-mode
版本。由原来安装 Emacs 时默认的 org-9.1.9
升级到了最新稳定版 org-9.3.6
。
今天在执行 M-x org-refile
时,出错了,错误信息为 Invalid function: org-preserve-local-variables
。
解决办法
In almost all cases an
invalid function
error is caused by an unclean Org-mode source directory. Cleaning it up and recompiling should fix the problem.
删除 elpa/org
目录下所有编译后的文件 *.elc
, 退出并重新打开 Emacs, 使其重新编译即可。
rm -rf ~/.emacs.d/elpa-26.3/org-9.3.6/*.elc