tagging individual postings

105 views
Skip to first unread message

Stefano Zacchiroli

unread,
Nov 3, 2016, 2:07:12 PM11/3/16
to bean...@googlegroups.com
Dear all,

is there a profound reason (which I'm clearly missing) why #tags can be
attached to a transaction as a whole, but not to individual postings?

It seems to me that, conceptually, if metadata are allowed to be both
transaction-global and posting-specific, so should #tags.

There are two workarounds for this that I can see:

- use None-valued metadata, e.g.,

2014-05-05 txn "Cafe Mogador" "Lamb tagine with wine"
Liabilities:CreditCard:CapitalOne -37.45 USD
tag1:
tag2:
Expenses:Restaurant

- use metadata entries that contain tags as values:

2014-05-05 txn "Cafe Mogador" "Lamb tagine with wine"
Liabilities:CreditCard:CapitalOne -37.45 USD
tags: #tag
Expenses:Restaurant

with the additional caveat that only one tag seems to be allowed as
metadata value, so it's cumbersome to add multiple tags this way.

Is this SMOP (and if so I'll be happy to file a ticket), or am I missing
something more profound here?

Many thanks in advance,
Cheers.
--
Stefano Zacchiroli . za...@upsilon.cc . upsilon.cc/zack . . o . . . o . o
Computer Science Professor . CTO Software Heritage . . . . . o . . . o o
Former Debian Project Leader . OSI Board Director . . . o o o . . . o .
« the first rule of tautology club is the first rule of tautology club »

Martin Blais

unread,
Nov 5, 2016, 9:40:30 PM11/5/16
to Beancount
On Thu, Nov 3, 2016 at 2:07 PM, Stefano Zacchiroli <za...@upsilon.cc> wrote:
Dear all,

is there a profound reason (which I'm clearly missing) why #tags can be
attached to a transaction as a whole, but not to individual postings?

No profound reason, just history.


It seems to me that, conceptually, if metadata are allowed to be both
transaction-global and posting-specific, so should #tags.

Tags should eventually get parsed in as metadata fields.
That's still a long way way, but I view tags only as a shorthand for metadata.


There are two workarounds for this that I can see:

- use None-valued metadata, e.g.,

    2014-05-05 txn "Cafe Mogador" "Lamb tagine with wine"
      Liabilities:CreditCard:CapitalOne         -37.45 USD
        tag1:
        tag2:
      Expenses:Restaurant

- use metadata entries that contain tags as values:

    2014-05-05 txn "Cafe Mogador" "Lamb tagine with wine"
      Liabilities:CreditCard:CapitalOne         -37.45 USD
        tags: #tag
      Expenses:Restaurant

  with the additional caveat that only one tag seems to be allowed as
  metadata value, so it's cumbersome to add multiple tags this way.

Is this SMOP (and if so I'll be happy to file a ticket), or am I missing
something more profound here?

You're welcome to file a ticket, but I think there's already something on the TODO list.

In any case, not a very urgent feature in my view, just a convenience. There are much more fundamental improvements I should focus on first (doing changes to be able to compute returns accurately, for instance).



 

Many thanks in advance,
Cheers.
--
Stefano Zacchiroli . za...@upsilon.cc . upsilon.cc/zack . . o . . . o . o
Computer Science Professor . CTO Software Heritage . . . . . o . . . o o
Former Debian Project Leader . OSI Board Director  . . . o o o . . . o .
« the first rule of tautology club is the first rule of tautology club »

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to bean...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/20161103180709.5vte7xolyi5hwtwv%40upsilon.cc.
For more options, visit https://groups.google.com/d/optout.

Stefano Zacchiroli

unread,
Nov 8, 2016, 8:43:14 AM11/8/16
to bean...@googlegroups.com
On Thu, Nov 03, 2016 at 07:07:09PM +0100, Stefano Zacchiroli wrote:
> Is this SMOP (and if so I'll be happy to file a ticket), or am I missing something more profound here?

^--- "this" being "supporting tags on individual postings"

Stefano Zacchiroli

unread,
Nov 8, 2016, 8:43:15 AM11/8/16
to bean...@googlegroups.com
On Sat, Nov 05, 2016 at 09:40:06PM -0400, Martin Blais wrote:
> > is there a profound reason (which I'm clearly missing) why #tags can be
> > attached to a transaction as a whole, but not to individual postings?
>
> No profound reason, just history.

*nod*

> You're welcome to file a ticket, but I think there's already something on
> the TODO list.

I looked before posting here, and just looked again, but I haven't found
anything relevant (well, there's #99, which I filed, but that's a
different matter IMO). So I've just filed #144 about this:
https://bitbucket.org/blais/beancount/issues/144/allow-tagging-of-individual-postings
If there was already a relevant issue which I haven't found, please let
me know and I'll be happy to close/merge #144 into it.

Thanks for your feedback!

-- Zack, who has now an almost decent Ledger -> Beancount migration
script for its own uses, and hence is slowly becoming active on
the Beancount front.
Reply all
Reply to author
Forward
0 new messages