all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Christopher J. Madsen" <cjm@cjmweb.net>
To: 5989@debbugs.gnu.org
Subject: bug#5989: 23.1.96; bug 4209 not completely fixed (regression in re-search-forward)
Date: Tue, 20 Apr 2010 13:19:21 -0500	[thread overview]
Message-ID: <4BCDF029.9040106@cjmweb.net> (raw)

I've discovered that bug #4209 was only partially fixed.  My original
recipe does not produce the bug in 23.1.96, but a slightly modified
one does:

;--- re-bug2.el starts here
(setq-default enable-multibyte-characters nil) ; this line is new

(set-buffer (get-buffer-create "*Test Buffer*"))

(insert "\xC2\x4C\xEF\x77\xC6\x69\x8C\x0A")

(goto-char (point-min))

(message "looking-at: %s" (looking-at
"\\`\xC2\x4C\xEF\x77\xC6\x69\x8C\x0A"))

(message "re-search-forward: %s"
         (re-search-forward "\\`\xC2\x4C\xEF\x77\xC6\x69\x8C\x0A" 100 t))
;--- re-bug2.el ends here

At the command line, this is the expected output:

$ emacs --batch -Q -l re-bug2.el
looking-at: t
re-search-forward: 9

With emacs 23.1.96, the output I actually get is:
looking-at: t
re-search-forward: nil


This recipe is closer to what I'm actually doing:

;--- re-bug-file.el starts here
(find-file-literally "sample.file")

(goto-char (point-min))

(message "looking-at: %s" (looking-at
"\\`\xC2\x4C\xEF\x77\xC6\x69\x8C\x0A"))

(message "re-search-forward: %s"
         (re-search-forward "\\`\xC2\x4C\xEF\x77\xC6\x69\x8C\x0A" 100 t))
;--- re-bug-file.el ends here

It should have the same output as the previous recipe.  sample.file
must begin with those 8 bytes.  The following Perl command can create
a suitable file (just redirect its output to sample.file):

perl -e 'binmode STDOUT; print "\xC2\x4C\xEF\x77\xC6\x69\x8C\x0Aand more\n"'



The original patch proposed by Matthew Dempsky
(http://debbugs.gnu.org/cgi/bugreport.cgi?bug=4209#12) appears to fix
the bug in all its variations, but the patch that was actually applied
by Kenichi Handa only fixes the original recipe.

I apologize for not trying the official patch sooner.  I just never
got around to rebuilding Emacs.


In GNU Emacs 23.1.96.4 (i686-pc-linux-gnu)
 of 2010-04-20 on byte
configured using `configure  '--without-pop' '--without-sound'
'--without-x' '--with-x-toolkit=no' '--without-xpm' '--without-jpeg'
'--without-tiff' '--without-gif' '--without-png' '--without-rsvg'
'--without-xft' '--without-libotf' '--without-m17n-flt'
'--without-toolkit-scroll-bars' '--without-xaw3d' '--without-xim'
'--without-gpm' '--without-dbus' '--without-makeinfo''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.utf8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr message sendmail regexp-opt ecomplete rfc822 mml
mml-sec password-cache mm-decode mm-bodies mm-encode mailcap mail-parse
rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util
netrc time-date mm-util mail-prsvr gmm-utils wid-edit mailheader canlock
sha1 hex-util hashcash mail-utils emacsbug help-mode easymenu view
warnings ediff-hook vc-hooks lisp-float-type lisp-mode register page
menu-bar rfn-eshadow timer jit-lock font-lock syntax facemenu font-core
frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help
simple abbrev loaddefs button minibuffer faces cus-face files
text-properties overlay md5 base64 format env code-pages mule custom
widget hashtable-print-readable backquote make-network-process multi-tty
emacs)









             reply	other threads:[~2010-04-20 18:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-20 18:19 Christopher J. Madsen [this message]
2016-06-02  1:29 ` bug#5989: 23.1.96; bug 4209 not completely fixed (regression in re-search-forward) Noam Postavsky
2016-06-04 16:15   ` Eli Zaretskii
2016-06-04 16:51     ` Noam Postavsky

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=4BCDF029.9040106@cjmweb.net \
    --to=cjm@cjmweb.net \
    --cc=5989@debbugs.gnu.org \
    /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.