From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: gabriele balducci Newsgroups: gmane.emacs.bugs Subject: bug#4023: mwheel.el uses (point) instead of point-before-scroll Date: Mon, 03 Aug 2009 18:26:51 +0200 Message-ID: <22673.1249316835@dschgrazlin2.units.it> Reply-To: balducci@univ.trieste.it, 4023@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1249346756 11621 80.91.229.12 (4 Aug 2009 00:45:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Aug 2009 00:45:56 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 04 02:45:49 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MY8A0-0004bR-EQ for geb-bug-gnu-emacs@m.gmane.org; Tue, 04 Aug 2009 02:45:48 +0200 Original-Received: from localhost ([127.0.0.1]:55527 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MY89z-0004h0-Ox for geb-bug-gnu-emacs@m.gmane.org; Mon, 03 Aug 2009 20:45:47 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MY0NF-0000ka-My for bug-gnu-emacs@gnu.org; Mon, 03 Aug 2009 12:26:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MY0NA-0000cI-Bi for bug-gnu-emacs@gnu.org; Mon, 03 Aug 2009 12:26:56 -0400 Original-Received: from [199.232.76.173] (port=58844 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MY0NA-0000c2-4C for bug-gnu-emacs@gnu.org; Mon, 03 Aug 2009 12:26:52 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:50862) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MY0N7-000688-G5 for bug-gnu-emacs@gnu.org; Mon, 03 Aug 2009 12:26:49 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n73GQkPl013118; Mon, 3 Aug 2009 09:26:47 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n73GA9Si010992; Mon, 3 Aug 2009 09:10:09 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: gabriele balducci Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 03 Aug 2009 16:10:08 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: report 4023 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12493153949458 (code B ref -1); Mon, 03 Aug 2009 16:10:08 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 3 Aug 2009 16:03:14 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n73G36KM009447 for ; Mon, 3 Aug 2009 09:03:08 -0700 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MY009-0004ZK-PS for bug-gnu-emacs@gnu.org; Mon, 03 Aug 2009 12:03:05 -0400 Original-Received: from [199.232.76.173] (port=45059 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MY007-0004YN-St for bug-gnu-emacs@gnu.org; Mon, 03 Aug 2009 12:03:04 -0400 Original-Received: from dschgrazlin2.univ.trieste.it ([140.105.55.81]:60450 helo=dschgrazlin2.units.it) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MY006-0000HM-Vw for bug-gnu-emacs@gnu.org; Mon, 03 Aug 2009 12:03:03 -0400 Original-Received: from localhost (loopback [127.0.0.1]) by dschgrazlin2.units.it (8.14.3/8.14.3) with ESMTP id n73GQqJE022678 for ; Mon, 3 Aug 2009 18:26:52 +0200 Original-Received: from dschgrazlin2.units.it ([127.0.0.1]) by localhost (dschgrazlin2.units.it [127.0.0.1]) (amavisd-new, port 10024) with LMTP id CNiXh9l2Hucd for ; Mon, 3 Aug 2009 18:26:52 +0200 (CEST) Original-Received: from dschgrazlin2.units.it (loopback [127.0.0.1]) by dschgrazlin2.units.it (8.14.3/8.14.3) with ESMTP id n73GQp5U022674 for ; Mon, 3 Aug 2009 18:26:51 +0200 X-Mailer: MH-E 8.2; nmh 1.3; GNU Emacs 23.1.1 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Mon, 03 Aug 2009 12:26:56 -0400 X-Mailman-Approved-At: Mon, 03 Aug 2009 18:23:04 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:29835 Archived-At: Hello, apologies if I am wrong. Just upgraded emacs to 23.1 and noted the following issue, related (apparently) to mwheel.el. Here is how to (hopefully) reproduce the problem. In an emacs window (under X): => set the point with mouse-1 => select a region with mouse-3 some lines below => now scroll down with the mouse wheel so that the bottom of the selected region scrolls `out' of the upper edge of the emacs window (the highlighted region must disappear) => extend the region by mouse-3 again => paste the region with mouse-2 somewhere (e.g. in a clean buffer) Result: only the text between the *visible* top of the window and the end of the region has been pasted. I.e. all works as if the beginning of the selected region had moved the first line of the visible portion of the buffer. This contrasts with the behavior in emacs-22.3, where extending the region while scrolling down with the wheel used to work as expected (by me): the contents of the region started from the point set with mouse-1 at the beginning. The (correct) behavior in 23.1 is obtained if scrolling is performed with the side bar, instead of the wheel (and also if the scroll with the wheel does not make the bottom of the region fly out of the upper window edge) Actually, the following new lines have appeared in mwheel.el from 22.3 to 23.1: (opoint (with-current-buffer buffer (when (eq (car-safe transient-mark-mode) 'only) (point)))) and I seem to understand that this is the origin of the problem. In fact, the following change: diff -c ./emacs-23.1/lisp/mwheel.el.ORIG ./emacs-23.1/lisp/mwheel.el *** ./emacs-23.1/lisp/mwheel.el.ORIG Mon Aug 3 17:05:23 2009 --- ./emacs-23.1/lisp/mwheel.el Mon Aug 3 17:05:23 2009 *************** *** 195,201 **** (buffer (window-buffer curwin)) (opoint (with-current-buffer buffer (when (eq (car-safe transient-mark-mode) 'only) ! (point)))) (mods (delq 'click (delq 'double (delq 'triple (event-modifiers event))))) (amt (assoc mods mouse-wheel-scroll-amount))) --- 195,201 ---- (buffer (window-buffer curwin)) (opoint (with-current-buffer buffer (when (eq (car-safe transient-mark-mode) 'only) ! point-before-scroll))) (mods (delq 'click (delq 'double (delq 'triple (event-modifiers event))))) (amt (assoc mods mouse-wheel-scroll-amount))) fixes everything for me. Do not know if this is the best solution (I am only an occasional lisp programmer); I do not even know if the object of my report is actually a problem or instead is something wanted (if so, I would be surprised). Apologies for the length of the message and a BIG THANKS for emacs, of course! ciao gabriele ----- In GNU Emacs 23.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.17.6) of 2009-08-03 on dschgrazlin1 Windowing system distributor `The XFree86 Project, Inc', version 11.0.40800000 configured using `configure '--prefix=/usr'' Important settings: value of $LC_ALL: C value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: C value of $XMODIFIERS: nil locale-coding-system: nil default-enable-multibyte-characters: t Major mode: Text Minor modes in effect: show-paren-mode: t tooltip-mode: t tool-bar-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t