Q:

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

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.  

A:

Just to have the information regarding this problem more complete - there's a whole page in emacs info dedicated to Mac OS X builds.  
Here's the link to web version: emacs info about ns events
Also I've found that when using Emacs 23 as an external editor for XCode, each file gets opened in a different frame (window).  To fix this, just add: 
  (setq ns-pop-up-frames nil) 

to your .emacs file

A:

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))

