3

I've been attempting to use magit but it keeps throwing an error that seq-keep is void. I started up emacs only installing use-package and magit and the issue persists. However, when I installed magit through package-install, it worked perfectly. I am using emacs 28.2 on Debian 12. Here is the complete init.el

(require 'package)
(setq package-archives '(("melpa" . "https://melpa.org/packages/")
                         ("org" . "https://orgmode.org/elpa/")
                         ("elpa" . "https://elpa.gnu.org/packages/")))
(package-initialize)
(unless package-archive-contents
 (package-refresh-contents))
(unless (package-installed-p 'use-package)
   (package-install 'use-package))
(require 'use-package)
(setq use-package-always-ensure t)
(use-package magit)

Here is how magit appears when the error apears: seq-keep void magit

2 Answers 2

3

You're using Emacs 28.2. It looks like function seq-keep was added in Emacs 29.

That means that it's undefined (its definition is void) in 28.2.

It's not clear to me from your post that it's Magit code that's complaining about seq-keep being undefined. You can find out what code is complaining by setting debug-on-error to t.

If it is Magit code that's expecting seq-keep then maybe try an older version of Magit, which doesn't require seq-keep, or pick up the Emacs 29 definition of seq-keep and load that in your init file so it's available for your recent version of Magit.

1
  • 2
    I upgraded to emacs 29.1 and the error stopped. Sep 29 at 20:41
1

This is actually mentioned a few places in the Magit sources, though it doesn't seem to be mentioned anywhere in the documentation.

There is a comment in magit-base.el that implies older versions of Emacs should install an updated version of the seq package from ELPA. It's not really simpler than defining seq-keep yourself, but if you keep it up to date (despite not being able to upgrade Emacs itself), it will work even if magit starts using future additions to seq in future versions.

(But of course, the best solution is to upgrade Emacs.)

Your Answer

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

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