[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/crdt 936418c 14/18: Synchronize text property on change
From: |
ELPA Syncer |
Subject: |
[elpa] externals/crdt 936418c 14/18: Synchronize text property on changes |
Date: |
Thu, 9 Sep 2021 12:57:13 -0400 (EDT) |
branch: externals/crdt
commit 936418ced9e4259f984f8f49e461251c8201c71f
Author: Qiantan Hong <qhong@mit.edu>
Commit: Qiantan Hong <qhong@mit.edu>
Synchronize text property on changes
and bug fix
---
HACKING.org | 4 ++--
crdt.el | 13 +++++++------
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/HACKING.org b/HACKING.org
index 996577a..57fde18 100644
--- a/HACKING.org
+++ b/HACKING.org
@@ -255,9 +255,9 @@ Development of the facility is still on-going.
+ [X] naive incremental
+ [ ] state-of-the-art level tree diff
+ [ ] a library of CRDTs
- - [-] synchronize text properties (any use case for this?)
+ - [X] synchronize text properties (any use case for this?)
+ [X] synchronize when new text is inserted
- + [ ] synchronize when changed
+ + [X] synchronize when changed
- [ ] synchronize markers (any use case for this?)
- [-] remote command
+ [X] basic remote command (only possibly use =(point)=)
diff --git a/crdt.el b/crdt.el
index a8f8ecb..d690a04 100644
--- a/crdt.el
+++ b/crdt.el
@@ -487,10 +487,8 @@ NAME is included in the report."
(progn ,@ body)
(error
(ding)
- (message "Error happens inside %s. This should never happen, please
submit an issue to crdt.el maintainers." ',name)
+ (message "Error happens inside %s. This should never happen, please file
a report to crdt.el maintainers." ',name)
(message " Error: %s" err)
- (message " Backtrace: ")
- (backtrace)
(if (crdt--server-p)
(progn
(message "Stop sharing the buffer because of error.")
@@ -1043,7 +1041,9 @@ Start the search for those ID-ITEMs around POSITION-HINT."
"Before change hook used by CRDT-MODE.
It saves the content to be changed (between BEG and END) into
CRDT--CHANGED-STRING."
(unless crdt--inhibit-update
- (setq crdt--changed-string (buffer-substring beg end))
+ (setq crdt--changed-string (crdt--buffer-substring beg end))
+ (crdt--text-property-assimilate nil beg end 0
+ 'crdt-id crdt--changed-string)
(setq crdt--changed-start beg)))
(defsubst crdt--crdt-id-assimilate (template beg &optional object)
@@ -1075,8 +1075,8 @@ update the CRDT-ID for any newly inserted text, and send
message to other peers
(save-restriction
(goto-char beg)
(if (and (= length (- end beg))
- (string-equal (crdt--changed-string beg length)
- (buffer-substring-no-properties beg end)))
+ (equal-including-properties (crdt--changed-string beg
length)
+ (crdt--buffer-substring beg
end)))
(crdt--crdt-id-assimilate (crdt--changed-string beg length)
beg)
(widen)
(with-silent-modifications
@@ -2518,6 +2518,7 @@ The result DIFF can be used in (CRDT--NAPPLY-DIFF OLD
DIFF) to reproduce NEW."
(defvar comint-input-ring)
(defvar comint-input-ignoredups)
(defvar comint-input-ring-size)
+(defvar comint-input-ring-file-name)
(defvar crdt-comint-command-entries
'((comint-send-input (point) (point))
- [elpa] externals/crdt dcf1dd5 02/18: Update version number, (continued)
- [elpa] externals/crdt dcf1dd5 02/18: Update version number, ELPA Syncer, 2021/09/09
- [elpa] externals/crdt 605d8fa 07/18: initial experiment of xscheme.el integration, ELPA Syncer, 2021/09/09
- [elpa] externals/crdt b6bcc8b 03/18: Merge branch 'master' into development, ELPA Syncer, 2021/09/09
- [elpa] externals/crdt cc37dcd 04/18: add description of bridge protocol, ELPA Syncer, 2021/09/09
- [elpa] externals/crdt bf1dc5d 09/18: typo, ELPA Syncer, 2021/09/09
- [elpa] externals/crdt e4493e5 13/18: bug fix for comint integration, ELPA Syncer, 2021/09/09
- [elpa] externals/crdt 52cbf50 15/18: autoload; fix bug for cmuscheme, ELPA Syncer, 2021/09/09
- [elpa] externals/crdt 3f6f566 11/18: lots of changes, ELPA Syncer, 2021/09/09
- [elpa] externals/crdt 38476da 05/18: Merge branch 'fix' into development, ELPA Syncer, 2021/09/09
- [elpa] externals/crdt c08e21d 06/18: Refactors and remote command, ELPA Syncer, 2021/09/09
- [elpa] externals/crdt 936418c 14/18: Synchronize text property on changes,
ELPA Syncer <=
- [elpa] externals/crdt e175d65 08/18: Remote command, ELPA Syncer, 2021/09/09
- [elpa] externals/crdt 6b85d8a 10/18: refactor, replace cl-generic with hashtable of handlers, ELPA Syncer, 2021/09/09
- [elpa] externals/crdt d7bc982 12/18: update README, ELPA Syncer, 2021/09/09
- [elpa] externals/crdt 40bd5d4 16/18: document, ELPA Syncer, 2021/09/09
- [elpa] externals/crdt b11bbc0 17/18: some more autoloads, ELPA Syncer, 2021/09/09
- [elpa] externals/crdt c1378c5 18/18: Merge branch 'development', ELPA Syncer, 2021/09/09