reddit / emacs
Disastrous upgrade to 28.1 - Org-mode header expansion still affected.
forevernooob · 2022-04-23 23:57
Hello,
Recently my Emacs got automatically updated from 27.1 to 28.1 (thanks Snap!) and oh boy am I regretting this.
First, I had to re-install `use-package` because none of the packages seemed to work. Then I had to update all of the packages. Then Emacs almost took my system down with CPU usage because it was apparently recompiling packages without letting me know in either the messages or warnings buffers. Together with a bunch of stuff in between made this a fun adventure.
Anyway, I'm lucky that people over at the Emacs Matrix room were able to help out, otherwise I'd be very much dead in the water. Especially considering my newness to Emacs.
However, as the title says, there's still one issue remaining that irks me to no end. Emacs has lost the ability to collapse/expand headers of org-mode files. It could be a conflict between `evil-mode` and `org-mode`, but how do I tackle this? I have no idea.
When I did `C-h k <Tab>` under an org file heading, I got this description:
TAB (translated from <tab>) runs the command evil-jump-forward (found
in evil-motion-state-map), which is an interactive native compiled
Lisp function in ‘evil-commands.el’.
It is bound to TAB.
(evil-jump-forward &optional COUNT)
Go to newer position in jump list.
To go the other way, press C-o.
I don't consider having a huge or complicated config, so I'm not sure why the breakage happened like it did. If you have suggestions for future-proofing my config so that above disasters don't happen (or at least the chance of them get minimized), then please do let me know. Here's my [`init.el`](https://paste.debian.net/plain/1238802/)
Thanks in advance.
#### Edit:
Thanks to @yantar92:matrix.org I think I know the root cause: https://github.com/emacs-evil/evil/issues/1604 - Seems like Evil-mode is not yet fully adapted to work with Org-mode in Emacs v28. Workaround is noted in that issue though.
[deleted] · 2022-04-24 01:44
[deleted]
redguardtoo · 2022-04-24 02:26
Can't reproduce the org issue, using Emacs 28.1 and latest evil.
You don't need upgrade/re-install all the packages. Native-compilation only compiles package being loaded. The compilation happens once.
Even ArchLinux gives user two Emacs 28.1 distributions (with native compilation and without native compilation), see https://bugs.archlinux.org/task/74348, I don't know why snap can't follow suit. Mabye you need discard snap and use a better package manager?
forevernooob · 2022-04-24 02:31
> Can't reproduce the org issue, using Emacs 28.1 and latest evil.
I'm using 28.1 and `Org mode version 9.5.2 (release_9.5.2-25-gaf6f12 @ /snap/emacs/current/usr/share/emacs/28.1/lisp/org/)`
> Mabye you need discard snap and use a beter package manager?
Yeah I guess I learned the hard way that automatic updates and Emacs does not equal happy marriage. I'll definitely try using a different method of installation.
forevernooob · 2022-04-24 02:31
~~But what about https://github.com/emacs-evil/evil/issues/1604 ?~~
*Edit*: Totally mixed up the packages because of a brainfart. Sorry!
[deleted] · 2022-04-24 03:02
[deleted]
[deleted] · 2022-04-24 03:16
[deleted]
forevernooob · 2022-04-24 03:42
Oh, I was under the impression that Org-mode was part of Emacs now.
forevernooob · 2022-04-24 03:44
> `sudo apt update && sudo apt upgrade`
That still is a conscious effort to upgrade, and I personally would prefer it above snap at this point. I didn't ask snap to upgrade my Emacs, but it did. I started noticing that I couldn't save an org file because of some missing encoding issues. I closed Emacs, opened it back up and it was a different version than what I started with.
As to why I used snaps in this case: I wanted to have a recent version of Emacs since that was recommended to me.
[deleted] · 2022-04-24 03:55
[deleted]
[deleted] · 2022-04-24 04:04
[deleted]
FrozenOnPluto · 2022-04-24 04:42
Recommended considering this in config:
(setq load-prefer-newer t)
And maybe nuke .elc files from your .emacs.d to force recompile?
I had a weird problem where everything was woinky on goign to 28.x, but nuking the elc files fixed everythign right up; default behaviour to pick up old files I think caught me, so the prefer-newer may help.
Theres also this package that may help:
auto-recompile:
(require 'auto-compile)
(auto-compile-on-load-mode)
(auto-compile-on-save-mode)
[deleted] · 2022-04-24 05:00
[deleted]
FrozenOnPluto · 2022-04-24 05:20
Yeah pretty much :)
forevernooob · 2022-04-24 07:41
In that case I might have misunderstood the way Emacs ecosystem was comprised. I thought that since Org-mode was integrated into Emacs, it meant that the sourcecode was now integrated into the main Emacs project too, essentially making it (part of) Emacs as well.
forevernooob · 2022-04-24 07:41
Sure, you could do that. But why would I want that for something like Emacs? AFAIK Emacs doesn't make network connections unless you explicitly tell it to and if you want to use it just for Org-mode and occasional other text editing tasks (like me, for now), would it even make sense to have the latest and greatest version?
This lesson has taught me that I should properly test Emacs versions before I decide to upgrade. There seem to be lots of moving parts that can break when something is upgraded / changed, so I guess the minimum requirement for a proper version continuation strategy would be (seamless) rollbacks. Perhaps something akin to Nix or Guix.
vifon · 2022-04-24 08:06
Org-mode is, but I think the /u/TunaCowboy's point is that evil-mode isn't. This is a problem with evil-mode.
forevernooob · 2022-04-24 08:56
Ooooooh my god I'm so sorry! You're right! And /u/TunaCowboy is of course right as well!
How on earth did I brainfart so hard on this. Usually I'm much more focused (even after a week of night shifts like now) but I guess my brain is getting too old for this shit.