emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Maxim Nikulin <manikulin@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: bug#47885: [PATCH] org-table-import: Make it more smarter for interactive use
Date: Wed, 2 Jun 2021 19:06:54 +0700	[thread overview]
Message-ID: <s97s8v$j6s$1@ciao.gmane.io> (raw)
In-Reply-To: <87fsy1jx52.fsf@gmail.com>

On 02/06/2021 00:46, Utkarsh Singh wrote:
>> 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.

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).





  reply	other threads:[~2021-06-02 12:08 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-19  4:43 Utkarsh Singh
2021-04-19  8:19 ` Nicolas Goaziou
2021-04-19 14:23   ` Utkarsh Singh
2021-04-20 13:40     ` Nicolas Goaziou
2021-04-20 17:15       ` Utkarsh Singh
2021-04-23  4:58       ` Utkarsh Singh
2021-04-27 20:21         ` bug#47885: " Nicolas Goaziou
2021-04-28  8:37           ` Utkarsh Singh
2021-04-28 16:38             ` Maxim Nikulin
2021-05-10 18:36               ` Utkarsh Singh
2021-05-12 17:08                 ` Maxim Nikulin
2021-05-14 14:54                   ` Utkarsh Singh
2021-05-15  9:13                     ` Bastien
2021-05-15 10:10                       ` Utkarsh Singh
2021-05-15 10:30                         ` Bastien
2021-05-15 11:09                           ` Utkarsh Singh
2021-05-17  5:29                         ` Bastien
2021-05-17 16:27                           ` Utkarsh Singh
2021-06-01 16:23                           ` Maxim Nikulin
2021-06-01 17:46                             ` Utkarsh Singh
2021-06-02 12:06                               ` Maxim Nikulin [this message]
2021-06-02 15:08                                 ` Utkarsh Singh
2021-06-02 16:44                                   ` Maxim Nikulin
2021-06-04  4:04                                     ` Utkarsh Singh
2021-06-05 12:40                                       ` Maxim Nikulin
2021-06-05 17:50                                         ` Utkarsh Singh
2021-06-09 12:15                                           ` Maxim Nikulin
2021-09-26  8:40                                           ` Bastien
2021-05-16 16:24                     ` Maxim Nikulin
2021-05-17 16:30                       ` Utkarsh Singh
2021-05-18 10:24                       ` Utkarsh Singh
2021-05-18 12:31                         ` Maxim Nikulin
2021-05-18 15:05                           ` Utkarsh Singh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='s97s8v$j6s$1@ciao.gmane.io' \
    --to=manikulin@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --subject='Re: bug#47885: [PATCH] org-table-import: Make it more smarter for interactive use' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).