Comments (21)
As a short-term solution, it's possible to have the seq-keep
definition in init.el
(defun seq-keep (function sequence)
"Apply FUNCTION to SEQUENCE and return the list of all the non-nil results."
(delq nil (seq-map function sequence)))
(from https://github.com/emacs-mirror/emacs/blob/master/lisp/emacs-lisp/seq.el)
After this, magit works fine.
from magit.
I've installed the mentioned kludge.
from magit.
I ran into this issue again on magit version
20231112.914
. I'm installing emacs and dependencies via nix, so manually side-loadingseq
isn't an option. But I thought it also wouldn't be required anymore in this version?Do you have by chance a workaround for a Nix based config?
This is what I'm currently using:
overrides = self: super: {
elpaPackages =
super.elpaPackages
// {
seq = self.callPackage ({
elpaBuild,
fetchurl,
lib,
}:
elpaBuild rec {
pname = "seq";
ename = "seq";
version = "2.24";
src = fetchurl {
url = "https://elpa.gnu.org/packages/seq-2.24.tar";
sha256 = "1w2cysad3qwnzdabhq9xipbslsjm528fcxkwnslhlkh8v07karml";
};
packageRequires = [];
meta = {
homepage = "https://elpa.gnu.org/packages/seq.html";
license = lib.licenses.free;
};
# tests take a _long_ time to byte-compile, skip them
postInstall = ''rm -r $out/share/emacs/site-lisp/elpa/${pname}-${version}/tests'';
}) {};
};
};
emacsPackage =
((pkgs.emacsPackagesFor pkgs.emacs29-gtk3).overrideScope' overrides).emacsWithPackages …;`
from magit.
As a workaround I installed seq-2.24
manually and added (require 'seq-25)
to my init file. I guess this has to do with the builtin seq
package (v2.23 in my case) being loaded first. I'm adding this comment here just in case it helps on debugging the issue.
from magit.
@jroimartin thank you for opening this. I confirm your work-around works for me as well. I'm also on emacs 28.2.
I've made a similar hack in my spacemacs config here:
makohoek/dotfiles@c7868f9
from magit.
@doolio You should probably report that to Straight's maintainers.
from magit.
But I thought it also wouldn't be required anymore in this version?
Magit now works around deficits of package.el
, but that doesn't change the fact that it depends on seq v2.24, which means that that package has to be installed independently when using an Emacs release that does not include that version yet.
I ran into this issue again on magit version
20231112.914
. I'm installing emacs and dependencies via nix, so manually side-loadingseq
isn't an option.
That's a bug in how magit is packages in nix then. Please report this to the maintainer of magit in nix. Thanks!
from magit.
Last night I started using seq-keep
in forge
but did not add seq-2.24
as a dependency. It is possible you updated packages at this point. I then noticed the issue thanks to CI and fixed it for forge
. I then went on to using seq-keep
in magit
as well. I did add the dependency this time around.
So it is likely that just updating packages again would also have fixed this issue; the fact that you had to manually install seq-2.24
speaks for that. If not -- if an older version of seq
is being loaded, despite of the package
-installed 2.24 being on the load-path
-- then it is most likely an issue with package
or something internal to the seq
backport package itself.
from magit.
You should not have to manually require seq-25
because that's what the package
-installed seq.el
does:
[snip]
;;; Code:
(if (version< emacs-version "25")
(require 'seq-24)
(require 'seq-25))
(provide 'seq)
;;; seq.el ends here
from magit.
I think I found the issue.
GNU Emacs 28.2 comes with seq-2.23 built in and it does not upgrade built-in packages automatically. Thus, I had to install seq-2.24 manually. Also, the function seq-keep used by magit is not autoloaded, which requires to explicitly load the library.
Long story short, my current workaround is:
- Install seq-2.24 manually.
- Add
(load "seq")
to the init file.
Does it make sense?
from magit.
Information about upgrading built-in packages in GNU Emacs 29: https://git.savannah.gnu.org/cgit/emacs.git/tree/etc/NEWS.29#n1714
from magit.
I've added an explicit require
.
(You shouldn't use load
. It is almost always better to use require
.)
I'll have to look into those news. I don't use package
myself, and assume(d) that it does not silently ignore explicitly specified dependency versions (by default, or ever).
from magit.
However, I cannot use (require 'seq)
because it seems the feature seq
is already provided by /usr/share/emacs/28.2/lisp/emacs-lisp/seq.elc
(instead of ~/.emacs.d/elpa/seq-2.24/seq.el
) by the time it is called from my init file. So require
is ignored.
from magit.
I see. That probably means that something loads seq
before package-initialize
is called. Across Emacs releases, there are big difference in how and when that is automatically called for you, if at all, how you can call it explicitly instead, and what the recommended way of doing that is. It could be that this defaults to being broken, but it could also could be that you do something that results in this behavior (possibly because it at one point was recommended that you do that).
In other words I will have to investigate. Meanwhile, other users running into this, should first try to update, and if that alone doesn't work add (require 'seq)
explicitly early on (but after package-initialize
, if that can be found in early-init.el
or init.el
), and only if that also doesn't work, fall back to (load 'seq)
.
If this is indeed a bug causes by the default configuration of some Emacs releases, or a common misconfiguration, then I might have to require seq
like so:
(when (and (featurep' seq)
(not (fboundp 'seq-keep)))
(unload-feature 'seq 'force))
(require 'seq)
from magit.
Hello. Does anyone know how to install the previous version of the package?
Why used rolling release?
from magit.
Just ran into this issue. Uninstalling magit
and its dependencies and re-installing doesn't install the latest version of the seq
package. I use straight.el
rather than package.el
if that matters and am still on Emacs 27.1. The workaround mentioned here is working for me though.
from magit.
Straight does not update dependencies and even ignores the specified minimal versions. See radian-software/straight.el#1083.
from magit.
Straight does not update dependencies and even ignores the specified minimal versions.
The latest commit on straight's develop
branch fixes this issue wrt magit
at least.
from magit.
I ran into this issue again on magit version 20231112.914
. I'm installing emacs and dependencies via nix, so manually side-loading seq
isn't an option. But I thought it also wouldn't be required anymore in this version?
from magit.
I ran into this issue again on magit version
20231112.914
. I'm installing emacs and dependencies via nix, so manually side-loadingseq
isn't an option. But I thought it also wouldn't be required anymore in this version?
Do you have by chance a workaround for a Nix based config?
Edit: I installed the package from melpa for the moment until the package gets fixed in Nix or there is a known workaround.
from magit.
Thanks for the hint @mmarx. I've adapted it for Home Manager in case anyone is looking for that as well:
{
programs = {
emacs = {
overrides = self: super: rec {
# Taken from https://github.com/magit/magit/issues/5011#issuecomment-1838598138
seq = self.callPackage ({ elpaBuild, fetchurl, lib }:
elpaBuild rec {
pname = "seq";
ename = "seq";
version = "2.24";
src = fetchurl {
url = "https://elpa.gnu.org/packages/seq-2.24.tar";
sha256 = "1w2cysad3qwnzdabhq9xipbslsjm528fcxkwnslhlkh8v07karml";
};
packageRequires = [];
meta = {
homepage = "https://elpa.gnu.org/packages/seq.html";
license = lib.licenses.free;
};
# tests take a _long_ time to byte-compile, skip them
postInstall = ''rm -r $out/share/emacs/site-lisp/elpa/${pname}-${version}/tests'';
}) {};
};
};
};
}
from magit.
Related Issues (20)
- Stage hunk in tramp session result in infinity loop HOT 2
- When doing worktree diff with a commit, apply/reverse doesn't work in the diff buffer HOT 3
- Setting `safe.bareRepository=explicit` breaks magit commit HOT 1
- magit-diff-paths output is not washed HOT 1
- Error in `magit-repolist-column-version` function: (wrong-type-argument integer-or-marker-p nil) HOT 1
- `magit-log` with `--author=` argument hangs with `vertico-mode` when `transient-default-level` is 7 HOT 2
- Magit should always specify --git-dir or GIT_DIR when cd-ing to a gitdir to run some Git subcommand. HOT 19
- Binding C-<tab> conflicts with Emacs' tab-bar-mode HOT 1
- Non-existing tramp function advised in magit-process.el HOT 1
- Confirm commit message when running emacs as client HOT 5
- Trying to visit files in `magit-diff-paths` output leads to wrong path
- large git merges make magit-process buffer grow quickly
- `Filter! diff.ignoreSubmodules=untracked` on top of magit buffer is confusing
- Unable to recursively init submodules HOT 1
- submodule update with universal argument still prompts for submodule selection when there is only one submodule HOT 2
- Invalid slot name: "#<magit-section ...>", :value
- Some update broke my custom git-commit-hook to insert comment into commit buffer HOT 3
- Magit push doesn't respect configured refspecs HOT 2
- Pressing RET (magit-visit-thing) on an URL in the magit-process buffer doesn't open URL HOT 4
- magit-log with --patch but without --graph errors HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from magit.