help-recutils
[Top][All Lists]
Advanced

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

[help-recutils] Determine record type’s key from CLI?


From: Paul Rankin
Subject: [help-recutils] Determine record type’s key from CLI?
Date: Fri, 11 Nov 2016 17:32:21 +1000

Is there any way to determine a record type’s key from the CLI?

I ask because I’m looking at rec-mode.el and I think editing the value of a 
field where the field type is a foreign key, Emacs should prompt with a 
selection of associated foreign keys, similar to the enum field type, rather 
than unrestricted text, e.g.

    %rec: fruit
    %key: id

    id: 0
    fruit: apple

    id: 1
    fruit: banana

    id: 2
    fruit: pineapple

    %rec: people
    %key: name
    %type: food rec fruit

    name: Philip
    food: 2

    name: James
    food: 1

When editing food in the rec type people, the selection should prompt for the 
key’s of fruit (0, 1, 2).

I can put this together in Emacs, but it seems better that the CLI retrieve the 
keys than parse the file with Lisp.

-- 
Paul W. Rankin
www.paulwrankin.com



reply via email to

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