Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I pin a specific package version or commit, e.g. for org-mode? #16520

Closed
komali2 opened this issue Aug 7, 2024 · 4 comments
Closed

Comments

@komali2
Copy link

komali2 commented Aug 7, 2024

There's some kind of bug in org-mode that makes org-roam-db-sync fail on files with certain kinds of links. The recommended fix org-roam/org-roam#2361 seems to be to pin org mode to a specific versions. use-package and doom emacs users have shared how to do this, however I'm not clear on how to do this in spacemacs from my configuration.

One option would possibly be to override the layer package: https://develop.spacemacs.org/doc/FAQ.html#how-to-override-a-layer-package however I feel like I'm probably missing an easier solution.

Many years ago a method to do this was issued as a PR: #6575 but closed without merge.

Is there a way in spacemacs to pin a package version similar to doom's (package! org :pin "5890ac") ?

@komali2
Copy link
Author

komali2 commented Aug 7, 2024

For now I've changed within layers/+emacs/org/packages.el

I set (org :location elpa :min-version "9.7.8") to instead be (org :location elpa :version "9.6.7") , then ran package-delete on org, then restarted emacs, then did package-recompile-all , and that seemed to work. I feel like there's probably a better way though.

@fnussbaum
Copy link
Collaborator

The recommended fix org-roam/org-roam#2361 seems to be to pin org mode to a specific versions

From reading that issue it seems it should actually work with newer Org versions, and is rather a matter of ensuring correct byte-compilation. I also had trouble when when upgrading to Org 9.7, as predicted in https://yhetil.org/emacs-devel/8735112ttw.fsf@localhost/T/#u. I think the same underlying problem led to this issue being reported, although there is actually nothing wrong with org-appear.

@smile13241324
Copy link
Collaborator

I don't think we have a proper way to pin package versions, the actual idea in Spacemacs is to use the latest and greatest package versions all the time. Assuming that incompatibilities are solved fast and happen very seldomly.

If it happens anyway then changing the layer is the right way to go.

@smile13241324 smile13241324 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 29, 2024
@fnussbaum
Copy link
Collaborator

If it happens anyway then changing the layer is the right way to go.

That is the most flexible way I think. One other way that I just used for persp-mode (which introduced an annoying bug/feature after the latest update that I planned to investigate at some later point) is rolling back the package update and then adding the package to dotspacemacs-frozen-packages to keep it from updating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants