From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "T.V Raman" Newsgroups: gmane.emacs.devel Subject: Re: Supported/Bundled CSV support? Date: Tue, 15 Mar 2022 08:27:23 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=gb18030 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33993"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Ergus , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Mar 15 16:31:21 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 1nU98p-0008gx-Rd for ged-emacs-devel@m.gmane-mx.org; Tue, 15 Mar 2022 16:31:19 +0100 Original-Received: from localhost ([::1]:36210 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nU98o-0000Qq-Ji for ged-emacs-devel@m.gmane-mx.org; Tue, 15 Mar 2022 11:31:18 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:40124) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nU95A-0006LB-11 for emacs-devel@gnu.org; Tue, 15 Mar 2022 11:27:32 -0400 Original-Received: from [2607:f8b0:4864:20::62b] (port=41493 helo=mail-pl1-x62b.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nU958-0000dY-CX for emacs-devel@gnu.org; Tue, 15 Mar 2022 11:27:31 -0400 Original-Received: by mail-pl1-x62b.google.com with SMTP id z3so16515147plg.8 for ; Tue, 15 Mar 2022 08:27:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=DwExEJyicMC1hXObUZWbzW7S7fkXLBCqZ8zdFgwzHCc=; b=Gy82EqALIeodOH2P+wvVUtibXS/2e4iDvJEPFsQ8JGx7s43P9JPMDWVCAE+MQUFNiw 060GIsz6OC/ZayreVMvpxwz/LNLDD7jxeIJ2jjYC1G4516u6sWku6m/OVwGlI9Gf7yp5 B+3uFOwpx/JLWJA3KwmI8MYMF8bP3LO2910oOVoiyWLuqI+4JDM2B+fRR3BSB4lIMfig n0pgoNqFlG02X9NothrAqIaO91kITRPISXHyNYm3VUojRVCQ9V9IO+Oe2+tqTL/2Of0L t5c1XvUH7Dk9D5qhfuJpkk83ZWLpvgj5p3bQotV3vMkC+eh2OyMmT+NGSlv3677EKGZn 4fmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=DwExEJyicMC1hXObUZWbzW7S7fkXLBCqZ8zdFgwzHCc=; b=jjZ5bWc2argpajFFbYMXF+gX4F3xuVQJKzkqvg3XI+qWOMwWfl+ZfKJOk1j9TlNgPh ngIfySbpRoqO7RLPiZb6MXsEIZP5bRIQlo+3nWPTmpBSBZwNob6B32WwNkVuWrV6/CYf mA84BssYeBo89h8qAV7NDEpEDeHqZM5J1uoA/2WUi/vk/nQNIqwuE6Mwyg1XpFQ4CIAC G/EgSazAfYnRF+RaCTcMbYFjyRBLD0epf5LTAPxedIEytIX0VHtvt+tOtgbVQsYAbtAG /yTZvcCKeEjSw7MzWmR+5TXxPrFTxPxMrdaKi/+vyvB0EodeADlvLEvLGm/adjI2HwZF Lo5w== X-Gm-Message-State: AOAM5314Xs4pos4BaT5LUSuINa/WxqmXag6/rrETDWfKAhCZmATSY52j Y3HLn51BRcyihrczOZQeUZn0AIYzXUUXiA== X-Google-Smtp-Source: ABdhPJw7JZ7Q3LBrImLhfxZw+EOcpsENDxirXgjc8BtSoxrsErmX/E92ehL2bH55wuYpCnOFEzMFIg== X-Received: by 2002:a17:90a:7f92:b0:1bc:f09:59 with SMTP id m18-20020a17090a7f9200b001bc0f090059mr5315491pjl.98.1647358048262; Tue, 15 Mar 2022 08:27:28 -0700 (PDT) Original-Received: from raman-glaptop (c-24-4-174-65.hsd1.ca.comcast.net. [24.4.174.65]) by smtp.gmail.com with ESMTPSA id e10-20020a056a00162a00b004f6fc39c081sm23083292pfc.211.2022.03.15.08.27.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Mar 2022 08:27:25 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Tue, 15 Mar 2022 10:57:57 -0400") X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::62b (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::62b; envelope-from=raman@google.com; helo=mail-pl1-x62b.google.com X-Spam_score_int: -161 X-Spam_score: -16.2 X-Spam_bar: ---------------- X-Spam_report: (-16.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5 autolearn=no autolearn_force=no X-Spam_action: no action 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:287195 Archived-At: Stefan Monnier writes: Yes, you are correct. There are modules like pcsv.el and similarly named ones from the past that do an approximate job -- when I looked into this approx 20 years ago, I also ended up writing one of my own within Emacspeak --- in my experience each of these hand-rolled csv parsers are differently broken in their own way -- including the one in emacspeak, since as as I pointed out in my earlier message, parsing various variants of CSV is surprizingly hard. >> I think having built-in CSV support that abstracts away the various >> details of parsing the various CSV variants will allow the emacs Dev >> community to focus on user solutions e.g.: >> >> A. Seamless data import/export >> B. Support the processing of larger amounts of data via org-table and th= e like >> C. Json support vastly sped up modules like lsp and eglot; I'd expect >> the same once we cross the chasm with respect to making CSV support >> a built-in detail that elisp developers can take for granted. > > You might be right, but if so you're talking about a very different kind > of "CSV support" than the kind I'm familiar with (which is the support > to manually edit/browse a human-generated CSV file, as offered by > `csv-mode`). You seem to be talking about code to efficiently parse > a whole CSV file into a Lisp representation (list of lists or better) or > to generate a CSV-formatted string from such Lisp representation. > > Is that right? In that case, indeed `csv-mode` is of no > help, basically. > > > Stefan > > >>> Just an idea/question: >>> >>> With the new Lars package vtable may be possible to support CSV or add >>> a package over it? >>> >>> I agree it is a bit annoying to depend of an external package for such >>> a simple format and maybe the implementation may be simpler than >>> expected as the format it pretty simple in general. >>> >>> WDYT? >>> >>> On March 14, 2022 11:30:43 PM GMT+01:00, Stefan Monnier >>> wrote: >>> >>> Languages like Python work around this with a csv module that >>> comes >>> bundled; Emacs has a couple of modules out on elpa/melpa all of which >>> look old. >>> >>> Don't know about Melpa, but in (Non)GNU ELPA, I can only find one such >>> package and it dates back to Dec 2021. >>> >>> Stefan > --=20 Thanks, --Raman(I Search, I Find, I Misplace, I Research) =817=A94 Id: kg:/m/0285kf1 =950=DC8