From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Pfeiffer Newsgroups: gmane.emacs.bugs Subject: bug#12419: Mouse click changes layout Date: Sun, 23 Sep 2012 23:56:06 +0200 Message-ID: <505F8576.8070902@t-online.de> References: <504FB55D.5030405@t-online.de> <5050432C.4060203@gmx.at> <5052450F.8030001@t-online.de> <5052F242.4060303@gmx.at> <5055D769.1060804@t-online.de> <50561046.60902@gmx.at> <505E1FB6.1050504@t-online.de> <505ED4AB.7070009@gmx.at> Reply-To: occitan@esperanto.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1348437442 10711 80.91.229.3 (23 Sep 2012 21:57:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 23 Sep 2012 21:57:22 +0000 (UTC) Cc: occitan@esperanto.org, 12419@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 23 23:57:26 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TFuAz-00077R-Kd for geb-bug-gnu-emacs@m.gmane.org; Sun, 23 Sep 2012 23:57:21 +0200 Original-Received: from localhost ([::1]:33794 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TFuAv-0005ui-0v for geb-bug-gnu-emacs@m.gmane.org; Sun, 23 Sep 2012 17:57:17 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58629) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TFuAr-0005uc-DF for bug-gnu-emacs@gnu.org; Sun, 23 Sep 2012 17:57:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TFuAq-0004Ku-0C for bug-gnu-emacs@gnu.org; Sun, 23 Sep 2012 17:57:13 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42057) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TFuAp-0004Kp-TB for bug-gnu-emacs@gnu.org; Sun, 23 Sep 2012 17:57:11 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TFuCb-00006v-MK for bug-gnu-emacs@gnu.org; Sun, 23 Sep 2012 17:59:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Pfeiffer Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 23 Sep 2012 21:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12419 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12419-submit@debbugs.gnu.org id=B12419.1348437482360 (code B ref 12419); Sun, 23 Sep 2012 21:59:01 +0000 Original-Received: (at 12419) by debbugs.gnu.org; 23 Sep 2012 21:58:02 +0000 Original-Received: from localhost ([127.0.0.1]:51603 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFuBe-00005l-0v for submit@debbugs.gnu.org; Sun, 23 Sep 2012 17:58:02 -0400 Original-Received: from mailout05.t-online.de ([194.25.134.82]:35191) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TFuBb-00005L-8N for 12419@debbugs.gnu.org; Sun, 23 Sep 2012 17:58:01 -0400 Original-Received: from fwd11.aul.t-online.de (fwd11.aul.t-online.de ) by mailout05.t-online.de with smtp id 1TFu9n-0007ZY-3D; Sun, 23 Sep 2012 23:56:07 +0200 Original-Received: from [192.168.178.34] (VgmW2-ZA8hl-0uIGZhnuEEqOGXchL5c0A437onYf+IEpuMy+YDMuYo7EpDBLmWVggM@[84.176.160.36]) by fwd11.t-online.de with esmtp id 1TFu9m-1GXf6G0; Sun, 23 Sep 2012 23:56:06 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120827 Thunderbird/15.0 In-Reply-To: <505ED4AB.7070009@gmx.at> X-ID: VgmW2-ZA8hl-0uIGZhnuEEqOGXchL5c0A437onYf+IEpuMy+YDMuYo7EpDBLmWVggM X-TOI-MSGID: db1cb6cd-b7a9-4d29-837b-3883f773667d X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:64829 Archived-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