How do I turn off the car fleet when I paste Emacs from another program?

If I Cc in some other program (say terminal or web browser) and then Cv in Emacs, autopilot sometimes creates extra parentheses or parentheses that I don't need. How do I limit this to the case when I copy by pasting external text into Emacs? My relavent lines in my init.el file:

(require 'autopair)
(autopair-global-mode 1)
(setq autopair-autowrap t)

      

+3


source to share


1 answer


If I understand correctly, you are embedding Emacs in a terminal emulator. In this case, the paste does indeed send the inserted characters as if they were being pressed by keys, which is why weird things can happen (e.g. when inserting into a Dired buffer).

For what it's worth, Emacs-25 supports "copied paste", which is a special functionality of "latest" xterms, in which these terminals send pasted text, surrounded by special escape sequences, so Emacs can know it's an paste.



In other words, this problem should be fixed in Emacs-25.

+5


source







All Articles