GitHub - larrasket/org-pad.el: Seamless iPad (or any device that can run a web browser) drawing into org-mode. · GitHub
/" data-turbo-transient="true" />
Skip to content
Search or jump to...
Search code, repositories, users, issues, pull requests...
-->
Search
Clear
Search syntax tips
Provide feedback
--><br>We read every piece of feedback, and take your input very seriously.
Include my email address so I can be contacted
Cancel
Submit feedback
Saved searches
Use saved searches to filter your results more quickly
-->
Name
Query
To see all available qualifiers, see our documentation.
Cancel
Create saved search
Sign in
/;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up
Appearance settings
Resetting focus
You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
{{ message }}
larrasket
org-pad.el
Public
Notifications<br>You must be signed in to change notification settings
Fork
Star
master
BranchesTags
Go to file
CodeOpen more actions menu
Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit
History<br>11 Commits<br>11 Commits
OrgPad.swiftpm
OrgPad.swiftpm
tests
tests
web
web
.gitignore
.gitignore
LICENSE
LICENSE
Makefile
Makefile
OrgPad.swiftpm.zip
OrgPad.swiftpm.zip
README.org
README.org
fake-ipad.sh
fake-ipad.sh
org-pad.el
org-pad.el
View all files
Repository files navigation
org-pad.el
Seamless iPad drawing into org-mode.<br>org-pad lets you draw on your iPad with Apple Pencil and have the result in your org-mode buffer as an inline figure.
Demo
Get started, one-time setup
[iPadOS only, if you want native experience] On the iPad, install Swift Playgrounds from the App Store (it’s free). This is the only App-Store install required; the OrgPad app itself is never distributed through the App Store.
In Emacs, run M-x org-pad-setup. This starts the org-pad server,<br>generates a fresh 6-digit pairing code, and opens a *org-pad setup*<br>buffer listing one or more setup URLs, one per LAN network interface<br>Emacs can see (e.g. =http://192.168.1.23:8777/setup=).
If you are using anything that is not iPadOS:
Open the URL for web browser experience.
In emacs, in an org-mode buffer, run M-x org-pad-draw or use the org-pad-menu.
On the iPad, open Safari and visit the setup URL. The page lets you<br>download and open OrgPad.swiftpm directly into Swift Playgrounds.
Inside Swift Playgrounds, tap Run . The app opens on a connect<br>screen asking for a 6-digit code.
Enter the code shown in the *org-pad setup* buffer (you might need to paste it directly instead of typing it). On success the iPad is paired and remembers the server for future sessions (via a token persisted in org-pad-token-file on the Emacs side). The code is single-use and expires after 5 wrong attempts. Re-run M-x org-pad-setup to get a new one if that happens.
You only need to repeat this flow when pairing a new iPad, after<br>clearing org-pad-token-file, or if the code expires before you finish<br>entering it.
Usage
Place point where you want a new figure and run M-x org-pad-draw (or bind it to a key). Emacs starts the server if it isn’t already running and queues a “new drawing” request; a message tells you to open OrgPad on the iPad (or, if it’s already open and idle, it will pick the request up immediately via its long poll). When you finish drawing and tap done, the PNG comes back and org-pad inserts an [[file:...]] link to it at point.
Place point on an existing org-pad figure link and run M-x org-pad-draw (or M-x org-pad-edit) to re-open it for editing. Because the original strokes are embedded in the PNG, the iPad app reconstructs your drawing exactly as you left it, this is the “self-contained PNG” format at work. Editing a plain PNG that wasn’t produced by org-pad (no embedded strokes) is refused with a clear error, since there is nothing to reconstruct from.
org-pad-draw is DWIM: on a re-editable figure link it edits; anywhere else it creates a new figure at point.
The server keeps running across multiple draw requests; use M-x org-pad-server-stop to shut it (and the Bonjour advertisement) down, e.g. before switching networks or ending your Emacs session.
M-x org-pad-menu opens a transient menu with draw / edit / setup, the client toggle, the figure background, and server start/stopm a convenient single entry point if you don’t want to remember commands.
Drawing on the web instead of the iPad
The web canvas is tldraw .<br>tldraw is loaded from a CDN, so the device needs internet<br>access the first time it opens the page.
It works as a receiver, just like the native app’s Waiting screen:
Set org-pad-client to web (or ask).
Run M-x org-pad-setup. Alongside the iPad instructions it lists a<br>receiver URL (e.g. =http://192.168.1.23:8777/canvas=).
Open that URL once on the iPad (or any device)...