From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: I-search: Clicking in minibuf during I-search fails. Date: Sat, 27 Oct 2007 09:58:09 -0400 Message-ID: References: <1191986217.275977.242960@o80g2000hse.googlegroups.com> <1192053098.477874.283490@k79g2000hse.googlegroups.com> <1192404883.312978.212670@t8g2000prg.googlegroups.com> <877iliu3p1.fsf@jurta.org> <87abqc2ibg.fsf@jurta.org> <87y7dth3u9.fsf@jurta.org> <87hckguquc.fsf@jurta.org> <87fxzxwlaq.fsf@jurta.org> Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: ger.gmane.org 1193493797 26530 80.91.229.12 (27 Oct 2007 14:03:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 27 Oct 2007 14:03:17 +0000 (UTC) Cc: amicitas@gmail.com, emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 27 16:03:18 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IlmFv-0007Sl-I7 for ged-emacs-devel@m.gmane.org; Sat, 27 Oct 2007 16:03:15 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IlmFm-0001K9-R0 for ged-emacs-devel@m.gmane.org; Sat, 27 Oct 2007 10:03:06 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IlmB2-00045U-U3 for emacs-devel@gnu.org; Sat, 27 Oct 2007 09:58:13 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IlmB1-00043L-5K for emacs-devel@gnu.org; Sat, 27 Oct 2007 09:58:12 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IlmB0-00043D-Qb for emacs-devel@gnu.org; Sat, 27 Oct 2007 09:58:10 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IlmB0-0002Hf-J6 for emacs-devel@gnu.org; Sat, 27 Oct 2007 09:58:10 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1IlmAz-0000Ea-T9; Sat, 27 Oct 2007 09:58:09 -0400 In-reply-to: <87fxzxwlaq.fsf@jurta.org> (message from Juri Linkov on Sat, 27 Oct 2007 01:43:48 +0300) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:81848 Archived-At: > So why does the event have the wrong position in it? I guess this is because clicking mouse button with the code (let ((cursor-in-echo-area t)) (read-event)) always returns an event where the buffer position is 1. What about the horizontal and vertical positions? Are they correct? If so, this code could find the character in the minibuffer that they correspond to, and put that position into the event. Does that fix it? PS: I already suggested trying an alternative solution that gets rid of using `read-event', and binds C-w to a new command in the minibuffer for editing the search string. That approach might be a good one. However, I expect we will have to fix a few bugs before it fully works. So I think that the other approach is likely to be easier, and I recommend trying it first.