Emacs 23.1和Mac OS X文件拖放问题 [英] Emacs 23.1 and Mac OS X problem with files drag and drop
问题描述
我的另一个问题是当将文件拖动到正在运行的emacs窗口时,它只显示现有缓冲区中文件的内容,而不是打开新缓冲区(命名与文件相同)。
有什么帮助吗?
我已经使用本页面的引用编辑了emacs:
链接文本
另外我注意到这个Emacs的版本已经相当片面 - 它坠毁了几次。使用以前的版本时,我不记得这样的情况。任何帮助将高度赞赏。
将以下内容放在.emacs文件中将有所帮助。您将不得不重新启动Emacs或评估代码。
(define-key global-map [ns-drag-file] 'my-ns-open-files'
(defun my-ns-open-files()
打开列表中的文件`ns-input-file'
(interactive)
(mapc'find-file ns-input-file)
(setq ns-input-file nil))
I've just compiled and installed emacs 23.1 on my mac. It's running Leopard 10.5.8. And I've noticed that dragging and dropping does not work correctly (as it used to work with emacs 22). Now when dragging a file to the emacs icon on the dock, Emacs will start with two windows (frames in its terminology), one showing the startup screen and the other with the contents of the file. I've tried to get rid of this behaviour and I've set 'inhibit-startup-screen' option to t. But that only helped with this problem.
The other problem that I have is that when dragging a file onto a running emacs window, it justs shows the contents of the file in the existing buffer, instead of opening a new buffer (named the same as the file). Any help with that?
I've compiled emacs myself using guidlines from this page: link text
Also I've noticed that this version of Emacs has been rather flaky - it crashed a few times. I do not remember such situations when using previous versions. Any help will be highly appreciated.
Putting the following in your .emacs file will help. You will either have to restart Emacs or evaluate the code.
(define-key global-map [ns-drag-file] 'my-ns-open-files)
(defun my-ns-open-files ()
"Open files in the list `ns-input-file'."
(interactive)
(mapc 'find-file ns-input-file)
(setq ns-input-file nil))
这篇关于Emacs 23.1和Mac OS X文件拖放问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!