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: Mon, 25 Oct 2010 13:59:44 +0200 Message-ID: <87ocaimqj3.fsf@dasa3.iem.pw.edu.pl> References: <87mxq4wman.fsf@kotik.lan> <57E157F5-BDE7-4431-B15F-8EE52E571677@gmail.com> <871v7f8gfl.fsf@kotik.lan> <87tykbqd1v.fsf@gollum.intra.norang.ca> <87zku2mzjn.fsf@dasa3.iem.pw.edu.pl> <627E784E-E564-4604-A644-1D7CBC1597F8@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=39716 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PALp0-0000Hm-88 for emacs-orgmode@gnu.org; Mon, 25 Oct 2010 08:06:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PALiZ-0005Jx-U8 for emacs-orgmode@gnu.org; Mon, 25 Oct 2010 08:00:01 -0400 Received: from lo.gmane.org ([80.91.229.12]:34511) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PALiZ-0005Js-KU for emacs-orgmode@gnu.org; Mon, 25 Oct 2010 07:59:59 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PALiV-0004EF-8z for emacs-orgmode@gnu.org; Mon, 25 Oct 2010 13:59:55 +0200 Received: from dasa3.iem.pw.edu.pl ([194.29.147.110]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 25 Oct 2010 13:59:55 +0200 Received: from lukasz.stelmach by dasa3.iem.pw.edu.pl with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 25 Oct 2010 13:59:55 +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 25, 2010, at 10:45 AM, Łukasz Stelmach wrote: >> 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). > > I don't understand, here is the current definition of orgtbl-to-csv: > > (defun orgtbl-to-csv (table params) > "Convert the orgtbl-mode table to CSV material. > This does take care of the proper quoting of fields with comma or > quotes." > (orgtbl-to-generic table (org-combine-plists > '(:sep "," :fmt org-quote-csv-field) > params))) > > so these are mandatory. I guess I do not understand what you are > saying. OK, try to eval these: (let ((params '(:sep "|"))) (org-combine-plists '(:sep "," :fmt org-quote-csv-field) params)) (let ((params '(:sep "|"))) (org-combine-plists params '(:sep "," :fmt org-quote-csv-field))) The latter prevents :sep from being overriden. -- Miłego dnia, Łukasz Stelmach