From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/59719 Path: main.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel,gmane.emacs.gnus.general Subject: Re: re-search bug? Date: Fri, 4 Feb 2005 10:14:52 +0900 (JST) Message-ID: <200502040114.KAA29556@etlken.m17n.org> References: <200502030223.LAA24558@etlken.m17n.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1107479703 5479 80.91.229.2 (4 Feb 2005 01:15:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 4 Feb 2005 01:15:03 +0000 (UTC) Cc: yamaoka@jpl.org, ding@gnus.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 04 02:15:03 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Cws3j-0007xj-1Y for ged-emacs-devel@m.gmane.org; Fri, 04 Feb 2005 02:14:55 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CwsH9-0000k9-FS for ged-emacs-devel@m.gmane.org; Thu, 03 Feb 2005 20:28:47 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CwsGs-0000hO-Mh for emacs-devel@gnu.org; Thu, 03 Feb 2005 20:28:30 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CwsGp-0000fw-Gp for emacs-devel@gnu.org; Thu, 03 Feb 2005 20:28:29 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CwsGp-0000fc-Cg for emacs-devel@gnu.org; Thu, 03 Feb 2005 20:28:27 -0500 Original-Received: from [192.47.44.130] (helo=tsukuba.m17n.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1Cws3l-00011L-AD; Thu, 03 Feb 2005 20:14:58 -0500 Original-Received: from nfs.m17n.org (nfs.m17n.org [192.47.44.7]) by tsukuba.m17n.org (8.12.3/8.12.3/Debian-7.1) with ESMTP id j141Es2Q011474; Fri, 4 Feb 2005 10:14:54 +0900 Original-Received: from fs.m17n.org (fs.m17n.org [192.47.44.2]) by nfs.m17n.org (8.12.3/8.12.3/Debian-7.1) with ESMTP id j141ErGl025444; Fri, 4 Feb 2005 10:14:53 +0900 Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) by fs.m17n.org (8.11.6p2/8.11.6) with ESMTP id j141Erp04728; Fri, 4 Feb 2005 10:14:53 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id KAA29556; Fri, 4 Feb 2005 10:14:52 +0900 (JST) Original-To: rms@gnu.org In-reply-to: (message from Richard Stallman on Thu, 03 Feb 2005 14:14:00 -0500) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.3.50 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: main.gmane.org gmane.emacs.devel:32853 gmane.emacs.gnus.general:59719 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:59719 In article , Richard Stallman writes: > It seems that the current code in casefiddle.c has a serious > bug in supporting this kind of case-mapping. > i <--up/downcase--> I > DOTLESS-i --upcase-> I > I-WITH-DOT-ABOVE --downcase-> i > Do you want to debug the serious bug? I can't work on it at the moment because I'll soon go abroad and be off-line for a week. Anyway, there's a possibility that the bug is not in casefiddle.c but in case-fold searching and regexp matching functions. I'm not sure. > If you send me a precise test case, I could try to debug it. Please evaluate the attached code. Then try these: (test-regexp) => 1 ; correct (test-search) => nil ; correct (setup-case-table) (test-regexp) => nil ; incorrect (test-search) => nil ; incorrect (recover-case-table) (test-regexp) => 1 ; correct (test-search) => nil ; correct --- Ken'ichi HANDA handa@m17n.org (require 'case-table) (defvar original-case-table (copy-case-table (standard-case-table))) (defvar dotted-I (make-char 'latin-iso8859-9 ?\335)) (defvar dotless-i (make-char 'latin-iso8859-9 ?\375)) (defun setup-case-table () (let ((tbl (standard-case-table))) (set-downcase-syntax dotted-I ?i tbl) (set-upcase-syntax ?I dotless-i tbl))) (defun recover-case-table () (set-standard-case-table (copy-case-table original-case-table))) (defun test-regexp () (with-temp-buffer (let ((case-fold-search t)) (insert "i.") (re-search-backward "i\\." nil t)))) (defun test-search () (with-temp-buffer (let ((case-fold-search t)) (insert dotless-i) (search-backward "i" nil t))))