Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upRemove undo-tree dependency #1074
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
npostavs
Aug 17, 2018
Make 30 changes on a files an save each step
Is there some specific set of changes needed for this? I tried with the below and got no errors (this doesn't load evil, but as far as I understand the bug is not related to evil-mode).
~/src/emacs$ emacs -Q -l bug-1074evil-undo-tree/setup.el -f bug-1074-do-changes -f kill-emacs
~/src/emacs$ emacs -Q -l bug-1074evil-undo-tree/setup.el -f bug-1074-undo --eval '(sit-for 2)' -f bug-1074-redo
Where is bug-1074evil-undo-tree/setup.el is
(defconst bug-1074-dir
(file-name-directory (or load-file-name buffer-file-name)))
(setq undo-limit 78643200)
(setq undo-outer-limit 104857600)
(setq undo-strong-limit 157286400)
(setq undo-tree-mode-lighter " UN")
(setq undo-tree-auto-save-history t)
(setq undo-tree-enable-undo-in-region nil)
(setq undo-tree-history-directory-alist `(("." . ,(expand-file-name "undo" bug-1074-dir))))
(add-hook 'undo-tree-visualizer-mode-hook
(lambda ()
(undo-tree-visualizer-selection-mode)
(setq display-line-numbers nil)))
(add-to-list 'load-path (expand-file-name "../elpa/packages/undo-tree/" bug-1074-dir))
(require 'undo-tree)
(global-undo-tree-mode 1)
(defun bug-1074-do-changes ()
(interactive)
(let ((file (expand-file-name "xx.txt" bug-1074-dir)))
(with-current-buffer (find-file-noselect file)
(pop-to-buffer-same-window (current-buffer))
(dotimes (i 30)
(insert (format "%d\n" i))
(save-buffer)))))
(defun bug-1074-undo ()
(interactive)
(let ((file (expand-file-name "xx.txt" bug-1074-dir)))
(with-current-buffer (find-file-noselect file)
(pop-to-buffer-same-window (current-buffer))
(dotimes (i 30)
(undo-tree-undo)))))
(defun bug-1074-redo ()
(interactive)
(let ((file (expand-file-name "xx.txt" bug-1074-dir)))
(with-current-buffer (find-file-noselect file)
(pop-to-buffer-same-window (current-buffer))
(dotimes (i 30)
(undo-tree-redo)))))
npostavs
commented
Aug 17, 2018
Is there some specific set of changes needed for this? I tried with the below and got no errors (this doesn't load evil, but as far as I understand the bug is not related to evil-mode).
Where is (defconst bug-1074-dir
(file-name-directory (or load-file-name buffer-file-name)))
(setq undo-limit 78643200)
(setq undo-outer-limit 104857600)
(setq undo-strong-limit 157286400)
(setq undo-tree-mode-lighter " UN")
(setq undo-tree-auto-save-history t)
(setq undo-tree-enable-undo-in-region nil)
(setq undo-tree-history-directory-alist `(("." . ,(expand-file-name "undo" bug-1074-dir))))
(add-hook 'undo-tree-visualizer-mode-hook
(lambda ()
(undo-tree-visualizer-selection-mode)
(setq display-line-numbers nil)))
(add-to-list 'load-path (expand-file-name "../elpa/packages/undo-tree/" bug-1074-dir))
(require 'undo-tree)
(global-undo-tree-mode 1)
(defun bug-1074-do-changes ()
(interactive)
(let ((file (expand-file-name "xx.txt" bug-1074-dir)))
(with-current-buffer (find-file-noselect file)
(pop-to-buffer-same-window (current-buffer))
(dotimes (i 30)
(insert (format "%d\n" i))
(save-buffer)))))
(defun bug-1074-undo ()
(interactive)
(let ((file (expand-file-name "xx.txt" bug-1074-dir)))
(with-current-buffer (find-file-noselect file)
(pop-to-buffer-same-window (current-buffer))
(dotimes (i 30)
(undo-tree-undo)))))
(defun bug-1074-redo ()
(interactive)
(let ((file (expand-file-name "xx.txt" bug-1074-dir)))
(with-current-buffer (find-file-noselect file)
(pop-to-buffer-same-window (current-buffer))
(dotimes (i 30)
(undo-tree-redo))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
mrbig033 commentedJul 21, 2018
•
edited
Issue
Undo tree is an undo package that cannot keep undos.
Environment
Emacs version: Emacs 26.1.50
Operating System: Manjaro (current)
Evil version: Evil version 1.2.13
Evil installation type: MELP
Graphical/Terminal: Graphical
Tested in a
make emacssession (see CONTRIBUTING.md): YesUndo configurations:
Reproduction steps
Expected behavior
You should be able to undo and/or redo every single change
Actual behavior
When it works, I'm able to undo 5 changes at the most. Half the time I can't undo anything at all. Sometimes I get the message
unrecognized entry in undo list undo-tree-canarywhile I'm performing the undo.Further notes
It is not just me:
https://old.reddit.com/r/emacs/comments/85t95p/undo_tree_unrecognized_entry_in_undo_list/
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=16523
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=16377
https://lists.ourproject.org/pipermail/implementations-list/2014-November/002091.html
syl20bnr/spacemacs#298
syl20bnr/spacemacs#9903
I also must add that I had this same problem before with entirely different configurations, other versions of Emacs and operating systems.