bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Lars Magne Ingebrigtsen
Subject: bug#3822: 23.1.50; can't search 8-bit byte on unibyte buffer
Date: Sat, 17 Sep 2011 08:45:41 +0200
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux)

Taiki SUGAWARA <buzz.taiki@gmail.com> 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/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]