From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: search-forward in emacs23 lisp Date: Mon, 29 Mar 2010 18:17:53 +0300 Message-ID: <83bpe717j2.fsf@gnu.org> References: <20100327.153148.886429907165788179.rasmith@aristotle.tamu.edu> <87y6hchx0i.fsf@gnu.org> <831vf339k4.fsf@gnu.org> <20100329.100117.57809164175956070.rasmith@aristotle.tamu.edu> NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1269876638 18314 80.91.229.12 (29 Mar 2010 15:30:38 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 29 Mar 2010 15:30:38 +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 17:30:34 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 1NwGur-0002C0-TS for geh-help-gnu-emacs@m.gmane.org; Mon, 29 Mar 2010 17:30:16 +0200 Original-Received: from localhost ([127.0.0.1]:44586 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NwGsD-0002Fr-1K for geh-help-gnu-emacs@m.gmane.org; Mon, 29 Mar 2010 11:27:29 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NwGoZ-0007eD-I0 for help-gnu-emacs@gnu.org; Mon, 29 Mar 2010 11:23:43 -0400 Original-Received: from [140.186.70.92] (port=45769 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NwGoX-0006oo-DJ for help-gnu-emacs@gnu.org; Mon, 29 Mar 2010 11:23:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NwGiz-0005kA-Hx for help-gnu-emacs@gnu.org; Mon, 29 Mar 2010 11:17:58 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:38566) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NwGiz-0005jx-9A for help-gnu-emacs@gnu.org; Mon, 29 Mar 2010 11:17:57 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0L0100H00UBXAM00@a-mtaout21.012.net.il> for help-gnu-emacs@gnu.org; Mon, 29 Mar 2010 18:17:47 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([77.127.176.135]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L0100HNKUHMAQ00@a-mtaout21.012.net.il> for help-gnu-emacs@gnu.org; Mon, 29 Mar 2010 18:17:47 +0300 (IDT) In-reply-to: <20100329.100117.57809164175956070.rasmith@aristotle.tamu.edu> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) 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:72535 Archived-At: > Date: Mon, 29 Mar 2010 10:01:17 -0500 (CDT) > Cc: help-gnu-emacs@gnu.org > From: rasmith@tamu.edu > > In other words, search-forward cannot find byte \377 when searching in > a *unibyte* buffer, but it can find that same byte if the buffer is > changed to multibyte. The reason is that in a unibyte buffer, > search-forward apparently changes byte \377 to a two-byte > representation (but not to utf-8, which would be \303\277). > > The code I had a problem with can be fixed by using char-after > (or more elegantly, I've now learned, using skip-chars-forward), > However, there's probably other code out there that's now broken > because of this. Is it a bug, or was it a mistake to expect > search-forward to find a single high byte in a multibyte buffer in the > first place? Please ask these questions on emacs-devel@gnu.org. All the experts who know the answers are there.