From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id kEMnMu2et2DOBgAAgWs5BA (envelope-from ) for ; Wed, 02 Jun 2021 17:08:29 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id WPduLe2et2DoVAAA1q6Kng (envelope-from ) for ; Wed, 02 Jun 2021 15:08:29 +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 30729156E9 for ; Wed, 2 Jun 2021 17:08:29 +0200 (CEST) Received: from localhost ([::1]:50586 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1loSTr-0002ub-Sl for larch@yhetil.org; Wed, 02 Jun 2021 11:08:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38612) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1loSTJ-0002sP-7j for emacs-orgmode@gnu.org; Wed, 02 Jun 2021 11:07:53 -0400 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]:36846) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1loSTG-00038p-A3 for emacs-orgmode@gnu.org; Wed, 02 Jun 2021 11:07:52 -0400 Received: by mail-pl1-x633.google.com with SMTP id x10so1258072plg.3 for ; Wed, 02 Jun 2021 08:07:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=opqDuORYFMHMOwSX7Ef0EtCUN7d2RnV+pxwPigcQ0Tg=; b=eiTSNHx8mTf2WhPwShGTFleAMCcI4s6YsjNxLC/Slp4i7n3HYyGV9pPARRtMiLEzZy ZGKjSWe0G0nrEz9GnFgtTybGbgaOIheVWrkPE/r7QHIKb2aEtsoKiGAq40Y1Tnh7QoQj 5ss1n6lrrXVsXqStw2cTPtbhwXG0n0Ge1V++it2RzaUejwIvopUErCMkuXoCJwwuZK1J Pp3Z657iuLNmstF9Zkc42AN4tfYmwZtQG7nknqOVD3JvNgg7Su6vK6JTtyrHjV42BAkg Cm4Ny4+5FNcd+FSK4kBxmJGRxyqepxngr74LS+TFX3ZOXxM+kmRDcEDOGg9Pi/UL5x7D dySw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=opqDuORYFMHMOwSX7Ef0EtCUN7d2RnV+pxwPigcQ0Tg=; b=n4gxaAbDQPPDPk0eJwnMW5sTuYTfOELZeaI90NIHD6IE4alA6l1hbqj+/+SnldtBJA TMcAc7j4Y/6n9KgZfXcSYfv90fA4zYtEIzSbOnrDOCSF4yEA9rvSFYpaKhSHq6SfC/Px e9/cfDcKcbkk2zUbYWzjFIq3euXpxzaxVeZu9s01rQW5Tfg4+Qg0Pe09WoILFdCOca2q jLKd3wICvliX5UeA0ObcmWjbBVxFoqWv4IsT5f9i3JiQzp6gtkXXb5vv/K1aJTNzWtc0 fnUSyUExk0mdhAhOr/fHEUtfh2b0hYmE2QvAQuREdZEspxNKwxuZGqZdQAEPbouWeX2C Y80w== X-Gm-Message-State: AOAM533sGgpz/+Q2LbXPfw5uX03jE7v/ub5dHjah2Uf89Rm5q5105ihJ J7jQJTKGNMR+00bCoiA/6QM= X-Google-Smtp-Source: ABdhPJzzkag9VzOEAFTQl0DGDf2LvSlcIgd+BaPjV4XePwSzb7wBjljo0GeN0hWbNCjckhZcEpN1dg== X-Received: by 2002:a17:903:1cd:b029:f0:c1c2:9e75 with SMTP id e13-20020a17090301cdb02900f0c1c29e75mr31478388plh.54.1622646468814; Wed, 02 Jun 2021 08:07:48 -0700 (PDT) Received: from localhost ([103.77.0.41]) by smtp.gmail.com with ESMTPSA id s11sm17184pfm.95.2021.06.02.08.07.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Jun 2021 08:07:48 -0700 (PDT) From: Utkarsh Singh To: Maxim Nikulin , emacs-orgmode@gnu.org Subject: Re: bug#47885: [PATCH] org-table-import: Make it more smarter for interactive use In-Reply-To: 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> <87fsy1jx52.fsf@gmail.com> Date: Wed, 02 Jun 2021 20:38:02 +0530 Message-ID: <87pmx4484t.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::633; envelope-from=utkarsh190601@gmail.com; helo=mail-pl1-x633.google.com X-Spam_score_int: 15 X-Spam_score: 1.5 X-Spam_bar: + X-Spam_report: (1.5 / 5.0 requ) BAYES_05=-0.5, 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: , 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=1622646509; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=opqDuORYFMHMOwSX7Ef0EtCUN7d2RnV+pxwPigcQ0Tg=; b=g0yyMWQW/c/kDq5b9hjmBrQ111G+3LccZzzW1Nqs9bqdhUaCo69necbOGuivnExW8A5SIz T3P16Rax1s16fbCFctVtdv8mqqc5/SA/iB1JlylozN+Xyq2BqITk/GoLN46/zO+VrSFCFT h5tgu97QgFD+i2Vn4RJ9awt/h23E6ohQKbcDfxQpN6TI/aLlUHd5hpTUF6Id6zxVP06O8a pBDXA5yN9sjSrDP0HA3Z/sb2SeEUlZvpd/9Y+zl6f7Qqh6EHYhN6hhKFOQyZa7e7HeOaOr lF5CMeiZGj6HKxac5eT7jSPEOYkFT14DWDELRH7dBKcne+ozKoJ9sq0Ryllidg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1622646509; a=rsa-sha256; cv=none; b=cF0L88J6y/ineDIU0Wu1Ut+jUYIF1Wemdv+mMcAJgjv1LE6YIEEfgTROnwbeWnBwVemNLa Nu/mHgnaH/sJ+3ROiSNlMs9mMibaBiYRtzjzT2YsTt4nGD4FkE1qnTZ7Beohe+m7yyoFkG fVBmC73tke52tsBSSQWLbN4F05NU8kyqMkNknxya0bd/p/KXeH933lLw0knRQqPYtj2fCi 9asopHJJicaEZ9vPdCXPaEWjRdIiYG6sBRalchH0wgiP6twJBY6Sv/8ikhAKTxDcZkZwi9 OxqTgLXVEOjfv0sXmNYWcE13XtZKaM92JCW0Py8ej5eyKGYyx1VrT2wdDie/9A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=eiTSNHx8; 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-Spam-Score: -3.13 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=eiTSNHx8; 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: 30729156E9 X-Spam-Score: -3.13 X-Migadu-Scanner: scn0.migadu.com X-TUID: c0i9voopVrre On 2021-06-02, 19:06 +0700, Maxim Nikulin wrote: > Notice that for "C-u M-x org-table-import" heuristics is not necessary, > the separator is specified explicitly. I see that your intention was to > improve user interface of org-table-import, but actually you broke it by > the "org-table-import: add file prompt" patch. I have not tried it, but > my expectation is that user prompt can be customized while keeping all > other things working. Maybe the docstring should be updated to make it > more friendly to novices (like me while reviewing your patch). Thanks for pointing out the error, locally you can fix it by (patches for patches): ;;;###autoload (defun org-table-import (file separator) @@ -955,12 +971,13 @@ lines. It can have the following values: - integer When a number, use that many spaces, or a TAB, as field separator. - regexp When a regular expression, use it to match the separator." (interactive (list (read-file-name "Import file: ") - (prefix-numeric-value current-prefix-arg))) + current-prefix-arg)) Currently I am trying to refactor CSV parsing by applying techniques used in pcsv library (MELPA package) which I think you will also enjoy to play with! -- Utkarsh Singh http://utkarshsingh.xyz