Subject: bug#10050: 24.0.90; image files display image data only after drag and drop

From: Jan Djärv <[email-masked]>
Date: Wed, 22 Feb 2012 12:05:57 +0100

Hello.

22 feb 2012 kl. 09:08 skrev Glenn Morris <[email-masked]>:

> Jan Djärv wrote:
> 
>> The big problem is that dragging a file to Emacs on NS inserts the
>> contents of that file to the current buffer instead of opening it as
>> people normally expect, and indeed is what all other Emacs versions
>> does. It is like that in Emacs 23 also, so this is not a regression.
>> But as we are in a feature freeze this will have to wait, even if the
>> behaviour is stupid. If Emacs would open dragged files in a new
>> buffer, images would be shown as images.
> 
> Is it just a question of doing what it says in the manual, or is more
> needed?
> 

No, that and changing the manual. 
The bindning to change is in ns-win.el

>    The default behavior when a user drags files from another application
>    into an Emacs frame is to insert the contents of all the dragged files
>    into the current buffer.  To remap the `ns-drag-file' event to open the
>    dragged files in the current frame use the following line:
> 
>         (define-key global-map [ns-drag-file] 'ns-find-file)
> 
> Maybe that change is sensible and safe enough for 24.1.
> (I can't even test it so I wouldn't know.)

If you want I can do it. I have been  running with that change in my local copy for about a year now.

    Jan D.