From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Jan D." Newsgroups: gmane.emacs.devel Subject: Re: [patch] enhanced mac drag-n-drop Date: Mon, 11 Apr 2005 21:39:11 +0200 Message-ID: <425AD25F.7030406@swipnet.se> References: <4ffa2515937474fb5129bf6781413018@swipnet.se> <639109ba1cd24c3d44f3795e1ca42d33@swipnet.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1113248462 19369 80.91.229.2 (11 Apr 2005 19:41:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 11 Apr 2005 19:41:02 +0000 (UTC) Cc: Sean O'Rourke , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 11 21:41:00 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DL4kZ-0002Wt-H9 for ged-emacs-devel@m.gmane.org; Mon, 11 Apr 2005 21:39:13 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DL4Kk-00066W-2J for ged-emacs-devel@m.gmane.org; Mon, 11 Apr 2005 15:12:30 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DL4KW-00065W-A2 for emacs-devel@gnu.org; Mon, 11 Apr 2005 15:12:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DL4KU-000658-Pn for emacs-devel@gnu.org; Mon, 11 Apr 2005 15:12:16 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DL4KU-0004fW-O0 for emacs-devel@gnu.org; Mon, 11 Apr 2005 15:12:14 -0400 Original-Received: from [195.54.107.73] (helo=mxfep02.bredband.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DL4nZ-00057F-1I; Mon, 11 Apr 2005 15:42:17 -0400 Original-Received: from coolsville.localdomain ([83.226.180.210] [83.226.180.210]) by mxfep02.bredband.com with ESMTP id <20050411193946.DBPS22685.mxfep02.bredband.com@coolsville.localdomain>; Mon, 11 Apr 2005 21:39:46 +0200 User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en Original-To: Jason Rumney In-Reply-To: X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:35870 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:35870 Jason Rumney wrote: >"Jan D." writes: > > > >>We should break out what you can use in a general dnd.el file. The >>x-dnd.el currently contains both general DND handling and protocol >>specifics. I'll look at what the w32 code uses and try to generalize >>it more. >> >> > >The code is in term/w32-win.el. I only used one function from >x-dnd.el, but I think I basically rewrote another function with minor >changes, so it may be possible to generalize that. Also a full dnd >implementation on w32 could probably use more from x-dnd.el if someone >were to contribute the necessary COM code to generate the more complex >events, so generalizing as much as you can would help in the long term. > I've done a small generalization, in the new file dnd.el. The idea is that platform specific parts call functions in this file. I've changed dired.el and w32-win.el (but not tested on w32). I'm not sure how things work on w32, but I think dropping on a dired buffer will copy a file to the dired directory on w32 as well now. The only thing a user can customize that is general on all platforms is the dnd-protocol-alist. Now, I know that it is hard to cover all cases with such a simple selection mechanism, For example, files may be image files, shall the image be created in Emacs? What is the url of a sound clip that is dropped? The X DND mechanism gives the types of items dropped, but I don't know what other platforms use for types, so it is hard for me to generalize this part. And I don't want to add complexity until we need it. Jan D.