unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Po Lu <luangruo@yahoo.com>
Cc: emacs-devel@gnu.org
Subject: Re: master 5743b74d4b 1/2: Improve mouse dragging
Date: Fri, 13 May 2022 10:36:18 +0300	[thread overview]
Message-ID: <83a6blope5.fsf@gnu.org> (raw)
In-Reply-To: <87czghx67w.fsf@yahoo.com> (message from Po Lu on Fri, 13 May 2022 15:05:39 +0800)

> From: Po Lu <luangruo@yahoo.com>
> Cc: emacs-devel@gnu.org
> Date: Fri, 13 May 2022 15:05:39 +0800
> 
> Eli Zaretskii <eliz@gnu.org> 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.



  reply	other threads:[~2022-05-13  7:36 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-12  7:31 master 5743b74d4b 1/2: Improve mouse dragging Eli Zaretskii
2022-05-12 12:03 ` Po Lu
2022-05-12 12:47   ` Eli Zaretskii
2022-05-12 13:02     ` Po Lu
2022-05-12 13:12       ` Eli Zaretskii
2022-05-12 13:20         ` Eli Zaretskii
2022-05-12 13:25           ` Po Lu
2022-05-12 13:23         ` Po Lu
2022-05-12 13:51           ` Eli Zaretskii
2022-05-13  0:27             ` Po Lu
2022-05-13  6:00               ` Eli Zaretskii
2022-05-13  7:05                 ` Po Lu
2022-05-13  7:36                   ` Eli Zaretskii [this message]
2022-05-13  7:49                     ` Po Lu
2022-05-13 10:32                       ` Eli Zaretskii
2022-05-13 11:10                         ` Po Lu
2022-05-13 12:08                           ` Eli Zaretskii
2022-05-13 12:45                             ` Po Lu
2022-05-13 12:48                               ` Eli Zaretskii
2022-05-13 12:16                           ` Eli Zaretskii
2022-05-13 12:46                             ` Po Lu
2022-05-12 15:49       ` [External] : " Drew Adams
2022-05-13  0:28         ` Po Lu
2022-05-13  1:49           ` Drew Adams
2022-05-13  3:42             ` Po Lu
2022-05-13 15:30               ` Drew Adams
2022-05-14  0:56                 ` Po Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83a6blope5.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=luangruo@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).