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

Previous Next

Package: emacs;

Reported by: Taiki SUGAWARA <buzz.taiki <at> gmail.com>

Date: Sat, 11 Jul 2009 15:40:04 UTC

Severity: normal

Tags: fixed

Fixed in version 24.1

Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 3822 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Taiki SUGAWARA <buzz.taiki <at> gmail.com>
Cc: 3822 <at> debbugs.gnu.org
Subject: Re: 23.1.50; can't search 8-bit byte on unibyte buffer
Date: Sat, 17 Sep 2011 08:45:41 +0200
Taiki SUGAWARA <buzz.taiki <at> 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/




This bug report was last modified 13 years and 246 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.