[gnu.emacs.bug] 18.52 search-forward can't find NULL

kayvan@APPLE.COM (Kayvan Sylvan) (01/20/89)

In GNU Emacs 18.52.3 of Thu Jan 19 1989 on mrspoc (usg-unix-v)

The machine is a plexus 68020 (m-plexus.h), running System 5.2
(s-usg5-2.h).

search-forward doesn't find "\000" in a file (this manifested by
running M-x yow).

I have a file containing:

abcde^@fghijk^@kjhkjhkj

with point at "a", I do eval-expression (search-forward "\0").
The message 'Search failed: "' appears in the message area.

I can't figure it out. Any ideas??

			---Kayvan

Kayvan Sylvan @ Tranasct Software, Inc. ---- Mountain View, CA (415) 961-6112
Internet: mrspoc!kayvan@apple.com  UUCP: ...!{apple,pyrmid,mips}!mrspo!kayvan

nate@hobbes.intel.com (Nate Hess) (01/20/89)

In article <8901191850.AA01262@mrspoc.UUCP>, mrspoc!kayvan@APPLE (Kayvan Sylvan) writes:
>I have a file containing:
>
>abcde^@fghijk^@kjhkjhkj
>
>with point at "a", I do eval-expression (search-forward "\0").
>The message 'Search failed: "' appears in the message area.

It's doing exactly what you told it to.  The string "\0" is the same as
the string "0".  In order to get the NULL character, you have to specify
the octal value '000' after the backslash:  "\000".

Happy Searching,
--woodstock
--
	   "What I like is when you're looking and thinking and looking
	   and thinking...and suddenly you wake up."   - Hobbes

woodstock@hobbes.intel.com   ...!{decwrl|hplabs!oliveb|amd}!intelca!mipos3!nate