all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Daniel Pfeiffer <occitan@t-online.de>
To: martin rudalics <rudalics@gmx.at>
Cc: occitan@esperanto.org, 12419@debbugs.gnu.org
Subject: bug#12419: Mouse click changes layout
Date: Sun, 23 Sep 2012 23:56:06 +0200	[thread overview]
Message-ID: <505F8576.8070902@t-online.de> (raw)
In-Reply-To: <505ED4AB.7070009@gmx.at>

Hi Martin,

thanks for going into so much detail!

la 09/23/2012 11:21 AM martin rudalics skribis:
> >> Can you try the attached patch?
> >
> > I now did, but in neither split direction anything seems to have changed
> > from what I described before.
>
> Let's look at your first scenario with emacs -Q: Do
>
> C-x 2
>
> C-x o
>
> and in the lower window insert the form
>
> (message (make-string 1000 ?a))
>
> so the buffer *scratch* now contains this text:
>
>
> ;; This buffer is for notes you don't want to save, and for Lisp evaluation.
> ;; If you want to create a file, visit that file with C-x C-f,
> ;; then enter the text in that file's own buffer.
>
> (message (make-string 1000 ?a))
>
>
> Now evaluate the form inserted - the minibuffer window resizes and the
> divider line between the upper and lower normal window moves up. Still
> in the lower window press the left mouse button down (but don't release
> it) with the mouse pointer on the "1" of the "1000".  Now release the
> left mouse button and the region starting with the word "notes" up to
> the space before "1000" gets higlighted.
>
> This is the behavior I observe with an unpatched Emacs trunk. With the
> patch, the divider line between the upper and lower window does not move
> and there's no region highlighting when I release the mouse button.

Well, you have me dumbfounded here.  To be honest I actually tried your patch 
in my configured Emacs.  Since it didn't seem to catch on, I even opened the 
file, and reevaluated the defun you patched. Now however I can no longer 
reproduce it even there :-(  Shame on me, I'm clueless...

However my first informatics lesson the professor told us: the most common bug 
is being off by one.  That is alas still the case with your patch: After C-x 2 
the lower window is one row higher than the upper one.  After our little 
experiment, it's the other way round, with this result:  When letting go of 
the mouse, I still marked to the line above, which is now in the position of 
my mouse-down event.  Sounds like an integer division rounding problem, though 
I don't see such a thing in your patch.  If both windows together have an even 
number of rows (by resizing the frame) it's fine.

If however I split either of the two windows again (even the top one, which is 
out of reach of the resizing echo area) the disturbing new before-your-patch 
behaviour comes back.

> The second scenario you sketched is
>
> > Independently of resizing, something similar happens for sideways
> > scrolling: Split *scratch* vertically, click on the v of visit, nothing
> > happens (that's where it dffers).  But then move the mouse 1 char right,
> > this triggers a sideways scroll.  The mouse is now over the e of file.
> > When letting go, it marks "visit that fil" but worse, it scrolls yet
> > again by the same amount, so that the mouse is now at the end of the
> > line, far from the text it marked.
>
> I suppose what you mean here with emacs -Q is:
>
> C-x 3
>
> Now if I click in any of the two windows on the "v" of the word "visit",
> I get the same sideways scroll behavior with my Emacs 23.3, Emacs 24.1
> and the current trunk regardless of how long I keep the button pressed.

The point is moving the mouse over to the i, which causes the 1st scroll, and 
then letting go, which causes the scrolled region to be marked, plus it causes 
a 2nd scroll by the same amount.  So the point is now far from the highlighted 
part.  I guess this comes from a different code location.  Only the user 
experience feels to me like both cases should be consistent with one another.

coralament / best Grötens / liebe Grüße / best regards / elkorajn salutojn
Daniel Pfeiffer

-- 
lerne / learn / apprends / lär dig / ucz się    Esperanto:
                     http://lernu.net  /  http://ikurso.net






  reply	other threads:[~2012-09-23 21:56 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-11 22:04 bug#12419: Mouse click changes layout Daniel Pfeiffer
2012-09-12  2:59 ` Eli Zaretskii
2012-09-12  8:09 ` martin rudalics
2012-09-13 20:41   ` Daniel Pfeiffer
2012-09-14  9:00     ` martin rudalics
2012-09-14 10:36       ` Eli Zaretskii
2012-09-14 13:38         ` martin rudalics
2012-09-14 14:10           ` Drew Adams
2012-09-14 15:08             ` martin rudalics
2012-09-14 16:18               ` Drew Adams
2012-09-14 19:14                 ` martin rudalics
2012-09-14 19:40                   ` Drew Adams
2012-09-15  9:51                     ` martin rudalics
2012-09-15 10:31                       ` martin rudalics
2012-09-14 14:53           ` Eli Zaretskii
2012-09-14 15:16             ` martin rudalics
2012-09-14 16:20               ` Drew Adams
2012-09-14 19:14                 ` martin rudalics
2012-09-14 16:56               ` Eli Zaretskii
2012-09-14 19:15                 ` martin rudalics
2012-09-14 20:16                   ` Eli Zaretskii
2012-09-15  9:54                     ` martin rudalics
2012-09-15 10:23                       ` Eli Zaretskii
2012-09-15 10:39                         ` martin rudalics
2012-09-15 11:14                           ` Eli Zaretskii
2012-09-15 12:44                             ` martin rudalics
2012-09-15 13:35                               ` Eli Zaretskii
2012-09-15 14:34                                 ` martin rudalics
2012-09-14 15:45             ` Stefan Monnier
2012-09-14 19:14               ` martin rudalics
2012-09-14 19:56                 ` Stefan Monnier
2012-09-15  9:51                   ` martin rudalics
     [not found]       ` <5055D769.1060804@t-online.de>
2012-09-16 17:45         ` martin rudalics
2012-09-22 20:29           ` Daniel Pfeiffer
2012-09-23  9:21             ` martin rudalics
2012-09-23 21:56               ` Daniel Pfeiffer [this message]
2012-09-24  8:17                 ` martin rudalics
2012-09-24 14:33                   ` Eli Zaretskii
2012-09-25  9:58                     ` martin rudalics
2012-09-25 12:09                       ` Eli Zaretskii
2012-09-25 14:12                         ` martin rudalics
2012-09-26  8:22                           ` Eli Zaretskii
2012-09-26 11:03                             ` martin rudalics
2012-09-26 11:55                               ` Eli Zaretskii
2012-09-26 12:43                                 ` martin rudalics
2012-09-26 13:17                                   ` Eli Zaretskii
2012-09-26 13:44                                     ` martin rudalics
2012-09-26 13:57                                       ` Eli Zaretskii
2012-09-24 22:20                   ` Daniel Pfeiffer
2012-09-25  6:32                     ` Eli Zaretskii
2012-09-25  9:58                     ` martin rudalics
2020-09-13 17:06               ` Lars Ingebrigtsen
2020-12-07 16:43                 ` Lars Ingebrigtsen

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=505F8576.8070902@t-online.de \
    --to=occitan@t-online.de \
    --cc=12419@debbugs.gnu.org \
    --cc=occitan@esperanto.org \
    --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.