Doom-emacs: Redo stopped working (user-error: Customize ‘evil-undo-system’ for redo functionality.)

Created on 22 Oct 2020  ·  2Comments  ·  Source: hlissner/doom-emacs

What did you expect to happen?

When pressing C-r after u the previously undone operation should be redone.

What actually happened?

In the buffer - nothing.

Additional details:

The C-r is bound to evil-redo.

I'm getting this error message:

user-error: Customize ‘evil-undo-system’ for redo functionality.

I tried to customize the evil-undo as suggested in the message by calling evil-customize. The options I have under the Evil Undo System are:

  • Vanilla undo

    This was originally selected. Setting this produces the issue as described above.

  • undo-redo

    Choosing this one gives similar results. Undo works, but redo gives me the following message:

    evil-redo: Symbol’s function definition is void: undo-redo
    
  • undo-tree

    Neither undo nor redo works. I get the following message:

    user-error: Enable ‘global-undo-tree-mode’ to use undo-tree commands.
    
  • undo-fu

    Neither undo nor redo works. I get the following messages:

    evil-undo: Symbol’s function definition is void: undo-fu-only-undo
    evil-redo: Symbol’s function definition is void: undo-fu-only-redo
    

So in summary the Vanilla undo option gives me the issue as described above. The undo-redo options is similar, only the message is different. No other option work at all.

It started few days ago. I don't remember changing anything in configuration. Probably it was after an upgrade, but I am not sure. I'm an Emacs noob, so please be patient with me 🙏

Steps to reproduce:

  1. Insert few characters in a buffer.
  2. Go to normal mode with ESC.
  3. Press u (it will undo as expected)
  4. Press C-r.

System information:

SYSTEM  type       darwin
        config     x86_64-apple-darwin18.7.0
        shell      /bin/zsh
        uname      Darwin 18.7.0 Darwin Kernel Version 18.7.0: Mon Aug 31 20:53:32 PDT 2020; root:xnu-4903.278.44~1/RELEASE_X86_64 x86_64
        path       (~/.emacs.d/bin/ ~/.nix-profile/bin ./node_modules/.bin/ ~/.local/bin /usr/local/opt/grep/libexec/gnubin /usr/local/opt/gnu-sed/libexec/gnubin /usr/local/opt/m4/bin /usr/local/opt/gettext/bin /usr/local/opt/make/libexec/gnubin /usr/local/opt/coreutils/libexec/gnubin ~/.cargo/bin ~/go/bin ~/.pyenv/shims ~/.nvm/versions/node/v11.15.0/bin /usr/local/bin /usr/bin /bin /usr/sbin /sbin /opt/X11/bin /Library/TeX/texbin /usr/local/Cellar/emacs-plus@27/27.1/libexec/emacs/27.1/x86_64-apple-darwin18.7.0/)
EMACS   dir        ~/.emacs.d/
        version    27.1
        build      Aug 17, 2020
        buildopts  --disable-dependency-tracking --disable-silent-rules --enable-locallisppath=/usr/local/share/emacs/site-lisp --infodir=/usr/local/Cellar/emacs-plus@27/27.1/share/info/emacs --prefix=/usr/local/Cellar/emacs-plus@27/27.1 --with-xml2 --with-gnutls --without-dbus --with-imagemagick --with-modules --with-rsvg --with-ns --disable-ns-self-contained
        features   RSVG IMAGEMAGICK GLIB NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS PDUMPER LCMS2 GMP
        traits     (server-running envvar-file)
DOOM    dir        ~/.doom.d/
        version    2.0.9
        build      HEAD -> develop adff1aa68 2020-10-22 02:10:59 -0400
        elc-files  0
        modules    (:completion company ivy :ui doom doom-dashboard doom-quit hl-todo modeline nav-flash ophints (popup +all +defaults) treemacs vc-gutter vi-tilde-fringe window-select workspaces :editor (evil +everywhere) file-templates fold multiple-cursors parinfer rotate-text snippets :emacs dired electric ibuffer vc :term eshell :checkers syntax spell :tools docker (eval +overlay) (lookup +docsets) lsp :os macos :tools magit make pass :lang clojure data (elm +lsp) emacs-lisp erlang (haskell +dante) javascript markdown nix (org +dragndrop +present) php plantuml python rest scheme sh web yaml :email (mu4e +gmail) :config (default +bindings +smartparens))
        packages   ((flycheck-vale))
        unpin      (n/a)
        elpa       (loop caddyfile-mode)

invalid

Most helpful comment

Either enable :emacs undo (for undo-fu), :emacs (undo +tree) (for undo-tree), or upgrade to Emacs 28 (for undo-redo). If you don't know which one to pick, I recommend the first.

Hope that helps!

All 2 comments

Either enable :emacs undo (for undo-fu), :emacs (undo +tree) (for undo-tree), or upgrade to Emacs 28 (for undo-redo). If you don't know which one to pick, I recommend the first.

Hope that helps!

Thank you. I did as you suggested, i.e. added undo under :emacs in the init.el and it works again.

Was this page helpful?
0 / 5 - 0 ratings