docs/manual/guide/15-alongside-emacs.org

19641366e5de9103a7d88bf80436ab2aebc03cf5
orgstar/docs/manual/guide/15-alongside-emacs.org

440 lines · 45236 bytes

  1#+TITLE: Working alongside Emacs and other tools
  2#+DESCRIPTION: How orgstar reads and writes files shared with Emacs and sync tools, merges outside changes, keeps recovery versions, calls Emacs, and differs from Emacs Org.
  3#+LEDE: orgstar works on plain org files in ordinary folders, so Emacs, other apps and sync tools can work on the same files.
  4
  5* How orgstar treats files
  6
  7** Bytes on disk
  8
  9orgstar edits the file's text directly; there is no separate document format. When it saves, text you didn't change is written back exactly as it was read:
 10
 11- A file with no changes is never rewritten.
 12- Untouched lines keep their bytes, including trailing whitespace, tabs, and the presence or absence of a final newline.
 13- Line endings are kept as they are. A file with CRLF line endings keeps them, and on the Mac the modeline shows =CRLF= for such a file. orgstar doesn't convert line endings; new lines that orgstar's commands insert end with LF.
 14
 15** Encodings
 16
 17orgstar edits UTF-8 files, with or without a byte order mark. A file that starts with a BOM keeps it.
 18
 19A file that isn't valid UTF-8 (UTF-16, Latin-1, or a file with invalid bytes) opens read-only. The window's subtitle says "Read-only: not UTF-8", undecodable bytes show as replacement characters, and commands that would change the file report that it "isn't UTF-8, so it can't be changed". orgstar never converts such a file.
 20
 21** How a save works
 22
 23Saving replaces the file through a temporary file in the same folder (named =.name.org.orgstar-…=), under the system's file coordination, so iCloud and other coordinating apps see a complete file. The steps are:
 24
 251. Read the file on disk. If it changed since orgstar last read or wrote it, keep both versions in the recovery folder and merge the change into your edits (see below).
 262. Read the file again. If it changed in the meantime, start over, up to three times.
 273. Replace the file. If another program replaced it between the check and the write, its version goes to the recovery folder and is merged into your edits.
 284. Read the file back. If it changed right after the write, orgstar's version goes to the recovery folder and the new disk version is merged in.
 29
 30Emacs and Syncthing don't use file coordination, so these checks can't lock them out. They narrow the window in which two writers can collide, and every version a save displaces is kept in the recovery folder.
 31
 32If the file keeps changing through all three attempts, the save fails with an error and your edits stay unsaved.
 33
 34In the Mac App Store version, when the folder doesn't let orgstar create the temporary file, orgstar writes the file in place instead.
 35
 36** Automatic and explicit saving
 37
 38With =save = "automatic"= (the default), orgstar saves a file one second after you stop typing. With ="explicit"=, only =⌘S= (Save) and =⌥⌘S= (Save All) save. See [[file:13-configuration.org][Configuration]]. The iOS app always saves automatically.
 39
 40* Changes made outside orgstar
 41
 42orgstar watches your folders. On the Mac it uses FSEvents; on iOS it is told of changes by file coordination and reads the folders again when you return to the app. When a file that is open in orgstar changes on disk:
 43
 44- If you have no unsaved edits in it, orgstar reloads it. Undo history for the file is cleared.
 45- If you have unsaved edits, orgstar merges the disk version into them and, with automatic saving, saves the result.
 46- If the changes conflict, nothing is saved and the conflict sheet opens.
 47
 48The merge is a line-based three-way merge between the version orgstar last read or wrote, your edits, and the disk version. A run of lines changed on one side only takes that side; changed the same way on both, it is taken once; changed differently on both, it is a conflict. Lines keep their endings, so CRLF files and a missing final newline survive a merge. A disk version that isn't valid UTF-8 always conflicts.
 49
 50After a reload or merge, orgstar also reads the file's setup files again.
 51
 52** The conflict sheet
 53
 54The sheet shows what differs, with lines marked - on disk and + in your version, and offers:
 55
 56| Button             | Effect                                                                                           |
 57|--------------------+--------------------------------------------------------------------------------------------------|
 58| Keep Mine          | Writes your version over the disk version. The disk version goes to the recovery folder.        |
 59| Use Disk Version   | Loads the disk version. Your version goes to the recovery folder.                                |
 60| Merge with Markers | Puts both sets of changes in the buffer, with conflicting lines between =<<<<<<< yours= and =>>>>>>> disk= markers, as =git merge= leaves them. Edit and save. Your version as it was goes to the recovery folder. |
 61| Cancel             | Closes the sheet. Automatic saving stops for the file until you decide; the Conflict button in the toolbar opens the sheet again. |
 62
 63On the Mac, File ▸ Revert to File on Disk loads the disk version at any time; unsaved changes go to the recovery folder.
 64
 65* Sync tools
 66
 67** iCloud Drive
 68
 69orgstar reads and writes files under file coordination, which is how iCloud expects apps to work. Files iCloud hasn't downloaded yet (=.name.org.icloud= placeholders) aren't indexed; orgstar asks iCloud to download them and indexes them when they arrive. On iOS they appear in the Folders tab with a cloud icon until then.
 70
 71** Syncthing
 72
 73Syncthing writes files without file coordination. orgstar sees its changes through file watching and merges them as described above.
 74
 75- Syncthing's temporary files (=.syncthing.*=) are ignored.
 76- Its folders =.stfolder= and =.stversions= are in the default =ignored-folders=.
 77- Conflict copies (=name.sync-conflict-YYYYMMDD-HHMMSS-ID.org=) are listed in the sidebar but never indexed, so they don't appear in the agenda, search or ID links.
 78
 79When a file with conflict copies opens, a message says how many there are. File ▸ Resolve Sync Conflicts… (on iOS, a toolbar button while there are copies, and in Commands) lists each copy against the file, with lines marked - in the file and + in the copy:
 80
 81| Button             | Effect                                                                                     |
 82|--------------------+--------------------------------------------------------------------------------------------|
 83| Keep File          | Leaves the file as it is.                                                                  |
 84| Use Copy           | Replaces the buffer's text with the copy's, as an edit you can undo.                       |
 85| Merge with Markers | Puts every difference between the file and the copy between conflict markers in the buffer. There is no common base, so every difference is marked. |
 86
 87Each choice then moves the copy to the recovery folder and deletes it from the folder.
 88
 89** Dropbox and other tools
 90
 91Any program that writes files in your folders is treated the same way: orgstar sees the change, reloads or merges, and keeps displaced versions. Programs that write through file coordination (iCloud, File Provider apps on iOS) are seen as they write; others are seen through FSEvents on the Mac and when you return to the app on iOS.
 92
 93** Files orgstar ignores
 94
 95When scanning folders, orgstar skips Emacs lock files (=.#name=), backups (=name~=) and auto-save files (=#name#=), its own temporary and backup files (names containing =.orgstar-=), =.DS_Store=, =.localized=, and the folders in =ignored-folders=. With =show-hidden-files = false=, every dotfile and dot folder is skipped. orgstar doesn't create or honour Emacs lock files.
 96
 97* Recovery versions
 98
 99Every version a save, a merge or a conflict resolution displaces is kept in the recovery folder, and so is a snapshot of the file before a save, at most once an hour:
100
101- on the Mac, =~/Library/Application Support/Orgstar/Recovery= (or =$ORGSTAR_DATA_DIR/Recovery=),
102- in the Mac App Store version, =~/Library/Containers/sh.krz.orgstar/Data/Library/Application Support/Orgstar/Recovery=,
103- on iOS, the app's own Application Support folder.
104
105Each file has a subfolder named from a hash of its path, holding its last 20 replaced versions and, apart from them, its last 10 snapshots. A version's file name has a timestamp, a label and the file's name. The labels are:
106
107| Label           | Kept when                                                                     |
108|-----------------+-------------------------------------------------------------------------------|
109| =external=      | A version written by another program was replaced or merged                   |
110| =local=         | orgstar's version was replaced, or set aside by Use Disk Version, Merge with Markers or Restore |
111| =sync-conflict= | A Syncthing conflict copy was resolved                                        |
112| =snapshot=      | A save changed the file and the last snapshot was more than an hour before    |
113
114File ▸ History… on the Mac, and Recovery Versions… on iOS (a toolbar button while there are versions, and in Commands), lists the open file's kept versions, newest first, each compared with the buffer (lines marked - in the buffer, + in the kept version). In the download version, History also lists the commits that changed the file when it is in a git repository. Restore puts a version's text in the buffer as an edit you can undo; the buffer as it was goes to the recovery folder first. On the Mac, Show in Finder selects the version's file. See [[file:01-files-and-folders.org::*Recovery versions][Recovery versions]] and, for committing to git as you save, [[file:01-files-and-folders.org::*Committing to git][Committing to git]].
115
116* Features that use Emacs on the Mac
117
118Some features run Emacs in batch mode on the Mac. Everything else works without Emacs installed. The [[file:../install.org][Mac App Store version]] never runs Emacs; it does what the download version does without Emacs, described below.
119
120| Feature                                                        | What runs                                                                                     |
121|----------------------------------------------------------------+-----------------------------------------------------------------------------------------------|
122| Emacs Lisp source blocks (=emacs-lisp=, =elisp=)               | The block, in =emacs -Q --batch=                                                              |
123| Table formulas outside what orgstar computes itself            | =org-table-recalculate= on a copy of the file; the table's new text replaces the old one if the table didn't change meanwhile |
124| Lisp table formulas that orgstar's Emacs Lisp interpreter can't evaluate | The same; orgstar first asks whether to run Lisp (yes, no, always)                  |
125| Export to PDF, and LaTeX and plain text orgstar can't write itself | =org-latex-export-to-pdf=, =org-latex-export-to-latex= or =org-ascii-export-to-ascii= |
126| =calc= source blocks that orgstar's Calc refuses               | The block, in =emacs -Q --batch=                                                              |
127| =elisp:= links                                                 | The form, after asking, in =emacs -Q --batch= in a copy of the file                           |
128
129HTML, Markdown, ODT, LaTeX and ASCII export don't use Emacs. See [[file:11-code-blocks.org][Code blocks]], [[file:10-tables.org][Tables]] and [[file:12-export.org][Export]].
130
131** How Emacs is found
132
133orgstar uses the first of these that is an executable file:
134
1351. the path in the environment variable =ORGSTAR_EMACS=,
1362. =/opt/homebrew/bin/emacs=,
1373. =/usr/local/bin/emacs=,
1384. =/Applications/Emacs.app/Contents/MacOS/Emacs=,
1395. =/run/current-system/sw/bin/emacs=,
1406. =/usr/bin/emacs=.
141
142An app started from the Dock doesn't see your shell's =PATH=, which is why orgstar looks in fixed places. Without Emacs, Emacs Lisp blocks and =elisp:= links run in orgstar's own Emacs Lisp interpreter, and a block or form that uses something the interpreter doesn't have fails with a message. A table is recalculated up to the first formula orgstar can't compute, and the echo area names the formula and the reason. A =calc= block that orgstar's Calc refuses isn't run. Export to PDF with Emacs, which the Mac App Store version leaves out, reports "Emacs isn't installed, so this format can't be exported.", and a LaTeX or plain text export orgstar can't write itself stops with the reason.
143
144** What Emacs sees
145
146- Emacs runs with =-Q=: your =init.el=, packages and customizations aren't loaded. Org and the exporters are the versions bundled with that Emacs.
147- orgstar writes a snapshot of the buffer to a temporary folder and runs Emacs on it, so unsaved edits are included. The working directory is the file's folder.
148- File-local variables marked safe apply (=enable-local-variables= is =:safe=).
149- Export doesn't run source blocks (=org-export-use-babel= is =nil=). The exported file is written next to the org file, as Emacs writes it, or moved to the place you chose.
150- For export and table recalculation, Emacs gets your =PATH= with =/opt/homebrew/bin=, =/usr/local/bin=, =/Library/TeX/texbin=, =/usr/bin= and =/bin= added, as source blocks do, so the programs it starts, such as =pdflatex=, are found when orgstar was opened from the Dock.
151- PDF export needs a LaTeX installation that Org's LaTeX exporter can run.
152- A table recalculation that takes more than 60 seconds, or an export that takes more than 120 seconds, is stopped. Source blocks have a limit of 300 seconds. =⌘.= (Cancel Running Task) stops a running block, export or table recalculation sooner.
153
154* Quick Look
155
156orgstar includes a Quick Look extension for org files (=.org= and =.org_archive=). Pressing Space on an org file in Finder, or in the Files app on iOS, shows the file as the HTML export renders it, with its =#+SETUPFILE= keywords applied. The preview reads a file as UTF-8, or as Latin-1 when it isn't valid UTF-8.
157
158Inside orgstar, selecting a file in the sidebar that isn't text shows a Quick Look preview, with Open with Default App and Show in Finder below it.
159
160* Spotlight
161
162On the Mac, orgstar includes a Spotlight importer for org files. Spotlight indexes each file's text, its title (=#+TITLE=, else the file name), =#+AUTHOR=, =#+DESCRIPTION=, and its tags (=#+FILETAGS= and heading tags) and headings as keywords. The importer reads only UTF-8 files.
163
164On iOS, the app adds the files in your folders to Spotlight itself; see [[file:14-ios.org][iPhone and iPad]].
165
166* Finder
167
168orgstar declares the =org.orgmode.org= file type for the extensions =.org= and =.org_archive=, and registers as an editor for it, and as an alternate editor for plain text. Double-clicking an org file in Finder, dropping files on orgstar's Dock icon, or running =open -a orgstar file.org= opens each file as a buffer. Files opened while orgstar is starting open once its window is ready. To make orgstar the app that opens org files, use Finder's Get Info ▸ Open with ▸ Change All.
169
170* org-protocol and Shortcuts
171
172orgstar registers the =org-protocol:= URL scheme on the Mac and iOS, and handles two sub-protocols, in both the =?key=value= form and the older =:/a/b/c= form:
173
174- =org-protocol://capture= opens Capture with the link's template, URL, title and body.
175- =org-protocol://store-link= stores the link for =C-c C-l= and copies it to the clipboard.
176
177Other sub-protocols, such as =open-source=, show "orgstar handles org-protocol capture and store-link".
178
179The Shortcuts action Capture to orgstar, on the Mac and iOS, files text with a capture template without opening the capture window. See [[file:08-capture.org][Capture]].
180
181* orgstar:// links and x-callback-url
182
183orgstar registers the =orgstar:= URL scheme on the Mac and iOS. These links open part of the app; the widgets and the Live Activity use them, and they work from Shortcuts, a browser, a note or =open= in Terminal:
184
185| Link                                           | Opens                                                 |
186|------------------------------------------------+-------------------------------------------------------|
187| =orgstar://agenda=                             | The agenda                                            |
188| =orgstar://clock=                              | The entry of the running clock                        |
189| =orgstar://review=                             | Review Flashcards                                     |
190| ~orgstar://capture?template=t~                 | Capture with that template, or the template list      |
191| ~orgstar://entry?path=/path/file.org&offset=N~ | The file at offset N                                  |
192
193** x-callback-url
194
195Links of the form ~orgstar://x-callback-url/action?parameters~ follow [[https://x-callback-url.com][x-callback-url 1.0]]: another app asks orgstar to do something and names links to open afterwards. Besides an action's own parameters, every action takes:
196
197| Parameter   | Meaning                                                                                  |
198|-------------+------------------------------------------------------------------------------------------|
199| =x-success= | Opened when the action succeeds, with the result's parameters added to its query         |
200| =x-error=   | Opened when it fails, with =errorCode= and =errorMessage= added                          |
201| =x-cancel=  | Opened when you close the capture window or sheet without filing                         |
202| =x-source=  | The calling app's name, shown when orgstar asks whether to allow it                      |
203
204Values are percent-encoded, as in any URL; encode a =+= in a value as =%2B=. Without =x-error=, an error shows in orgstar's message area.
205
206*** capture
207
208| Parameter       | Meaning                                                                          |
209|-----------------+----------------------------------------------------------------------------------|
210| =template=      | A template's =key= in =capture.toml=                                             |
211| =text=          | The text, inserted as =%i=                                                       |
212| =url=, =title=  | A link, as org-protocol gives one: =%a=, =%:link=, =%:description=               |
213| /prompt name/   | The answer to the prompt with that text: =What= for =%^{What}=, =Tags= for =%^g=, =Date= for =%^t=, =Effort= for =%^{Effort}p= |
214
215With =template= and =text= given and a parameter for every prompt in the template, orgstar files the entry without showing anything, as Capture to orgstar does in Shortcuts; on iOS the file is saved at once. =%^C= and =%^L= insert nothing. Otherwise the capture window (Mac) or sheet (iOS) opens with the template chosen (the template list without =template=), the text as =%i= and the link as =%a=, and asks what is missing; prompt answers given in the link aren't filled in there. Templates that make a Denote note or ask for a date tree's day (=time-prompt=) always open it. Closing it without filing opens =x-cancel=.
216
217Result: =template= (the key) and =file= (the target, relative to its folder).
218
219*** open
220
221| Parameter | Meaning                                                                                       |
222|-----------+-----------------------------------------------------------------------------------------------|
223| =file=    | A file relative to one of your folders (the first that has it), or an absolute path inside one |
224| =heading= | With =file=: the first heading with this title                                                |
225| =id=      | Instead of =file=: the heading with this =ID= property                                         |
226
227Shows the file or heading: in the editor on the Mac, in the reader on iOS. Result: =file=.
228
229*** agenda
230
231| Parameter | Meaning                                                                                                    |
232|-----------+------------------------------------------------------------------------------------------------------------|
233| =view=    | A view's name: =Agenda= (the default), =TODO List=, =Stuck Projects=, or one in =views.toml=; case is ignored |
234| =limit=   | How many entries to return: 50 when not given, at most 200                                                 |
235
236Runs the view with your agenda settings, as the agenda shows it. Calendar events and reminders are left out. Result:
237
238| Parameter | Meaning                                                 |
239|-----------+---------------------------------------------------------|
240| =view=    | The view's name                                         |
241| =result=  | The entries, as a JSON array                            |
242| =count=   | How many entries =result= holds                         |
243| =total=   | How many entries the view has; more than =count= when =limit= cut it |
244
245Each entry is an object with these keys, those without a value left out:
246
247| Key        | Value                                                                                       |
248|------------+---------------------------------------------------------------------------------------------|
249| =title=    | The heading's title                                                                         |
250| =todo=     | Its TODO keyword                                                                            |
251| =priority= | Its priority letter                                                                         |
252| =tags=     | Its tags, as an array                                                                       |
253| =category= | Its category                                                                                |
254| =file=     | Its file, relative to its folder                                                            |
255| =status=   | =overdue=, =due-soon=, =normal= or =done=                                                   |
256| =date=     | Agenda views: the day it shows on, =2026-11-26=; overdue entries show on today              |
257| =time=, =end= | Agenda views: its start and end time, =10:00=                                            |
258| =kind=     | Agenda views: =scheduled=, =deadline=, =habit= or =timestamp=                               |
259| =section=  | Block views: the header of the block it is in                                               |
260
261To show an entry, pass its =file= and =title= to =open= as =file= and =heading=.
262
263*** clock-in, clock-out and clock-status
264
265=clock-in= takes =id=, or =file= and =heading=, as =open= does, and clocks in to that heading; without them, to the entry clocked last. Dangling clocks are asked about in orgstar first, as Clock In asks. =clock-out= stops the running clock. =clock-status= changes nothing.
266
267| Action         | Result                                                                                 |
268|----------------+----------------------------------------------------------------------------------------|
269| =clock-in=     | As =clock-status=                                                                      |
270| =clock-out=    | =heading=, =file= and =minutes= clocked                                                |
271| =clock-status= | =running= (=true= or =false=), and while a clock runs =heading=, =file=, =started= (ISO 8601) and =minutes= |
272
273On iOS the file is saved at once.
274
275*** Errors
276
277| =errorCode=          | When                                                                     |
278|----------------------+--------------------------------------------------------------------------|
279| =unknown-action=     | The action isn't one of the above                                        |
280| =missing-parameter=  | =open= without =file= or =id=                                            |
281| =invalid-parameter=  | =limit= isn't a number above 0                                           |
282| =not-found=          | No such file, heading, ID or view                                        |
283| =capture-failed=     | The template can't be filled or filed; =errorMessage= says why            |
284| =clock-failed=       | Clocking in or out failed; =errorMessage= says why                       |
285| =no-clock=           | =clock-out= with no clock running                                        |
286| =not-allowed=        | You chose Don't Allow                                                    |
287| =needs-orgstar-plus= | The action needs orgstar+                                                |
288| =not-ready=          | The Mac app's window isn't open yet                                      |
289
290*** Which links orgstar opens
291
292orgstar opens =x-success=, =x-error= and =x-cancel= only for other apps' schemes. It never opens =orgstar:= links (a link could call itself), =org-protocol:= links (they would capture), or =http:=, =https:=, =file:=, =ftp:=, =javascript:=, =data:=, =about:= and =blob:= links, which would send results to a web server or open a download. Such a callback is skipped and the action still runs.
293
294*** Allowing apps
295
296A link from a web page or another app could write to your files or read them. So capture without the window or sheet, =clock-in=, =clock-out=, =agenda= and =clock-status= need orgstar+, as Shortcuts actions do, and the first time an app uses one of them orgstar asks: Allow "/name/" to use orgstar?, with where results go. Allow remembers the app; Don't Allow opens =x-error= with =not-allowed=. An app is the =x-source= name together with the schemes of its callbacks, so a link that gives an allowed name but sends results to another app asks again. =x-source= is whatever the link says, so allow only names you expect to see.
297
298=open= and capture through the window or sheet never ask, as =org-protocol://capture= doesn't: they show what they do and write nothing until you file.
299
300Allowed apps are listed under Apps Allowed to Use Links, in Settings ▸ Capture on the Mac and the Settings tab on iOS, each with Forget.
301
302*** Shortcuts or x-callback-url
303
304In Shortcuts, use the Capture to orgstar action: it runs without switching apps and returns its message as a value. Use x-callback-url from apps that support it (Drafts, launchers, Shortcuts' Open X-Callback URL action, =open= in Terminal), and for opening entries, the agenda and the clock, which have no Shortcuts action.
305
306*** Examples
307
308#+BEGIN_SRC text
309orgstar://x-callback-url/capture?template=t&text=Call%20Sam&x-source=Drafts&x-success=drafts://
310orgstar://x-callback-url/capture?template=w&url=https%3A%2F%2Fexample.com&title=Example&x-cancel=myapp://cancelled
311orgstar://x-callback-url/open?file=work%2Fprojects.org&heading=Website
312orgstar://x-callback-url/agenda?view=TODO%20List&limit=10&x-source=My%20App&x-success=myapp://agenda
313orgstar://x-callback-url/clock-in?id=5f0c1e2a&x-success=myapp://clocked
314#+END_SRC
315
316The agenda example opens a link like ~myapp://agenda?count=1&result=%5B%7B%22title%22…&total=1&view=TODO%20List~. On the Mac, try them from Terminal with =open '…'=.
317
318* Compatibility notes
319
320** Defaults that differ from Emacs
321
322orgstar's defaults follow a common Doom Emacs setup rather than plain Emacs in several places. If you use plain Emacs on the same files, set these in =config.toml= to match your Emacs, or use Import from Emacs; see [[file:13-configuration.org][Configuration]].
323
324| Setting                              | orgstar default                     | Plain Emacs default             |
325|--------------------------------------+-------------------------------------+---------------------------------|
326| =fill-column=                        | 80                                  | 70                              |
327| =org-M-RET-may-split-line=           | =false=                             | =t=                             |
328| =org-list-allow-alphabetical=        | =true=                              | =nil=                           |
329| =org-hide-emphasis-markers=          | =true=                              | =nil=                           |
330| =org-pretty-entities=                | =true=                              | =nil=                           |
331| =org-startup-indented=               | =true=                              | =nil=                           |
332| =org-startup-truncated=              | =false=                             | =t=                             |
333| =electric-pair-mode=                 | =true=                              | off                             |
334| =org-agenda-span=                    | 10 days                             | a week                          |
335| =org-agenda-show-all-dates=          | =false=                             | =t=                             |
336
337=org-hide-emphasis-markers= and =org-pretty-entities= matter for files you also edit in Emacs: orgstar aligns tags and tables, and fills paragraphs, by the width text has on screen in your Emacs. If they don't match your Emacs, tags and tables that orgstar aligns look misaligned in Emacs.
338
339These behave as Emacs's defaults and have no setting in =config.toml=: =org-log-repeat= is =time= unless =#+STARTUP= says otherwise, fast TODO selection is on when keywords have keys, priorities are =A= to =C= with =B= as default unless =#+PRIORITIES= says otherwise, and =org-use-sub-superscripts= is ={}= for display (only =x_{1}= and =x^{2}= are lowered and raised).
340
341** How the agenda looks
342
343The agenda selects the same entries as Org's, but shows them its own way (see [[file:07-agenda.org][The agenda]]):
344
345- Rows have their own layout: the time or a status such as =Due in 2d= on the left, the category above the title, and the keyword and priority as badges. =org-agenda-prefix-format= doesn't change the layout; what the format has besides =%c=, =%t=, =%s= and =%i=, such as =%e= or =%b=, shows after the category, and =%t= in its =agenda= entry decides whether a time in the heading text leaves the title.
346- Days without entries are hidden unless =org-agenda-show-all-dates= is =true=; today always shows.
347- Today's past deadlines and past scheduled entries are gathered in an Overdue group, oldest first, rather than sorted among today's entries by urgency.
348- The time grid and the now line are drawn as lines among a day's timed entries, where =org-agenda-time-grid=, =org-agenda-use-time-grid= and =org-agenda-show-current-time-in-grid= put them. orgstar draws the lines itself, so the strings in =org-agenda-time-grid= and =org-agenda-current-time-string= have no equivalent.
349
350** Snippets and yasnippet
351
352orgstar's snippets (see [[file:02-the-editor.org][The editor]]) read yasnippet's field syntax, and Import from Emacs copies your org-mode snippets into =snippets.toml= (see [[file:13-configuration.org][Configuration]]). They are tested against yasnippet's own expansion. Where they differ:
353
354- =TAB= expands a trigger only where it has no other meaning. With yasnippet's minor mode, =TAB= on a heading or in a table expands a trigger before the caret first; in orgstar it cycles or moves to the next field.
355- No Emacs Lisp: backquoted forms, =$(…)= transformations, =# condition:= and =# expand-env:= aren't run. Snippets with the first two aren't imported, and =snippets.toml= refuses =$(…)= in a field. Capture's =%(…)= runs in orgstar's own interpreter instead.
356- The default of a field is selected on entering it; typing replaces it, as yasnippet's first keystroke clears it.
357- Lines after the first take the indentation of the trigger's line, rather than being indented by the mode (=yas-indent-line=).
358- The trigger is the text back to a blank, or a part of it after a character other than a letter, digit or =_=; =yas-key-syntaxes= isn't read.
359- One set of snippets for org files. Snippets for other modes, =.yas-parents=, =# group:=, =# binding:= and =# uuid:= aren't used.
360- A field inside another field's default is skipped by yasnippet once the outer field is typed over; orgstar visits it, empty, where it was.
361- Capture's escapes for dates and prompts (=%t=, =%U=, =%<…>=, =%^{…}=) work in bodies, which yasnippet doesn't have.
362
363** Completion and dabbrev, corfu and org-roam
364
365Completion follows Emacs's =completion-at-point= with corfu's list (see [[file:02-the-editor.org][The editor]]). Where it differs:
366
367- Expand Word is =dabbrev-expand= with its defaults, and is tested against it in a buffer of its own. It searches the other open files whatever their mode, rather than only buffers in the same mode, and after them the index of your folders, which Emacs doesn't have. Without a word right before the caret it reports =No possible abbreviation preceding point= instead of expanding the word before the blank, and =dabbrev-abbrev-skip-leading-regexp= and =dabbrev-case-fold-search= aren't read.
368- Complete Word (and Doom's =C-n= and =C-p=) lists words in the order Expand Word finds them; =cape-dabbrev= collects the same words, which corfu then sorts by length and history.
369- Fuzzy matching scores as the command palette does, which is close to Doom's orderless with =orderless-flex= but takes no separators: spaces in what's typed are ignored.
370- The list that opens by itself reads one pause and one length for every position (=corfu-auto-delay=, =corfu-auto-prefix=), with Doom's macOS values as defaults (0.4 seconds, two characters).
371- =[[id:= completes every heading in your folders, as =org-roam-node-insert= completes nodes, but a heading without an =ID= gets one when chosen, which org-roam leaves to =org-id-get-create=. The description is the heading's title as written. org-roam's =roam:= links aren't completed.
372- Property values come from the index as well as the buffer; Org's =org-read-property-value= offers only the buffer's.
373
374** Lint File and org-lint
375
376Lint File (see [[file:02-the-editor.org][The editor]]) runs the checkers of =org-lint= that have the same meaning in orgstar, with org-lint's names, trust and messages, and finds the same lines; the tests compare the two on the same files. It differs in these ways:
377
378- Lint All Folders checks every file in your folders, which org-lint doesn't do; an orphaned attachment folder is listed once there, not once for each file beside it.
379- IDs are found through orgstar's index of all your folders, not =org-id-locations=. org-lint finds an unknown ID only when =org-id-locations= is loaded and doesn't have it; Lint File always reports one.
380- orgstar's own checkers, which org-lint doesn't have: =duplicate-id= (across your folders), =unknown-todo-keyword=, =missing-attachment-folder=, =orphaned-attachment-folder= and =invalid-file-search=. =unknown-todo-keyword= reports a heading starting with a keyword common in Org configurations (=NEXT=, =WAIT=, =HOLD=, …) or one letter away from a keyword of the file (=TODOX=), when the file and the configuration don't define it.
381- Not checked: Babel header arguments and values and source block languages (=wrong-header-argument=, =wrong-header-value=, =empty-header-argument=, =deprecated-header-syntax=, =named-result=, =invalid-babel-call-block=, =suspicious-language-in-src-block=), which depend on the languages loaded in Emacs; export options, macros and =#+INCLUDE= (=unknown-options-item=, =misspelled-export-option=, =invalid-macro-argument-and-template=, =wrong-include-link-parameter=, =obsolete-include-markup=, =beamer-frame=), which depend on the export back-ends loaded; citations (=non-existent-bibliography=, =missing-print-bibliography=, =invalid-cite-export-declaration=, =incomplete-citation=); =item-number=, =LaTeX-$=, =trailing-bracket-after-link=, =unclosed-brackets-in-link-description=, =percent-encoding-link-escape=, =extraneous-element-in-footnote-section=, =invalid-image-alignment= and =combining-keywords-with-affiliated=, where orgstar's reading of lists, LaTeX fragments and links differs from Org's in details these checks depend on.
382- Timestamps are checked against English day names, as Emacs writes them with the C locale.
383- The panel lists everything; org-lint's =h= and =i= (hide or ignore a checker) and its prefix arguments (one category or one checker) aren't there.
384
385** Known differences from Emacs Org
386
387orgstar refuses some things with a message rather than doing something different from Emacs. These are the ones found in the current version.
388
389Code blocks (see [[file:11-code-blocks.org][Code blocks]]):
390
391- =:cmdline= is supported only for shells, =dot=, =plantuml=, =mermaid= and C, C++, D, Java, Fortran and Clojure.
392- =:prologue= and =:epilogue= aren't supported for =dot=, =plantuml= and =mermaid=; =:stdin= and =:shebang= only for shells.
393- =:post= and noweb references that run a block (=<<name()>>=) take a block in the same file, as =name= or =name(arg=value)=. =name[header arguments](…)=, an index such as =name()[0]=, and blocks in other files or the Library of Babel are refused: "References like … aren't supported yet."
394- A =:post= reference is resolved once with an empty =*this*= before the block runs, so one that can't be resolved stops the run before it starts; Org runs the block and then fails.
395- =org-sbe= in a table formula doesn't run a block that has =:post=; on the Mac download version the table is recalculated in Emacs.
396- =:session= is supported only for shells, Python, Ruby, JavaScript and R; on iOS and in the Mac App Store version, only for JavaScript and Python. C, C++, D, Java, Fortran and Clojure ignore it, as in Org.
397- Clojure runs with babashka or the Clojure CLI only; other =:backend= values are refused.
398- R blocks return their standard output, whatever =:results= says; ob-R returns the value with =:results value=.
399- Header arguments, =:var= values and =:cache= that need Lisp evaluated by Emacs are refused when orgstar's interpreter can't evaluate them: "… is Lisp that only Emacs can evaluate; nothing was run."
400- Tangling refuses =:var= and noweb references that would run a block, tables and lists in a shell block's =:var=, and =:var= in languages other than shells, Python, Emacs Lisp, C, C++, D, Java, Fortran and Clojure.
401- On iOS and in the Mac App Store version, only Emacs Lisp, JavaScript, Python, calc, sqlite, dot and mermaid blocks run: Emacs Lisp in orgstar's own interpreter, JavaScript in JavaScriptCore, Python in Pyodide with the standard library only. A block whose =:var=, =:post= or noweb reference runs a block in another language runs nothing.
402
403Links (see [[file:09-links.org][Links]]):
404
405- =shell:= links aren't run. =elisp:= links run a form after asking, in Emacs in the Mac
406  download version when it is installed, otherwise in orgstar's interpreter; command names
407  aren't run.
408
409Capture templates (see [[file:08-capture.org][Capture]]):
410
411- =%(= escapes run in orgstar's Emacs Lisp interpreter, not in Emacs. A form that uses something the interpreter doesn't have stops the capture with a message.
412
413Tables and dynamic blocks (see [[file:10-tables.org][Tables]] and [[file:06-dates-and-clocking.org][Dates and clocking]]):
414
415- Formulas outside orgstar's own calculator go to Emacs in the Mac download version, and are refused in the Mac App Store version and on iOS.
416- Clock tables ignore =:formatter= and refuse scopes given as functions.
417- Dynamic blocks other than =clocktable=, =columnview= and denote-org's aren't supported. A column view of another file doesn't write its summaries into that file.
418
419Other:
420
421- =C-c C-q= before the first heading (setting file tags) isn't supported.
422- The date prompt also reads =today=, =tomorrow=, =yesterday=, =next week= and =last week=, which Org's prompt ignores.
423- Priority ranges that aren't letters or numbers are refused.
424- =#+SETUPFILE= URLs aren't fetched.
425- Most =#+STARTUP= options for footnotes, entities, numbering and odd levels are accepted and ignored; see [[file:13-configuration.org][Configuration]].
426- Line numbers are on the Mac only. Visual line numbers count the screen lines in view; with the caret scrolled out of view they count lines of the file.
427- Incremental search doesn't save the mark where it began, and has no =M-e= editing, =C-w= or =C-y= yanking into the string, or search ring beyond the last search.
428- =auto-fill-mode= fills on a typed space only, not on =RET=.
429- Keyboard macros (see [[file:03-keys.org][Keys and commands]]): the prefix argument counts macros only; =C-u= before another command does nothing and says so. =C-u C-x (= and =C-u <f3>= (append to the last macro), the macro ring (=C-x C-k C-n=, =C-x C-k C-p=), the counter commands other than =<f3>= (=C-x C-k C-c=, =C-x C-k C-f=), =C-x C-k e= (editing a macro), =C-x C-k b= (binding a key), =C-x C-k r= (running on each line of the region) and =C-x q= (query) aren't supported. A named macro is saved in =macros.toml= rather than written with =insert-kbd-macro=. Commands run from a menu or the palette while recording aren't recorded; Emacs records =M-x= and its answer.
430- The agenda's text search (see [[file:07-agenda.org][The agenda]]) covers the agenda files only: =org-agenda-text-search-extra-files= and =org-agenda-search-view-max-outline-level= aren't supported. It runs from the view menu rather than the dispatcher's =s= and =S=, and the search view's =[=, =]=, ={= and =}= keys, which add words and regexps to the search, aren't supported.
431- In regexps, =\<=, =\>= and =\b= use Org's word syntax but don't find a word boundary where the script changes between two word characters, as Emacs does (for example between an emoji and a letter).
432- org-roam: nodes come from orgstar's index, not org-roam's database; the graph is orgstar's own (see [[file:09-links.org][Links]]), not org-roam-ui's. Templates are tables in =capture.toml= rather than Lisp: targets other than =file=, =file+head=, =file+olp= and =file+head+olp= (such as =node=), function templates and =${…}= fields other than =title=, =slug=, =id= and a ref's =ref= and =body= aren't supported, and the capture window shows only the template's text, as if every template were narrowed. When an outline path's heading appears twice, the last is used where org-roam reports an error. A template of only =%?= doesn't leave the empty line Emacs leaves. The go-to daily-note commands ask for a template only when the templates name different files. Cancelling a capture makes nothing, so there's no question about deleting the new file. =roam:= links aren't rewritten to =id:= links when followed (=org-roam-link-auto-replace=), and one to a title no node has reports it rather than making the node. =roam-ref= with an existing node opens it rather than capturing into it. Refs aren't listed as backlinks (reflinks), and =org-roam-node-display-template= isn't read: the chooser shows title and tags. The daily date prompt prefers future dates, where org-roam prefers past ones.
433- Denote: a note's front matter is read from its first 40 lines. =denote-date-format=, =denote-front-matter-components-present-even-if-empty-value= and changes to =denote-file-types= aren't read; the defaults are used. Keywords are sorted after they are put in lower case, where Denote sorts them as typed, so =Zeta= and =alpha= sort differently when they aren't already lower case. Denote's quoting of Markdown values is followed exactly, including that a title with =\"= in it gains a backslash each time Rename Note from Front Matter rewrites it. See [[file:09-links.org][Links]].
434- org-timer: =org-timer-display= is always the mode line. The timer's =C-u= forms are separate commands bound to =C-u C-c C-x 0=, =C-u C-u C-c C-x 0= and =C-u C-c C-x ,=; Set Countdown Timer… has no prefix-argument forms.
435- Radio lists are Org 9.8's =#+ATTR_ORG: :radio= checkbox lists. The =#+ORGLST= radio lists of Org 9.1 and earlier, removed in Org 9.2, aren't supported, nor is =org-list-checkbox-radio-mode=.
436- org-attach: =org-attach-method= is always =cp= for Attach File… (the other methods have their own commands), =org-attach-auto-tag= is always =ATTACH=, =org-attach-preferred-new-method= is always =id=, and =org-attach-id-to-path-function-list= is Org's default. The dispatcher's =b=, =O= and =F= keys and =org-attach-archive-delete= aren't supported. Delete All Attachments… asks once and deletes the folder with what's in it.
437- org-crypt works with symmetric encryption only (=org-crypt-key= nil); public keys aren't supported. =org-crypt-tag-matcher= is a single tag. =org-crypt-use-before-save-magic= is a setting in =config.toml= rather than a function to call; with it, entries stay decrypted in the editor after a save, where Emacs's buffer holds the messages, and a file whose entries can't be encrypted isn't saved, where Emacs asks for the passphrase. Emacs Import doesn't read the call. =org-crypt-disable-auto-save= has no counterpart: orgstar keeps no auto-save files.
438- EasyPG's =.gpg= files are read and written with a passphrase only (symmetric); files encrypted to public keys aren't supported. orgstar keeps no passphrase cache beyond the open file; =epa-file-cache-passphrase-for-symmetric-encryption= has no counterpart.
439- When TODO dependencies refuse a change on a =COMMENT= heading, the heading keeps =COMMENT=. Org removes it before the check and doesn't put it back.
440- org-fc: only the default SM2 algorithm and parameters, review over every folder, no dashboard, audio or vocab cards, and a text-input answer compared as a whole; see Differences from org-fc in [[file:16-flashcards.org][Flashcards]].
Keyboard shortcuts

Global

⌘K
Command palette & jump
/
Focus search
?
Show this help
g d
Dashboard
g e
Explore repositories
g n
Notifications

Repository & editor

t
Find file in repository
y
Copy immutable SHA permalink
g c
Code tab
g i
Issues tab
g m
Merge requests tab
g b
Builds tab
⌘↵
Submit active form