在绑定按键时,有两种常见的key notation形式,像是RET
与<return>
,TAB
与<tab>
,在EmacsWiki当中有一定的介绍,但在最后提到了,
Are angle brackets really necessary, in order to disambiguate keys?
No. If you would like to do without the angle brackets, at least in most interactive contexts (i.e., not hard-coded, literal occurrences), you can do so. Just use library NaKeD (No Angles Key Descriptions).
也就是说,一般推荐使用类似RET
、TAB
这样类似的写法而不是尖括号的形式。
在另一篇博客中也有关于这方面的讨论,并且有下面这张图帮助理解:
李杀大佬的Emacs教程里面也有类似的解释,就是在TUI与GUI模式下的区别。
我的疑问是,以下面的代码为例,应该将C-RET
和C-<return>
都同时绑定到了org-meta-return
上了
(general-def org-mode-map "C-RET" #'org-meta-return)
然而事实是,GUI下没有生效,必须再单独指定C-<return>
才能正确在GUI下正常生效:
(general-def org-mode-map "C-<return>" #'org-meta-return)
这是什么原因呢?