all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: martin rudalics <rudalics@gmx.at>
Cc: acm@muc.de, 48409@debbugs.gnu.org, juri@linkov.net
Subject: bug#48409: Text runs away before user can copy it
Date: Sun, 30 May 2021 15:44:00 +0000	[thread overview]
Message-ID: <YLOywAQh/dszhXhX@ACM> (raw)
In-Reply-To: <YKjuGtThrAFPwhmG@ACM>

Hello, Martin.

The conversation about this bug has gone a bit quiet.  It seems neither
of us has got much more to say about it.

I propose committing my patch in the next day or two.  If there's
anything more to say about it, please let me know, soon.  Thanks!


On Sat, May 22, 2021 at 11:42:18 +0000, Alan Mackenzie wrote:
> On Sat, May 22, 2021 at 10:05:05 +0200, martin rudalics wrote:
> >  > I've been laboriously working out a patch, too, and have come up
> >  > with the one below.  It takes a surprisingly similar approach to
> >  > your own patch [snipped], but doesn't test for a minibuffer, so
> >  > perhaps is more general.  I didn't actually study your patch till my
> >  > own was nearly finished.

> > I didn't include the minibuffer check initially.  But since I can't
> > think of any other occasion where we would change window coordinates in
> > between a down and up event, I thought it's cheaper to use it.

> I can't think of any other sensible use where the window layout might
> change, either.  But if somebody puts a command on down-mouse-1 which
> does this, we might end up generating a spurious drag event.  It's
> difficult to predict precisely what people might do with Emacs.

> >  > To detect mouse movement, my patch changes from comparing window
> >  > relative x, y to frame relative x, y.

> > In order to identify clicks on the bottom line, I check whether the top
> > y-coordinate of the (mini-)window has changed.  If it has changed, I
> > simply declare that no mouse movement occurred.  Comparing frame
> > relative coordinates is cleaner at the expense of having to store them
> > always for each button down event.

> Yes.  Such are the decisions one has, somewhat arbitrarily, to make.  ;-)

> >  > If the code detects no movement, but a different window, the
> >  > position of the up event is changed to be inside the window of the
> >  > down event.

> > I didn't check that part but I think that using `window-edges' here is
> > slightly over-engineered.

> I was considering using the available C functions, but in the end decided
> it was too much bother.  ;-(  At least the processing here isn't
> time-critical.

> > OTOH, it gives you the body of the minibuffer window at no cost.  So
> > I'm undecided what's better.  Am I right that you return a position
> > near the upper right corner of the window?  If so why?

> No, I don't think that's the case.  If the up event position is outside
> the window, I move it to the nearest border (at a left/top border, or (1-
> border) for a right/bottom border).

> > Finally, I'm now completely lost wrt what our patches are trying to
> > achieve.  Ruling out drag events when there are none is not a bad idea.

> I think it's a good idea.  Diagnosing the original symptoms was quite a
> bit harder than for most bugs, so it would be good to try to avoid
> similar things happening again.

> > But do we really want to show echo area messages even when there is no
> > echo in the first place?

> You mean, is view-echo-area-messages really a sensible command to bind to
> mouse-1?  I wasn't actually aware of this facility until Juri (or was it
> Drew?) pointed it out in the bug report.  It's not something I use myself
> (on a Linux tty with gpm-mouse-mode disabled).

> > Or am I missing something?

> I don't think so.

> > martin

-- 
Alan Mackenzie (Nuremberg, Germany).





  parent reply	other threads:[~2021-05-30 15:44 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-14  6:32 bug#48409: Text runs away before user can copy it 積丹尼 Dan Jacobson
2021-05-14  7:07 ` Eli Zaretskii
2021-05-14 17:58   ` Juri Linkov
2021-05-14 18:46     ` Eli Zaretskii
2021-05-15 12:29       ` 積丹尼 Dan Jacobson
2021-05-15 12:34         ` Eli Zaretskii
2021-05-14 19:45     ` Eli Zaretskii
2021-05-14 19:51       ` bug#48409: [External] : " Drew Adams
2021-05-14 20:13       ` Eli Zaretskii
2021-05-14 20:53         ` Alan Mackenzie
2021-05-15  5:56           ` Eli Zaretskii
2021-05-15 11:15             ` Alan Mackenzie
2021-05-17 20:53       ` Juri Linkov
2021-05-18 13:13         ` Eli Zaretskii
2021-05-18 18:42           ` Alan Mackenzie
2021-05-18 19:05             ` Eli Zaretskii
2021-05-18 20:23               ` Alan Mackenzie
2021-05-19 12:12                 ` Eli Zaretskii
2021-05-19 15:49                   ` Alan Mackenzie
2021-05-19 17:40                 ` martin rudalics
2021-05-20 16:54                   ` martin rudalics
2021-05-21 20:55                     ` Alan Mackenzie
2021-05-22  8:05                       ` martin rudalics
2021-05-22 11:42                         ` Alan Mackenzie
2021-05-22 14:36                           ` martin rudalics
2021-05-22 15:12                             ` Eli Zaretskii
2021-05-22 16:36                               ` martin rudalics
2021-05-30 15:44                           ` Alan Mackenzie [this message]
2021-05-31  7:55                             ` martin rudalics
2021-05-31 10:44       ` Alan Mackenzie

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

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

  git send-email \
    --in-reply-to=YLOywAQh/dszhXhX@ACM \
    --to=acm@muc.de \
    --cc=48409@debbugs.gnu.org \
    --cc=juri@linkov.net \
    --cc=rudalics@gmx.at \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.