From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: Re: I-search: Clicking in minibuf during I-search fails. Date: Mon, 22 Oct 2007 03:35:43 +0300 Organization: JURTA Message-ID: <87abqc2ibg.fsf@jurta.org> References: <1191986217.275977.242960@o80g2000hse.googlegroups.com> <1192053098.477874.283490@k79g2000hse.googlegroups.com> <1192404883.312978.212670@t8g2000prg.googlegroups.com> <877iliu3p1.fsf@jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1193013928 25542 80.91.229.12 (22 Oct 2007 00:45:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 22 Oct 2007 00:45:28 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org, amicitas@gmail.com To: rms@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 22 02:45:28 2007 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 1IjlQ8-0004uJ-1q for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Oct 2007 02:45:28 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IjlQ0-0001Km-81 for geb-bug-gnu-emacs@m.gmane.org; Sun, 21 Oct 2007 20:45:20 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IjlPy-0001Hw-4h for bug-gnu-emacs@gnu.org; Sun, 21 Oct 2007 20:45:18 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IjlPw-0001FV-I1 for bug-gnu-emacs@gnu.org; Sun, 21 Oct 2007 20:45:17 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IjlPw-0001FJ-Ev for bug-gnu-emacs@gnu.org; Sun, 21 Oct 2007 20:45:16 -0400 Original-Received: from gnome.kiev.sovam.com ([212.109.32.24]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IjlPr-00031s-Uq; Sun, 21 Oct 2007 20:45:12 -0400 Original-Received: from relay02.kiev.sovam.com ([62.64.120.197]) by gnome.kiev.sovam.com with esmtp (Exim 4.67 (FreeBSD)) (envelope-from ) id 1IjlPq-00011r-Kr; Mon, 22 Oct 2007 03:45:10 +0300 Original-Received: from [83.170.232.243] (helo=smtp.svitonline.com) by relay02.kiev.sovam.com with esmtp (Exim 4.67) (envelope-from ) id 1IjlPo-00005W-1J; Mon, 22 Oct 2007 03:45:08 +0300 In-Reply-To: (Richard Stallman's message of "Sun\, 21 Oct 2007 03\:26\:46 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) X-Scanner-Signature: 6f32a619495bd298c8ed4cb100af0918 X-DrWeb-checked: yes X-SpamTest-Envelope-From: juri@jurta.org X-SpamTest-Group-ID: 00000000 X-SpamTest-Header: Not Detected X-SpamTest-Info: Profiles 1649 [Oct 21 2007] X-SpamTest-Info: helo_type=3 X-SpamTest-Info: {HEADERS: header Content-Type found without required header Content-Transfer-Encoding} X-SpamTest-Method: none X-SpamTest-Rate: 25 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0255], KAS30/Release X-detected-kernel: by monty-python.gnu.org: FreeBSD 6.x (1) 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:16799 Archived-At: > This bug is caused by the hack in `isearch-edit-string' that uses > > (let ((cursor-in-echo-area t)) > (read-event)) > > before reading the search string in the minibuffer with > `read-from-minibuffer'. When clicking mouse-1 in `read-event' > above, it incorrectly handles the mouse click. > > Why does this code handle the mouse-click at all? > It ought to just return the event, right? It doesn't read the mouse button release event (mouse-1), so the mouse release happens in the minibuffer after read-from-minibuffer activates it. Thus, mouse-1 selects the region because read-from-minibuffer with the pressed down-mouse-1 puts the mark to the beginning of the minibuffer (before the prompt). Below is the test case that emulates this problem in `isearch-edit-string': (progn (message "Prompt: ") (let ((cursor-in-echo-area t)) (read-event)) (read-from-minibuffer "Prompt: ")) after evaluating you can try to press mouse-1 in the echo area, and release it in the minibuffer. -- Juri Linkov http://www.jurta.org/emacs/