Menu

#365 Incremental search with pasted text

Unknown
open
nobody
None
v4.1
5
2017-03-17
2017-03-17
No

A common workflow is to start jmacs incremental search by typing Ctrl-S, then paste the search text into the window.

This works as expected when using iterm2 or macOS native terminal when editing files on other servers using ssh and a joe v3.7 on the other side.

But in a local session using iterm2 or terminal incremental search ends and pasted text is added at cursor position to the text. Locally I use v4.1 which is currently the version you get when using MacPorts package "joe".

Any idea how to fix it?

Discussion

  • John J. Jordan

    John J. Jordan - 2017-03-17

    The scenario that's not doing what you expect is probably due to bracketed paste catching the input -- this pastes your text directly into the buffer. The scenario that works, on the other hand, just comes in as keystrokes, and will get picked up by incremental search as you expect.

    Not sure how to go about fixing this with the way it's currently written, because the whole point of bracketed paste is to prevent the input from being interpreted as keystrokes.

    However, you can probably work around this by disabling bracketed paste (the "brpaste" option). The trouble is, you can't enable/disable it while JOE is running. You might see whether you can disable it in the terminal, too. Maybe also try enabling paste_hack (which I think is on by default -- but shouldn't be :-) because it messes up in slow SSH connections).

    HTH -john

     
  • Gerrit Griebel

    Gerrit Griebel - 2017-03-17

    Perfect, thanks a lot, I didn't know about "brpaste" joe option and switching it off solved my problem. Also thanks for hinting to "pastehack" option. Very useful.

     

Log in to post a comment.