1

When emacs frozen, I restart it and I see that 84;0;0c may end up writting into very first line of the latest open file.


The way I start emacs daemon: emacsclient -c -qut file.txt 2>/dev/null. While this process is on-going when I type enter or some characters they show up on the opened file.

$ cat file.txt
MY_FILE_STARTS
$ kill -9 $(ps auxww | grep -E "[e]macsclient"  | awk '{print $2}')
$ emacsclient -qut file.txt 2>/dev/null
alper
alper
alper

Than opened file shown as follows:

lper
alper
alper


84;0;0cMY_FILE_STARTS

Simple solution would be not to enter any keys while emacs daemon is starting but accidently I may end up typing enter once in a while.

What does 84;0;0c stands for and is it possible to prevent writing those characters when emacs is unresponsive?

14
  • 1
    Have you tried to interrupt Emacs from some shell command line via pkill -SIGUSR2 emacs? That should start the debugger. It may be necessary to call pkill -SIGUSR2 emacs multiple times.
    – Tobias
    May 20, 2022 at 12:34
  • Yes but when emacs freeze and when I try to exit from the daemon or press some keys they written into buffer and shows up after the emacs starts working
    – alper
    May 25, 2022 at 18:32
  • @Tobias I figure out the reason for this. I was starting emacs daemon as follows: emacsclient -qut 2>/dev/null after this when I press any key like enter that writting into 1st line of the open file followed by 84;0;0c
    – alper
    Jun 8, 2022 at 13:09
  • This is probably not an Emacs problem. What terminal emulator are you using? Do you get the same results if you use xterm instead?
    – db48x
    Jun 9, 2022 at 0:48
  • I am using iTerm2(iterm2.com) ; same problem occurs in Terminal
    – alper
    Jun 9, 2022 at 16:28

1 Answer 1

2

I found the solution in 0;95;0c escape code is inserted with typeahead in terminal emacs and Everytime I open emacs with -nw my file is prepended with 0;276;0c. My screen realestate is also being cut in half.

My problem was:

This is more likely to happen if you are using Emacs over a slow connection, and begin typing before Emacs is ready to respond.

Solution:

Customizing xterm-extra-capabilities and setting the capabilities manually makes the problem go away. But if I set it to nil the bug goes away.

I had to add: (setq xterm-extra-capabilities nil) into my init file to fix this problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.