[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
cut and paste hazard
From: |
Paul Rubin |
Subject: |
cut and paste hazard |
Date: |
5 Mar 2004 22:19:59 -0000 |
I tried cutting and pasting some text from a web browser window into
an Emacs buffer in a terminal window, and got some weird behavior
(beeping and hard-to-fathon minibuffer error messages) from Emacs on
the paste operation. It was just a sentence or two of plain text
about a guy from Spain and I couldn't at first understand what was wrong.
It turned out that because the Spanish guy's name contained an
accented character, Emacs interpreted the 8-bit code for that
character as an editing command with the Meta key set.
This is kind of scary--that particular accented string luckily didn't
screw up anything by accident. It's even a security risk, since I
could imagine being able to maliciously engineer a block of text that
did something nasty when pasted into Emacs.
Unfortunately, at least with Emacs running in a terminal window and
with the paste operation being done externally by the window manager,
I don't see a workaround. If Emacs is running in an X window, it
should accept 8-bit typein as normal text, and require actual meta key
events to set off editing commands (I don't know if it does this).
- cut and paste hazard,
Paul Rubin <=