From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: case-insensitive string comparison Date: Tue, 26 Jul 2022 22:30:21 +0300 Message-ID: <83wnbzbrjm.fsf@gnu.org> References: <837d3zdfco.fsf@gnu.org> <21545625.EfDdHjke4D@nimes> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27015"; mail-complaints-to="usenet@ciao.gmane.io" Cc: sds@gnu.org, emacs-devel@gnu.org To: Bruno Haible Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jul 26 21:34:58 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oGQKW-0006hy-Ec for ged-emacs-devel@m.gmane-mx.org; Tue, 26 Jul 2022 21:34:56 +0200 Original-Received: from localhost ([::1]:45078 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oGQKV-0001Fl-89 for ged-emacs-devel@m.gmane-mx.org; Tue, 26 Jul 2022 15:34:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50606) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGQG2-0006Yp-VV for emacs-devel@gnu.org; Tue, 26 Jul 2022 15:30:19 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:44374) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGQG2-0003az-6g; Tue, 26 Jul 2022 15:30:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=4qzPxfrWVhSBikFVD3kiFk0Ht688Onoqphv1Hu6mlw8=; b=X0F3xfzWxQ8jvayqcAXY dPW+KImQPkRzMG7lr77JsArvuN4Qd1+QyAOkBwnGllezi1hZOHJ3vJSgW2CgxVUJqughyPvyPUuGs nlUWVQd1NenOcOMIJPR3RkGAzSCj42Q87rD/zXiHPcezfiqVfY8DlHPI7FMvUwtEsH1rr7z3j9Cwv nQbcm8FyuOxv82gh17RipeNeU+yw6AD0xWNhjp9ciS6Dio+BrtIrKe4u7jM/3mj5R9d5HLf94DcX3 QY7XEUH/MR8b24LkzTHTQORVGOe4z2YzLbaSAKogO+INGBIOh7YJmxSxi4ZoQxdlP1rgMuo+pR+26 x6drOfQOk/TXjA==; Original-Received: from [87.69.77.57] (port=3813 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGQG0-0000Ff-Hp; Tue, 26 Jul 2022 15:30:17 -0400 In-Reply-To: <21545625.EfDdHjke4D@nimes> (message from Bruno Haible on Tue, 26 Jul 2022 20:56:10 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:292715 Archived-At: > From: Bruno Haible > Cc: sds@gnu.org, emacs-devel@gnu.org > Date: Tue, 26 Jul 2022 20:56:10 +0200 > > Eli Zaretskii wrote: > > With the > > current machinery, a Lisp program or a user can control up/down-casing > > by specifying a buffer-local case-table, and we won't give up this > > important functionality. > > For which types of users, and for which use-cases, do you consider this an > "important functionality"? One example that immediately comes to mind is when you need to downcase strings without being hit by the case of 'I' in the Turkish locale. We use this, for example, when parsing various Internet protocols. More importantly, Emacs had this feature for many years, so suddenly losing it is not really a possibility. > Recall that the Unicode casing tables already cover the special cases for > 'ß', Turkisch i, and so on. We have the infrastructure for supporting that, and do so in locales where that is required. In particular, Emacs imports the data from the Unicode SpecialCasing.txt file. > I'd like to understand whether per-user customization of casing rules is > so important that libunistring should offer it in the API (as opposed to > requiring code modifications). > > LibreOffice, for example, allows per-user customizations of the spell- > checking dictionary, but not of the casing tables. Is that a flaw, and why? Emacs is not only a text-editing program, it is primarily a text-processing environment. When you write programs that process text, control of case conversions is sometimes important. Whether this means libunistring needs to grow such an API, I don't know.