From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#3822: 23.1.50; can't search 8-bit byte on unibyte buffer Date: Sat, 17 Sep 2011 08:45:41 +0200 Message-ID: References: <87d487kzd5.wl%buzz.taiki@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1316242344 25132 80.91.229.12 (17 Sep 2011 06:52:24 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 17 Sep 2011 06:52:24 +0000 (UTC) Cc: 3822@debbugs.gnu.org To: Taiki SUGAWARA Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Sep 17 08:52:20 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R4ol9-0001t7-75 for geb-bug-gnu-emacs@m.gmane.org; Sat, 17 Sep 2011 08:52:19 +0200 Original-Received: from localhost ([::1]:54479 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4ol8-0007mY-Op for geb-bug-gnu-emacs@m.gmane.org; Sat, 17 Sep 2011 02:52:18 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:47630) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4ol6-0007mN-0p for bug-gnu-emacs@gnu.org; Sat, 17 Sep 2011 02:52:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R4ol4-0007LS-Pj for bug-gnu-emacs@gnu.org; Sat, 17 Sep 2011 02:52:15 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33641) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4ol4-0007LO-KD for bug-gnu-emacs@gnu.org; Sat, 17 Sep 2011 02:52:14 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1R4opi-0007Ed-3v; Sat, 17 Sep 2011 02:57:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Magne Ingebrigtsen Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 17 Sep 2011 06:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 3822 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 3822-submit@debbugs.gnu.org id=B3822.131624261527794 (code B ref 3822); Sat, 17 Sep 2011 06:57:01 +0000 Original-Received: (at 3822) by debbugs.gnu.org; 17 Sep 2011 06:56:55 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R4opY-0007E6-52 for submit@debbugs.gnu.org; Sat, 17 Sep 2011 02:56:54 -0400 Original-Received: from hermes.netfonds.no ([80.91.224.195]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R4opW-0007Dy-5e for 3822@debbugs.gnu.org; Sat, 17 Sep 2011 02:56:51 -0400 Original-Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1R4okl-0003ln-R1; Sat, 17 Sep 2011 08:51:55 +0200 In-Reply-To: <87d487kzd5.wl%buzz.taiki@gmail.com> (Taiki SUGAWARA's message of "Sun, 12 Jul 2009 00:34:14 +0900") User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) X-Now-Playing: Various's _Not Alone (3)_: "Unveiled - Endless" X-MailScanner-ID: 1R4okl-0003ln-R1 MailScanner-NULL-Check: 1316847115.90401@WacljhxB6Uts1kO9PrbIVg X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 17 Sep 2011 02:57:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:51270 Archived-At: Taiki SUGAWARA writes: > I wrote code for search 8-bit byte on unibyte buffer like a > followings. but emacs says `search failed'. It's a bug? > > (with-temp-buffer > (set-buffer-multibyte nil) > (insert (make-string 1 ?\xff)) > (goto-char (point-min)) > (search-forward (make-string 1 ?\xff))) It seems somewhat odd, at least. However, it probably isn't a bug. The `insert' will insert the 0xff byte into the buffer, but `(make-string 1 ?\xff)' will create a multibyte string, which will, of course, not be found in the buffer. I think. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/