GNU bug report logs -
#9458
24.0.50; Searching in binary buffers
Previous Next
Reported by: Helmut Eller <eller.helmut <at> gmail.com>
Date: Wed, 7 Sep 2011 12:55:02 UTC
Severity: normal
Found in version 24.0.50
Done: Andreas Schwab <schwab <at> linux-m68k.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 9458 in the body.
You can then email your comments to 9458 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#9458
; Package
emacs
.
(Wed, 07 Sep 2011 12:55:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Helmut Eller <eller.helmut <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 07 Sep 2011 12:55:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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''
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#9458
; Package
emacs
.
(Wed, 07 Sep 2011 16:14:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 9458 <at> debbugs.gnu.org (full text, mbox):
ELISP> (let ((s "\xce"))
(with-temp-buffer
(set-buffer-multibyte nil)
(save-excursion (insert s))
(and (looking-at s) (search-forward s))))
*** Eval error *** Search failed: "\316"
Likely a bug in boyer_moore.
Andreas.
--
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Reply sent
to
Andreas Schwab <schwab <at> linux-m68k.org>
:
You have taken responsibility.
(Wed, 07 Sep 2011 16:56:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Helmut Eller <eller.helmut <at> gmail.com>
:
bug acknowledged by developer.
(Wed, 07 Sep 2011 16:56:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 9458-done <at> debbugs.gnu.org (full text, mbox):
Fixed on emacs-23 branch.
Andreas.
--
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 06 Oct 2011 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 13 years and 321 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.