Bernt Hansen <be...@norang.ca> writes: > Łukasz Stelmach <lukasz.stelm...@iem.pw.edu.pl> writes: >> Carsten Dominik <carsten.domi...@gmail.com> writes: >>> What use case do you have in mind? [...] >> My bank lets me download monthly reports as CSV. In fact they let me >> choose the separator and the default value is the comma. But I choose >> '|' because then I can open the csv as org file and just do >> >> (replace-regexp "^" "|") >> >> to get a beautiful org-mode table. > > There is an easier org-mode way I think. Just get the comma delimited > data into your org file, select the region and C-c | to get your table. > > If you are inserting an external file with C-x i <file> RET > then C-x C-x marks the region and C-c | converts it to a table.
Cool :-) It works like charm. I'll have to check how to convert decimal commas to periods. I still like '|' more for my perl script, though, because it's enough to split '\|' and not care about quoted commas. But this is my problem. OK, I won't insist on keeping the patch but I would like to get a rationale of :sep parameter in orgtbl-to-generic without a choice of how to quote it. OR, if you think that CSV should stay as it is then I suggest such a rewrite: (defun orgtbl-to-csv (table params) (orgtbl-to-generic table (org-combine-plists params '(:sep "," :fmt org-quote-csv-field)))) to make CSV :sep and and :fmt mandatory (that's how this all have starded). -- Miłego dnia, Łukasz Stelmach _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode