From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: master a1a435b3f6: Respect test function when performing local drag-and-drop Date: Tue, 14 Jun 2022 14:21:57 +0300 Message-ID: <83fsk7trqi.fsf@gnu.org> References: <83tu8ou0xi.fsf@gnu.org> <87a6agawcs.fsf@yahoo.com> <83ilp4t1o8.fsf@gnu.org> <875yl4arfp.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21413"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jun 14 13:23:32 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o14du-0005Le-V2 for ged-emacs-devel@m.gmane-mx.org; Tue, 14 Jun 2022 13:23:31 +0200 Original-Received: from localhost ([::1]:51228 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o14dt-0001Oa-IC for ged-emacs-devel@m.gmane-mx.org; Tue, 14 Jun 2022 07:23:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50968) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o14cb-0000cn-Mu for emacs-devel@gnu.org; Tue, 14 Jun 2022 07:22:09 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:33122) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o14cb-0003Nt-EW; Tue, 14 Jun 2022 07:22:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=wrhpekyPze01GDhLCUuhInXn64G8kD98kINymLJwJFQ=; b=AZEImyQNnHZ1 TVlFnQt6m5tdbbE9kEZFKTlNEZ+MztetDTJ5Iv5+lDMQMTte/JBGexicTeo5wv4yBScz71uXbRm8z TtOgN0rdYinSYp810B/7TEDDXXabDdDaD88Wz3hckmnLow3FMiCPofvCaXZIjXhonFfe0/6tt/vRn gFPCXV+Eo7+oNV7sDOewKMAfdHaGJpStvA2YGO9MzQ4scc9grW3o43OcOXi0bgY3zhcktoZi6lgSY CVZYgmkRDCaF6h3/NX0/OpC186ZaaZEww8ClgWYuqm4RrTqx+YPP3HlnxZdAVZ/3xaNqlu66Pw2vl FbFzEjOpyjKs+CAmkmd8Eg==; Original-Received: from [87.69.77.57] (port=3071 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o14ca-0003Zd-UI; Tue, 14 Jun 2022 07:22:09 -0400 In-Reply-To: <875yl4arfp.fsf@yahoo.com> (message from Po Lu on Tue, 14 Jun 2022 10:51:06 +0800) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:291168 Archived-At: > From: Po Lu > Cc: emacs-devel@gnu.org > Date: Tue, 14 Jun 2022 10:51:06 +0800 > > How about this? > > Function called for the return value of `x-begin-drag' when dropping on a frame. > > It should accept two arguments POS and ACTION, and return a symbol > describing what to return from `x-begin-drag' if the drop happens on a > frame. POS is a mouse position list detailing the location of the drop, > and ACTION is the action specified by the caller of `x-begin-drag'. > > If nil or a non-symbol value is returned, the drop will be cancelled. Suggest a slight rewording: Function that determines return value of drag-and-drop on Emacs frames. If the value is a function, `x-begin-drag' will call it with two arguments, POS and ACTION, where POS is a mouse position list that specifies the location of the drop, and ACTION is the action specified by the caller of `x-begin-drag'. The function should return a symbol describing what to return from `x-begin-drag' if the drop happens on an Emacs frame. If the value is nil, or the function returns a value that is not a symbol, a drop on an Emacs frame will be canceled.