From: Lars Magne Ingebrigtsen <larsi@gnus.org>
To: Taiki SUGAWARA <buzz.taiki@gmail.com>
Cc: 3822@debbugs.gnu.org
Subject: bug#3822: 23.1.50; can't search 8-bit byte on unibyte buffer
Date: Sat, 17 Sep 2011 08:45:41 +0200 [thread overview]
Message-ID: <m3sjnvd5uy.fsf@stories.gnus.org> (raw)
In-Reply-To: <87d487kzd5.wl%buzz.taiki@gmail.com> (Taiki SUGAWARA's message of "Sun, 12 Jul 2009 00:34:14 +0900")
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/
next prev parent reply other threads:[~2011-09-17 6:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-11 15:34 bug#3822: 23.1.50; can't search 8-bit byte on unibyte buffer Taiki SUGAWARA
2011-09-17 6:45 ` Lars Magne Ingebrigtsen [this message]
2011-09-17 7:21 ` Andreas Schwab
2011-09-17 7:24 ` Lars Magne Ingebrigtsen
2011-09-18 15:21 ` Chong Yidong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3sjnvd5uy.fsf@stories.gnus.org \
--to=larsi@gnus.org \
--cc=3822@debbugs.gnu.org \
--cc=buzz.taiki@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.