If I try to use er/expand-region but it fails with Symbol’s function definition is void: org-outline-overlay-data.

org-version : Org mode version 9.2.2

In the release notes for the current org (9.2), it says that org-outline-overlay-data has been removed.

But there is no org-outline-overlay-data in the expand-region code when I search the package directory.

#### System Info
- OS: gnu/linux
- Emacs: 26.1
- Spacemacs: 0.300.0
- Spacemacs branch: develop (rev. fba6d38bf)
- Graphic display: t
- Distribution: spacemacs
  • Something loaded by your init file is clearly trying to invoke that missing function. Bisect your init file to find the culprit. If the problem comes from some code your init file loads then that will tell which code file that is. If necessary you can then bisect that file. – Drew Apr 21 '19 at 18:47

just delete ~/.emacs.d/elpa/*/develop/expand-region* and spacemacs will re-install it.


The problem is that expand-region is byte-compiled with the built-in org, but then the org layer installs a newer version from ELPA which has changed the definition of the org-save-outline-visibility macro, leading to the symbol error.

  • 1
    That did it, thanks! – chrimuelle Apr 26 '19 at 7:12
  • I'm not using spacemacs but I deleted expand-region from .emacs.d/el-get and reinstall it and that solved the problem. Thanks ! – Raoul HATTERER Mar 19 at 19:28

I'm not using spacemacs, but the problem is still the same.

I'm using use-package and straight.el to manage my packages.

The same problem as noted by BlindingDark in the quote by flatwhatson is the problem.

expand-region is using the built-in org and not the newer one loaded by use-package.

This is easily fixed by telling use-package to load after org has been loaded.

(use-package expand-region
  :after (org)

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.