[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/crdt 1347c678c3 04/44: Use some warning instead of mess
From: |
ELPA Syncer |
Subject: |
[elpa] externals/crdt 1347c678c3 04/44: Use some warning instead of message |
Date: |
Sat, 2 Jul 2022 22:57:32 -0400 (EDT) |
branch: externals/crdt
commit 1347c678c3a05ce649a659d9237ffe5c05819583
Author: Qiantan Hong <qhong@mit.edu>
Commit: Qiantan Hong <qhong@mit.edu>
Use some warning instead of message
---
crdt.el | 27 +++++++++++++++------------
1 file changed, 15 insertions(+), 12 deletions(-)
diff --git a/crdt.el b/crdt.el
index 55dd1ec726..52c7aa7444 100644
--- a/crdt.el
+++ b/crdt.el
@@ -486,16 +486,13 @@ NAME is included in the report."
`(condition-case err
(progn ,@ body)
(error
- (ding)
- (message "Error happens inside %s. This should never happen, please file
a report to crdt.el maintainers." ',name)
- (message " Error: %s" err)
+ (warn "CRDT mode exited in buffer %s because of error %s inside %s."
+ (current-buffer) err ',name)
(if (crdt--server-p)
- (progn
- (message "Stop sharing the buffer because of error.")
- (crdt-stop-share-buffer))
- (progn
- (message "Killing the buffer because of error.")
- (kill-buffer))))))
+ (crdt-stop-share-buffer)
+ (remhash crdt--buffer-network-name (crdt--session-buffer-table
crdt--session))
+ (crdt--refresh-buffers-maybe)
+ (crdt-mode -1)))))
(defun crdt--recover (&optional err)
"Try to recover from a synchronization failure.
@@ -1625,8 +1622,14 @@ CRDT--PROCESS should be bound to The network process for
the client connection."
(with-current-buffer buffer
(crdt-mode 0)
(setq crdt--session nil))))))
- (message "Server stopped sharing %s."
- (mapconcat #'identity buffer-names ", "))
+ (let ((notify-names
+ (cl-remove-if-not
+ (lambda (buffer-name)
+ (gethash buffer-name (crdt--session-buffer-table crdt--session)))
+ buffer-names)))
+ (when notify-names
+ (warn "Server stopped sharing %s."
+ (mapconcat #'identity buffer-names ", "))))
(let ((crdt--session saved-session))
(crdt--broadcast-maybe crdt--message-string
(when crdt--process
@@ -1919,7 +1922,7 @@ Setup up the server with PASSWORD and assign this Emacs
DISPLAY-NAME."
(kill-buffer process-buffer))
(when (and proxy-process (process-live-p proxy-process))
(interrupt-process proxy-process)))
- (message "Disconnected.")))
+ (warn "CRDT session disconnected.")))
(defun crdt-stop-session (&optional session)
"Stop sharing the SESSION.
- [elpa] externals/crdt updated (81b55a27b8 -> 282c48c47c), ELPA Syncer, 2022/07/02
- [elpa] externals/crdt 97427622b1 06/44: fix bug in crdt--stop-session interactive spec, ELPA Syncer, 2022/07/02
- [elpa] externals/crdt 1347c678c3 04/44: Use some warning instead of message,
ELPA Syncer <=
- [elpa] externals/crdt b421e4e679 10/44: Merge branch 'fix' into development, ELPA Syncer, 2022/07/02
- [elpa] externals/crdt 94b0c488b5 09/44: bump version number, ELPA Syncer, 2022/07/02
- [elpa] externals/crdt 3dcc9958f6 11/44: cleanup, ELPA Syncer, 2022/07/02
- [elpa] externals/crdt 10f423bbef 15/44: Merge branch 'fix' into development, ELPA Syncer, 2022/07/02
- [elpa] externals/crdt 900abacbdd 16/44: Use the term "user-command-functions" instead of proxy, ELPA Syncer, 2022/07/02
- [elpa] externals/crdt 38fdfc5557 07/44: semver, and various fixes, ELPA Syncer, 2022/07/02
- [elpa] externals/crdt 270a4099bb 14/44: return -> cl-return, ELPA Syncer, 2022/07/02
- [elpa] externals/crdt d46be72920 05/44: remove base64 mangling and fix a stupid bug, ELPA Syncer, 2022/07/02
- [elpa] externals/crdt 3a78c8a615 24/44: Improve settings form when CRDT-USE-STUNNEL is nil, ELPA Syncer, 2022/07/02
- [elpa] externals/crdt 569486e6c6 25/44: Lots of changes, ELPA Syncer, 2022/07/02