From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 4PITKHJztmDEvgAAgWs5BA (envelope-from ) for ; Tue, 01 Jun 2021 19:50:42 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 4c9rI3JztmADDwAAbx9fmQ (envelope-from ) for ; Tue, 01 Jun 2021 17:50:42 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1151C21B46 for ; Tue, 1 Jun 2021 19:50:42 +0200 (CEST) Received: from localhost ([::1]:39932 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lo8XH-00023P-Qs for larch@yhetil.org; Tue, 01 Jun 2021 13:50:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37384) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lo8TE-0006TZ-1S for emacs-orgmode@gnu.org; Tue, 01 Jun 2021 13:46:28 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]:42515) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lo8T9-0005fc-1x; Tue, 01 Jun 2021 13:46:27 -0400 Received: by mail-pf1-x42f.google.com with SMTP id x18so59228pfi.9; Tue, 01 Jun 2021 10:46:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=eAoO5u8z1nazt7pXODdsrOsx9yqIkxuXLX5JP2VT1x0=; b=Q+e/dwT0Ue3qr8NPEwz3AP4oXAjPyB06MVe4o4zSExtkllwzRjhVhdixID2Z5vybBZ gz6xR3WFynxleMKF7UGINtOFStr1xUyepM1mE2l6e+L2u5xHen5yEE/APUxoVgY3RhkC 3uHJ5QW7Q+bjjLk488fcrvKMXSPWe3Z3Cd693tHOe0XWUMIucgyIZXNE5c8o7nCQ9N6A EpL64HoxLbWpcWuXRaBCLExdHWQUZ5M+vV5v9Utpp/9s3jO2r86Vvpv0OYAq6G6JvHka 54Q623v8hZxW/YZnewXpXcDtmb9zPiLgZnVACLLbAEPgjSRrubZmb3lSyJ9I2+SGva6n KJdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=eAoO5u8z1nazt7pXODdsrOsx9yqIkxuXLX5JP2VT1x0=; b=RU3Ii8XlJMwWYBfRlUKxXYxWr4DqrexkLna4s0DtZmR1DTDGttPv2SGyS1qa0w8OT6 fVV2+yk61IzgW1YRtdxFD3Vn9AaMlDSYBASvuThAKJwqEMR7z6sUFV375QclaomIJ8Sr uSbPuqVVmurLdQHlgg7S3vevTMzIvSKYJYWp8zPdKZlYaaqPhgonFDdJs4kQXbq5kQs7 zyDXV3GZ/jZalH4DcDfVxjy2+0KO9K4Ac5Vxmf157sJRNwqz55AiAR86uctXKmFzDmgw 2vtWkvX9Xjcia1iHjjLcPrldtTU9BvuF9o/yTQTOdEvq6zqoXz93K/ITP3PiwDwCEC/7 k0wA== X-Gm-Message-State: AOAM532DtadeuLI2PdY6fkZaX68CFa/0IDQMUT+B8Yur9BKPFL9xY3oL jDJzo0h7aZ8ln8CdhTE6E9s= X-Google-Smtp-Source: ABdhPJxV9gSLbxKe1Zh/5TWHLxT433pHY7pPe9WnduRLpnErvdXgtNh9TiGw0TwLC30MIgUyl3sNlg== X-Received: by 2002:a63:3cd:: with SMTP id 196mr18462277pgd.39.1622569580046; Tue, 01 Jun 2021 10:46:20 -0700 (PDT) Received: from localhost ([43.230.65.204]) by smtp.gmail.com with ESMTPSA id q3sm14020994pff.142.2021.06.01.10.46.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Jun 2021 10:46:19 -0700 (PDT) From: Utkarsh Singh To: Maxim Nikulin Subject: Re: bug#47885: [PATCH] org-table-import: Make it more smarter for interactive use In-Reply-To: <899175c5-1547-8c0c-2f16-f089fc74690a@gmail.com> References: <87czuq9958.fsf@gmail.com> <8735vmelfs.fsf@nicolasgoaziou.fr> <87k0oyfj4y.fsf@gmail.com> <87im4h9irn.fsf@nicolasgoaziou.fr> <87zgxpwqa7.fsf@gmail.com> <875z07jx6n.fsf@nicolasgoaziou.fr> <87tunqby9a.fsf@gmail.com> <875yzq77w8.fsf@gmail.com> <87o8dd74dv.fsf@gmail.com> <874kf49x7f.fsf@gnu.org> <87pmxse29o.fsf@gmail.com> <87a6ouj5c8.fsf@bzg.fr> <899175c5-1547-8c0c-2f16-f089fc74690a@gmail.com> Date: Tue, 01 Jun 2021 23:16:33 +0530 Message-ID: <87fsy1jx52.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=utkarsh190601@gmail.com; helo=mail-pf1-x42f.google.com X-Spam_score_int: 1 X-Spam_score: 0.1 X-Spam_bar: / X-Spam_report: (0.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, PDS_OTHER_BAD_TLD=1.997, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bastien , emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1622569842; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=eAoO5u8z1nazt7pXODdsrOsx9yqIkxuXLX5JP2VT1x0=; b=J+qila+PPK/X1uaDMWnyl3+j3gjOxuqF4rhEV2VKeH4o6DDnrx8KrsR/IFpM9ctXO75AO8 4RMsVQJdRPaz0lcx2OtzwCzxKSNT6GjGx63pBg2P0Bg1HYhkWKvMRXkKVM0L1oxwaaYJot FVdW3FejkJ8B/IEWKamL+QABVR9pqU3dTgahRge6dU4rsOcicIyjrO5qMThk1I2q/LVKGA Z1XBrUkymicnYq08w8S086iYlpTpZpivYaD5lEAE2o43rWnMF8aqm2qg1+CfCDkOucnPlN SMEgKyo/E1RYxrY5txC4rvXeIDKAzI4Zvcgj1S3gRJ12YjGTxjWP0vjh/OocRQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1622569842; a=rsa-sha256; cv=none; b=CwzJemoxnbLAc8SLnKeUvTmjEJQ3W63PRYHJ0dWwOkdFVWZ/7ytqGjytTS/2ZqhR1xEnvU AbNtCbM/YtAevgIs+X+yimJv5H2FcKliHS3FAfNZ6lKD2kFciVzerAJ7YLgb/vyugCs1vv W2G0FOFl9B/1myetusDE7jscWwMbMLrV068o2lfZhKbU7PuGlJkSTIJlJiYdriCNeBUNS5 ITKracNqv/Wl5kN4SjpNrvyAscl9e+38ec3x6VaUJ074WGo9kryCqhnR8qd7ZLGbJDBD00 dZXwH/2y4nSu6/Xm0xP/X0ulvoUigUhYYbI2lzDEzvTglimCNVdf+YhipHwojQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b="Q+e/dwT0"; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -3.13 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b="Q+e/dwT0"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 1151C21B46 X-Spam-Score: -3.13 X-Migadu-Scanner: scn0.migadu.com X-TUID: PjS/XrAD53FA Hi Maxim, First of all I would like to thank you for testing out patches and taking time to write a detailed report about it. On 2021-06-01, 23:23 +0700, Maxim Nikulin wrote: > On 17/05/2021 12:29, Bastien wrote: >> Utkarsh Singh writes: >>> For now can you review the patches I proposed earlier in this >>> thread? >> >> Not until both you and Maxim are confident this is useful, complete >> and predictable. > > I have too many points to object to consider my opinion as objective. > > Org 9.4.5+patches M-x org-table-import > > | 1,Word,66.3e-35 | | | | > | 2,Unquoted | cell,2.7 | | | > | 3,"Quoted | cell",3.14 | | | > | 4,"Cell | ""with | quotes""",2021-06-01 | | > | 5,"Next | cell | is | empty","" | > | 6,"Cell | with | new | | > | Line",6.28 | | | | > > So my personal conclusion is that CSV file is imported incorrectly in > both cases: with guessed separator and with explicitly requested through > prefix argument. Completion works a bit worse too. Currently `org-table-guess-separator' returns "," (COMMA as string) and `org-table-covert-region' uses '(4) to represent COMMA as separator which is the main cause of breakdown in importing. To make importing work well we have to: + Guess right separator (`org-table-guess-separator') + Parse CSV with this separator (`org-table-covert-region') As far as I can tell "guessing part" works well and now we just have to make parser work well with new separators. -- Utkarsh Singh http://utkarshsingh.xyz