0

I am new to emacs and I met a weird emacs problem, which I don't even know is a feature or what :)

Behavior:

The emacs is in the text-mode and turned off all the plugins, and I want to type ["ls"], but when I finish typing ] and wait for around 1 sec, the cursor will move to the second ". Then if I keep typing, let's say abc, then the text will become ["lsabc. When I switch to another buffer and switch back, the text will be back to normal ["ls"]abc.

Another scenario, in c-mode, when I type #define HI "hhhh, it becomes #dhhhh, which is really weird.

Does anyone have an idea of what happened here?

I am using Emacs (daemon/client) 26.1 under macOS 10.12.6, installed using homebrew, specifically, this binary package.

Drew
  • 75,699
  • 9
  • 109
  • 225
Jiahao Cai
  • 101
  • 2
  • Sounds like a display problem, if you see something different just by going to another buffer and returning to the same one. Try `C-l`, to see if redisplaying helps. But do you see the same problem if you start Emacs with `emacs -Q`? If not, bisect your init file to find the culprit. – Drew Jan 31 '19 at 21:56
  • @Drew Thank for your comment, `C-l` helps a lot, but `emacs -Q` leads to the same thing. I disable everything in `init.el`, but the same thing occurs, kind of weird. – Jiahao Cai Jan 31 '19 at 22:50
  • Sounds like a problem in your environment. But you can file an Emacs bug (`M-x report-emacs-bug`) to make the maintainers aware of the problem. They might have some useful advice, if it's not really an Emacs problem, or if it is an Emacs bug they might fix it. But wait a bit, to see if someone here has a helpful answer. – Drew Jan 31 '19 at 23:12
  • Thanks, you are so helpful :) – Jiahao Cai Feb 01 '19 at 01:21
  • @Drew Magically, now `emacs -Q` works for me, do you have any idea of the next step? – Jiahao Cai Feb 01 '19 at 02:56
  • As usual: If something works with `emacs -Q` but it doesn't work without `-Q`, i.e., with your init file, you need to bisect your init file to find the culprit. You can use command `comment-region` to comment out 1/2, then 3/4, 7/8, 15/16, 31/32... of the file until you find the problem. That's quick - a binary search. With a prefix arg, `comment-region` uncomments. Very easy to do; you just need to start Emacs multiple times, with different pieces of your init file in play. – Drew Feb 01 '19 at 03:32

0 Answers0