We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
One solution is
(defun undohist-recover-safe () (when (file-exists-p buffer-file-name) (condition-case var (undohist-recover-1) (error (message "Can not recover undo history: %s" var)))))
. Another is
(defun undohist-recover-1 () (let* ((buffer (current-buffer)) (file (buffer-file-name buffer))) (when (file-exists-p file) (let* ((undo-file (make-undohist-file-name file)) undo-list) (when (and (undohist-recover-file-p file) (file-exists-p undo-file) (or (null buffer-undo-list) (yes-or-no-p "\ buffer-undo-list is not empty. Do you want to recover now? "))) (with-temp-buffer (insert-file-contents undo-file) (goto-char (point-min)) (let ((alist (undohist-decode (read (current-buffer))))) (if (string= (md5 buffer) (assoc-default 'digest alist)) (setq undo-list (assoc-default 'undo-list alist)) (message "\ File digest doesn't match, so undo history will be discarded.")))) (when (consp undo-list) (setq buffer-undo-list undo-list)))))))
.
The text was updated successfully, but these errors were encountered:
I don't use this package for a long time. Therefore, feel free to open PRs to fix any issue you've encountered.
Sorry, something went wrong.
Ok. Do you use another package in place of undohist?
I recommend undo-tree, but I've heard it is hard for Emacs beginners. 🤔
No branches or pull requests
One solution is
. Another is
.
The text was updated successfully, but these errors were encountered: