From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: mouse-drag-and-drop-region Date: Sat, 02 Dec 2017 11:16:57 +0100 Message-ID: <5A227D99.80001@gmx.at> References: <5A17E03C.4000304@gmx.at> <20171127.221126.1551780406743300719.tkk@misasa.okayama-u.ac.jp> <5A1D233B.1080803@gmx.at> <20171201.231604.2119730668205428159.tkk@misasa.okayama-u.ac.jp> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1512209858 1114 195.159.176.226 (2 Dec 2017 10:17:38 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 2 Dec 2017 10:17:38 +0000 (UTC) Cc: eliz@gnu.org, tak.kunihiro@gmail.com, agrambot@gmail.com, emacs-devel@gnu.org To: Tak Kunihiro Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 02 11:17:32 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eL4rO-00084o-3Z for ged-emacs-devel@m.gmane.org; Sat, 02 Dec 2017 11:17:27 +0100 Original-Received: from localhost ([::1]:35046 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eL4rT-0005Ue-O2 for ged-emacs-devel@m.gmane.org; Sat, 02 Dec 2017 05:17:31 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51428) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eL4rI-0005Rf-FO for emacs-devel@gnu.org; Sat, 02 Dec 2017 05:17:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eL4rF-0005lf-AC for emacs-devel@gnu.org; Sat, 02 Dec 2017 05:17:20 -0500 Original-Received: from mout.gmx.net ([212.227.17.21]:52050) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eL4rE-0005l8-W5; Sat, 02 Dec 2017 05:17:17 -0500 Original-Received: from [192.168.1.100] ([46.125.250.88]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0Mcyxq-1ec3m11bqU-00IHWm; Sat, 02 Dec 2017 11:17:03 +0100 In-Reply-To: <20171201.231604.2119730668205428159.tkk@misasa.okayama-u.ac.jp> X-Provags-ID: V03:K0:qX/MePMENAOpvMpAsRNYisOUKeomUd798rs0uAlykTnnOrZNeyG hRAToXlFJ5SMRpxStJqoI0byYYLRHmCge83f9GMY+DObVU+ML72bB/+Qs1oegnsNTpYu0CY TqChKNvUPklDaKI2SKe5tniNgNnXqOB09X4LiJwRswEClEMrrsnYtM6nUevIbytJXXtUZRK kC9NL7Ttqk8oQqx/f7lHQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:1/e233U4rAI=:xyR9OyeGFZivAHLwMJyZMm xGZrVJaHfRk6pxPkhLtNEGHnjqvW22oqYfOEau5jv9CNbbZ/NvJ+kyytsCQteMdsPNf8yh2YS pfy3DTloduMb5KKFlEhCW94YMGMT4ikvO7uo8Ev2B+Ve4KPGi0ufOnjRCCDoSzy2jpmgHHvm4 XjqGXA0kEq3MJh0fYMboQfo8o7rYznFNGjwvTV9g5kLqTGA2kUM9Mr+kv7Qi7gJQhC2C8Q5yR j2HmKAXsPuZawFwUmbjGBYZeNxoBegpdXjb8kKjmecPCuPpP0ntAgAnaQhrTOP+d5PginSiaP ZhWQx0GTAqqTGO1gsS64rHjslDzIFgQcPAc+0RLA6hggIAtzWKk2P3hjv+fRzzG2hITIEaipz mTrJdF+BeYRwEnkk/VIZUnUvQU/yEFS7QBxpnz184jlSSiMIv1n9HN4kqkQbJYpsgVxZFAmUI 980NpwfDM1W2y2WGo9UTR/Jm1tS4RaLmp2jao470Lz+zQ6Uz7VNnzl82KovD8QHDpaZodGssj pDtkzkOyJGVzRGiZme73bvyntP94+h9Ku5qRjBLax4oTJZm68iUjjOC1+6UoGcPi31dR/1H+Z AleZ0mYRAdJ90YeUBlyjJQ12g38OhL587pwmP4/wT/kz1oMXCF8MNlafe96jKnS5zvzl60qd4 TuW70z9BTkdhrAq/jeOX5nrz8MLwXwJzigP+w4ZqJ6W0k2nCR03cd/GRPd9Nu92TOj6no11AT y5CDMlgUxl/zVYhP/Dap1S4Doy+IpPgqQ8ZgnblwdilOJ5jWGLvl0KJM9JwC1uhqCAvjp1Av X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.17.21 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:220612 Archived-At: > I re-re-revised mouse-drag-and-drop-region. I'm sending replay to > https://lists.gnu.org/archive/html/emacs-devel/2017-11/msg00663.html, > ChangeLog, and patch. Thank you. Still, please consider sending patches as attachments so applying them is simpler. > OK. A new variable `mouse-drag-and-drop-region-show-cursor' is > defined. Please note that the first line of a doc string may contain complete sentences only. You could write something like (defvar mouse-drag-and-drop-region-show-cursor t "If non-nil, move point with mouse cursor during dragging. In addition, highlight the original region with `mouse-drag-and-drop-region-face'.") > Now the code checks if cursor is on the text area. If not, it restore > the initial region. I'm not sure to tell "Drop failed" is a good > idea. When an user wants to undo the drag, he may drag to toolbar. > Restore the initial region is what is expected. The code for now does > not tell the message. OK. But the code fails to poperly restore the previous cursor type when the drop fails. For example when with emacs -Q I evaluate (progn (setq mouse-drag-and-drop-region t) (setq mouse-drag-and-drop-region-show-cursor t) (display-buffer "*Messages*")) mark some text in the *scratch* buffer and accidentally drag-and-drop it on the mode line of the *Messages* buffer, the cursor in the *Messages* buffer disappears. I think you have to remember the old cursor type and make sure it gets restored whatever happens. martin