candera / cccp-emacs Goto Github PK
View Code? Open in Web Editor NEWAn emacs client for the Common Collaborative Coding Protocol.
An emacs client for the Common Collaborative Coding Protocol.
Currently, if a remote and local user are both making edits to a file, undo undoes edits in whatever order they happen. So undo can wind up jumping back and forth between sections of the document in a very non-intuitive way.
I think users would expect that undo would undo local edits and leave remote edits alone, although perhaps they would also like a way to explicitly undo remote edits.
Notes on the problem here: https://github.com/candera/cccp-emacs/wiki/Undo.
Relevant section of the emacs manual: http://www.gnu.org/software/emacs/elisp/html_node/Maintaining-Undo.html
I'm not sure whether this is an issue with cccp-emacs or the agent, but if I fire up two instances of emacs and send a change that includes entering a double-quote, what gets inserted on the other side is ". Somewhere, something is not encoding quotes properly.
I haven't tried this yet, but I'm guessing that deleting quotes would be even worse, since we compute the number of characters to remove by looking at the length of the string in the edit message. If it's encoded with a backslash, presumably we'd be deleting extra characters.
After linking a buffer with cccp-link-buffer
, making some edits, unlinking it with cccp-unlink-buffer
, and then relinking it with cccp-link-buffer
again, edits are not communicated to the other emacs instance: it's as if we're not linked at all. It's not clear if this is a problem with emacs, with the agent, or with the server.
Re-linking a buffer should cause synchronization to resume.
Currently, the code uses emacs calls like point-max to compute the calls that need to be sent to the server. However, if a user narrows the buffer, these calls return the positions as if the visible portion of the buffer were
cccp-mode should function normally when narrowing is in use.
cccp-before-change
and cccp-after-change
? Are they the narrowed positions or the widened ones?There might be a call somewhere that lets you temporarily widen the buffer, sort of like save-excursion
.
The protocol is slightly funky for using swank, which encodes everything as an emacs Lisp string. We've already discovered that it's not gracefully handling double-quotes. We need to make sure that we can correctly synchronize changes to text that contain unusual characters properly. That includes quotes, newlines, null characters, control characters, and stuff out of the ASCII range.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.