GithubHelp home page GithubHelp logo

cccp-emacs's People

Contributors

candera avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cccp-emacs's Issues

Undo behaves non-intuitively

Background

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.

Expected Behavior

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.

Tech Notes

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

Quotes are not handled properly

Background

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.

Expected Behavior

  • Insertion of quotes should work properly.
  • Deletion of quotes should work properly.

`cccp-unlink-buffer` followed by `cccp-link-buffer` does not work

Background

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.

Expected Behavior

Re-linking a buffer should cause synchronization to resume.

Deal with narrowing

Background

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

Desired Behavior

cccp-mode should function normally when narrowing is in use.

Open Questions

  • Is narrowing reported as a deletion to the modification functions? If so, it's going to look to everyone else as if chunks of the buffer were deleted whenever the user narrows. That's probably not helpful, particularly if other users are editing elsewhere in the buffer.
  • If the buffer is narrowed, what positions are reported to cccp-before-change and cccp-after-change? Are they the narrowed positions or the widened ones?

Tech Notes

There might be a call somewhere that lets you temporarily widen the buffer, sort of like save-excursion.

Ensure we handle unusual characters properly

Background

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.

Acceptance Criteria

  • emacs-to-emacs synchronization successfully handles both inserts and deletes for the the following classes of characters:
    • quotes
    • backslashes
    • newlines
    • null characters
    • control characters
    • characters above 128
    • characters above 256

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.