4

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 
1
  • 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. Commented Apr 21, 2019 at 18:47

2 Answers 2

6

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

https://github.com/syl20bnr/spacemacs/issues/12099#issuecomment-480904298

@flatwhatson
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
  • I'm not using spacemacs but I deleted expand-region from .emacs.d/el-get and reinstall it and that solved the problem. Thanks ! Commented Mar 19, 2021 at 19:28
0

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) 
2
  • 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 ? Commented 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. Commented Jun 1, 2021 at 13:07

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.