From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id ANKNNn+1t2AsOQAAgWs5BA (envelope-from ) for ; Wed, 02 Jun 2021 18:44:47 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id oMbuMX+1t2CNRwAAB5/wlQ (envelope-from ) for ; Wed, 02 Jun 2021 16:44:47 +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 63C1017434 for ; Wed, 2 Jun 2021 18:44:47 +0200 (CEST) Received: from localhost ([::1]:50804 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1loTz4-0003LP-Hs for larch@yhetil.org; Wed, 02 Jun 2021 12:44:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37008) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1loTyi-0003L7-U4 for emacs-orgmode@gnu.org; Wed, 02 Jun 2021 12:44:24 -0400 Received: from ciao.gmane.io ([116.202.254.214]:33142) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1loTyh-000314-HT for emacs-orgmode@gnu.org; Wed, 02 Jun 2021 12:44:24 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1loTye-0008yF-9q for emacs-orgmode@gnu.org; Wed, 02 Jun 2021 18:44:20 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Maxim Nikulin Subject: Re: bug#47885: [PATCH] org-table-import: Make it more smarter for interactive use Date: Wed, 2 Jun 2021 23:44:14 +0700 Message-ID: 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> <87pmx4484t.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 In-Reply-To: <87pmx4484t.fsf@gmail.com> Content-Language: en-US Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 22 X-Spam_score: 2.2 X-Spam_bar: ++ X-Spam_report: (2.2 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FORGED_MUA_MOZILLA=2.309, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_A=-0.613, NML_ADSP_CUSTOM_MED=0.9, 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=1622652287; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=eag4eC7/e7dP1Yfi9IipKqlgSgVOp0oRTs9ddnAAyIY=; b=HQ/EO0U0rXskhvYHVEJnuJOxCPZuDCYEvyWZpSkgp7lVW6hUwSzyBUmC5/7ezx8Ab/a+dM PWeqbPNA7bKzGzNKePLNWg8woFt2xigjYNaajl7Hhj0fgxJ4+GnFhz7EZBdSNPL2uUl61F EPQ6SvqC5v8NlH40TK2xjOkaYlA9DdAfMiU4nz04FyrGDfmBT9EIMMCn5aXbrvm0sIsWPC ZsYkTJt2zN7Cfn/a6B5c10r4+P0QAyXeKob2mQhwDO9gftrNQg0b94ubThFkoHHWGe/oFb rJ8Sb4SdLFr8u7IYrJLTxIHvSiS+WX8KDZIRoE8Q9mhkKcgAjbfryNyCJtCLlQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1622652287; a=rsa-sha256; cv=none; b=uk/ECuK+RaoLT2/+LqskViMaZ6THTv1KNSlGHzbaMAcSybzR/Bvb5Fi9Dor5SeOxTdLlC/ ZH3PJad6l6sSkeZAFG3lz2a1ke+TPydGeBO5ME8Dhgz98Fz+53cyuzvmZ8Dbg/RQjWkbOz zGBke4Q6bY9Uh/wUuBxcUIdYXrMED8KWkBeR8WZmLmSTKhgOzfnOrOaaXL07LpX18ZazaH 1VWCmpqi42rPVDb+z/wlcNCzCIC8dLm5Lic4gJi7WfQm08dy4oTHGqboU9rTeEcuzSE90r j2wwc8wsUuQ/LLftVvrNT3rw15K5SQk68KAtinFUtKQg/W7QDDQejSJm9DqpQg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); 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: -1.83 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); 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: 63C1017434 X-Spam-Score: -1.83 X-Migadu-Scanner: scn0.migadu.com X-TUID: v+1bmokGcZHs On 02/06/2021 22:08, Utkarsh Singh wrote: > ;;;###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)) It seems, prefix argument works now. Let me remind that file name completion was working better before your change. I have noticed a couple of error messages. Unsure what is going wrong, I hope, command to launch emacs is correct (-Q -L ~/src/org-mode/lisp test.org). At startup: Eager macro-expansion failure: (error "rx ‘not’ syntax error: (or 10 44)") In response to M-x org-table-import: rx-check-not: rx ‘not’ syntax error: (or 10 44) > 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! I do not know opinion of Org maintainers. Personally I believe that org can take advantage of Emacs core features or of other packages if they are available and fallback to minimal implementation otherwise. Unsure whether borrowing code from pcsv can cause license issues. Current CSV parser is not perfect but it works reasonably well.