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: First two elements of search-ring shown twice in minibuffer when using M-p multiple times? Date: Sat, 08 Mar 2008 17:18:16 +0200 Organization: JURTA Message-ID: <87myp99rd3.fsf@jurta.org> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1204989676 27624 80.91.229.12 (8 Mar 2008 15:21:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 8 Mar 2008 15:21:16 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org To: Tobias Bading Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Mar 08 16:21:43 2008 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 1JY0rZ-0004aE-Vr for geb-bug-gnu-emacs@m.gmane.org; Sat, 08 Mar 2008 16:21:30 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JY0r1-0002g0-MO for geb-bug-gnu-emacs@m.gmane.org; Sat, 08 Mar 2008 10:20:55 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JY0qx-0002fr-1d for bug-gnu-emacs@gnu.org; Sat, 08 Mar 2008 10:20:51 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JY0qu-0002fX-Ro for bug-gnu-emacs@gnu.org; Sat, 08 Mar 2008 10:20:50 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JY0qu-0002fU-Lq for bug-gnu-emacs@gnu.org; Sat, 08 Mar 2008 10:20:48 -0500 Original-Received: from relay01.kiev.sovam.com ([62.64.120.200]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JY0qu-0006EF-Ge for bug-gnu-emacs@gnu.org; Sat, 08 Mar 2008 10:20:48 -0500 Original-Received: from [83.170.232.243] (helo=smtp.svitonline.com) by relay01.kiev.sovam.com with esmtp (Exim 4.67) (envelope-from ) id 1JY0qi-0007xr-PR; Sat, 08 Mar 2008 17:20:45 +0200 In-Reply-To: (Tobias Bading's message of "Sat, 8 Mar 2008 15:38:49 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-unknown-linux-gnu) X-Scanner-Signature: a8c813420754d5015e2a5a3aeed75c84 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 2372 [Mar 7 2008] X-SpamTest-Info: helo_type=3 X-SpamTest-Info: {HEADERS: header Content-Type found without required header Content-Transfer-Encoding} X-SpamTest-Info: {TO: local part of email appears in body} X-SpamTest-Method: none X-SpamTest-Rate: 20 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0278], KAS30/Release X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.8-5.1 (or MacOS X 10.2-10.3) 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:17687 Archived-At: > I'm using Emacs 22.1 compiled under MacOS X and Windoze XP from the > EMACS_22_1 tag in the cvs repository for quite some time now and both of > em work great, wouldn't want to live without them :-). However, there's > a minor bug that really bugs me. It is reproducible on both platforms > without any customizations, i.e. my .emacs file moved out of the way. It > goes like this: > Start a fresh emacs, then C-s 1 RET, C-s 2 RET, C-s 3 RET to search for > "1", "2" and "3". The value of variable search-ring is ("3" "2" "1") > now. So far, so good. Now, let's try to search for "1" again using M-p > (isearch-ring-retreat) in isearch-mode. A C-s C-s searches for "3", now > a M-p and you're searching for "2", but the next M-p does not search for > "1", but for "3" again! And another M-p brings you to "2". This is what > I noticed on both platforms: After the initial C-s C-s sequence, the > minibuffer shows "I-search: 3", the cursor is still in your buffer and > the tool bar as well as the menu bar remain unchanged. After the first > M-p the minibuffer displays "I- > search: 2" and the cursor is at the end of the minibuffer. However, the > tool bar and the menu bar still remain unchanged. I guess this is part of > the problem, because the second M-p finally adapts the tool bar and the > menu bar to the fact that the cursor is in the minibuffer now, i.e. the > Minibuf menu item appears and a few icons are grayed out. Unfortunately, > the second M-p also jumps back to the first element of search-ring > instead of showing the third element. So to reach the third element of > search-ring, you have to press M-p four times instead of > twice :-(. I hope I'm not the only one having this problem and that > there's a fix available :-). Thank you for the bug report. I hope it is possible to fix this undesirable behavior by using the HISTPOS argument of read-from-minibuffer where HISTPOS will point to the correct history position in the search ring. This also gives us the opportunity to rewrite isearch-edit-string to remove unnecessary ad-hoc minibuffer precessing tricks that cause the incorrect behavior you described in the second part of your bug report. -- Juri Linkov http://www.jurta.org/emacs/