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 5743b74d4b 1/2: Improve mouse dragging Date: Fri, 13 May 2022 10:36:18 +0300 Message-ID: <83a6blope5.fsf@gnu.org> References: <83sfpfp5p1.fsf@gnu.org> <87sfpfx8j8.fsf@yahoo.com> <83ilqaq5o9.fsf@gnu.org> <87fsleykdp.fsf@yahoo.com> <83h75uq4id.fsf@gnu.org> <87bkw2yjeg.fsf@yahoo.com> <83ee0yq2pg.fsf@gnu.org> <8735hexoo3.fsf@yahoo.com> <83h75unf94.fsf@gnu.org> <87czghx67w.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23917"; 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 Fri May 13 09:40:22 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 1npPuP-00065b-SY for ged-emacs-devel@m.gmane-mx.org; Fri, 13 May 2022 09:40:22 +0200 Original-Received: from localhost ([::1]:38962 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1npPuN-0006dj-3t for ged-emacs-devel@m.gmane-mx.org; Fri, 13 May 2022 03:40:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51670) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1npPqP-0002xx-O4 for emacs-devel@gnu.org; Fri, 13 May 2022 03:36:17 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:55794) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1npPqP-0001uC-Ea; Fri, 13 May 2022 03:36:13 -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=5ZXrXK7VQ0AVsVMI2mBCUcc8xEfQF6aSVsDC/+HSw0E=; b=EmyyGdJiH3mE 1D5gJMYy+/I0zdndUdW5L1KO86WyiuCGV+vNjZ3UvsvbQuh9V76RUkn2Pxro38zUwZbSK8uSseN99 QXtkQRnJOBVS0s6yCY37ax/rIwuIGoa+cHfN2XUFiDYPrRN8GrS4R5NCa+BKcJS9MQNTjt3TVNVPY l7tu2PdncITpyb+FtlPhuXOktFmA2QpXAKdV3XMZaMmPckZkedCCK7LHnz7uhZPo5cr3hgND4Um0G hONfRmqYPVJOa8uwmru27dTVKT1iVgHBMxvPFMc8q5oUfq+6dycHlA5JvhfXNREDbwqJAlRQ7TiQJ 2ixFUFd9Y2wudFCpWlIEMg==; Original-Received: from [87.69.77.57] (port=1290 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 1npPqO-0007JR-7R; Fri, 13 May 2022 03:36:13 -0400 In-Reply-To: <87czghx67w.fsf@yahoo.com> (message from Po Lu on Fri, 13 May 2022 15:05:39 +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:289714 Archived-At: > From: Po Lu > Cc: emacs-devel@gnu.org > Date: Fri, 13 May 2022 15:05:39 +0800 > > Eli Zaretskii writes: > > > I'm not sure I understand. Do you remember the details of tis > > interference? If not, can you reimplement this using tooltip-show and > > string copying, and tell what problems that yields? I really don't > > want to have the tricky code that sets up colors in tooltip-show to be > > in more than one place, it's a maintenance problem waiting to happen. > > The immediate problem is that the tooltip contents get displayed in a > proportional font, which makes no sense when dragging monospace text. This can be countermanded by using a variant of tooltip-face that doesn't specify the variable-pitch inheritance. In general, though, the text should have the same typeface as the region you are dragging, right? IOW, if the region you are dragging uses variable-pitch, the tooltip should use that as well. I would suggest refactoring tooltip-show and possibly the 'tooltip' face as well, so that use of the variable-pitch attribute could be controlled by the caller if the tooltips are used for something other than their original goal. As currently implemented, tooltip-show is really unsuitable for being called in any other context, so our recommendation to use it, and not x-show-tip, effectively stands on the proverbial feet of clay. > IIRC there was also a problem involving `tooltip-hide-delay' and > help-echo events, but I don't remember the details of that well enough > to reproduce it. That is unfortunate. I'd really prefer that we could call tooltip-show in mouse.el, not x-show-tip. So if you can afford that, please try reproducing the problems, and let's convert mouse.el to using tooltip-show.