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 16:25:03 +0200 Message-ID: <7516a8ee97c7efa620a8dd0570a747e6@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]:55645) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGrXr-0006lJ-K3 for emacs-orgmode@gnu.org; Tue, 03 Sep 2013 10:25:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VGrXj-0000SH-Ed for emacs-orgmode@gnu.org; Tue, 03 Sep 2013 10:25:27 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:59921) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGrXj-0000S7-8g for emacs-orgmode@gnu.org; Tue, 03 Sep 2013 10:25:19 -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 5BED7A80F1 for ; Tue, 3 Sep 2013 16:25:07 +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 hv6N-nRNk4zL for ; Tue, 3 Sep 2013 16:25:06 +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 085F3A80D8 for ; Tue, 3 Sep 2013 16:25:05 +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