From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Desktop saves isearch-mode Date: Tue, 18 Oct 2005 11:07:19 +0300 Organization: JURTA Message-ID: <87u0ffxv34.fsf@jurta.org> References: <87slv1esu9.fsf@jurta.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1129627809 1037 80.91.229.2 (18 Oct 2005 09:30:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 18 Oct 2005 09:30:09 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 18 11:30:07 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1ERnlg-0002My-IL for ged-emacs-devel@m.gmane.org; Tue, 18 Oct 2005 11:28:24 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ERnlf-0002lk-TH for ged-emacs-devel@m.gmane.org; Tue, 18 Oct 2005 05:28:23 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ERmZe-00032b-7E for emacs-devel@gnu.org; Tue, 18 Oct 2005 04:11:55 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ERmZW-00030Y-Eg for emacs-devel@gnu.org; Tue, 18 Oct 2005 04:11:47 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ERmZV-00030M-29 for emacs-devel@gnu.org; Tue, 18 Oct 2005 04:11:45 -0400 Original-Received: from [194.126.101.111] (helo=mail.neti.ee) by monty-python.gnu.org with esmtp (Exim 4.34) id 1ERmZU-0000td-5b; Tue, 18 Oct 2005 04:11:44 -0400 Original-Received: from mail.neti.ee (80-235-32-236-dsl.mus.estpak.ee [80.235.32.236]) by Relayhost1.neti.ee (Postfix) with ESMTP id 7544FC860; Tue, 18 Oct 2005 11:11:56 +0300 (EEST) Original-To: rms@gnu.org In-Reply-To: (Richard M. Stallman's message of "Mon, 17 Oct 2005 17:57:31 -0400") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Virus-Scanned: by amavisd-new-2.2.1 (20041222) (Debian) at neti.ee 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:44241 Archived-At: > When isearch leaves the buffer in isearch mode (this can happen after > switching buffers during incremental search), > > I think that is the bug. Isearch mode should not be left enabled. > > Can you debug that and fix it? The simplest way to reproduce this is to evaluate: (define-key isearch-mode-map "\M-m" (lambda () (interactive) (switch-to-buffer "*Messages*"))) and to type `C-s M-m a' in any buffer except the *Messages* buffer. The first key activates search mode, the second key switches to the *Messages* buffer, and the third key continues to search for `a' in the *Messages* buffer with search mode still enabled. After exiting the search in the *Messages* buffer and switching back to the original buffer where the search was activated, the mode line of the original buffer still displays the "Isearch" string and isearch-mode is non-nil. But perhaps this is just an improper key binding for isearch mode and a valid way to duplicate a global keybinding in isearch mode is to bind its key to `isearch-other-control-char': ;; existing global key binding: (define-key global-map "\M-m" (lambda () (interactive) (switch-to-buffer "*Messages*"))) ;; how to allow using the same key binding in isearch-mode: (define-key isearch-mode-map "\M-m" 'isearch-other-control-char) This doesn't cause the reported problem. -- Juri Linkov http://www.jurta.org/emacs/