From mboxrd@z Thu Jan 1 00:00:00 1970 From: francois@avalenn.eu Subject: [PATCH] [org-table] user-chosen separator in org-table-convert-region Date: Tue, 03 Sep 2013 12:20:22 +0200 Message-ID: <8aac63099d110d297d0ada9ff87cb93b@avalenn.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48639) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGnj7-0005f1-H8 for emacs-orgmode@gnu.org; Tue, 03 Sep 2013 06:20:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VGnj0-0000Fi-7Q for emacs-orgmode@gnu.org; Tue, 03 Sep 2013 06:20:49 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:35736) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGnj0-0000Ey-0K for emacs-orgmode@gnu.org; Tue, 03 Sep 2013 06:20:42 -0400 Received: from mfilter14-d.gandi.net (mfilter14-d.gandi.net [217.70.178.142]) by relay3-d.mail.gandi.net (Postfix) with ESMTP id B95EAA80CD for ; Tue, 3 Sep 2013 12:20:26 +0200 (CEST) Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by mfilter14-d.gandi.net (mfilter14-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id D5oUF+BCD16E for ; Tue, 3 Sep 2013 12:20:25 +0200 (CEST) Received: from webmail.gandi.net (unknown [10.58.1.145]) (Authenticated sender: francois@avalenn.eu) by relay3-d.mail.gandi.net (Postfix) with ESMTPA id 70714A80DB for ; Tue, 3 Sep 2013 12:20:25 +0200 (CEST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hello, I made this patch to make easier conversion to org-table from csv-like text with arbitrary separator. --- lisp/org-table.el | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/lisp/org-table.el b/lisp/org-table.el index c7e7eb8..c8c2462 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -575,6 +575,8 @@ nil When nil, the command tries to be smart and figure out the (if (< separator 1) (user-error "Number of spaces in separator must be >= 1") (format "^ *\\| *\t *\\| \\{%d,\\}" separator))) + ((stringp separator) + (format "^ *\\|%s" separator)) (t (error "This should not happen")))) (while (re-search-forward re end t) (replace-match "| " t t))) -- 1.7.9