GUI Emacs在Mac下不能识别 C-. ?【已解决】

才发现,Mac下不能识别组合按键 C-. ? 是我的设置问题,还是Mac下GUI Emacs本来就不识别这个组合建?有没有人也复现这个"bug"?

我觉得这个bug应该和Mac高度相关:

  • 正常使用C-.无法识别;
  • 如果在Emacs中将Command键当Control键使用,即 (setq mac-command-modifier 'control),这时,C-.在Emacs中是可以工作的。

所以,似乎是C-.这个组合键通过API interface进入Emacs这个过程中失效了,而不是Emacs内部无法处理。可以确认Mac系统本身是可以识别这个组合键的,如在System Preferences -> Keyboard -> Shortcuts中,C-.是可以设置并工作的。

有经验的筒子们吱一声哪?谢谢!

$> brew info emacs
emacs: stable 26.3 (bottled), HEAD
GNU Emacs text editor
https://www.gnu.org/software/emacs/
/usr/local/Cellar/emacs/26.1_1 (3,992 files, 123.2MB) *
  Built from source on 2018-05-30 at 10:06:15 with: --with-cocoa
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/emacs.rb
==> Dependencies
Build: pkg-config ✔
Required: gnutls ✘
==> Options
--HEAD
	Install HEAD version
==> Caveats
To have launchd start emacs now and restart at login:
  brew services start emacs
Or, if you don't want/need a background service you can just run:
  emacs
==> Analytics
install: 18,153 (30 days), 51,788 (90 days), 186,402 (365 days)
install_on_request: 8,610 (30 days), 22,797 (90 days), 93,954 (365 days)
build_error: 0 (30 days)

猜测是你的搜狗输入法冲突了 image

3 个赞

我这里没问题,无法重现

evil-repeat-pop is an interactive and compiled function defined in
evil-repeat.el.

Signature
(evil-repeat-pop COUNT &optional SAVE-POINT)

Documentation
Replace the just repeated command with a previously executed command.

Only allowed after evil-repeat, evil-repeat-pop or
evil-repeat-pop-next. Uses the same repeat count that
was used for the first repeat.

The COUNT argument inserts the COUNT-th previous kill.
If COUNT is negative, this is a more recent kill.

Key Bindings
evil-normal-state-map C-.
1 个赞

非常非常感谢!!!

我擦泪,原来是搜狗输入法的锅,我把Mac系统级的shortcuts全过了一遍也没发现有C-.,居然是“万恶”的搜狗输入法在捣蛋! image 已经把它的快捷键通通禁掉了,就留了个shift