Drafts 20 Released - Cross-linking Drafts + Typewriter Scrolling

I use “” to find things like this. For example “- [ ]” works well.

Inside of [[s: syntax?

Doesn’t need to be in a double bracket [[s: search… you should be able to enter “- [ ] do asap” in the search field above the drafts list…

Sure - but what I am trying to do is use the wiki links syntax to jump directly to a specific line of a draft that includes a task. Before that I am using an action to collect all tasks in active projects which should in a final step write the wiki syntax for every open task In a new draft.

So something like

Project 1

  • [ ] task a. [[s:search definition a]]
  • [ ] task b. [[s:search definition b]]

Ah. I see. A wiki-link (as they’re natively defined) only addresses a draft, rather than a location within that draft.

That said, if you haven’t already seen the conversation here => New and Better- Question about Drafts Capabilites [[links]] you might find what you’re looking for…

3 Likes

No, unfortunately it doesn’t appear that will work inside of the [[s: syntax. I wish it did, as things stand I have to do that off the primary search and create extra workspaces then use the [[w: syntax to set up those environments.

What I use this for is keeping track of things I need to discuss or follow up with someone about. For example I might have this line in a draft:

  • [ ] John Doe: Did you buy the winning lottery ticket?

In an ideal world I’d love to set up this using the [[s: syntax in a note of all the people I generally interact with:

  • [[s:"- [ ] John Doe"]]
  • [[s:"- [ ] Throckmorton P Ruddygore"]]

That way if I have open items, they would show up in the search, if I check them off they no longer show up. Since I can’t find a way to make that work, I am instead setting up a workgroup for each person I typically interact with and then doing:

  • [[w:John Doe]]

to shift to that workgroup. It takes a bit more upfront work, but has it’s advantages too. I do wish there were a way to hide workspaces from the dropdown menu when I’m just using them for this, but I just put them at the bottom.

I’ve tried to figure out how this works, but it seems that nothing changes when I use this. It still pops up with a search box saying it’s found too many notes that match, etc. I considered that maybe this works by “locking in” a UUID or something behind the scenes, so I even created a note first, then created the [[d:]] link to it, before creating the next titled note - but it didn’t change anything.

Am I misinterpreting the function of this style link? How does it actually differ vs. the normal link/what conflicts is it avoiding, if not a title conflict?

It works the same as having no prefix. Adding the d: is just being explicit about the type of link it is.

  • [[Title of Draft]]: Open a draft with the specified title. This will search for and open a draft with “Title of Draft” in the first line of the draft. If more than one is found, it will offer to search to help you locate the correct draft - if none is found, it will offer to create a new draft with the first line “Title of Draft” and open it. The search is loose, so would also match a draft with the title “# Title of Draft”.
  • [[d:Title of Draft]]: This format is the same as above, but can be used if it is important to avoid possible conflicts.

So what are the conflicts it refers to in the above docs? It isn’t multiple drafts as you discovered. My interpretation has always been that it is just being explicit in the definition and the conflict is more user misinterpretation. I think it is there so you can be explicit in noting say that you want to link to a draft called “foo” when you have a workspace called “foo”. But if that isn’t the case, I’m happy to learn more.

When you tap on the link you are presumably getting the multiple matching drafts message. This means that you have at least two drafts with a title that matches what you have entered into the wiki style cross link.

If you really want to link to a particular draft you have two options at this point.

  1. Make your title for that draft unique.
  2. Get the UUID for the draft (it’s unique ID), and use the u: syntax instead of d: to link to it.
  • [[u:UUID-OF-DRAFT]]: Open a draft with the specified UUID. Useful to force linking directly to a known draft. The draft will not be created if it does not exist. Useful in cases where matching by title may not be reliable and specific enough and you would rather link to a specific draft by its identifier.

I would typically change the title. But occasionally I have had drafts where the title changes naturally through processing and by using the UUID instead, I get consistent linking even when the title changes.

Hope that helps.

1 Like

Perhaps worth reading the related article in the User Guide to better understand how linking works in Drafts:

Thank you, I did, but I think it’s my understanding of “avoid possible conflicts” that’s wrong. I took “avoid possible conflicts” to mean “link to one draft even if others conflict”, but it seems not to mean that. I’m not sure how to find clarity on this meaning

Does this passage in the linked article not provide clarity?

Thanks @sylumer - if it’s just a case of it being explicit, that makes sense. I thought it was a separate type/option. I am happy to link to UUID etc as needed, just wasn’t sure if I was misreading something :slight_smile:

@agiletortoise What you’ve copied and pasted makes sense in light of the previous @sylumer’s comment - I’d thought the prefix of [[d:title]] had been separate to [[title]] rather than just explicitly not being say [[u:<UUID<]]