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, 2019 at 18:47

2 Answers 2


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.

As an alternative, you can try to update/reinstall the expand-region package via M-x package-reinstall RET expand-region RET (you might have to do M-x package-refresh-contents RET first to update your package index from ELPA.)

  • 1
    That did it, thanks!
    – chriad
    Apr 26, 2019 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 ! Mar 19, 2021 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)
  • I am using too use-package and straight, but this : (use-package expand-region :after (org)) doesnt work for me :( Do you have a other option ?
    – Cletip
    May 30, 2021 at 8:08
  • @Cletip No sorry, as this worked for me I haven't looked into trying alternatives. Best I can suggest is trimming your .emacs down to bare bones and fiddle with load order.
    – Bae
    Jun 1, 2021 at 13:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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