On Fri, Mar 30, 2018 at 11:59:40PM -0400, Martin Blais wrote:
>On Fri, Mar 30, 2018 at 8:22 AM, Dominik Aumayr <
dom...@aumayr.name> wrote:
>
>> I think that could be very useful. I think there needs to be some
>> discussion about the syntax before you start implementing.
>>
>> Would it look like this?
>>
>> ```beancount
>>
>> 2018-03-30 * "Hooli Shop" "Buy hoodie"
>> Expenses:Fashion 10.00 USD
>> Assets:Cash
>>
>> marker Assets:US:*
>>
>> 2018-03-31 * "Walgreens" "Groceries"
>> Expenses:Groceries 45.00 USD
>> Assets:US:BoA:Checking
>>
>> ```
>
>
>Hmm, the few non-directive keywords I have at the moment don't have proper
>metadata (e.g. line number).
>I was thinking of making it a directive instead.
>e.g.
>
>2018-03-30 marker "...any string..."
>
>The date has no meaning (but it you can think of a useful meaning I can add
>one.)
>
>Also, the account name that's there, how is it used? Would it not be more
>general to make it a general string?
Why not just have them as options? Since the parser, which validates the
options, has access to the line number, it shouldn't be hard to store
the line numbers.
The dates are currently used (see below), but I think it would be better
without them - the current mechanism really only works well for the
"insert the latest entries at the end of a section" scenario. Inserting
earlier entries than some already in the section would create an
unordered mess.
This is the documentation for the current 'insert-entry' fava-option.
>This option can be used to specify where entries are inserted. The
>argument to this option should be a regular expression matching account
>names. This option can be given multiple times. When adding an entry,
>the account of the entry (for a transaction, the account of the last
>posting is used) is matched against all insert-entry options and the
>entry will be inserted before the datewise latest of the matching
>options. If the entry is a Transaction and no insert-entry option
>matches the account of the last posting the account of the second to
>last posting and so on will be tried. If no insert-entry option matches
>or none is given, the entry will be inserted at the end of the main
>file.
>
>
>
>>
>> > Am 28.03.2018 um 04:22 schrieb Martin Blais <
bl...@furius.ca>:
>> >
>> > I could promote the custom entry as a native one.
>> > Let's call it "marker".
>> > Would that be useful?
>> >
>> >
>> > On Tue, Mar 27, 2018 at 2:04 AM, <
dominik.aumayr...@gmail.com>
>> an email to
beancount+...@googlegroups.com.
>> an email to
beancount+...@googlegroups.com.
>> msgid/beancount/CAK21%2BhMKca%3DWb8Jv45k9tHWHZ%2Bv2vbsG14yXtq4RyC6M9tB1mg%
>>
40mail.gmail.com.
>> > For more options, visit
https://groups.google.com/d/optout.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Beancount" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to
beancount+...@googlegroups.com.
>> msgid/beancount/B436BAF8-B56D-4FED-B9A1-F1B408AE6BD1%
40aumayr.name.
>To unsubscribe from this group and stop receiving emails from it, send an email to
beancount+...@googlegroups.com.
>To view this discussion on the web visit
https://groups.google.com/d/msgid/beancount/CAK21%2BhM-bVNW8N7hdC1qv9GBFui_wDuV8viUOzYZKuBJXxRiKA%40mail.gmail.com.