Issues with Emacs 23.1 and Mac OS X with drag and drop files

I just compiled and installed emacs 23.1 on my mac. He launches Leopard 10.5.8. And I noticed that drag and drop does not work correctly (as it was used to work with emacs 22). Now, by dragging the file onto the emacs icon on the dock, Emacs will start from two windows (frames in its terminology), one of which shows the launch screen, and the other - the contents of the file. I tried to get rid of this behavior, and I set the "prevent start" option to t. But it only helped with this problem.

Another problem that I have is that when dragging a file into a running emacs window, it simply displays the contents of the file in an existing buffer instead of opening a new buffer (named the same as the file). Any help on this?

I compiled emacs myself using the recommendations on this page: link text

I also noticed that this version of Emacs was pretty flaky - it crashed several times. I do not remember such situations when using previous versions. Any help would be greatly appreciated.

+5
emacs macos
source share
2 answers

Putting the following into 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)) 
+7
source share

Just to make this issue more comprehensive, there's a whole page in emacs info on Mac OS X crashes. Here's a link to the web version: emacs information about ns events

I also found that when using Emacs 23 as an external editor for Xcode, each file opens in a different frame (window). To fix this, simply add:

  (setq ns-pop-up-frames nil) 

to the .emacs file

+11
source share

All Articles