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

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

[debbugs-tracker] bug#9458: closed (24.0.50; Searching in binary buffers


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#9458: closed (24.0.50; Searching in binary buffers)
Date: Wed, 07 Sep 2011 16:56:02 +0000

Your message dated Wed, 07 Sep 2011 18:51:26 +0200
with message-id <address@hidden>
and subject line Re: bug#9458: 24.0.50; Searching in binary buffers
has caused the GNU bug report #9458,
regarding 24.0.50; Searching in binary buffers
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
9458: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9458
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 24.0.50; Searching in binary buffers Date: Wed, 07 Sep 2011 14:50:29 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)
search-forward seems to work strangely in binary/unibyte buffers.
Create a file test.el containing this code:

(defvar test-string (unibyte-string #xce))

(with-temp-file "test.txt"
  (set-buffer-multibyte nil)
  (setq buffer-file-coding-system 'binary)
  (insert test-string))

(with-current-buffer (get-buffer-create "test.txt")
  (set-buffer-multibyte nil)
  (setq buffer-file-coding-system 'binary)
  (erase-buffer)
  (insert-file-contents "test.txt")
  (search-forward test-string))

Executing this with: emacs -Q -batch -l test.el
prints: 
Search failed: "Î"
[Exit 255]


The Lisp code creates a file test.txt for a single character ?\xce.  As
expected, hexdump -C test.txt prints: 
00000000  ce                                                |Î|
00000001


Opening and searching that character with Emacs fails.  That's
definitely not what I was expecting.  What's the proper way to search
those characters?






In GNU Emacs 24.0.50.4 (i686-pc-linux-gnu, GTK+ Version 2.20.1)
 of 2011-09-05 on ix
Windowing system distributor `The X.Org Foundation', version 11.0.10707000
configured using `configure  '--enable-asserts' '--enable-checking' 
'--with-gif=no' '--with-gnutls=no' 'CFLAGS=-g3 -O0''




--- End Message ---
--- Begin Message --- Subject: Re: bug#9458: 24.0.50; Searching in binary buffers Date: Wed, 07 Sep 2011 18:51:26 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)
Fixed on emacs-23 branch.

Andreas.

-- 
Andreas Schwab, address@hidden
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


--- End Message ---

reply via email to

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