bug-recutils
[Top][All Lists]
Advanced

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

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


From: Charles Millar
Subject: Re: [bug-recutils] [help-recutils] :cmdline option in ob-rec usage
Date: Fri, 05 Jun 2015 21:48:16 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0



On 06/05/2015 01:50 PM, Jose E. Marchesi wrote:
     > | 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?

:cmdline actually does nothing.  You must use :fields instead, like in:

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


Slowly something is penetrating my skull - essentially in ob-rec.el :fields is used as conditional and if true concat the print function for each field called- correct?

However, the resulting column order depends upon when the fields are first encountered as ob-rec.el works its way through each record in the rec:type, i.e. if "This is Person3" is the first record, I get the desired result; otherwise the original example the table column order is as follows

    | Name            | Address                 | City    | Address_2   |
    |-----------------+-------------------------+---------+-------------|
    | This is Person1 | 123 Some Street         | Anytown |             |
    | This is Person2 | 456 Another Lane        | Anytown |             |
    | This is Person3 | 789 Whatever Blvd       | Anytown | Apartment A |
    | This is Person4 | 001 AndStillAnother Ave | Anytown |             |
Is there a way of sorting the output so that the table columns are in the order given in :fields?

Charlie



reply via email to

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