CaseLeaf

Handbook / Links between marks

Links between marks

A passage can point at another passage, at a mail, at a note, at a page on the web: at anything with an address.

Pointing one passage at another

Copy, select, link:

  1. Mark the passage you want to point at, and choose Copy Link to Mark.
  2. Go to the passage that should point at it, in another document beside this one or in the same document.
  3. Mark it, and choose Link to Copied Mark.

There is no picker and no search. You are looking at both ends, which is how you noticed the connection.

The two ends are different kinds of mark, a link from here and a link target, and the marks list can filter for either.

What a link to a mark is

What lands on the clipboard is a Markdown link: the marked words as its text, and an address of this shape:

caseleaf://open?id=<the document's identity>
               &where=<where it was>
               &page=<the page>
               &markid=<the mark's identity>

Both ends are named by identity, the document's and the mark's. The path and the page are where they were, not what they are, which is why the link survives the file being moved and the pages being renumbered.

Linking to anything else

Anything you have copied that looks like an address can be attached to a passage: a hook:// bookmark, a web page, a mailto:, an address belonging to another application. Nothing is refused for being the wrong sort of address. If what you copied is a Markdown link, the address inside it is what is attached.

Following a link

Clicking a mark that carries a link follows it. These open without asking:

caseleaf:// hook:// https:// http:// mailto: file:// message://

and the schemes of a few applications people keep notes and tasks in: DEVONthink, Obsidian, Things, OmniFocus and Bear.

Anything else, such as another program's own scheme, is shown to you in full first, with Cancel and Open, because a link is something whoever made the file put there. A document cannot make this application launch something by being read; it can only make it ask.

Following a link to another passage moves the view there and reports it, for example "Followed the link to page 3." Any tool can follow a link.

Looking before you follow

Rest the pointer on a link the document itself carries, a cross-reference or a citation, and a small picture of where it goes appears beside the pointer: the piece of the page around the place the link names, with the page's number in its corner. It is there to answer is this worth following without losing your place. Move the pointer off the link, press anywhere, or scroll and it goes. A link to a web address shows nothing here; its address is what matters, and that is in the tooltip.

See also

Watch: a short video for this page is still to come.


Contents