From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Info-search-whitespace (Was: Improvements to `(emacs)File Variables') Date: Fri, 19 Nov 2004 03:23:29 +0200 Organization: JURTA Message-ID: <87fz36h90m.fsf_-_@jurta.org> References: <878y942l8h.fsf-monnier+emacs@gnu.org> <20041114232600.GA12968@fencepost> <20041118170700.GG5243@xts.gnuu.de> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1100832278 4766 80.91.229.6 (19 Nov 2004 02:44:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 19 Nov 2004 02:44:38 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 19 03:44:25 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CUyl6-00065o-00 for ; Fri, 19 Nov 2004 03:44:24 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CUytz-0001M0-1f for ged-emacs-devel@m.gmane.org; Thu, 18 Nov 2004 21:53:35 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CUytm-0001Lt-RT for emacs-devel@gnu.org; Thu, 18 Nov 2004 21:53:23 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CUytm-0001Lh-5m for emacs-devel@gnu.org; Thu, 18 Nov 2004 21:53:22 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CUytm-0001Le-2z for emacs-devel@gnu.org; Thu, 18 Nov 2004 21:53:22 -0500 Original-Received: from [66.33.219.6] (helo=knife.dreamhost.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CUykl-0001UF-9P for emacs-devel@gnu.org; Thu, 18 Nov 2004 21:44:03 -0500 Original-Received: from mail.jurta.org (80-235-37-70-dsl.mus.estpak.ee [80.235.37.70]) by knife.dreamhost.com (Postfix) with ESMTP id 64318E4130; Thu, 18 Nov 2004 18:44:00 -0800 (PST) Original-To: Stefan Monnier In-Reply-To: (Stefan Monnier's message of "Thu, 18 Nov 2004 13:04:26 -0500") User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) 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: main.gmane.org gmane.emacs.devel:30060 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:30060 Stefan Monnier writes: > Go to the Emacs manual and do a M-s search for "unibyte: *t". Out of curiosity I looked at what the Emacs manual does say about unibyte mode and noticed such a problem: Emacs hangs with "unibyte: *t" Info search string. This is because Info-search expands it with Info-search-whitespace to "unibyte:\\(?:\\s-+\\)*t" and on the line * --unibyte: Initial Options. (line 101) Emacs goes into a long loop because it tries to match whitespace \\(?:\\s-+\\)* in extremely many ways. Perhaps Info-search should search for a string only, not a regexp: i.e. preprocess a search string with `regexp-quote' before replacing whitespace with Info-search-whitespace and re-searching for it. Anyway, the standalone Info reader already doesn't search for a regexp with the `s' key, and the Emacs Info reader should not differ from it. Of course, this doesn't prohibit from adding a new command `Info-search-regexp' (without keybinding) to the Emacs Info reader, which won't expand whitespace to Info-search-whitespace and will use a search regexp exactly as specified by the user. -- Juri Linkov http://www.jurta.org/emacs/