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: CSV parsing and other issues (Re: LC_NUMERIC) Date: Fri, 11 Jun 2021 21:04:51 +0300 Message-ID: <83h7i49t18.fsf@gnu.org> References: <20210606233638.v7b7rwbufay5ltn7@E15-2016.optimum.net> <83a6o1hn9l.fsf@gnu.org> <20210608004510.usj7rw2i6tmx6qnw@E15-2016.optimum.net> <83h7i9f5ij.fsf@gnu.org> <73df2202-081b-5e50-677d-e4498b6782d4@gmail.com> <83eedcdw8k.fsf@gnu.org> <83lf7hbqte.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25396"; mail-complaints-to="usenet@ciao.gmane.io" Cc: boruch_baum@gmx.com, emacs-devel@gnu.org To: Maxim Nikulin Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jun 11 20:08:12 2021 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 1lrlZj-0006PN-MA for ged-emacs-devel@m.gmane-mx.org; Fri, 11 Jun 2021 20:08:11 +0200 Original-Received: from localhost ([::1]:44010 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lrlZi-0004ga-N9 for ged-emacs-devel@m.gmane-mx.org; Fri, 11 Jun 2021 14:08:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46206) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lrlWg-0001u8-5x for emacs-devel@gnu.org; Fri, 11 Jun 2021 14:05:02 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:36722) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lrlWf-00077S-Qe; Fri, 11 Jun 2021 14:05:01 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4154 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 1lrlWf-0001mo-Ds; Fri, 11 Jun 2021 14:05:01 -0400 In-Reply-To: (message from Maxim Nikulin on Fri, 11 Jun 2021 23:58:24 +0700) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:270710 Archived-At: > From: Maxim Nikulin > Date: Fri, 11 Jun 2021 23:58:24 +0700 > Cc: boruch_baum@gmx.com > > On 10/06/2021 23:57, Eli Zaretskii wrote: > >> From: Maxim Nikulin Date: Thu, 10 Jun 2021 23:28:59 +0700 > > > > For processing CSV, if there's a need to know whether the > > locale uses the comma as a decimal separator, we could > > indeed extend locale-info. But such an extension is almost > > trivial and doesn't even touch on the significant problems > > in the rest of the discussion. > > > > You forgot `setlocale(LC_NUMERIC, "C")', didn't you? No, I didn't. Adding a call to setlocale to locale-info, even if we want to add an argument for the caller to control the locale, is trivial. > > Here's a trivial example: > > > > (insert (downcase (buffer-substring POS1 POS2))) > > > > Contrast with > > > > (insert (downcase "FOO")) > > Either `set-text-properties' should be called on "FOO" before passing it > to `downcase' Which property will help here? we don't have such properties. they need to be designed and implemented. > or `locale-downcase' with LOCALE first argument should be > added. How would you implement locale-downcase? Are you familiar with how Emacs case tables work? And even if we had locale-downcase, which locale would you pass to it in any given use case? Please note that I'm not saying these issues cannot be solved -- they can. I'm saying that designing them requires non-trivial thought, something we didn't yet do.