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: Sun, 18 Jan 2004 18:08:56 -0500 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <20040118230856.GA12299@fencepost> 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> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1074467741 19111 80.91.224.253 (18 Jan 2004 23:15:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 18 Jan 2004 23:15:41 +0000 (UTC) Cc: Kai Grossjohann , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Jan 19 00:15:37 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 1AiM8n-0001Sv-00 for ; Mon, 19 Jan 2004 00:15:37 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AiM8f-0007hP-00 for ; Mon, 19 Jan 2004 00:15:37 +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 1AiM53-00015J-HY for emacs-devel@quimby.gnus.org; Sun, 18 Jan 2004 18:11:45 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AiM4X-00013f-Kl for emacs-devel@gnu.org; Sun, 18 Jan 2004 18:11:13 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AiM41-0000eb-5t for emacs-devel@gnu.org; Sun, 18 Jan 2004 18:11:12 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AiM40-0000eL-Vi for emacs-devel@gnu.org; Sun, 18 Jan 2004 18:10:40 -0500 Original-Received: from miles by fencepost.gnu.org with local (Exim 4.24) id 1AiM2K-0003vY-OO; Sun, 18 Jan 2004 18:08:56 -0500 Original-To: "Jan D." Content-Disposition: inline In-Reply-To: <0495BFCE-4A01-11D8-867D-00039363E640@swipnet.se> User-Agent: Mutt/1.3.28i Blat: Foop 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:19254 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:19254 On Sun, Jan 18, 2004 at 10:55:23PM +0100, Jan D. wrote: > >Well, err, the obvious idea is to have (DND-TYPE TEST FUNCTION) > >triples instead of pairs, where the TEST has an arg specifying where > >the drag is going to happen. > > I thought that would be too complex for a user to customize. For > example, However complex it is, it's certainly simpler than modifying a built-in hardwired function though! Anyway, I think the above sort of interface is easy enough for the customize package to manipulate, and it can offer a more user friendly interface. I'd suggest: (1) Make the alist entry be one of (DND-TYPE DROP-FUN TEST-FUN) or (DND-TYPE . DROP-FUN) with TEST-FUN being a test function that accepts the same args as DROP-FUN. Putting the TEST-FUN last makes it easier to omit. (2) If TEST-FUN is omitted/nil, default to some common formula like `in a writable text area' (3) Export the default test-function as a real function, so the user can call it from his code too (or use it explicitly in the alist, though of course that would be redundant). -Miles -- I'm beginning to think that life is just one long Yoko Ono album; no rhyme or reason, just a lot of incoherent shrieks and then it's over. --Ian Wolff