From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.bugs Subject: bug#17562: 24.4.50; REGRESSION: mouse double-click on `(` does not select whole Lisp sexp Date: Tue, 27 May 2014 02:55:04 +0200 Message-ID: <87tx8cdorb.fsf@web.de> References: <28b9c286-b99c-42b1-9768-d39a449a9855@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1401152185 29097 80.91.229.3 (27 May 2014 00:56:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 27 May 2014 00:56:25 +0000 (UTC) Cc: 17562@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 27 02:56:17 2014 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 1Wp5ge-0006Ep-Ku for geb-bug-gnu-emacs@m.gmane.org; Tue, 27 May 2014 02:56:16 +0200 Original-Received: from localhost ([::1]:59156 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wp5ge-0004ZV-90 for geb-bug-gnu-emacs@m.gmane.org; Mon, 26 May 2014 20:56:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53713) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wp5gW-0004YM-Su for bug-gnu-emacs@gnu.org; Mon, 26 May 2014 20:56:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wp5gQ-0007e4-RS for bug-gnu-emacs@gnu.org; Mon, 26 May 2014 20:56:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33880) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wp5gQ-0007dz-OC for bug-gnu-emacs@gnu.org; Mon, 26 May 2014 20:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Wp5gQ-0003zk-3q for bug-gnu-emacs@gnu.org; Mon, 26 May 2014 20:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 May 2014 00:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17562 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17562-submit@debbugs.gnu.org id=B17562.140115212415296 (code B ref 17562); Tue, 27 May 2014 00:56:02 +0000 Original-Received: (at 17562) by debbugs.gnu.org; 27 May 2014 00:55:24 +0000 Original-Received: from localhost ([127.0.0.1]:60990 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wp5fn-0003ye-N9 for submit@debbugs.gnu.org; Mon, 26 May 2014 20:55:24 -0400 Original-Received: from mout.web.de ([212.227.15.3]:62751) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wp5fk-0003yH-10 for 17562@debbugs.gnu.org; Mon, 26 May 2014 20:55:21 -0400 Original-Received: from drachen.dragon ([90.186.167.75]) by smtp.web.de (mrweb103) with ESMTPSA (Nemesis) id 0LyDlZ-1WlIWf1lPp-015deg; Tue, 27 May 2014 02:55:08 +0200 In-Reply-To: (Stefan Monnier's message of "Mon, 26 May 2014 18:54:09 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.91 (gnu/linux) X-Provags-ID: V03:K0:HyxkFy3SbkcLdlmwRaJImxaG0M5IBrHmx70nvAF5LQFPb/kmX/x 9WJjI/AINy8MS7rhtpOl+tuFF/0z1YPovaX4/2HWatbCbDuAvultucRqg4u3f5gjLx1uOys f4rSM2GlDb0TzLtc+uyMpK3nN4Kvi6nna/OH2Cce7atJSJ59Z8nm2Foj+KCxE7XPlxI66yN kj5AJqAUQQCpq5M3A6BRg== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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:89528 Archived-At: Stefan Monnier writes: > > Visit dired.el. Double-click on the opening paren of > > (defun dired-get-filename ... > > Only part of the defun is selected. > > Hmm... I can't reproduce it here (using "emacs -Q"): > - after opening dired.el I first have to search for "defun > dired-get-filename" > because it's not immediately visible. > - once it's in sight, if I double-click on it, the whole expression is > selected&highlighted, point is moved to right after the matching close > paren, and as a consequence the window is redrawn to show the end of > the expression (since the beginning is now outside of the window). > > I never use this feature, but I see the exact same behavior in > Emacs-24.3, so I assume it's the way it's always worked. > > Can you reproduce the problem with "emacs -Q"? Yes. There is no misunderstanding, you obviously don't see what we see. Are you sure you tried with trunk, and not emacs-24? Here's what I found out in the meantime: In contrast to before the above commit, the second click now leads to a call to `mouse-set-region'. I tried to debug-on-entry `mouse-set-region' in both emacs -Q and tried our recipe: - Without your commit, the command is not run (no debugger) - With your commit, the debugger pops up. When the debugger pops up, the window already has been scrolled, and point is indeed at the end of the sexp. After `mouse-set-region' has finished, point has been replaced according to the position under the mouse (after scrolling). In general, in current trunk, when window scrolling happens, point is now always positioned in the line under the mouse, instead of after the sexp. Seems like something happens similar to what is described in the old code: ;; Don't run the up-event handler if the window ;; start changed in a redisplay after the ;; mouse-set-point for the down-mouse event at ;; the beginning of this function. When the ;; window start has changed, the up-mouse event ;; contains a different position due to the new ;; window contents, and point is set again. Michael.