[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [PATCH] [org-table] user-chosen separator in org-table-convert-r
From: |
Carsten Dominik |
Subject: |
Re: [O] [PATCH] [org-table] user-chosen separator in org-table-convert-region |
Date: |
Sun, 29 Sep 2013 12:28:50 +0200 |
Hi Francois,
thanks for the explanation. I have checked in a modified version which does
what you proposal and also allows the user to call `C-c |' with a triple prefix
arg. In that case, the command will prompt the user for a regular expression
that will be used.
Useful, thank you!
- Carsten
On 3.9.2013, at 12:20, address@hidden wrote:
> 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
>
>
>
signature.asc
Description: Message signed with OpenPGP using GPGMail