bug-recutils
[Top][All Lists]
Advanced

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

[bug-recutils] :cmdline option in ob-rec usage


From: Charles Millar
Subject: [bug-recutils] :cmdline option in ob-rec usage
Date: Wed, 27 May 2015 20:22:05 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

Just in case this is a bug I am cross posting the following

Given the following in Testrec1.rec

%rec: Contact

Name: This is Person1
Address: 123 Some Street
City: Anytown
State: AState
ZIP: 00000
Other: None

Name: This is Person2
Address: 456 Another Lane
City: Anytown
State: AState
ZIP: 00000
Other: think

Name: This is Person3
Address: 789 Whatever Blvd
Address: Apartment A
City: Anytown
State: AState
ZIP: 00000
Other: thank

Name: This is Person4
Address:001 AndStillAnother Ave
City: Anytown
State: AState
ZIP: 00000
Other: thunk

%rec: foo

bar: baz

(end Testrec1,.rec)

Evaluating the shell command in emacs

recsel -t Contact -p Name,Address[0-1],City Testrec1.rec

 results in

Name: This is Person1
Address: 123 Some Street
City: Anytown

Name: This is Person2
Address: 456 Another Lane
City: Anytown

Name: This is Person3
Address: 789 Whatever Blvd
Address: Apartment A
City: Anytown

Name: This is Person4
Address: 001 AndStillAnother Ave
City: Anytown


In my Testrec1.org file I evaluate

#+begin_src rec :data Testrec1.rec :type Contact :cmdline -p Name,Address[0-1],City

#+end_src

#+RESULTS:
| Name | Address | City | State | ZIP | Other | Address_2 | |-----------------+-------------------------+---------+--------+-------+-------+-------------| | This is Person1 | 123 Some Street | Anytown | AState | 00000 | None | | | This is Person2 | 456 Another Lane | Anytown | AState | 00000 | think | | | This is Person3 | 789 Whatever Blvd | Anytown | AState | 00000 | thank | Apartment A | | This is Person4 | 001 AndStillAnother Ave | Anytown | AState | 00000 | thunk | |

Results desired


| Name            | Address                 | Address_2   | City |
|-----------------+-------------------------+-------------+---------|
| This is Person1 | 123 Some Street         |             | Anytown |
| This is Person2 | 456 Another Lane        |             | Anytown |
| This is Person3 | 789 Whatever Blvd       | Apartment A | Anytown |
| This is Person4 | 001 AndStillAnother Ave |             | Anytown |

Am I using the :cmdline option correctly?

Charlie Millar



reply via email to

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