From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: bojohan@gnu.org (Johan =?utf-8?Q?Bockg=C3=A5rd?=) Newsgroups: gmane.emacs.help Subject: Re: search-forward in emacs23 lisp Date: Mon, 29 Mar 2010 01:00:45 +0200 Message-ID: <87y6hchx0i.fsf@gnu.org> References: <20100327.153148.886429907165788179.rasmith@aristotle.tamu.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1269820997 11392 80.91.229.12 (29 Mar 2010 00:03:17 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 29 Mar 2010 00:03:17 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Mar 29 02:03:07 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Nw2Rc-000106-UE for geh-help-gnu-emacs@m.gmane.org; Mon, 29 Mar 2010 02:03:05 +0200 Original-Received: from localhost ([127.0.0.1]:51293 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nw2Rc-0004OI-D2 for geh-help-gnu-emacs@m.gmane.org; Sun, 28 Mar 2010 20:03:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nw1To-00044t-Dp for help-gnu-emacs@gnu.org; Sun, 28 Mar 2010 19:01:16 -0400 Original-Received: from [140.186.70.92] (port=56992 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nw1Tm-0003ek-LR for help-gnu-emacs@gnu.org; Sun, 28 Mar 2010 19:01:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nw1TL-0003VS-NE for help-gnu-emacs@gnu.org; Sun, 28 Mar 2010 19:00:49 -0400 Original-Received: from smtprelay-b11.telenor.se ([62.127.194.20]:45032) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nw1TL-0003VG-EM for help-gnu-emacs@gnu.org; Sun, 28 Mar 2010 19:00:47 -0400 Original-Received: from ipb1.telenor.se (ipb1.telenor.se [195.54.127.164]) by smtprelay-b11.telenor.se (Postfix) with ESMTP id 5378BC396 for ; Mon, 29 Mar 2010 01:00:46 +0200 (CEST) X-SENDER-IP: [85.228.202.239] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aj06AB98r0tV5MrvPGdsb2JhbACHaIdbi2YMAQEBATUtvVWFAQQ X-IronPort-AV: E=Sophos;i="4.51,324,1267398000"; d="scan'208";a="56764119" Original-Received: from c-efcae455.04-211-6c6b701.cust.bredbandsbolaget.se (HELO muon.localdomain) ([85.228.202.239]) by ipb1.telenor.se with ESMTP; 29 Mar 2010 01:00:46 +0200 Original-Received: by muon.localdomain (Postfix, from userid 1000) id 64D9248411D; Mon, 29 Mar 2010 01:00:45 +0200 (CEST) Mail-Copies-To: never Mail-Followup-To: help-gnu-emacs@gnu.org, rasmith@tamu.edu In-Reply-To: <20100327.153148.886429907165788179.rasmith@aristotle.tamu.edu> (rasmith@tamu.edu's message of "Sat, 27 Mar 2010 15:31:48 -0500 (CDT)") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Mailman-Approved-At: Sun, 28 Mar 2010 20:02:41 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:72527 Archived-At: rasmith@tamu.edu writes: > If I move to the buffer that contains the data to be parsed (which has > its multibyte flag set to nil), then > (search-forward (unibyte-string ?\377)) behaves as above. However, in > that same buffer, a keyboard isearch-forward for \377 finds a \377 > with no problem. There does seem to be a bug regarding search in unibyte buffers, ;; This works (let ((case-fold-search nil)) (search-forward "\377")) ;; This actually matches \277 instead! (let ((case-fold-search t)) (search-forward "\377")) Isearch works, by luck, since it binds case-fold-search to nil because of this strange behavior of `downcase' in a unibyte context, (let ((default-enable-multibyte-characters nil)) (with-temp-buffer (downcase 255))) ; worked correctly in Emacs 22 => 4194303