From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Unibyte characters, strings and buffers Date: Fri, 28 Mar 2014 21:52:30 +0300 Message-ID: <8338i2f95d.fsf@gnu.org> References: <831txozsqa.fsf@gnu.org> <83ppl7y30l.fsf@gnu.org> <83d2h6yezx.fsf@gnu.org> <533528B9.9040200@cs.ucla.edu> <837g7eybwl.fsf@gnu.org> <5335C288.4090306@cs.ucla.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1396032754 24536 80.91.229.3 (28 Mar 2014 18:52:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 28 Mar 2014 18:52:34 +0000 (UTC) Cc: emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 28 19:52:43 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WTbtT-0006aB-6X for ged-emacs-devel@m.gmane.org; Fri, 28 Mar 2014 19:52:43 +0100 Original-Received: from localhost ([::1]:35551 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTbtS-00068w-Tg for ged-emacs-devel@m.gmane.org; Fri, 28 Mar 2014 14:52:42 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56634) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTbtL-00067h-4u for emacs-devel@gnu.org; Fri, 28 Mar 2014 14:52:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WTbtF-0005oS-VB for emacs-devel@gnu.org; Fri, 28 Mar 2014 14:52:35 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:38926) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTbtF-0005oH-NM for emacs-devel@gnu.org; Fri, 28 Mar 2014 14:52:29 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0N3500G00TDFX100@a-mtaout22.012.net.il> for emacs-devel@gnu.org; Fri, 28 Mar 2014 21:52:28 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N3500GRMTRFK980@a-mtaout22.012.net.il>; Fri, 28 Mar 2014 21:52:28 +0300 (IDT) In-reply-to: <5335C288.4090306@cs.ucla.edu> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.172 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:171091 Archived-At: > Date: Fri, 28 Mar 2014 11:42:16 -0700 > From: Paul Eggert > CC: Emacs development discussions > > On 03/28/2014 01:18 AM, Eli Zaretskii wrote: > > what you suggest will just > > replace one set of subtly buggy behaviors with another > > Code that blithly passes bytes in the range 128-255 to char-equal is > *already* buggy. There's nothing wrong with those bytes, certainly not when they stand for Latin-1 characters. > Although the proposed change wouldn't fix those bugs, it'd fix > others, so it'd be a win. How is it a win, when it actually _adds_ bugs? E.g., under your proposal, (char-equal 192 224) will yield non-nil when case-fold-search is non-nil. > Plus, the change is simpler and easier to explain than what we have now, > and that is a long-term win. I don't see how it is simpler or easier to explain. It replaces one lopsided interpretation of 128-255 values with another. > I'm afraid what I'm hearing is "although it's broken, unless we come up > with a perfect solution we shouldn't do anything". I don't know where you heard that. I certainly didn't say anything like that. > I'd rather fix this particular problem now, even if it's not > practical to fix all the related problems now. I suggested a solution: ignore case-fold-search in unibyte buffers. I think that's a greater win. > We don't need to slay the entire unibyte dragon to fix the > relatively minor issue of comparing characters. I agree. But then you are responding in a wrong thread ;-)