bug-recutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-recutils] ob-rec.el change delimiter from "comma" to "tab"


From: Charles Millar
Subject: Re: [bug-recutils] ob-rec.el change delimiter from "comma" to "tab"
Date: Mon, 24 Aug 2015 19:25:45 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0

Soooo - apparently the solution is

\\\t

( code before the following
(setq cmd (concat cmd " | rec2csv -d \\\t")))

(org-table-convert-region (point-min) (point-max) '(16))



On 08/16/2015 05:42 PM, Charles Millar wrote:
I am cross posting so as to reach a possibly wider audience and also that this issue may be a feature request.

I have found recutils and recmode are very flexible. I started to use them in my legal work, especially when tables must be generated in estate proceedings for instance. As for simplicity it is easier for me to keep track of contacts as well as "interested parties" using recutils.

Please note that I keep most of my files in as *.org and therefore use ob-rec.el quite a bit.

As you may infer from the subject line, the rec2csv default comma delimited table is a problem for me, whereas a tab delimited table would be much better in my situation - for example an address field with

Name
+ Address
+ City, State ZIP

will generate two columns upon conversion because of the comma between City and State.

Likewise, a field which I call Note: may include two or three sentences with an occasional comma which of course break these sentences into columns.

I rarely use a tab. (I export to latexpdf so almost always I rely on latex commands for indentation, etc.)

So how should I alter ob-rec.el so that the table is tab delimited?

I have changed two lines in my attempt:

     (setq cmd (concat cmd " | rec2csv")))

to a tab delimiter

      (setq cmd (concat cmd " | rec2csv -d     ")))
^^

where immediately following the -d I have inserted C-i, or C-q C-i, \t, TAB, and two or three other variations. I have inserted a <space> between the -d and my entry as well as have not inserted a space.

Second I have changed

    (org-table-convert-region (point-min) (point-max) '(4))

to

    (org-table-convert-region (point-min) (point-max) '(16))

The best result I have is an empty table.

The message buffer has the following

org-src-fontification:rec-mode: 2: error: expected a record
executing Rec code block (SCHEDA)...
rec2csv: option requires an argument -- 'd'
user-error: Empty table - created default table

The command line rec2csv -d C-v <tab> :f foo :t bar works.

I want to use recutils as much as possible so any help will be greatly appreciated.

Charlie Millar






reply via email to

[Prev in Thread] Current Thread [Next in Thread]