GithubHelp home page GithubHelp logo

Comments (4)

retroj avatar retroj commented on September 14, 2024

I think this only affects terminal users, where pasting a newline character causes the line to be sent. In gui emacs, pasting a newline at the prompt does not cause the text to be sent, so if paste protection is desired for the gui, it would take a different form, such as testing the length of the input and prompting for confirmation.

from circe.

jorgenschaefer avatar jorgenschaefer commented on September 14, 2024

Fascinating. I didn't know the GUI version fixes that.

That means this is only useful for (not (window-system)) frames. Possibly as an external mode so it doesn't clutter up circe.el, depending on how big the change would be.

from circe.

jorgenschaefer avatar jorgenschaefer commented on September 14, 2024

I've been playing with test implementations of this a bit. This is a tricky beast.

To do "perfect" paste protection, Circe has to delay sending any PRIVMSG to the server, just in case it is followed up with another few. This delay is noticeable, even at lengths of 0.2s. Below that, it does not work because Emacs needs longer than that to actually process the input for long lines.

Not-so-perfect paste protection could send the first few lines and then kick in. The best place for this I found would be in lui-send-input.

from circe.

jorgenschaefer avatar jorgenschaefer commented on September 14, 2024

I do not see a sensible way to do paste protection for terminals here. Annoying. Begone, ticket.

from circe.

Related Issues (20)

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.