From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs,gmane.emacs.pretest.bugs Subject: bug#1215: 23.0.60; unibyte->multibyte conversion problem (in search-forward and friends) Date: Wed, 22 Oct 2008 10:51:29 -0400 Message-ID: References: Reply-To: Stefan Monnier , 1215@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1224688245 1456 80.91.229.12 (22 Oct 2008 15:10:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 22 Oct 2008 15:10:45 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, 1215@emacsbugs.donarmstrong.com To: Eduardo Ochs Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 22 17:11:43 2008 connect(): Connection refused Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KsfN0-00084J-6c for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Oct 2008 17:11:34 +0200 Original-Received: from localhost ([127.0.0.1]:45730 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KsfLt-0001Yo-Oq for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Oct 2008 11:10:25 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KsfLe-0001Pf-MO for bug-gnu-emacs@gnu.org; Wed, 22 Oct 2008 11:10:10 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KsfLd-0001PJ-7K for bug-gnu-emacs@gnu.org; Wed, 22 Oct 2008 11:10:10 -0400 Original-Received: from [199.232.76.173] (port=51350 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KsfLd-0001PG-1P for bug-gnu-emacs@gnu.org; Wed, 22 Oct 2008 11:10:09 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:47402) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KsfLb-0000L9-PA for bug-gnu-emacs@gnu.org; Wed, 22 Oct 2008 11:10:08 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9MFA1rW016694; Wed, 22 Oct 2008 08:10:01 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m9MF04Rs013738; Wed, 22 Oct 2008 08:00:04 -0700 X-Loop: don@donarmstrong.com Resent-From: Stefan Monnier Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Wed, 22 Oct 2008 15:00:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1215 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 1215-submit@emacsbugs.donarmstrong.com id=B1215.122468709912389 (code B ref 1215); Wed, 22 Oct 2008 15:00:04 +0000 Original-Received: (at 1215) by emacsbugs.donarmstrong.com; 22 Oct 2008 14:51:39 +0000 Original-Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9MEpZUT012382 for <1215@emacsbugs.donarmstrong.com>; Wed, 22 Oct 2008 07:51:37 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtoEAPLa/khFxLrB/2dsb2JhbACBcsRYg0+BCw X-IronPort-AV: E=Sophos;i="4.33,464,1220241600"; d="scan'208";a="28714461" Original-Received: from 69-196-186-193.dsl.teksavvy.com (HELO pastel.home) ([69.196.186.193]) by ironport2-out.teksavvy.com with ESMTP; 22 Oct 2008 10:51:29 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 5844E8101; Wed, 22 Oct 2008 10:51:29 -0400 (EDT) In-Reply-To: (Eduardo Ochs's message of "Tue, 21 Oct 2008 12:00:58 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Wed, 22 Oct 2008 11:10:10 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:21784 gmane.emacs.pretest.bugs:23289 Archived-At: > Let me refer to strings like "<>" - where the "<<" and ">>" stand > for guillemets, i.e., the characters that we type with `C-x 8 <' and > `C-x 8 >' - as "anchors". So: if I produce an anchor string in a > unibyte buffer and then I search for an occurrence of that string in > multibyte buffer, the search fails. There are no guillemets in unibyte buffers. > ;;--------snip,snip-------- > ;; -*- coding: raw-text-unix -*- > ;; (save-this-block-as "/tmp/1.txt") > (progn > (find-file "/tmp/2.txt") > (goto-char (point-min)) > (setq anchorstr "=ABfoo=BB") > (message (if (multibyte-string-p anchorstr) "multi" "uni")) > (search-forward anchorstr)) There's a bug here, indeed: Emacs should refuse to save such a file, because raw-text-unix (to which I prefer to refer as `binary') cannot encode =AB and =BB. Stefan