From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: Drag and drop patch for X, please review. Date: 20 Jan 2004 11:34:21 +0900 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <200401171729.i0HHT1wq016912@stubby.bodenonline.com> <20040118004009.GA24635@fencepost> <2C5AAB61-49F7-11D8-A763-00039363E640@swipnet.se> <87isj90wm8.fsf@emptyhost.emptydomain.de> <0495BFCE-4A01-11D8-867D-00039363E640@swipnet.se> <20040118230856.GA12299@fencepost> <21F6574D-4AC0-11D8-BCBC-00039363E640@swipnet.se> Reply-To: Miles Bader NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1074570041 16213 80.91.224.253 (20 Jan 2004 03:40:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 20 Jan 2004 03:40:41 +0000 (UTC) Cc: Kai Grossjohann , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Jan 20 04:40:28 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 1Aimke-0003Q1-00 for ; Tue, 20 Jan 2004 04:40:28 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1Aimkd-0007zO-00 for ; Tue, 20 Jan 2004 04:40:27 +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 1Aimih-0003mS-Il for emacs-devel@quimby.gnus.org; Mon, 19 Jan 2004 22:38:27 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AimfJ-0002eH-OY for emacs-devel@gnu.org; Mon, 19 Jan 2004 22:34:57 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1Aim0h-0000q0-MX for emacs-devel@gnu.org; Mon, 19 Jan 2004 21:53:39 -0500 Original-Received: from [202.32.8.214] (helo=TYO201.gate.nec.co.jp) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Ailit-0004EL-Go; Mon, 19 Jan 2004 21:34:35 -0500 Original-Received: from mailgate4.nec.co.jp (mailgate54.nec.co.jp [10.7.69.195]) by TYO201.gate.nec.co.jp (8.11.7/3.7W01080315) with ESMTP id i0K2YSc29944; Tue, 20 Jan 2004 11:34:28 +0900 (JST) Original-Received: (from root@localhost) by mailgate4.nec.co.jp (8.11.7/3.7W-MAILGATE-NEC) id i0K2YSi28293; Tue, 20 Jan 2004 11:34:28 +0900 (JST) Original-Received: from edsgm01.lsi.nec.co.jp ([10.50.208.11]) by mailsv4.nec.co.jp (8.11.7/3.7W-MAILSV4-NEC) with ESMTP id i0K2YRt27976; Tue, 20 Jan 2004 11:34:27 +0900 (JST) Original-Received: from mcsss2.ucom.lsi.nec.co.jp (localhost [127.0.0.1]) by edsgm01.lsi.nec.co.jp (8.9.3p2+3.2W/3.7W_EDC_Ver.1.0) with ESMTP id LAA21278; Tue, 20 Jan 2004 11:34:23 +0900 (JST) Original-Received: from mcspd15 (mcspd15 [10.30.114.174]) by mcsss2.ucom.lsi.nec.co.jp (8.12.10/8.12.8/EDcg v2.01-mc/1046780839) with ESMTP id i0K2YMnX016804; Tue, 20 Jan 2004 11:34:22 +0900 (JST) Original-Received: by mcspd15 (Postfix, from userid 31295) id CDFC974B; Tue, 20 Jan 2004 11:34:21 +0900 (JST) Original-To: "Jan D." System-Type: i686-pc-linux-gnu Blat: Foop In-Reply-To: <21F6574D-4AC0-11D8-BCBC-00039363E640@swipnet.se> Original-Lines: 28 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:19316 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:19316 "Jan D." writes: > The DND-TYPE is not unique. That is, when I drop a file from say the > Gnome file manager, I have several types to choose from, for example, > text/uri-list, text/plain, UTF8_STRING, and some more. If a user is > going to be able to make an intelligent choice, I'd assume he wants to > look at all acceptable types as a group. Well why not do so then? I.e., pass a list of all the acceptable types as a list to the TEST-FUN. > Also, there are several types out there that a user can add to the > alist that the current suggestion just ignores (say application/xml or > just about any unknown type). How do we determine which of these are > more specific? If it's hard for the calling code to order the possible types, you could use a simple ordered list instead of an alist, e.g., with entries like (TEST-FUN . DROP-FUN), TEST-FUN being called with a _list_ of the available types (+ other info), and the first test returning non-nil causing the corresponding DROP-FUN to be called. As a convenience, you could also allow TEST-FUN to be a string, and consider it to match if the list of types contains it (or whatever). -Miles -- Come now, if we were really planning to harm you, would we be waiting here, beside the path, in the very darkest part of the forest?