TaskPaper 3 tag with attributes bug?


#1

Hi,

I’ve just discovered a feature I was using a lot with TP2 is not working in TP3??
Try this:
enregistrement:
- microphone pour le bassdrum @tobuy(2017)
- Sennheiser E 902 @micro(bassdrum) @micro(drum)
- Shure Beta 52A @micro(bassdrum)

In TP2, I can either filter @micro(bassdrum) or @micro(drum). I can’t do it anymore in TP3. The second @micro(drum) is unclickable?

Any clue?

Thx.

Nicolas


#2

A line can certainly have an attribute of the name micro, but it can’t have two attributes of the same name.

The attribute value can, however, be a comma-separated list - try this:

Enregistrement:
    - microphone pour le bassdrum @tobuy(2017)
    - Sennheiser E 902 @micro(bassdrum, drum)
    - Shure Beta 52A @micro(bassdrum)

(Note, incidentally, that the TP format is a tab-indented outline, so the items of equipment will only be children of Enregistrement (rather than siblings), if they are preceded by a tab character - try, for example, collapsing the enregistrement list with ⌘9 or a bullet-click)

PS if you need separate scripted access to the comma-delimited strings within an attribute value, the API will split the value into sub-strings for you:


#3

Thanks but how to filter then by either @micro(bassdrum) or @micro(drum)? Because in TP3, if I click on “drum” @micro(bassdrum, drum), the query will @micro = bassdrum, drum. but I want to have @micro = drum only. If do that, TP3, will show me nothing.

Thx.

Nicolas


#4

do @drum and @bassdrum work as tags for you ?


#5

Hi, well not quite because I’ve like the attributes in TaskPaper in order to group tags. Like I was able to do a search with @micro to see all the tags associated either with attributes (drum) or (bassdrum) and then do a fine filtering.
I was using TP as a mini database for papers like so:
papiers non couchés (uncoated):
- Holmen Trend @uncoated @Fischer @gm2(60) @info(volumineux)
- ProLight @uncoated @Fischer @gm2(40) @gm2(50) @gm2(60) @info(opaque)
- Normaset Puro @uncoated @gm2(60) @Antalis(3) @autrenom(OffZettW)
- Maxioffset @uncoated @gm2(60) @gm2(70) @gm2(80) @format(46x64) @format(65x92) @Fischer
- Supersetlaser 2800 @uncoated @gm2(60) @gm2(80) @format(32x45) @format(46x64) @Fischer
- Edixion @uncoated @gm2(60) @Antalis(3)
- Normaset Classic @uncoated @gm2(50) @gm2(60) @Antalis
- Euroscript @uncoated @gm2(60) @Antalis(3)
- Trophée blanc @uncoated @gm2(60) @Inapa
- Lettura 72 @uncoated @gm2(60) @Papyrus
- PlanoPremium @uncoated @gm2(60) @Papyrus(01)
- PlanoPak @uncoated @gm2(40) @gm2(45) @gm2(50) @gm2(60) @Papyrus
- Olin Bulk @uncoated @Antalis @gm2(60) @gm2(85) @info(volumineux)

In TP2, I can easily select all the gm2(50) for example sur easily.

I can even search with attribute with < or > or => or <= . It’s becoming super powerful.

Update — I’ve just discovered I can’t do Relations searches in TP3. Like @gm2 < 50. Bug?

How come TP3 is not working that way, I thought the queries engine would be more powerful.

When you were providing the synthax of using @micro(bassdrum, drum), the commas is then a “and” and not a “or”.

Is there any other workaround? Jesse?

Many thanks,

Nicolas


#6

@micro(bassdrum, drum)

I think you may be able to find what you need to work on these tuples with an OR operator in the query language at:

https://guide.taskpaper.com/reference/searches/

using, for example the contains and matches operators on the attribute contents -
perhaps starting by experimenting with View > Begin Editor Search and then using saved searches.


#7

Look for “Relation Modifiers” at https://guide.taskpaper.com/reference/searches/. I think you’re search will work as you want using:

@gm2 <[n] 50

In TaskPaper 2 all search relations were string based, but with modifiers they can now be string, number, or date

This is trickier. The underlying issue is that TaskPaper item attributes are now stored as a key/value dictionary. So can’t have multiple keys with the same value because one would overwrite the other. Some options to encode TaskPaper 2’s @a(b) @a(c) would be:

one @a(b)
two @a(c)
three @a(b,c)

Or

one @a-b
two @a-c
three @a-b @a-c

For the first example to search for a specific value (for example “b”) you would need to enter:

@a contains b

Unfortunately you can’t just click on a “b” value to generate this search.

The second encoding makes it possible to just click on value to get the specific searches that you want, but unfortunately makes it difficult to just search for all @a. You can do it, but would need to type in a regex like:

matches "@a"

Generally the search engine is much more powerful in TaskPaper 3, but you’ve run into the biggest weakness vrs TaskPaper 2. There’s now yet a good way to associate multiple values with a single tag.

I think the first encoding i.e. (three @a(b,c)) is best long term, and I expect to build in support for it eventually. But it’s not something that I’m actively working on at the moment.


#8

Hi Jesse & Complexpoint,

Thanks for all the explanations. I will dig with the new encoding and especially the latter one.
I’ll have to retag a bit my paper mini database though. :wink:

I’m still using TaskPaper a lot and it’s a part of my independent worker arsenal. Thanks for keeping it alive.

I’m looking to see new improvement to TP in the future.

Nicolas