刚刚在 Windows 7 下安装了 Emacs 24
尝试在 emacs 中剪切和粘贴(kill & yank)时出现以下错误,例如
C-k, C-y
杀死一行并将其复制到其他地方:
Symbol's function definition is void: x-cut-buffer-or-selection-value
我已从我的 .emacs 中注释掉以下内容并重新启动了 emacs,但错误仍然存在:
;; get copy and paste to work between emacs and other windows
;; (setq x-select-enable-clipboard t)
;; (setq interprogram-paste-function 'x-cut-buffer-or-selection-value)
在linux下使用具有相同.emacs文件的emacs 24我没有类似的问题
我已经完成了最初的 googel 拖网,但我发现的所有信息都表明该错误已被修复,这并没有太大帮助
不幸的是,这使我无法在 Windows 下使用 emacs
更新
这条线似乎没有引起问题:
;; get copy and paste to work between emacs and other windows
(setq x-select-enable-clipboard t)
但是这些行可以:
;; this line causes cut/paste errors under windows (emacs 24)
;; (setq interprogram-paste-function 'x-cut-buffer-or-selection-value)
;; this alternative fixes windows problems but causes errors under linux (emacs 24)
(setq interprogram-paste-function 'x-selection-value)
我已经尝试过让我的 .emacs 平台有条件,例如:
;; this line causes cut/paste errors under windows (emacs 24)
(if (eq system-type 'gnu-linux) (setq interprogram-paste-function 'x-cut-buffer-or-selection-value) )
;; (setq interprogram-paste-function 'x-cut-buffer-or-selection-value)
;; this alternative causes errors under linux (emacs 24)
(if (eq system-type 'windows-nt) (setq interprogram-paste-function 'x-selection-value) )
;;(setq interprogram-paste-function 'x-selection-value)
这解决了问题,但这似乎有点杂乱无章......