On Thu, Nov 29, 2018 at 11:53 AM Martin Blais <[email protected]> wrote:
> On Wed, Nov 28, 2018 at 10:00 PM Oon-Ee Ng <[email protected]> wrote: > >> The output is sorted by day, but within the day outputs aren't sorted >> (or, rather, they're sorted by line number). Is this reliable behaviour >> (as-in, should I expect it to change at some point)? >> > > - It's intended to be "stable," that is, between two runs, the order > should be the same. > - It's not intended to be something you should rely on, not the least > reason which is that you may reorder input in your file. It may change if > there's a good reason for it (but frankly I don't see any reason to right > now). > > > The current source file for importing that I'm working on lists >> transaction in reverse chronological order (I want chronological, in this >> case) but also has a reference number that is monotonically increasing. So >> my current hack is to set line number for the transactions to be that >> reference number. >> > > That seems not unlike the idea of storing the time in metadata - discussed > in a prior thread but not yet implemented - and to use that as a secondary > sort key. Maybe I can generalize this idea of a secondary sort key to let > users put whatever they want in there (as long as the type is comparable, > for sorting). > > > https://bitbucket.org/blais/beancount/issues/340/formalize-the-concept-of-a-secondary-sort > Yes having a secondary sort would be useful. That's effectively what I'm using lineno for right now. -- 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 [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/CAGQ70etyMph_4De4nv25C0cEQ-s43Cavd0_RcUsQcrVZj2Mb0Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
