From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?=C5=81ukasz?= Stelmach Subject: Re: [PATCH] quote the real csv separator Date: Sun, 24 Oct 2010 22:49:18 +0200 Message-ID: <871v7f8gfl.fsf@kotik.lan> References: <87mxq4wman.fsf@kotik.lan> <57E157F5-BDE7-4431-B15F-8EE52E571677@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from [140.186.70.92] (port=57110 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PA7VV-0003nz-QQ for emacs-orgmode@gnu.org; Sun, 24 Oct 2010 16:49:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PA7VU-0003Sp-HF for emacs-orgmode@gnu.org; Sun, 24 Oct 2010 16:49:33 -0400 Received: from lo.gmane.org ([80.91.229.12]:48497) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PA7VU-0003SU-2k for emacs-orgmode@gnu.org; Sun, 24 Oct 2010 16:49:32 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PA7VP-0002aW-2y for emacs-orgmode@gnu.org; Sun, 24 Oct 2010 22:49:27 +0200 Received: from 87-205-172-252.adsl.inetia.pl ([87.205.172.252]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 24 Oct 2010 22:49:27 +0200 Received: from lukasz.stelmach by 87-205-172-252.adsl.inetia.pl with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 24 Oct 2010 22:49:27 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Carsten Dominik writes: > On Oct 24, 2010, at 12:56 AM, Łukasz Stelmach wrote: > >> I'd rather use an optional sep argument to the org-quote-csv-field >> function but I've got no idea how to stick it into the orgtbl-apply- >> fmt. However, the quoting function should use current rather then >> assume comma. >> [...] >> > thanks for the patch, but I do not understand it. > > The separator for csv is always the comma, or am I wrong here? A bit. The fact is that both OpenOffice (i've just checked) and Microsoft Office (I am almost 100% sure) allow to choose the separator upon export. And org-mode also allows it with radio tables with the :sep parameter (which is passed to the generic exporter). > So this function should use comma, hard-coded. The only place > where it is used is when orgtbl-to-csv calls the generic > exporter. It does so with comma as separator and with > org-quote-csv-field as formatting function. > > What use case do you have in mind? For me in particular? This is quite complicated ;-) And if you decide to reject the patch I will understand. (Read only I you have some time to waste ;) 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. The reports from the bank are prepared for each account independently. When I transfer money between them I get entries in two reports. To get rid of this mess I decided to write a perl programme and I do it. And I prepare test data as radio tables and export them using pipe (yeah I know, this doesn't make a good point in favour of my patch) because... I prefer to manipulate all my bank report data with org-mode as tables. *My* use case isn't very good, is it? -- Miłego dnia, Łukasz Stelmach