Table of Contents

The Perennial Emacs Challenge: Mobile

While a rich desktop experience, Emacs leaves one more than wanting on mobile, especially on iOS. Emigrating from Obsidian to Emacs, I knew that solving for mobile continuity was necessary, and this post reflects that solution path.

Solution Overview

Workflow Diagram

My workflow leverages Git as a core method for syncing state between desktop and mobile. When on desktop, I use magit (an Emacs git client), and Working Copy, an iOS git client, on mobile.

With this structure, I can pull and push changes with ease, and fortunately, managing merge conflicts has been minimal.

For mobile, I have a single shortcut that will stage all local changes and commit them in a single tap. I have a simple commit message convention, as I’m not concerned with annotating the commit message itself: #mobile: update DATETIME.

Additionally, leveraging the automation feature in iOS Shortcuts, I pull notes every time I open my notes app, ensuring that I’m ready to modify notes without remote conflict.

Here’s a simple example of what that looks like:

Workflow

Let’s breakdown this down!

iOS Shortcuts

This workflow depends on iOS Shortcuts.

Additionally, we’ll use app-enabled functionality within shortcuts to pull this off, so we’ll have several pre-requisite apps:

Install those and then let’s look at the shortcuts themselves.

My Shortcuts

I have two iOS Shortcuts that make this tick seamlessly:

Pull Notes

iCloud download

This shortcut effectively does a git pull on your repo. While you could open the Working Copy app to do this, doing this with a single button is rather convenient.

On top of that, I’d encourage you to setup a Shortcut Automation to run this when you open your note taking app or whichever app you’ll be editing in. This ensures you won’t forget to pull any remote changes before taking notes, avoiding merge conflicts.

Push Note Changes

iCloud download

Lastly, this shortcut bundles your modified files into a single commit and pushes it to your remote repo.

Standard Workflow

  1. Open your note taking app
  2. Make edits to your notes
  3. Run the “Push Note Changes” shortcut

Final Tips

If you want to explore a tad further, here are some additional tips!

Silence Notifications

You can conditionally silence notifications for these shortcuts by passing in a dictionary with notification set to false, like below.

Notifications are enabled by default.

Here’s an example of my “Open App” automation:

Suppress Notifications

I didn’t want the notification popping up every time, so I added this override.

Shortcuts Widget

I like to keep my shortcuts handy on the Home Screen, so I put it in my widgets.

Shortcut Widgets

This way, they’re always accessible on my home screen.

Auto-Commit

While I don’t use it because I feel I’m in-and-out of my writing app frequently, you could “auto-commit” changes via a shortcut whenever your writing app closes.

Just configure the “Push Note Changes” shortcut to run whenever your writing app closes via Shortcut Automations.