From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Drag and drop patch for X, please review. Date: Wed, 21 Jan 2004 16:09:16 -0500 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <200401171729.i0HHT1wq016912@stubby.bodenonline.com> <9616315C-49F9-11D8-A763-00039363E640@swipnet.se> <66F4EDBB-4AC4-11D8-BCBC-00039363E640@swipnet.se> <3E8D86E4-4B60-11D8-A9EB-00039363E640@swipnet.se> Reply-To: rms@gnu.org NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1074719939 22008 80.91.224.253 (21 Jan 2004 21:18:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 21 Jan 2004 21:18:59 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed Jan 21 22:18:53 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AjPkT-0002PP-00 for ; Wed, 21 Jan 2004 22:18:53 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AjPkT-0007jL-00 for ; Wed, 21 Jan 2004 22:18:53 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AjPjn-0003ab-GY for emacs-devel@quimby.gnus.org; Wed, 21 Jan 2004 16:18:11 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AjPfh-0002E9-Cf for emacs-devel@gnu.org; Wed, 21 Jan 2004 16:13:57 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AjPdF-0001E0-P3 for emacs-devel@gnu.org; Wed, 21 Jan 2004 16:11:57 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AjPdE-0001Cy-EN for emacs-devel@gnu.org; Wed, 21 Jan 2004 16:11:24 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.24) id 1AjPbA-0003Eg-JW; Wed, 21 Jan 2004 16:09:16 -0500 Original-To: "Jan D." In-reply-to: <3E8D86E4-4B60-11D8-A9EB-00039363E640@swipnet.se> (jan.h.d@swipnet.se) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:19414 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:19414 Maybe, but then dired would have to have code to handle all the details of all drag and drop protocols, basically all the code that is in the new file x-dnd.el and more since I haven't added Motif and OpenWindows It could perhaps call a subroutine that does most of the work, but with a different argument from the one used globally. Or the global command could generate and unread a modified event, which would then be looked up in turn. Thinking about it, it would actually not do the job. Because if the drag enters Emacs in a non-dired buffer, dired would not see the XdndEnter message. Later on when the mouse travels to a dired buffer, dired would just see a XdndPosition message, and that is not enough. Which of these messages causes the Lisp-level drag-n-drop event? I would guess it is the last message that does so. Also, we are not selecting the buffers that the mouse travels over when doing a drop, so a local binding would have no effect if another buffer is selected when the drag starts. The time to look up the proper key binding is when the drop *ends*, and only then. It is not hard to get the key bindings for a given place on the Emacs frame. We do that for mouse clicks, we could do it here too. The reason for not selecting the buffer the mouse is over is that a drag can be aborted, It certainly should not select the buffer. There is no need for that.