From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alex Newsgroups: gmane.emacs.devel Subject: Re: mouse-drag-and-drop-region Date: Tue, 14 Nov 2017 14:17:25 -0600 Message-ID: <874lpwobsa.fsf@gmail.com> References: <5A0ABD41.5040402@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1510690728 21578 195.159.176.226 (14 Nov 2017 20:18:48 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 14 Nov 2017 20:18:48 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) Cc: Eli Zaretskii , tak.kunihiro@gmail.com, emacs-devel To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 14 21:18:44 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 1eEhfL-00054C-QS for ged-emacs-devel@m.gmane.org; Tue, 14 Nov 2017 21:18:40 +0100 Original-Received: from localhost ([::1]:33438 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eEhfR-0006gm-Oc for ged-emacs-devel@m.gmane.org; Tue, 14 Nov 2017 15:18:45 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33969) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eEheM-0006SA-L1 for emacs-devel@gnu.org; Tue, 14 Nov 2017 15:17:39 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eEheL-0004uA-JJ for emacs-devel@gnu.org; Tue, 14 Nov 2017 15:17:38 -0500 Original-Received: from mail-it0-x22e.google.com ([2607:f8b0:4001:c0b::22e]:52657) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eEheG-0004rt-1b; Tue, 14 Nov 2017 15:17:32 -0500 Original-Received: by mail-it0-x22e.google.com with SMTP id n134so11493983itg.1; Tue, 14 Nov 2017 12:17:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-transfer-encoding; bh=uNikW6ncs2KNM+SVd+GdHpQmeSYDpTi+VIAC2/JCwXg=; b=sjEescqbHeFMjMItmsLYXVoCVnGOuxVhi4H2RJkOn46lwcz0fCB2jfz4WfvDMXusg8 YIWCmbZ6TPPhN5fd5oCFLdyTg9EpXGfESHynIncSmiQFQiYCDR2rHtl4RYyh78fwfwrH WxHxEAnfmVKISW2ymtSkBeNUq0NM/zY1MValBR0XLGS3ydcAdDCDIIcs9esHT+8dL4E/ 52Neac4PStFTOLNtTObb2s1v1yHa7o6duR0iTyY9p42zUuxI6uwqZyC1zeJXbjB9AYFe NaHeTXUsnaNfcm5JxcZr2nyl7frW3b5xUU7EbbnEEiIoQpd9iFZgNZeL3qzYy4MxkbOG GGGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references :user-agent:date:message-id:mime-version:content-transfer-encoding; bh=uNikW6ncs2KNM+SVd+GdHpQmeSYDpTi+VIAC2/JCwXg=; b=Me0K5Vyu2h9SNkrezp6nfVeacOp71doR8/aCzTdHunG1wydIEVB9hOI/Zz6w9H0t91 40I6wXfDBSUX8pAgoCVSEr9RmUsx6WJEk4WPXesrapyW6gwjRzwznreWoWrqqyLniqSl 6Ucj9o4vQuW/iLbH0bcF3f/XFn5k7UhiIrlnwmJwovhC2GOSdsf0vwnN6/ZnCx4v6yzl QT+NOJPppWiONi0Tt8OljtPa3nGRX/FoTh+23fNeRi7lBswqhzXmPSuqqr2pXYVDMvfD z/kajp5W70Qg2GCDdADPJQ0eOckNXr+0wrbrpvSSMFAUz4lcSNgO74AVAHRYhL4m/YbE TvQA== X-Gm-Message-State: AJaThX5yfnIZC6ZQfdDDkpP1BfqF0TRiTZJdNABQVFn35BwqJjIMck98 BBs6n3JX2xpagCv5Owg/ZbotEQ== X-Google-Smtp-Source: AGs4zMbWKsv2po/tUgzJi0QKx+MrhSBqWgVdhzF2CmiVjImnAouLB4pWQ+zbuMLwFYkk36NA5KV1sA== X-Received: by 10.36.178.3 with SMTP id u3mr15771223ite.77.1510690651079; Tue, 14 Nov 2017 12:17:31 -0800 (PST) Original-Received: from lylat (S010664777d9cebe3.ss.shawcable.net. [70.64.85.59]) by smtp.gmail.com with ESMTPSA id b66sm5772987itb.28.2017.11.14.12.17.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Nov 2017 12:17:29 -0800 (PST) In-Reply-To: <5A0ABD41.5040402@gmx.at> (martin rudalics's message of "Tue, 14 Nov 2017 10:54:09 +0100") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4001:c0b::22e 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:220197 Archived-At: martin rudalics writes: > Anyway, here are some comments: > > (1) Why does the value selection happen within the =E2=80=98track-mouse= =E2=80=99 form > and why do you delete the mouse overlay? That is, why don't we move > this part > > (unless value-selection ; initialization > (delete-overlay mouse-secondary-overlay) > (setq value-selection (buffer-substring start end)) > (move-overlay mouse-secondary-overlay start end)) ; (deactivate= -mark) > > right to the beginning so we have something like > > (let* ((start (region-beginning)) > (end (region-end)) > (point (point)) > (buffer (current-buffer)) > (window (selected-window)) > (value-selection (buffer-substring start end))) > (move-overlay mouse-secondary-overlay start end) > (track-mouse > ... > > there? I imagine that this has to do with inputting a non-mouse-movement event before moving the mouse at all. If you use your change and press "C-g" before moving the mouse, then the region will still be pasted. Doing the above without your change currently results in an error due to `insert' using a nil `value-selection', though. So it's faulty either way. > (3) Showing tooltips can be distracting and should be optional. Note > also, that usurping tooltips this way may prevent them from showing > interesting properties of the drop area like whether the text there > is read only. OTOH we might consider retaining properties of the > text in (non-GTK) tooltips. Also, trying to use `tooltip-show' in text-terminals using `xterm-mouse-mode' yields a lot of "Error while displaying tooltip" messages. > I think (8) and (9) should be fixed before the release. As for future > releases we might also consider a =E2=80=98set-transient-map=E2=80=99 bas= ed solution. Perhaps (3) should be fixed before release as well (at least disabling tooltips when they can't be shown)? Eli, would it be okay to make the same `read-event' -> `read-key' change (specific to xt-mouse as in Bug#29150) here as well to tide over until the function uses `set-transient-map'? This appears to be the last `read-event' present in mouse.el to get rid of.