[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/undo-fu-session 56cdd3538a 16/53: Don't show common-place
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/undo-fu-session 56cdd3538a 16/53: Don't show common-place messages in the echo area |
Date: |
Thu, 7 Jul 2022 12:05:16 -0400 (EDT) |
branch: elpa/undo-fu-session
commit 56cdd3538a058c6916bdf2d9010c2179f2505829
Author: Campbell Barton <ideasman42@gmail.com>
Commit: Campbell Barton <ideasman42@gmail.com>
Don't show common-place messages in the echo area
These are distracting and not very useful,
the messages are still logged so users can check if the file change
causing undo-data to fail to load.
---
undo-fu-session.el | 25 +++++++++++++++++++++++--
1 file changed, 23 insertions(+), 2 deletions(-)
diff --git a/undo-fu-session.el b/undo-fu-session.el
index 4cf9173143..cbc191683c 100644
--- a/undo-fu-session.el
+++ b/undo-fu-session.el
@@ -96,6 +96,17 @@ Enforcing removes the oldest files."
:type 'integer
:group 'undo-fu-session)
+
+;; ---------------------------------------------------------------------------
+;; Utility Functions
+;;
+
+(defmacro undo-fu-session--message-without-echo (str &rest args)
+ "Wrap `message' passing in STR and ARGS, without showing in the echo area."
+ `
+ (let ((inhibit-message t))
+ (message ,str ,@args)))
+
;; ---------------------------------------------------------------------------
;; Undo List Make Linear
;;
@@ -485,12 +496,22 @@ Argument PENDING-LIST an `pending-undo-list'. compatible
list."
(goto-char (point-min))
(setq content-header (read (current-buffer)))
+ ;; Use `undo-fu-session--message-without-echo' to avoid distracting
the user
+ ;; when a common-place reason for failing to load is hit.
+ ;;
+ ;; These issues are common when working with others on documents.
+ ;; This way users may find out why undo didn't load if they need,
+ ;; without distracting them with noisy info.
(unless (eq (buffer-size buffer) (assoc-default 'buffer-size
content-header))
- (message "Undo-Fu-Session discarding undo data: file length
mismatch")
+ (undo-fu-session--message-without-echo
+ "Undo-Fu-Session discarding undo data: file length mismatch for
%S"
+ filename)
(throw 'exit nil))
(unless (string-equal (sha1 buffer) (assoc-default 'buffer-checksum
content-header))
- (message "Undo-Fu-Session discarding undo data: file checksum
mismatch")
+ (undo-fu-session--message-without-echo
+ "Undo-Fu-Session discarding undo data: file checksum mismatch
for %S"
+ filename)
(throw 'exit nil))
;; No errors... decode all undo data.
- [nongnu] elpa/undo-fu-session 7bbc89a42f 36/53: Build linear-list in-order instead of reversing, (continued)
- [nongnu] elpa/undo-fu-session 7bbc89a42f 36/53: Build linear-list in-order instead of reversing, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session 2fe1efcfa1 37/53: Shorten message, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session 5862b90b9c 38/53: Cleanup: use file-name-concat for clarity, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session 56d3134287 40/53: Cleanup: use simpler syntax to construct the overlay list, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session 4330e87aac 50/53: Remove undo-fu-session hooks when no buffers have the mode enabled, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session 3e54374b37 52/53: Cleanup: use double-dash for private functions, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session fa4833d470 02/53: readme: update to reference other packages, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session fa62a9b9a1 03/53: Cleanup: messages & docstrings, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session 049fe942f6 11/53: Cleanup: order buffer-undo-list before pending-undo-list, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session 5cc4b4f33d 12/53: Fix for linearizing an empty undo-list disabling undo on reload, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session 56cdd3538a 16/53: Don't show common-place messages in the echo area,
ELPA Syncer <=
- [nongnu] elpa/undo-fu-session 5135b5cb61 15/53: Update changelog, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session a038914736 18/53: Update readme, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session 191babe23c 24/53: Cleanup: docstring width warnings, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session 00bc3807d7 25/53: Cleanup: replace 'if' with 'cond', ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session 7c095e863c 26/53: Cleanup: remove redundant groups, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session cbe37c6643 31/53: Alternate fix for #2, make the directory only readable by the user, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session 4605b0cc2b 33/53: Tests: simplify execution, with & without the linear option set, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session 3e810c7c9a 34/53: Tests: move into subdirectory, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session 1a3d500d8b 39/53: Support different compression formats & format conversion, ELPA Syncer, 2022/07/07
- [nongnu] elpa/undo-fu-session b492c07573 43/53: Fix bzip2 and Z-standard compression types, ELPA Syncer, 2022/07/07