[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] Re: [PATCH] quote the real csv separator
From: |
Łukasz Stelmach |
Subject: |
[Orgmode] Re: [PATCH] quote the real csv separator |
Date: |
Sun, 24 Oct 2010 22:49:18 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
Carsten Dominik <address@hidden> 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
[Orgmode] Re: [PATCH] quote the real csv separator, Sébastien Vauban, 2010/10/25