Loris Bennett writes: > Hi, > > I'm running > > Org mode version 9.4.4 (9.4.4-25-g3a522a-elpaplus @ > /home/loris/.emacs.d/elpa/org-plus-contrib-20210222/) > > and today I encountered the following error when refiling > > org-refile: Invalid function: org-preserve-local-variables > > Despite the error, the refiling itself did however work. > > I am fairly sure that I have refiled without seeing this error message > since I last updated Org, thus I am somewhat surprised by it.
org-preserve-local-variables is a macro defined in org-macs.el. That file is loaded by org.el, which is loaded by org-refile.el. So, I think everything looks fine there. My guess---especially if you're running Emacs 26 or lower, which ships with an Org that didn't yet have org-preserve-local-variables---is that you have a mixed installation. list-load-path-shadows might reveal the problem. https://orgmode.org/worg/org-faq.html#mixed-install