From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?=C5=81ukasz?= Stelmach Subject: [PATCH] quote the real csv separator Date: Sun, 24 Oct 2010 00:56:32 +0200 Message-ID: <87mxq4wman.fsf@kotik.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from [140.186.70.92] (port=44372 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P9n1A-00029p-8t for emacs-orgmode@gnu.org; Sat, 23 Oct 2010 18:56:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P9n17-00041H-RQ for emacs-orgmode@gnu.org; Sat, 23 Oct 2010 18:56:52 -0400 Received: from lo.gmane.org ([80.91.229.12]:40663) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P9n17-00040z-He for emacs-orgmode@gnu.org; Sat, 23 Oct 2010 18:56:49 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1P9n13-0003Ju-1w for emacs-orgmode@gnu.org; Sun, 24 Oct 2010 00:56:45 +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 00:56:45 +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 00:56:45 +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 Hi. 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. --8<---------------cut here---------------start------------->8--- diff --git a/lisp/org.el b/lisp/org.el index b482b8e..501dd8d 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -18019,7 +18019,7 @@ With prefix arg UNCOMPILED, load the uncompiled versions." (defun org-quote-csv-field (s) "Quote field for inclusion in CSV material." - (if (string-match "[\",]" s) + (if (string-match (concat "[\"" *orgtbl-sep* "]") s) (concat "\"" (mapconcat 'identity (split-string s "\"") "\"\"") "\"") s)) --8<---------------cut here---------------end--------------->8--- -- Miłego dnia, Łukasz Stelmach