I'd like to send some commands to the terminal Emacs is running in, using send-string-to-terminal
. However, some terminals don't support the command I have in mind.
When this is the case, the command is echoed after the cursor, temporarily overwriting the display, and causing graphical corruption:
Result of running M-:(send-string-to-terminal "\e[5 q")
in xfce4-terminal
(Note that the text appears in the echo area by mere coincidence—if I had run the code using a keybinding in a different buffer, the output would be positioned after the cursor)
Obviously, this is not desirable. Is there a way to hide the output (or mask it by redrawing the display in that region) so the command can silently fail?
(message)
or(message "")
to clear the echo area.