符号的函数定义为void:x-cut-buffer-or-selection-value

bph*_*bph 18 emacs

刚刚在Windows 7下安装了Emacs 24

尝试在emacs中剪切和粘贴(kill&yank)时出现以下错误,例如

C-k, C-y
Run Code Online (Sandbox Code Playgroud)

杀死一行并将其复制到其他地方:

Symbol's function definition is void: x-cut-buffer-or-selection-value
Run Code Online (Sandbox Code Playgroud)

我已经从我的.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)
Run Code Online (Sandbox Code Playgroud)

我没有类似的问题使用emacs 24与linux下相同的.emacs文件

我做了一个初步的googel拖网,但是我发现的所有信息都表明这个bug已经修好了,这对我没什么帮助

不幸的是,这使得emacs在windows下无法使用

UPDATE

这条线似乎没有导致问题:

;; get copy and paste to work between emacs and other windows
(setq x-select-enable-clipboard t)
Run Code Online (Sandbox Code Playgroud)

但这些线路:

;; 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)
Run Code Online (Sandbox Code Playgroud)

我已经开始使我的.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)
Run Code Online (Sandbox Code Playgroud)

这解决了问题,但这看起来像一个kludge ...

spe*_*ves 7

EMACS 24中的变量名称已更改:

current-kill:符号的函数定义为void:x-cut-buffer-or-selection-value

打开.emacs并更改:'x-cut-buffer-or-selection-value)

to :( setq interprogram-paste-function'x-selection-value)

我在这篇文章中找到了答案:http: //lists.gnu.org/archive/html/emacs-devel/2010-09/msg00638.html


eve*_*_jr 2

如果您根本不进行自定义,Emacs 会如何表现?即开始于

emacs -Q
Run Code Online (Sandbox Code Playgroud)

我面前没有 Windows 机器,但我的配置中没有任何特定于 Windows 的剪切/粘贴功能,而且我在使用 24 时从未遇到过任何问题,尽管我还没有尝试过稳定版本。