Subject: bug#3822: 23.1.50; can't search 8-bit byte on unibyte buffer

From: Lars Magne Ingebrigtsen <[email-masked]>
Date: Sat, 17 Sep 2011 08:45:41 +0200

Taiki SUGAWARA <[email-masked]> 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/