Warning when I revert from desktop session. Emacs

廉价感情. 提交于 2020-01-04 05:36:06

问题


Yesterday I found desktop mode from EmacsWiki, and then I configure it for my Emacs 24:

;; Desktop
(require 'desktop)

;; save the desktop file automatically if it already exists
(desktop-save-mode 1)

;; use only one desktop
(setq desktop-path '("~/.emacs.d/tmp/"))
(setq desktop-dirname "~/.emacs.d/tmp/")
(setq desktop-base-file-name "desktop.cache")

But I got a warning in *Compile-Log* buffer when I restart Emacs:

Warning: ad-Orig-kill-region called with 3 arguments, but accepts only 2

Anyone else encounter this warning when use desktop? Or, any add-ons else better than desktop-mode?


回答1:


The ad-Orig- prefix is telling you that the function kill-region is advised. Possibly that advice is causing issues?

C-hf kill-region RET should tell you the name of the advice; chances are good that it's something in your own config, so I would look for it there firstly.

See if disabling the advice resolves the problem.

I do note an oddity with this function in Emacs 24; the source code for kill-region clearly takes an optional third argument, but that *Help* screen mentions only the two required args.

I checked in Emacs 23, and the help there mentions all three arguments.

Perhaps there's a bug in Emacs 24 which is responsible for both the discrepancy in the help output, and the error you're seeing?



来源:https://stackoverflow.com/questions/10393391/warning-when-i-revert-from-desktop-session-emacs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!