MojoPad

Working Alongside Other Apps

Plenty of people arrive at MojoPad already living in something else — a document manager holding years of PDFs, a folder of markdown, a reference library. You don't have to move any of it. The most comfortable arrangement is usually a division of labour: the other app holds the documents; MojoPad holds the thinking and the links between them.

Link to a document that lives somewhere else

Most Mac apps can hand you a permanent link to one of their items — DEVONthink calls it an item link, and other apps offer something similar. Copy that link, then in MojoPad select the words you want to link and choose Make Custom URL Link… (⌥⌘U). Now the sentence in your notes points straight at the source document, and one click reopens it in the app that owns it — at the right item, every time.

The first time you click a link like that, MojoPad asks before handing it to another app, and offers to always allow that kind of link. Nothing leaves your Mac; the question is just so a link in a document you imported can't quietly launch something.

Read and quote without moving anything

If a PDF or book is worth keeping in MojoPad, import it and read it here: highlight passages, and drag a selection onto the page you're writing to land it as a quote with a ↩ backlink to the exact spot. See Importing for the whole reading and excerpting flow.

If it belongs in the other app, keep it there and link to it. Many people annotate PDFs in their document manager and keep MojoPad for what the annotations mean — the argument, the connections, the writing that comes out of them.

Getting your work back out

Nothing here is a one-way door. A MojoPad document is a folder: right-click it in the Finder and choose Show Package Contents and you'll find one plain file per page, plus your attachments as ordinary files. On top of that, File ▸ Export Document writes the whole wiki out as a folder of Markdown, plain text or Word files, as a website, or as a PDF or ePub — and any single page exports on its own from Export Page As.

Pages that live in a file on disk

Sometimes a note shouldn't move in at all. Three cases where that's true:

  • The note already lives in a folder another app indexes. Your document manager watches a folder; a markdown file in it is part of your searchable library, and you'd lose that by copying it into a wiki.
  • Someone else edits it too. A README in a project folder, a shared file in a synced folder — it has to stay where the other person (or the other machine) expects it.
  • You want it in two places at once. Written on the iPad in a plain markdown editor, thought about in MojoPad.

For those, choose File ▸ New Page from a File… and pick the file. You get a normal MojoPad page — it links, it's found by search, it shows up in the graph, it takes backlinks — except its words live in that file. Type here and the file changes. Change the file in any other app and the page catches up, usually before you've looked back at it. Nothing is copied and nothing is converted.

The page carries a small ⇄ filename mark under its title, so you always know which pages reach outside the document. Click it to show the file in the Finder.

Follow a whole folder

One file at a time is right for a handful of notes. When the thing you want to work with is a folder — an indexed folder, a vault, a repo's notes directory — choose File ▸ Link a Folder… instead. Every text file in it becomes a page, the folders inside it become folders in your sidebar, and files added to it later turn up as pages on their own, whether they were added while you were working or while MojoPad was closed.

That last part is what makes it feel like one library rather than two: clip something into the folder from another app, and a minute later it's a page here, searchable and ready to link.

Files MojoPad can't treat as notes — images, PDFs, anything that isn't text — are left alone rather than turned into pages, and hidden folders are skipped. Very large folders are followed only in part, and MojoPad says so when that happens.

File ▸ Stop Following a Folder… ends the arrangement. The pages stay, each still linked to its own file; only the watching for new files stops.

Set it up in two minutes

Say you keep your reading notes in ~/Notes, and another app already watches that folder.

  1. Choose File ▸ Link a Folder… and pick ~/Notes.
  2. MojoPad counts what it found and asks before doing anything. Say Follow.
  3. A folder called Notes appears in your sidebar with a page for every text file, arranged the way the folder is arranged.
  4. Open one and type. Wait a moment, then look at the file in the other app — your sentence is there.
  5. Now edit that file in the other app and save. Come back to MojoPad without touching anything: the page has already caught up.

That round trip is the whole feature. Everything else is what happens when it gets complicated.

Working with a document manager's indexed folder

This is the arrangement most people are after: the document manager holds the documents, MojoPad holds the thinking, and one folder is common ground. Two things are worth knowing.

MojoPad writes into the file, it doesn't replace it. That matters more than it sounds. Apps that save by writing a new file and swapping it out break any link pointing at the old one — so if you keep item links to that document (DEVONthink's Make Custom URL Link, and the equivalent elsewhere), they'd stop working every time you edited. MojoPad edits the file in place, so the item stays the same item and your links keep resolving.

A file created after the folder was indexed needs one nudge. A document manager notices changes to files it already knows about within seconds — that's the direction that matters, and it just works. But a brand-new file appearing in the folder may not show up until it rescans. In DEVONthink: select the indexed group and choose File ▸ Update Indexed Items. This is the other app's behaviour, not MojoPad's, and it catches everyone once — including us, while building this.

The smooth path, then: make new pages from files the other app already knows about, and when you do add a file from outside, run its update once.

One file, or a whole folder?

One file when a particular note needs to live somewhere specific — a README beside its code, a document someone else edits, a file you also open on a phone. A folder when you want two apps to share a working library, and you want new files to keep arriving without asking.

You can do both in one wiki, and a folder you follow can sit alongside hundreds of ordinary pages. Linked pages are ordinary pages in every other respect: they link, they take backlinks, they're found by search, they show up in the graph, and they can be tagged and given properties like anything else. Those extras live in the document, not in the file — so tagging a linked page doesn't scribble on someone else's file.

When something looks wrong

  • The page says “not connected.” This document hasn't been allowed to use that file on this Mac. That's normal for a wiki that came from somewhere else, or one restored onto a new machine — MojoPad asks once when the document opens, and you can say yes then. Meanwhile the page shows the copy kept inside the document, so nothing is lost.
  • Edits aren't reaching the file. Check the page still shows its mark. If the file was moved or renamed outside MojoPad, the page keeps its words but has nothing to write to — make a new linked page from the file in its new home.
  • A new file in a followed folder hasn't appeared. Give it a moment; if it still hasn't, check it's a text file, that it isn't inside a hidden folder, and that the folder isn't so large that MojoPad said it was only following part of it.
  • You want the whole picture. Help ▸ Save Diagnostic Report has a Linked external files section listing every linked page, every folder being followed, which folders are approved on this Mac, and any file that has gone missing or drifted out of step.

Send a page you already have out to a file

The other direction. A page that has been in your wiki for years can be given a home on disk: open it and choose File ▸ Move This Page to a File…, then say where it should live. Its words go into that file, and from then on the page and the file are the same thing — edit either.

What moves is the writing. Its name, tags, properties, aliases and backlinks stay here, in the wiki, exactly as they were; the file gets the words alone. A rich-text page becomes Markdown on the way out, so anything Markdown can't express is simplified — MojoPad says so before it does anything, and you can stop there.

Some pages can't go: a storyboard would lose its shape as a flat file (use Send Storyboard To instead), an imported file or a canvas isn't writing, and a protected page won't be written out in the clear.

When you both change it at once

If you edit the page while another app edits the file, MojoPad stops rather than guess: a bar appears offering Use the file's or Keep mine. Neither version is thrown away before you choose — pick Keep mine and your text goes out to the file, pick Use the file's and the page takes what's on disk.

What to expect

  • Renaming the page doesn't rename the file, and deleting the page doesn't delete the file — the page moves to the Trash and the file stays exactly where it is.
  • Only text files can be linked — Markdown and plain text. A linked page is stored as Markdown, so it can round-trip through other editors without losing anything.
  • Deleting the file doesn't cost you the words. MojoPad keeps a copy inside the document, so the page still opens, still searches and still shows up in the graph when the file is gone — on a disconnected drive, say. Put the file back and the page reconnects to it.
  • A document with a password can't have linked pages. The whole point of that password is that your words aren't sitting in the clear, and a file outside the document would be.
  • Open a document that someone else made and MojoPad asks before touching any file it points at, naming the folders. Say no and those pages still open — from the copies stored inside the document — and the page says not connected under its title so you can tell at a glance. Nothing on disk is read or written until you allow it.
  • macOS may ask too. The first time MojoPad reaches a file in your Desktop, Documents or Downloads folder, macOS puts up its own permission alert. That's the system asking, not MojoPad, and it only happens once per folder.
  • If the page and the file both change while they're apart — you wrote on another Mac, and the file changed on this one — MojoPad won't pick a winner. You get the same Use the file's / Keep mine choice, with both versions intact.