emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Re: [PATCH] quote the real csv separator


From: Bernt Hansen
Subject: [Orgmode] Re: [PATCH] quote the real csv separator
Date: Sun, 24 Oct 2010 21:25:00 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Łukasz Stelmach <address@hidden> writes:

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

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.

If this works better for you then I would suggest dropping the patch.

Regards,
Bernt



reply via email to

[Prev in Thread] Current Thread [Next in Thread]