From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: rasmith@tamu.edu Newsgroups: gmane.emacs.help Subject: Re: search-forward in emacs23 lisp Date: Sun, 28 Mar 2010 11:39:15 -0500 (CDT) Message-ID: <20100328.113915.866357745907943848.rasmith@aristotle.tamu.edu> References: <20100327.153148.886429907165788179.rasmith@aristotle.tamu.edu> Reply-To: rasmith@tamu.edu NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1269794390 24721 80.91.229.12 (28 Mar 2010 16:39:50 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 28 Mar 2010 16:39:50 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Mar 28 18:39:46 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 1NvvWc-0001ZM-Cv for geh-help-gnu-emacs@m.gmane.org; Sun, 28 Mar 2010 18:39:46 +0200 Original-Received: from localhost ([127.0.0.1]:57000 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NvvWb-00059f-SC for geh-help-gnu-emacs@m.gmane.org; Sun, 28 Mar 2010 12:39:45 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NvvWB-00059P-UV for help-gnu-emacs@gnu.org; Sun, 28 Mar 2010 12:39:19 -0400 Original-Received: from [140.186.70.92] (port=54182 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NvvWA-00057P-9F for help-gnu-emacs@gnu.org; Sun, 28 Mar 2010 12:39:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NvvW8-0004rR-KJ for help-gnu-emacs@gnu.org; Sun, 28 Mar 2010 12:39:18 -0400 Original-Received: from aristotle.tamu.edu ([128.194.75.5]:35405) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NvvW8-0004rL-9h for help-gnu-emacs@gnu.org; Sun, 28 Mar 2010 12:39:16 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by aristotle.tamu.edu (Postfix) with ESMTP id 33775E041C for ; Sun, 28 Mar 2010 11:39:15 -0500 (CDT) In-Reply-To: <20100327.153148.886429907165788179.rasmith@aristotle.tamu.edu> X-Mailer: Mew version 6.3 on Emacs 23.1 / Mule 6.0 (HANACHIRUSATO) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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:72513 Archived-At: From: rasmith@tamu.edu Subject: search-forward in emacs23 lisp Date: Sat, 27 Mar 2010 15:31:48 -0500 (CDT) Sorry to reply to my own post, but the following rather ugly solution solves the problem of finding a single FF byte: (while (/= (char-after) ?\377) (forward-char 1) ) (forward-char 1) This replaces (search-forward (unibyte-string ?\377)) which, in emacs23, no matter what I do, insists on turning the byte into the two-byte string \231\277 before searching. But surely there's a better way? Robin Smith Department of Philosophy rasmith@tamu.edu Texas A&M University http://aristotle.tamu.edu/~rasmith/ 4237 TAMU Voice +1 979 845 5679 College Station, TX 77843-4237 FAX +1 979 845 0458