Commit 25e1ab6b10
Verified · cmc
Layout: unified · split
appcast.xml added +244
| @@ -0,0 +1,244 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle"> | ||
| 3 | <channel> | ||
| 4 | <title>orgstar</title> | ||
| 5 | <link>https://gitbay.org/krz/orgstar</link> | ||
| 6 | <item> | ||
| 7 | <title>orgstar 1.2.0</title> | ||
| 8 | <link>https://krz.sh/apps/orgstar/</link> | ||
| 9 | <sparkle:version>728</sparkle:version> | ||
| 10 | <sparkle:shortVersionString>1.2.0</sparkle:shortVersionString> | ||
| 11 | <sparkle:minimumSystemVersion>26.0</sparkle:minimumSystemVersion> | ||
| 12 | <pubDate>Sat, 21 Nov 2026 22:04:19 -0600</pubDate> | ||
| 13 | <description><![CDATA[<h2>orgstar 1.2.0</h2> | ||
| 14 | <ul> | ||
| 15 | <li>The agenda in the sidebar, beside the editor: the calendar button under the sidebar switches between your files and the agenda or one of your saved views.</li> | ||
| 16 | <li>A graph of your org-roam or Denote notes and the links between them (Window ▸ Graph).</li> | ||
| 17 | <li><code>dot</code> and <code>mermaid</code> blocks are drawn in the app when the programs aren't installed; <code>calc</code> and <code>sqlite</code> blocks run in the app too.</li> | ||
| 18 | <li>LaTeX, ODT and plain text (ASCII) export without Emacs.</li> | ||
| 19 | <li>More table formulas without Emacs: more Calc and Lisp formulas, date arithmetic and <code>org-sbe</code>.</li> | ||
| 20 | <li>Radar plots, more of gnuplot's <code>set</code> options and SVG files without gnuplot.</li> | ||
| 21 | <li>Save as View… keeps a typed match or search as a view in <code>views.toml</code>.</li> | ||
| 22 | <li>orgstar can stay in the menu bar, with capture and today's agenda (Settings ▸ General).</li> | ||
| 23 | <li>A sheet shows what's new once after an update.</li> | ||
| 24 | <li>PDF export typesets math without a network connection.</li> | ||
| 25 | <li>Fixes: attachment links stay with the entry they belong to, and attached images show in HTML and PDF export.</li> | ||
| 26 | </ul> | ||
| 27 | <p>Universal (Apple silicon and Intel), macOS 26 or later. Notarized.</p>]]></description> | ||
| 28 | <enclosure url="https://files.krz.sh/orgstar/orgstar-1.2.0.dmg" type="application/octet-stream" sparkle:edSignature="hHwHIUJ7VWf+I4FotDK7XjBhKiiD4kv8x+zRJuRXBsAXDgf98KM/iP/F3fPe4uzPmNoBWpwZpkSju3KlPjmzCA==" length="69432234"/> | ||
| 29 | </item> | ||
| 30 | <item> | ||
| 31 | <title>orgstar 1.1.1</title> | ||
| 32 | <link>https://krz.sh/apps/orgstar/</link> | ||
| 33 | <sparkle:version>611</sparkle:version> | ||
| 34 | <sparkle:shortVersionString>1.1.1</sparkle:shortVersionString> | ||
| 35 | <sparkle:minimumSystemVersion>26.0</sparkle:minimumSystemVersion> | ||
| 36 | <pubDate>Fri, 20 Nov 2026 09:06:31 -0600</pubDate> | ||
| 37 | <description><![CDATA[<p>Fixes shared with the new Mac App Store version, and a new signing key for sponsor licenses.</p> | ||
| 38 | <p>Universal (Apple silicon and Intel), macOS 26 or later. Notarized.</p>]]></description> | ||
| 39 | <enclosure url="https://files.krz.sh/orgstar/orgstar-1.1.1.dmg" type="application/octet-stream" sparkle:edSignature="/HZ53dkVOoSI6iIT9OC+jYmXccvU15tLBWB5jyPxvkBJysoAwHgyCy7OAsXWfKddV4VDfVOuMO73fTu7tpkZDQ==" length="58377069"/> | ||
| 40 | </item> | ||
| 41 | <item> | ||
| 42 | <title>orgstar 1.1.0</title> | ||
| 43 | <link>https://krz.sh/apps/orgstar/</link> | ||
| 44 | <sparkle:version>591</sparkle:version> | ||
| 45 | <sparkle:shortVersionString>1.1.0</sparkle:shortVersionString> | ||
| 46 | <sparkle:minimumSystemVersion>26.0</sparkle:minimumSystemVersion> | ||
| 47 | <pubDate>Thu, 19 Nov 2026 20:25:39 -0600</pubDate> | ||
| 48 | <description><![CDATA[<h2>orgstar 1.1.0</h2> | ||
| 49 | <ul> | ||
| 50 | <li><b>orgstar+</b>: running source blocks, PDF and Word export, encryption, org-roam and Denote notes, widgets, Calendar and Reminders, and Shortcuts actions are now orgstar+. You get it by sponsoring orgstar on GitHub: $60 once, or $5 a month. If you used orgstar before this version, you keep all of it.</li> | ||
| 51 | <li><b>Denote</b>: with notes-package = "denote", the note commands follow Denote's file names and front matter. This covers denote: links and backlinks, query links, denote-journal entries, renaming, signatures, sequences, silos and denote-org's dynamic blocks.</li> | ||
| 52 | <li>Command names in the palette, menus and messages are now in German, French, Japanese, Spanish and Brazilian Portuguese.</li> | ||
| 53 | </ul> | ||
| 54 | <p>Universal (Apple silicon and Intel), macOS 26 or later. Notarized.</p>]]></description> | ||
| 55 | <enclosure url="https://files.krz.sh/orgstar/orgstar-1.1.0.dmg" type="application/octet-stream" sparkle:edSignature="YwJM7sJdvOAOAGgwOxv0vSNT2HGo4JZ5ouJiyCzRhxOX9iBpgXDZO/DOD8TAPWE9jplJxUnLnunGyzHKFgEhBA==" length="58161966"/> | ||
| 56 | </item> | ||
| 57 | <item> | ||
| 58 | <title>orgstar 0.9.2</title> | ||
| 59 | <link>https://gitbay.org/krz/orgstar/releases/tag/v0.9.2</link> | ||
| 60 | <sparkle:version>560</sparkle:version> | ||
| 61 | <sparkle:shortVersionString>0.9.2</sparkle:shortVersionString> | ||
| 62 | <sparkle:minimumSystemVersion>26.0</sparkle:minimumSystemVersion> | ||
| 63 | <pubDate>Mon, 19 Oct 2026 15:13:39 -0500</pubDate> | ||
| 64 | <description><![CDATA[<p>Fixes a crash in the Mac app when archiving a subtree (Archive Subtree, <code>org-archive-subtree</code>) in a file with folded headings, such as one with <code>#+STARTUP: overview</code>.</p> | ||
| 65 | <p>Universal (Apple silicon and Intel), macOS 26 or later. Notarized.</p>]]></description> | ||
| 66 | <enclosure url="https://gitbay.org/krz/orgstar/releases/download/v0.9.2/orgstar-0.9.2.dmg" type="application/octet-stream" sparkle:edSignature="oTGE4ZzrIIHp0F9gsBafLR/AkgHS0pHqPYeJPeSYUeSA1foFvUxZGMNqiypJ80YepW4GmWAOL62Rdx2k6ISJAA==" length="56752788"/> | ||
| 67 | </item> | ||
| 68 | <item> | ||
| 69 | <title>orgstar 0.9.1</title> | ||
| 70 | <link>https://gitbay.org/krz/orgstar/releases/tag/v0.9.1</link> | ||
| 71 | <sparkle:version>557</sparkle:version> | ||
| 72 | <sparkle:shortVersionString>0.9.1</sparkle:shortVersionString> | ||
| 73 | <sparkle:minimumSystemVersion>26.0</sparkle:minimumSystemVersion> | ||
| 74 | <pubDate>Sat, 17 Oct 2026 16:18:41 -0500</pubDate> | ||
| 75 | <description><![CDATA[<p>Build fix for the iPhone, iPad and Apple Watch app: the plural forms added in 0.9.0 are now included in the iOS build. No changes to the Mac app.</p> | ||
| 76 | <p>Universal (Apple silicon and Intel), macOS 26 or later. Notarized.</p>]]></description> | ||
| 77 | <enclosure url="https://gitbay.org/krz/orgstar/releases/download/v0.9.1/orgstar-0.9.1.dmg" type="application/octet-stream" sparkle:edSignature="Vzmsm2VoHtef1P2oVrtrMzeGglsIPI9eBXu0s2T9TpM3Qq94J7qe+J2EBbGysoygImSlm29f7y7vpRc9TtXfBg==" length="56733477"/> | ||
| 78 | </item> | ||
| 79 | <item> | ||
| 80 | <title>orgstar 0.9.0</title> | ||
| 81 | <link>https://gitbay.org/krz/orgstar/releases/tag/v0.9.0</link> | ||
| 82 | <sparkle:version>554</sparkle:version> | ||
| 83 | <sparkle:shortVersionString>0.9.0</sparkle:shortVersionString> | ||
| 84 | <sparkle:minimumSystemVersion>26.0</sparkle:minimumSystemVersion> | ||
| 85 | <pubDate>Sat, 17 Oct 2026 15:57:22 -0500</pubDate> | ||
| 86 | <description><![CDATA[<p>French, Japanese, Spanish and Brazilian Portuguese.</p> | ||
| 87 | <ul> | ||
| 88 | <li><b>Languages.</b> Menus, settings, the agenda, widgets and the watch app are in French, Japanese, Spanish and Brazilian Portuguese, alongside English and German, and follow the system language.</li> | ||
| 89 | <li><b>Plurals.</b> Counts such as selected entries, minutes and days use the right singular or plural form in every language.</li> | ||
| 90 | <li><b>Archive and mode line.</b> The archive prompt and the mode line's line and word count are translated.</li> | ||
| 91 | </ul> | ||
| 92 | <p>Universal (Apple silicon and Intel), macOS 26 or later. Notarized.</p>]]></description> | ||
| 93 | <enclosure url="https://gitbay.org/krz/orgstar/releases/download/v0.9.0/orgstar-0.9.0.dmg" type="application/octet-stream" sparkle:edSignature="dslitE37pa5fStMYht1G9kSZGye+1zAWvo/hY0u7yGMMvHImWTM98a7zyUJmaaIyApqP7pl/0cwoog1gMVW9BA==" length="56745704"/> | ||
| 94 | </item> | ||
| 95 | <item> | ||
| 96 | <title>orgstar 0.8.0</title> | ||
| 97 | <link>https://gitbay.org/krz/orgstar/releases/tag/v0.8.0</link> | ||
| 98 | <sparkle:version>549</sparkle:version> | ||
| 99 | <sparkle:shortVersionString>0.8.0</sparkle:shortVersionString> | ||
| 100 | <sparkle:minimumSystemVersion>26.0</sparkle:minimumSystemVersion> | ||
| 101 | <pubDate>Sat, 17 Oct 2026 14:33:36 -0500</pubDate> | ||
| 102 | <description><![CDATA[<p>Missed habits join the Overdue group, and the iPhone and iPad app gets an entry sheet, a first-launch guide and an About screen.</p> | ||
| 103 | <ul> | ||
| 104 | <li><b>Overdue.</b> A habit scheduled on an earlier day and not done goes in today's Overdue group, and every overdue row shows how late it is (2d ago) instead of the time of day it had.</li> | ||
| 105 | <li><b>iOS: entry sheet.</b> Tapping an agenda entry opens a sheet to change its title, TODO state, priority, scheduled date, deadline, tags and notes, with undo and redo. Done writes the changes to the file together.</li> | ||
| 106 | <li><b>iOS: Overdue section.</b> Overdue entries are a section of their own above today.</li> | ||
| 107 | <li><b>iOS: first launch.</b> A few screens introduce the app, ask for the folder of org files, and offer notifications, Calendar events and Reminders, each asked for only when you choose it.</li> | ||
| 108 | <li><b>iOS: About.</b> Settings ends with About orgstar: the version, the manual, release notes, the issue tracker, support email and the privacy policy.</li> | ||
| 109 | </ul> | ||
| 110 | <p>Universal (Apple silicon and Intel), macOS 26 or later. Notarized.</p>]]></description> | ||
| 111 | <enclosure url="https://gitbay.org/krz/orgstar/releases/download/v0.8.0/orgstar-0.8.0.dmg" type="application/octet-stream" sparkle:edSignature="KoXgyNL6aSDjrN0Wu9RKLQRy0su3OrTptr5/tMqGRjNQu3EYycztUGdRNNHfuKPH0tY8uPWg/h1a0YN5Hl+GBQ==" length="56391805"/> | ||
| 112 | </item> | ||
| 113 | <item> | ||
| 114 | <title>orgstar 0.7.0</title> | ||
| 115 | <link>https://gitbay.org/krz/orgstar/releases/tag/v0.7.0</link> | ||
| 116 | <sparkle:version>541</sparkle:version> | ||
| 117 | <sparkle:shortVersionString>0.7.0</sparkle:shortVersionString> | ||
| 118 | <sparkle:minimumSystemVersion>26.0</sparkle:minimumSystemVersion> | ||
| 119 | <pubDate>Fri, 16 Oct 2026 12:57:22 -0500</pubDate> | ||
| 120 | <description><![CDATA[<p>Hide folders from the agenda, by hand or with a Focus, and agenda fixes.</p> | ||
| 121 | <ul> | ||
| 122 | <li><b>Hiding folders.</b> With more than one folder, the Folders menu in the agenda's toolbar shows or hides each folder's files in the agenda and the widgets; the shown folders' names appear under the title. Reminders still fire for hidden folders.</li> | ||
| 123 | <li><b>Focus filter.</b> Add orgstar's Hide Folders filter to a Focus in System Settings ▸ Focus to hide its folders while the Focus is on and mute their reminders.</li> | ||
| 124 | <li><b>Archived tasks.</b> agenda-exclude-archives in config.toml leaves out the files your agenda files archive to, by #+ARCHIVE:, an :ARCHIVE: property or org-archive-location.</li> | ||
| 125 | <li><b>Reminders.</b> Notification titles are the heading without its TODO keyword and priority.</li> | ||
| 126 | <li><b>Fix.</b> After a file changed, agenda rows could show another entry's title while opening the right one.</li> | ||
| 127 | </ul> | ||
| 128 | <p>Universal (Apple silicon and Intel), macOS 26 or later. Notarized.</p>]]></description> | ||
| 129 | <enclosure url="https://gitbay.org/krz/orgstar/releases/download/v0.7.0/orgstar-0.7.0.dmg" type="application/octet-stream" sparkle:edSignature="EAjU6aDyTtfrxIYlDOyarmyY4dT5A49bLYaIwOGYxyzFnhJjCEypPGeyzemo44w2uniZ/jPXXc5f0sogRtFUBw==" length="56265203"/> | ||
| 130 | </item> | ||
| 131 | <item> | ||
| 132 | <title>orgstar 0.6.1</title> | ||
| 133 | <link>https://gitbay.org/krz/orgstar/releases/tag/v0.6.1</link> | ||
| 134 | <sparkle:version>531</sparkle:version> | ||
| 135 | <sparkle:shortVersionString>0.6.1</sparkle:shortVersionString> | ||
| 136 | <sparkle:minimumSystemVersion>26.0</sparkle:minimumSystemVersion> | ||
| 137 | <pubDate>Thu, 15 Oct 2026 21:03:42 -0500</pubDate> | ||
| 138 | <description><![CDATA[<p>New star icons, and app icons that keep their colors in dark mode.</p> | ||
| 139 | <ul> | ||
| 140 | <li><b>Star icons.</b> The three unicorn icons are now Org Star, Night Star and Pastel Star: a full-size heading star on the same backgrounds. An icon chosen before stays chosen.</li> | ||
| 141 | <li><b>Dark mode.</b> In the system's Dark icon style and in the Dock in dark appearance, each icon keeps a darkened version of its own colors instead of turning into the same glyph on gray.</li> | ||
| 142 | </ul> | ||
| 143 | <p>Universal (Apple silicon and Intel), macOS 26 or later. Notarized.</p>]]></description> | ||
| 144 | <enclosure url="https://gitbay.org/krz/orgstar/releases/download/v0.6.1/orgstar-0.6.1.dmg" type="application/octet-stream" sparkle:edSignature="Yju3xlhhaDYDWv3Axv/qiiPzG5ECoIpNNulhcZ3yjgyYfnRcIZkRdE4nb0tM8e3EPFin5zkRL8A6lv/pnIecCA==" length="56193559"/> | ||
| 145 | </item> | ||
| 146 | <item> | ||
| 147 | <title>orgstar 0.6.0</title> | ||
| 148 | <link>https://gitbay.org/krz/orgstar/releases/tag/v0.6.0</link> | ||
| 149 | <sparkle:version>527</sparkle:version> | ||
| 150 | <sparkle:shortVersionString>0.6.0</sparkle:shortVersionString> | ||
| 151 | <sparkle:minimumSystemVersion>26.0</sparkle:minimumSystemVersion> | ||
| 152 | <pubDate>Thu, 15 Oct 2026 02:35:07 -0500</pubDate> | ||
| 153 | <description><![CDATA[<p>Built-in themes and app icons.</p> | ||
| 154 | <ul> | ||
| 155 | <li><b>Themes.</b> Settings ▸ Appearance ▸ Theme chooses a theme for the light appearance and one for the dark: Default, Solarized, Gruvbox, Modus, Catppuccin, Tomorrow and Paper for light; Default, Solarized, Gruvbox, Modus, Catppuccin, Nord, Dracula, Tokyo Night and doom-one for dark. They are light-theme and dark-theme in config.toml, and colors set there or in a theme file still apply on top. Themes other than Default also color the sidebar, the modeline, the agenda and buttons.</li> | ||
| 156 | <li><b>Your own theme.</b> Copy to Config Folder writes the two chosen themes into my-theme.toml, every color written out, to start from.</li> | ||
| 157 | <li><b>App icons.</b> Settings ▸ Appearance ▸ App Icon offers thirteen icons, three of them unicorns, shown in the Dock while orgstar runs. The default icon follows the system's Default, Dark and Tinted icon styles.</li> | ||
| 158 | </ul> | ||
| 159 | <p>Universal (Apple silicon and Intel), macOS 26 or later. Notarized.</p>]]></description> | ||
| 160 | <enclosure url="https://gitbay.org/krz/orgstar/releases/download/v0.6.0/orgstar-0.6.0.dmg" type="application/octet-stream" sparkle:edSignature="GHl722oApUUw5sjTU8gwOpwYl0RBGX2WfmEdkIf/lYmfkyThcz5gDurL+V8o/3Vuo+DdPAhg206C+FZfsnMfBA==" length="54797148"/> | ||
| 161 | </item> | ||
| 162 | <item> | ||
| 163 | <title>orgstar 0.5.0</title> | ||
| 164 | <link>https://gitbay.org/krz/orgstar/releases/tag/v0.5.0</link> | ||
| 165 | <sparkle:version>509</sparkle:version> | ||
| 166 | <sparkle:shortVersionString>0.5.0</sparkle:shortVersionString> | ||
| 167 | <sparkle:minimumSystemVersion>26.0</sparkle:minimumSystemVersion> | ||
| 168 | <pubDate>Wed, 14 Oct 2026 00:11:59 -0500</pubDate> | ||
| 169 | <description><![CDATA[<p>Writing, search and export, Org's defaults, and a German translation of what's new.</p> | ||
| 170 | <ul> | ||
| 171 | <li><b>Writing.</b> A proportional body font (Settings ▸ Appearance ▸ Body text), with tables, code, dates and tags kept monospaced. A text width that centres lines in a wide window. Line numbers are off by default. Emphasize (C-c C-x C-f), with ⌘B, ⌘I and ⌘U in the Mac keys. The word count shows characters and reading time.</li> | ||
| 172 | <li><b>Search.</b> Search Notes finds text before a file's first heading, and shows the passage each result matched with the words in bold.</li> | ||
| 173 | <li><b>Notes.</b> Find Node and Insert Node Link make a new node from a title that isn't found. Backlinks show the line each link is on.</li> | ||
| 174 | <li><b>Export.</b> Word files have heading styles and the file's images. PDF export has page numbers, and settings for margins and font in the Export dialog.</li> | ||
| 175 | <li><b>Safety.</b> Recovery Versions keeps an hourly snapshot of a file before saving.</li> | ||
| 176 | <li><b>Org's defaults.</b> New installs get Org's TODO keywords (TODO and DONE) and M-RET at the caret; existing settings are kept. Logging, speed keys and spell checking are in Settings ▸ Editing.</li> | ||
| 177 | <li><b>Getting started.</b> A welcome sheet offers to add a folder or make one in iCloud Drive, and to choose the keys.</li> | ||
| 178 | <li><b>Smaller changes.</b> The date prompt reads today, tomorrow, yesterday, next week and last week. Remove Schedule and Remove Deadline have keys. Recovery Versions, Resolve Sync Conflicts, Revert to File on Disk and Check Spelling While Typing are in the menus.</li> | ||
| 179 | </ul> | ||
| 180 | <p>Universal (Apple silicon and Intel), macOS 26 or later. Notarized.</p>]]></description> | ||
| 181 | <enclosure url="https://gitbay.org/krz/orgstar/releases/download/v0.5.0/orgstar-0.5.0.dmg" type="application/octet-stream" sparkle:edSignature="D6ejdGoS0X14FzjiteFw8zbHPbCIKYPMDEIU1AI0qUgIPVevG8RXS/NFqz5uRxBrwCjG9ai2olLtHW3sqT94Dg==" length="53122632"/> | ||
| 182 | </item> | ||
| 183 | <item> | ||
| 184 | <title>orgstar 0.4.2</title> | ||
| 185 | <link>https://gitbay.org/krz/orgstar/releases/tag/v0.4.2</link> | ||
| 186 | <sparkle:version>490</sparkle:version> | ||
| 187 | <sparkle:shortVersionString>0.4.2</sparkle:shortVersionString> | ||
| 188 | <sparkle:minimumSystemVersion>26.0</sparkle:minimumSystemVersion> | ||
| 189 | <pubDate>Mon, 12 Oct 2026 23:31:15 -0500</pubDate> | ||
| 190 | <description><![CDATA[<p>A fix for windows with several panes.</p><ul><li>⌘W or the × on a pane's only tab closes the pane instead of leaving it empty, and closes the buffer only when no other pane shows it. ⌘W on an empty pane closes the pane, not the window.</li></ul><p>Universal (Apple silicon and Intel), macOS 26 or later. Notarized.</p>]]></description> | ||
| 191 | <enclosure url="https://gitbay.org/krz/orgstar/releases/download/v0.4.2/orgstar-0.4.2.dmg" type="application/octet-stream" sparkle:edSignature="fBFIEB6062S2DWb/KP3cb7Ghb7koQEwVxble7NYi+A8koHm+fCcE2qYbmeqa0nkoO7OZVAxh5fZivSIk4ga9Dw==" length="52794043"/> | ||
| 192 | </item> | ||
| 193 | <item> | ||
| 194 | <title>orgstar 0.4.1</title> | ||
| 195 | <link>https://gitbay.org/krz/orgstar/releases/tag/v0.4.1</link> | ||
| 196 | <sparkle:version>487</sparkle:version> | ||
| 197 | <sparkle:shortVersionString>0.4.1</sparkle:shortVersionString> | ||
| 198 | <sparkle:minimumSystemVersion>26.0</sparkle:minimumSystemVersion> | ||
| 199 | <pubDate>Mon, 12 Oct 2026 20:25:14 -0500</pubDate> | ||
| 200 | <description><![CDATA[<p>Fixes in the editor and in Word export.</p><ul><li>M-RET at the end of a folded heading inserts the new heading after the subtree, as Emacs does with point behind the ellipsis, instead of between the heading and its hidden body.</li><li>Tabs stop every 8 columns from the start of the line, as in Emacs.</li><li>Word export sets a page size, Letter or A4 by region as PDF export does. Quick Look and Pages laid the document out on a narrow page without one.</li><li>iOS: the Schedule and Deadline prompts take a time; arrow keys skip folded text instead of opening it.</li></ul><p>Universal (Apple silicon and Intel), macOS 26 or later. Notarized.</p>]]></description> | ||
| 201 | <enclosure url="https://gitbay.org/krz/orgstar/releases/download/v0.4.1/orgstar-0.4.1.dmg" type="application/octet-stream" sparkle:edSignature="Uq1IXSYvkVTMembKtsE8vAgHpaQgjSMShb3Ts2tMC3FSHQFJJQyWDsY5aQjksn7P98o6spapPP/McxIUuSFUBw==" length="52722000"/> | ||
| 202 | </item> | ||
| 203 | <item> | ||
| 204 | <title>orgstar 0.4.0</title> | ||
| 205 | <link>https://gitbay.org/krz/orgstar/releases/tag/v0.4.0</link> | ||
| 206 | <sparkle:version>481</sparkle:version> | ||
| 207 | <sparkle:shortVersionString>0.4.0</sparkle:shortVersionString> | ||
| 208 | <sparkle:minimumSystemVersion>26.0</sparkle:minimumSystemVersion> | ||
| 209 | <pubDate>Mon, 12 Oct 2026 08:48:33 -0500</pubDate> | ||
| 210 | <description><![CDATA[<p>Images and files can be pasted and dropped into notes.</p><ul><li>An image on the clipboard is saved as <code>org-yank-image-save-method</code> says and linked on a line of its own at the caret. Pasted or dropped files are handled as <code>org-yank-dnd-method</code> says. With the caret on an image line, the link shows with the image under it.</li><li>iOS: paste, drop and Take Photo in the editor; Attach Photo or Video inserts the link at the caret; Export Subtree… in the Export menu.</li></ul><p>Universal (Apple silicon and Intel), macOS 26 or later. Notarized.</p>]]></description> | ||
| 211 | <enclosure url="https://gitbay.org/krz/orgstar/releases/download/v0.4.0/orgstar-0.4.0.dmg" type="application/octet-stream" sparkle:edSignature="2+Po0wxJ1bKcNORuqnCv58Y9fRWw0CD449X0WRQfD/G3Bu43utNnskIHgl+knfpiTYAk2cW0yP3MclnRTXylDA==" length="52770955"/> | ||
| 212 | </item> | ||
| 213 | <item> | ||
| 214 | <title>orgstar 0.3.2</title> | ||
| 215 | <link>https://gitbay.org/krz/orgstar/releases/tag/v0.3.2</link> | ||
| 216 | <sparkle:version>467</sparkle:version> | ||
| 217 | <sparkle:shortVersionString>0.3.2</sparkle:shortVersionString> | ||
| 218 | <sparkle:minimumSystemVersion>26.0</sparkle:minimumSystemVersion> | ||
| 219 | <pubDate>Sun, 11 Oct 2026 20:13:45 -0500</pubDate> | ||
| 220 | <description><![CDATA[<ul><li>Settings ▸ Agenda ▸ Habits only today (<code>org-habit-show-habits-only-for-today</code>). On by default, as in Org; off, habits also show on the later days they are scheduled for. Also on iOS and in Import from Emacs.</li></ul><p>Universal (Apple silicon and Intel), macOS 26 or later. Notarized.</p>]]></description> | ||
| 221 | <enclosure url="https://gitbay.org/krz/orgstar/releases/download/v0.3.2/orgstar-0.3.2.dmg" type="application/octet-stream" sparkle:edSignature="dDZRzSc6GGP0q/5bU41FFXonNf6nlwL09aPg95xYMycRbItGP0PJSjn3j9uLDDFh07vlzwL10993PmGfiCqQAA==" length="52638851"/> | ||
| 222 | </item> | ||
| 223 | <item> | ||
| 224 | <title>orgstar 0.3.1</title> | ||
| 225 | <link>https://gitbay.org/krz/orgstar/releases/tag/v0.3.1</link> | ||
| 226 | <sparkle:version>464</sparkle:version> | ||
| 227 | <sparkle:shortVersionString>0.3.1</sparkle:shortVersionString> | ||
| 228 | <sparkle:minimumSystemVersion>26.0</sparkle:minimumSystemVersion> | ||
| 229 | <pubDate>Sun, 11 Oct 2026 19:45:32 -0500</pubDate> | ||
| 230 | <description><![CDATA[<ul><li>The agenda sorts timed entries by time before habits: timed habits go among the timed entries, and the now line and calendar events are placed by start time.</li><li>iOS: the string catalog is compiled in a build phase, so the German strings are complete.</li></ul><p>Universal (Apple silicon and Intel), macOS 26 or later. Notarized.</p>]]></description> | ||
| 231 | <enclosure url="https://gitbay.org/krz/orgstar/releases/download/v0.3.1/orgstar-0.3.1.dmg" type="application/octet-stream" sparkle:edSignature="I0W+v/dUXzaqvMadCG8t3anaQ2n8mUMEfNPFX4jzSfmXkWIihg0Yi5Oza5PqZ7gVEkdAc/ea22wQzv06S1VMAg==" length="52629700"/> | ||
| 232 | </item> | ||
| 233 | <item> | ||
| 234 | <title>orgstar 0.3.0</title> | ||
| 235 | <link>https://gitbay.org/krz/orgstar/releases/tag/v0.3.0</link> | ||
| 236 | <sparkle:version>459</sparkle:version> | ||
| 237 | <sparkle:shortVersionString>0.3.0</sparkle:shortVersionString> | ||
| 238 | <sparkle:minimumSystemVersion>26.0</sparkle:minimumSystemVersion> | ||
| 239 | <pubDate>Sun, 11 Oct 2026 19:09:49 -0500</pubDate> | ||
| 240 | <description><![CDATA[<p>Updates from the app, windows and panes, a watch app, and the rest of Org's agenda, clocking, capture and table options.</p><ul><li><b>Updates.</b> orgstar ▸ Check for Updates…, and a daily automatic check that the app asks about on its second launch.</li><li><b>Windows and panes.</b> Split Pane Below and Right (C-x 2, C-x 3), Close Pane, Close Other Panes, Next Pane, and New Window (C-x 5 2) for a second window of panes.</li><li><b>Agenda.</b> Reminders from the Reminders app; Add to Calendar… and Edit Event… for calendar events; block agendas, per-view sorting, prefix format and skip conditions in <code>views.toml</code>; a Stuck Projects view; the time grid and now line; <code>org-agenda-sorting-strategy</code>; state changes in log mode; <code>org-agenda-todo-ignore-*</code>, <code>org-agenda-start-on-weekday</code>, <code>org-deadline-warning-days</code> and <code>org-agenda-files</code>; holidays in diary sexps.</li><li><b>Editor.</b> Incremental search (C-s, C-r); relative and visual line numbers; auto-fill mode; LaTeX previews; remote inline images and images for <code>attachment:</code> links; Insert Drawer, Copy to Refile Target, Go to Refile Target, drag element, bullet cycling; configurable structure templates; coderef and regexp links; <code>org-archive-location</code>, refile targets, tag inheritance settings and <code>org-tag-alist</code>.</li><li><b>Capture.</b> <code>regexp</code> targets, template groups, <code>time-prompt</code>, <code>tree-type</code> groupings, Refile… after capture, and the <code>%(…)</code> and <code>%[file]</code> escapes.</li><li><b>Clocking.</b> Clocks started or stopped in Emacs or on another device are followed; rounding, a state switch on clock-in, clock out when done, and a notification when the clock passes the Effort; <code>org-clock-into-drawer</code> and <code>CLOCK_INTO_DRAWER</code>; clock tables over other files with <code>:match</code> and <code>:step</code>; the clock report reads open buffers.</li><li><b>Tables.</b> table.el tables edited in place; formula iteration and automatic recalculation; <code>#+PLOT</code> with gnuplot or Swift Charts.</li><li><b>Code blocks.</b> Ruby, Node and R sessions; <code>:var</code> for Ruby, JavaScript, R and awk; <code>:prologue</code> and <code>:epilogue</code> for interpreted languages.</li><li><b>Column view.</b> Values are edited in the sheet; <code>@min</code>, <code>@max</code> and <code>@mean</code>; <code>columnview</code> blocks from <code>file:</code> and ID sources, with <code>:match</code>.</li><li><b>Export.</b> Word (.docx), iCalendar, and publishing projects.</li><li><b>More of Org.</b> org-attach, org-crypt, radio lists and org-timer, <code>org-track-ordered-property-with-tag</code>, and backlinks and daily notes as in org-roam.</li><li><b>Doom.</b> zz, zt and zb, number increment, replace state, q:.</li><li><b>Mac.</b> Today, Up Next and Habits widgets for the desktop and Notification Center. German localization.</li><li><b>iPhone, iPad and Apple Watch.</b> A watchOS app with today's agenda, the clock and dictated capture; iPad multi-window; <code>keymap.toml</code> and the Doom preset with a hardware keyboard; the board, bulk agenda actions, column view, backlinks, refile from the editor, Word export, table CSV and TSV import and export, and highlighted code in the block editor.</li></ul><p>Universal (Apple silicon and Intel), macOS 26 or later. Notarized.</p>]]></description> | ||
| 241 | <enclosure url="https://gitbay.org/krz/orgstar/releases/download/v0.3.0/orgstar-0.3.0.dmg" type="application/octet-stream" sparkle:edSignature="JMqSTRUAuS1fsuvUaMjZXED7ul6n3hqllJ0TIiFchRoenv8YQMbSBWm6cJWDoE8FxmNiljHqZxV1477LZz7zCw==" length="52689165"/> | ||
| 242 | </item> | ||
| 243 | </channel> | ||
| 244 | </rss> | ||
favicon.svg added +1
| @@ -0,0 +1 @@ | |||
| 1 | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#4a7bd0" d="M16 2l3.9 9.1 9.9.9-7.5 6.5 2.3 9.7L16 23.1 7.4 28.2l2.3-9.7L2.2 12l9.9-.9z"/></svg> | ||
guide/01-files-and-folders.html added +323
| @@ -0,0 +1,323 @@ | |||
| 1 | <!DOCTYPE html> | ||
| 2 | <html lang="en"> | ||
| 3 | <head> | ||
| 4 | <meta charset="utf-8"> | ||
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
| 6 | <title>Files, folders and buffers · orgstar</title> | ||
| 7 | <meta name="description" content="Adding folders, opening files, working with buffers, searching, saving, and how orgstar handles changes made outside it."> | ||
| 8 | <link rel="icon" href="../favicon.svg" type="image/svg+xml"> | ||
| 9 | <link rel="stylesheet" href="../theme.css"> | ||
| 10 | <link rel="stylesheet" href="../syntax.css"> | ||
| 11 | <link rel="stylesheet" href="../style.css"> | ||
| 12 | </head> | ||
| 13 | <body> | ||
| 14 | <header class="site"> | ||
| 15 | <a class="site-title" href="../index.html">orgstar</a> | ||
| 16 | <nav> | ||
| 17 | <a href="../install.html">Install</a> | ||
| 18 | <a href="../quickstart.html">Quick start</a> | ||
| 19 | <a href="index.html">Manual</a> | ||
| 20 | </nav> | ||
| 21 | </header> | ||
| 22 | <main> | ||
| 23 | <h1>Files, folders and buffers</h1> | ||
| 24 | <p class="lede">orgstar works on folders of files you add to its sidebar, keeps each open file in a buffer, saves on its own, and merges changes other programs make to the same files.</p> | ||
| 25 | <nav class="toc" aria-label="On this page"> | ||
| 26 | <h2>On this page</h2> | ||
| 27 | <ul> | ||
| 28 | <li><a href="#the-window">The window</a> | ||
| 29 | <ul> | ||
| 30 | <li><a href="#menus-and-the-command-palette">Menus and the command palette</a></li> | ||
| 31 | <li><a href="#showing-and-hiding-panes">Showing and hiding panes</a></li> | ||
| 32 | </ul></li> | ||
| 33 | <li><a href="#folders">Folders</a> | ||
| 34 | <ul> | ||
| 35 | <li><a href="#adding-a-folder">Adding a folder</a></li> | ||
| 36 | <li><a href="#removing-a-folder">Removing a folder</a></li> | ||
| 37 | <li><a href="#what-the-sidebar-lists">What the sidebar lists</a></li> | ||
| 38 | <li><a href="#creating-renaming-and-trashing-files">Creating, renaming and trashing files</a></li> | ||
| 39 | </ul></li> | ||
| 40 | <li><a href="#opening-files">Opening files</a> | ||
| 41 | <ul> | ||
| 42 | <li><a href="#files-that-aren-t-org">Files that aren't org</a></li> | ||
| 43 | </ul></li> | ||
| 44 | <li><a href="#buffers">Buffers</a> | ||
| 45 | <ul> | ||
| 46 | <li><a href="#buffer-commands">Buffer commands</a></li> | ||
| 47 | <li><a href="#buffer-names">Buffer names</a></li> | ||
| 48 | <li><a href="#the-tab-bar">The tab bar</a></li> | ||
| 49 | </ul></li> | ||
| 50 | <li><a href="#searching-your-notes">Searching your notes</a></li> | ||
| 51 | <li><a href="#the-outline-pane">The outline pane</a> | ||
| 52 | <ul> | ||
| 53 | <li><a href="#backlinks">Backlinks</a></li> | ||
| 54 | <li><a href="#inspector">Inspector</a></li> | ||
| 55 | </ul></li> | ||
| 56 | <li><a href="#saving">Saving</a> | ||
| 57 | <ul> | ||
| 58 | <li><a href="#how-a-save-works">How a save works</a></li> | ||
| 59 | </ul></li> | ||
| 60 | <li><a href="#external-changes">External changes</a> | ||
| 61 | <ul> | ||
| 62 | <li><a href="#conflicts">Conflicts</a></li> | ||
| 63 | <li><a href="#syncthing-conflict-copies">Syncthing conflict copies</a></li> | ||
| 64 | <li><a href="#recovery-versions">Recovery versions</a></li> | ||
| 65 | <li><a href="#icloud">iCloud</a></li> | ||
| 66 | </ul></li> | ||
| 67 | <li><a href="#encodings-and-line-endings">Encodings and line endings</a></li> | ||
| 68 | <li><a href="#on-ios">On iOS</a></li> | ||
| 69 | </ul> | ||
| 70 | </nav> | ||
| 71 | <h2 id="the-window">The window</h2> | ||
| 72 | <p>orgstar has one main window, titled with the name of the buffer it shows. From left to right it holds:</p> | ||
| 73 | <ul> | ||
| 74 | <li>the <strong>sidebar</strong>, listing the folders you added and the files in them;</li> | ||
| 75 | <li>the <strong>outline pane</strong>, listing the headings of the open file, with the <strong>backlinks pane</strong> under it;</li> | ||
| 76 | <li>the <strong>editor</strong>, with the optional tab bar above it and the modeline and echo area below it;</li> | ||
| 77 | <li>the <strong>inspector</strong>, hidden by default, showing column view and clocked time.</li> | ||
| 78 | </ul> | ||
| 79 | <p>The toolbar holds a button that shows or hides the outline pane, a progress indicator while orgstar indexes your folders, the running clock (see <a href="06-dates-and-clocking.html">Dates and clocking</a>), a <code class="verbatim">Conflict</code> button when the open file has a conflict (see <em>Conflicts</em> below), and the search field.</p> | ||
| 80 | <p>The window title is the buffer name (see <em>Buffer names</em> below). When the open file is not UTF-8, the subtitle reads <code class="verbatim">Read-only: not UTF-8</code>. The close button shows the unsaved-changes dot while any open buffer has unsaved edits.</p> | ||
| 81 | <p>With no folders added, the editor area reads "Add a folder of org files". With folders but no open file, it reads "Choose a file" and suggests <code class="verbatim">⌘P</code>.</p> | ||
| 82 | <p>The Agenda, Board, Clock Report and Capture windows are separate; they are covered in <a href="07-agenda.html">Agenda</a>, <a href="06-dates-and-clocking.html">Dates and clocking</a> and <a href="08-capture.html">Capture</a>. Closing the main window quits orgstar when no other window is open.</p> | ||
| 83 | <h3 id="menus-and-the-command-palette">Menus and the command palette</h3> | ||
| 84 | <p>Most commands are in the menu bar. The <code class="verbatim">Org</code> menu lists every org command, each with the keys that run it in the current keymap; it is disabled when no file is open.</p> | ||
| 85 | <p>File ▸ Command Palette… (<code class="verbatim">⇧⌘P</code>; <code class="verbatim">M-x</code> in the Emacs and Doom presets; <code class="verbatim">SPC :</code> in Doom normal state) lists every command by title with its keys. Type to filter (characters match in order, as in Quick Open), then press <code class="verbatim">Return</code> to run the top match or click one. <code class="verbatim">Escape</code> closes it. Text movement and editing commands (forward character, kill line and so on) are not listed; they are only on keys.</p> | ||
| 86 | <p>Several commands in this chapter are only in the palette, not in a menu: Close Other Buffers, Close All Buffers, Last Buffer and Show or Hide Tab Bar.</p> | ||
| 87 | <h3 id="showing-and-hiding-panes">Showing and hiding panes</h3> | ||
| 88 | <table> | ||
| 89 | <thead> | ||
| 90 | <tr><th>Menu item</th><th>Shortcut</th><th>Palette title</th></tr> | ||
| 91 | </thead> | ||
| 92 | <tbody> | ||
| 93 | <tr><td>View ▸ Show or Hide Outline</td><td><code class="verbatim">⌥⌘O</code></td><td>Show or Hide Outline</td></tr> | ||
| 94 | <tr><td>View ▸ Show or Hide Backlinks</td><td></td><td>Show or Hide Backlinks</td></tr> | ||
| 95 | <tr><td>View ▸ Show or Hide Columns and Clock</td><td><code class="verbatim">⌥⌘I</code></td><td>Show or Hide Columns and Clock</td></tr> | ||
| 96 | <tr><td>View ▸ Show Tab Bar</td><td></td><td>Show or Hide Tab Bar</td></tr> | ||
| 97 | </tbody> | ||
| 98 | </table> | ||
| 99 | <p>The toolbar's outline button does the same as View ▸ Show or Hide Outline. The sidebar is shown and hidden with the standard View menu command. The button at the right of the bar under it switches it between the files and an agenda; see <a href="07-agenda.html">The agenda</a>.</p> | ||
| 100 | <p>orgstar remembers whether the outline, backlinks and inspector are shown. The outline pane's visibility is remembered for org files only: for other files it starts hidden each time you open one. Drag the divider on the outline pane's right edge to resize it (160 to 400 points; 220 by default).</p> | ||
| 101 | <h2 id="folders">Folders</h2> | ||
| 102 | <p>orgstar does not open a single folder like a project. You add any number of folders, called roots, and each appears as a section of the sidebar. orgstar indexes every org file in them for search, the agenda, refiling, backlinks and IDs.</p> | ||
| 103 | <h3 id="adding-a-folder">Adding a folder</h3> | ||
| 104 | <p>Choose File ▸ Add Folder… (<code class="verbatim">⇧⌘O</code>), or click <code class="verbatim">+</code> at the bottom of the sidebar, and pick a folder. The first time orgstar opens with no folder, a welcome sheet offers the same, or a new <code class="verbatim">org</code> folder in iCloud Drive with a <code class="verbatim">notes.org</code> in it (in the Mac App Store version, a folder you choose or make in iCloud Drive), and the choice of keys; Get Started… in the empty window opens the sheet again. orgstar indexes it in the background; the toolbar shows a progress indicator while it works.</p> | ||
| 105 | <p>orgstar keeps a bookmark to each folder, so a folder you move or rename in Finder is followed. If a folder can't be found at launch, orgstar reports <code class="verbatim">Can't find the folder PATH.</code> Adding a folder that is already in the sidebar does nothing.</p> | ||
| 106 | <p>orgstar keeps the list of folders, the index and recovery versions in <code class="verbatim">~/Library/Application Support/Orgstar</code>; the Mac App Store version keeps them in <code class="verbatim">~/Library/Containers/sh.krz.orgstar/Data/Library/Application Support/Orgstar</code>.</p> | ||
| 107 | <h3 id="removing-a-folder">Removing a folder</h3> | ||
| 108 | <p>Click <code class="verbatim">−</code> at the bottom of the sidebar and choose the folder, or right-click the folder's header and choose Remove from Sidebar…. Confirm with <code class="verbatim">Remove</code>. The folder and its files stay on disk; only orgstar's index entries for them are removed.</p> | ||
| 109 | <h3 id="what-the-sidebar-lists">What the sidebar lists</h3> | ||
| 110 | <p>Each root is a collapsible section headed by the folder's name; hover over the name to see its full path. Roots are sorted by path. Inside a root, subfolders come first, then files, each sorted by name the way Finder sorts them. orgstar remembers which roots you collapsed.</p> | ||
| 111 | <p>The sidebar lists every file in the folder, not only org files, with an icon for its kind:</p> | ||
| 112 | <table> | ||
| 113 | <thead> | ||
| 114 | <tr><th>Icon</th><th>File</th></tr> | ||
| 115 | </thead> | ||
| 116 | <tbody> | ||
| 117 | <tr><td>document</td><td><code class="verbatim">.org</code></td></tr> | ||
| 118 | <tr><td>archive box</td><td><code class="verbatim">.org_archive</code></td></tr> | ||
| 119 | <tr><td>orange warning sign</td><td>a Syncthing conflict copy (see <em>Syncthing conflict copies</em> below)</td></tr> | ||
| 120 | <tr><td>photo</td><td>an image</td></tr> | ||
| 121 | <tr><td>rich document</td><td>a PDF</td></tr> | ||
| 122 | <tr><td>play button</td><td>audio or video</td></tr> | ||
| 123 | <tr><td><code class="verbatim"></></code></td><td>source code or a script</td></tr> | ||
| 124 | <tr><td>plain document</td><td>other text</td></tr> | ||
| 125 | <tr><td>cloud with arrow</td><td>an iCloud file still downloading (see <em>iCloud</em> below)</td></tr> | ||
| 126 | </tbody> | ||
| 127 | </table> | ||
| 128 | <p>Some files are never listed or indexed:</p> | ||
| 129 | <ul> | ||
| 130 | <li>Emacs backups (names ending in <code class="verbatim">~</code>), auto-save files (names starting with <code class="verbatim">#</code>) and lock files (<code class="verbatim">.#name</code>);</li> | ||
| 131 | <li>Syncthing's temporary files (<code class="verbatim">.syncthing.*</code>);</li> | ||
| 132 | <li>orgstar's own temporary files (names containing <code class="verbatim">.orgstar-</code>);</li> | ||
| 133 | <li><code class="verbatim">.DS_Store</code> and <code class="verbatim">.localized</code>;</li> | ||
| 134 | <li>anything inside these folders: <code class="verbatim">.git</code>, <code class="verbatim">.hg</code>, <code class="verbatim">.svn</code>, <code class="verbatim">.jj</code>, <code class="verbatim">.bzr</code>, <code class="verbatim">.stfolder</code>, <code class="verbatim">.stversions</code>, <code class="verbatim">.Trash</code>, <code class="verbatim">.Spotlight-V100</code>, <code class="verbatim">.fseventsd</code>, <code class="verbatim">.build</code>, <code class="verbatim">.venv</code>, <code class="verbatim">.cache</code>, <code class="verbatim">.tox</code>, <code class="verbatim">.mypy_cache</code>, <code class="verbatim">.pytest_cache</code>, <code class="verbatim">.gradle</code>, <code class="verbatim">.next</code>, <code class="verbatim">.terraform</code> and <code class="verbatim">node_modules</code>.</li> | ||
| 135 | </ul> | ||
| 136 | <p>Other dotfiles and dot folders are listed unless you turn off Settings ▸ General ▸ Show hidden files and folders (on by default). To change the list of ignored folders, set <code class="verbatim">ignored-folders</code> in <code class="verbatim">config.toml</code> to folder names separated by spaces; there is no control for it in Settings. See <a href="13-configuration.html">Configuration</a>.</p> | ||
| 137 | <pre><code class="language-toml highlight"><span class="source toml"><span class="punctuation definition table toml">[</span><span class="entity name section toml">orgstar</span><span class="punctuation definition table toml">]</span> | ||
| 138 | <span class="variable other key toml">show-hidden-files</span> <span class="keyword operator assignment toml">=</span> <span class="constant language toml">true</span> | ||
| 139 | <span class="variable other key toml">ignored-folders</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>.git .hg node_modules build<span class="punctuation definition string end toml">"</span></span></span></code></pre> | ||
| 140 | <p>Only org files (<code class="verbatim">.org</code> and <code class="verbatim">.org_archive</code>) are read by the index. Other files are listed and can be opened, but their contents are not searched.</p> | ||
| 141 | <h3 id="creating-renaming-and-trashing-files">Creating, renaming and trashing files</h3> | ||
| 142 | <p>Right-click a file or folder in the sidebar for:</p> | ||
| 143 | <ul> | ||
| 144 | <li>New File… — creates a file in that folder (for a file, in the folder holding it). A name without an extension gets <code class="verbatim">.org</code>. A name like <code class="verbatim">projects/house</code> creates the <code class="verbatim">projects</code> folder too. Names can't start with <code class="verbatim">/</code> or contain <code class="verbatim">..</code>. The new file opens.</li> | ||
| 145 | <li>Rename… — renames the file or folder in place. The new name can't contain <code class="verbatim">/</code>. Open buffers of the file, or of files inside the folder, are saved first (in explicit save mode you are asked) and reopened under the new path.</li> | ||
| 146 | <li>Show in Finder.</li> | ||
| 147 | <li>Move to Trash… — moves the file or folder to the Trash after you confirm. Open buffers of it close without saving; the confirmation warns you when the file, or an open file inside the folder, has unsaved changes. You can put it back from the Trash in Finder.</li> | ||
| 148 | </ul> | ||
| 149 | <p>Right-click a root's header for New File…, Expand or Collapse, Show in Finder and Remove from Sidebar….</p> | ||
| 150 | <h2 id="opening-files">Opening files</h2> | ||
| 151 | <p>Click a file in the sidebar to open it. Other ways:</p> | ||
| 152 | <ul> | ||
| 153 | <li><strong>Quick Open</strong>: File ▸ Quick Open… (<code class="verbatim">⌘P</code>; <code class="verbatim">C-x C-f</code> in the Emacs and Doom presets; <code class="verbatim">SPC SPC</code>, <code class="verbatim">SPC .</code> or <code class="verbatim">SPC f f</code> in Doom normal state). Type part of a file's path below its root. Characters match in order, not necessarily next to each other; matches at the start of a word and runs of consecutive characters rank higher, and shorter paths win ties. Up to 50 matches show, with each file's name and path. The top match is selected; <code class="verbatim">↑</code> and <code class="verbatim">↓</code>, or <code class="verbatim">C-p</code> and <code class="verbatim">C-n</code>, move the selection. Press <code class="verbatim">Return</code> to open the selected match or click any match; <code class="verbatim">Escape</code> closes the list. Syncthing conflict copies are left out.</li> | ||
| 154 | <li><strong>Finder</strong>: open an org file from Finder, with <code class="verbatim">open file.org</code> in Terminal, or by dropping it on orgstar's Dock icon. orgstar registers as the default app for org files and as an alternative editor for plain text. Each file opens as a buffer.</li> | ||
| 155 | <li><strong>Links</strong>: following a <code class="verbatim">file:</code> link or an ID link opens the target file; see <a href="09-links.html">Links</a>.</li> | ||
| 156 | <li><strong>Doom ex command</strong>: <code class="verbatim">:e FILE</code> opens <code class="verbatim">FILE</code>, relative to the current file's folder; <code class="verbatim">~</code> is expanded. A file that doesn't exist is reported as <code class="verbatim">No file FILE</code>.</li> | ||
| 157 | </ul> | ||
| 158 | <p>A file opened from Finder or by a link does not have to be inside one of your folders. In the Mac App Store version, a link to a file outside them first asks you to grant access to its folder (see <a href="../install.html">Install</a>). Such a file is edited and saved normally, but it isn't listed in the sidebar, isn't indexed for search or the agenda, and isn't watched for outside changes (orgstar still merges outside changes when it saves; see <em>Saving</em> below).</p> | ||
| 159 | <p>orgstar has no Open Recent menu. Instead, it reopens the buffers that were open when you quit, in the same order, with the same file showing and each caret where you left it. Files that no longer exist are skipped.</p> | ||
| 160 | <h3 id="files-that-aren-t-org">Files that aren't org</h3> | ||
| 161 | <p>How a file opens depends on what it is:</p> | ||
| 162 | <ul> | ||
| 163 | <li><strong>Org files</strong> (<code class="verbatim">.org</code>, <code class="verbatim">.org_archive</code>) open in the editor with org editing.</li> | ||
| 164 | <li><strong>Text files</strong> open in the same editor as plain text. A file counts as text when macOS knows its type as text, or, for unknown types, when its first 8 KB are valid UTF-8 with no NUL bytes. Org commands report <code class="verbatim">Not an org file</code>, and the outline pane shows "No outline" when you turn it on. Files in these languages get syntax highlighting: shell (<code class="verbatim">.sh</code>, <code class="verbatim">.bash</code>, <code class="verbatim">.zsh</code>, <code class="verbatim">.zshrc</code>, <code class="verbatim">.bashrc</code>, <code class="verbatim">.profile</code>), Python, Emacs Lisp, C, C++, R, JavaScript, Java, Scheme, Clojure, Haskell, Rust, Go, Ruby, JSON, YAML, TOML and Lua.</li> | ||
| 165 | <li><strong>Everything else</strong> (images, PDFs, audio, video, archives, binary files) shows a Quick Look preview in place of the editor, with <code class="verbatim">Open with Default App</code> and <code class="verbatim">Show in Finder</code> buttons below it. The preview is not a buffer.</li> | ||
| 166 | </ul> | ||
| 167 | <p>Text files from Finder use orgstar only if you choose it with Open With, since orgstar is not their default app.</p> | ||
| 168 | <h2 id="buffers">Buffers</h2> | ||
| 169 | <p>Each open file is a buffer, as in Emacs. A buffer keeps its text, caret, folds, undo history and unsaved edits while another buffer is showing. Opening a file that already has a buffer shows that buffer. Two paths to the same file (through a symbolic link, for example) share one buffer, as <code class="verbatim">find-buffer-visiting</code> does.</p> | ||
| 170 | <p>A new buffer is placed after the current one in the buffer order. Next and Previous Buffer follow that order and wrap around. Switch to Buffer and Last Buffer follow the order in which you last showed buffers.</p> | ||
| 171 | <h3 id="buffer-commands">Buffer commands</h3> | ||
| 172 | <table> | ||
| 173 | <thead> | ||
| 174 | <tr><th>Command</th><th>Menu, or palette</th><th>Mac</th><th>Emacs preset</th><th>Doom (normal state)</th></tr> | ||
| 175 | </thead> | ||
| 176 | <tbody> | ||
| 177 | <tr><td>Switch to Buffer…</td><td>Window ▸ Switch to Buffer…</td><td></td><td><code class="verbatim">C-x b</code>, <code class="verbatim">C-x C-b</code></td><td><code class="verbatim">SPC b b</code>, <code class="verbatim">SPC b B</code>, <code class="verbatim">SPC ,</code>, <code class="verbatim">:b</code>, <code class="verbatim">:ls</code></td></tr> | ||
| 178 | <tr><td>Next Buffer</td><td>Window ▸ Next Buffer</td><td><code class="verbatim">⇧⌘]</code>, <code class="verbatim">⌃Tab</code></td><td><code class="verbatim">⇧⌘]</code>, <code class="verbatim">C-x <right></code></td><td><code class="verbatim">SPC b n</code>, <code class="verbatim">SPC b ]</code>, <code class="verbatim">] b</code>, <code class="verbatim">:bn</code></td></tr> | ||
| 179 | <tr><td>Previous Buffer</td><td>Window ▸ Previous Buffer</td><td><code class="verbatim">⇧⌘[</code>, <code class="verbatim">⌃⇧Tab</code></td><td><code class="verbatim">⇧⌘[</code>, <code class="verbatim">C-x <left></code></td><td><code class="verbatim">SPC b p</code>, <code class="verbatim">SPC b [</code>, <code class="verbatim">[ b</code>, <code class="verbatim">:bp</code></td></tr> | ||
| 180 | <tr><td>Last Buffer</td><td>palette</td><td></td><td></td><td><code class="verbatim">SPC `</code></td></tr> | ||
| 181 | <tr><td>Close Buffer</td><td>File ▸ Close Buffer</td><td><code class="verbatim">⌘W</code></td><td><code class="verbatim">⌘W</code>, <code class="verbatim">C-x k</code></td><td><code class="verbatim">SPC b k</code>, <code class="verbatim">SPC b d</code>, <code class="verbatim">:bd</code></td></tr> | ||
| 182 | <tr><td>Close Other Buffers</td><td>palette</td><td></td><td></td><td><code class="verbatim">SPC b O</code></td></tr> | ||
| 183 | <tr><td>Close All Buffers</td><td>palette</td><td></td><td></td><td><code class="verbatim">SPC b K</code></td></tr> | ||
| 184 | </tbody> | ||
| 185 | </table> | ||
| 186 | <p>Menu shortcuts (<code class="verbatim">⇧⌘]</code>, <code class="verbatim">⌘W</code> and the others) work in every preset. The Doom preset also has the Emacs preset's <code class="verbatim">C-x</code> keys in every state. The Mac preset's <code class="verbatim">⌃Tab</code> and <code class="verbatim">⌃⇧Tab</code> are in addition to the menu shortcuts.</p> | ||
| 187 | <p>Switch to Buffer asks in the echo area. The choices are the open buffers, most recently shown first, with the current buffer last. Type to narrow them, <code class="verbatim">Tab</code> to complete the top choice, <code class="verbatim">Return</code> to switch, <code class="verbatim">Escape</code> to cancel.</p> | ||
| 188 | <p>Close Buffer closes the current buffer and shows the buffer you showed before it. With no buffer open, <code class="verbatim">⌘W</code> closes the window. In a window split into panes, closing the last tab of a pane closes the pane; its buffer stays open when another pane shows it. In other windows (Agenda, Board and so on) <code class="verbatim">⌘W</code> closes that window. File ▸ Close Window (<code class="verbatim">⇧⌘W</code>) closes the window in front.</p> | ||
| 189 | <p>When you close buffers with unsaved edits, what happens depends on the save mode (see <em>Saving</em> below): in automatic mode they are saved first; in explicit mode orgstar asks <code class="verbatim">Save</code>, <code class="verbatim">Don't Save</code> or <code class="verbatim">Cancel</code> (<code class="verbatim">Save All</code> for several files). A buffer whose save fails or conflicts stays open.</p> | ||
| 190 | <h3 id="buffer-names">Buffer names</h3> | ||
| 191 | <p>A buffer is named after its file. When two open files have the same name, each name gets as many of its folders as it takes to tell them apart, in angle brackets, as Emacs's uniquify does with <code class="verbatim">post-forward-angle-brackets</code>:</p> | ||
| 192 | <pre><code class="language-text">notes.org<work> | ||
| 193 | notes.org<home> | ||
| 194 | notes.org<archive/2024></code></pre> | ||
| 195 | <p>These names show in the window title, the tab bar and Switch to Buffer.</p> | ||
| 196 | <h3 id="the-tab-bar">The tab bar</h3> | ||
| 197 | <p>View ▸ Show Tab Bar shows a row of tabs above each pane, one per buffer that pane has shown, in the order it first showed them. It is off by default; the setting is <code class="verbatim">tab-bar</code> in <code class="verbatim">config.toml</code>.</p> | ||
| 198 | <ul> | ||
| 199 | <li>Click a tab to show its buffer. Hover to see the file's full path.</li> | ||
| 200 | <li>Click <code class="verbatim">×</code> to close a buffer, in every pane. On a pane's last tab, with other panes in the window, it closes the pane as well, as Close Buffer does. A dot replaces the <code class="verbatim">×</code> while the buffer has unsaved edits; clicking it also closes the buffer, with the same unsaved-changes handling as Close Buffer.</li> | ||
| 201 | </ul> | ||
| 202 | <h2 id="searching-your-notes">Searching your notes</h2> | ||
| 203 | <p>The search field in the toolbar searches every org file in your folders. Click it or choose Edit ▸ Search Notes (<code class="verbatim">⇧⌘F</code>; <code class="verbatim">SPC /</code> or <code class="verbatim">SPC s p</code> in Doom normal state) and type.</p> | ||
| 204 | <p>While the field holds text, the outline pane shows the results in place of the outline. Each result is a heading, or a file when the match is in the text before its first heading, titled by its <code class="verbatim">#+TITLE</code> or its name. Under the title is the passage the words were found in, with them in bold, then the file's name. Click a result to open the file at that heading. Clear the field to get the outline back.</p> | ||
| 205 | <p>How matching works:</p> | ||
| 206 | <ul> | ||
| 207 | <li>orgstar searches heading titles, the text under each heading and the text before a file's first heading, in <code class="verbatim">.org</code> and <code class="verbatim">.org_archive</code> files. Files that aren't org are not searched. Syncthing conflict copies are not searched.</li> | ||
| 208 | <li>Each word you type matches words that start with it, ignoring case and accents: <code class="verbatim">proj</code> finds <code class="verbatim">project</code> and <code class="verbatim">projection</code>.</li> | ||
| 209 | <li>Every word must match within the same heading, or within the text before the first heading.</li> | ||
| 210 | <li>Up to 50 results show, best matches first.</li> | ||
| 211 | <li>Open buffers with unsaved edits are searched as they are in the buffer, not as they are on disk.</li> | ||
| 212 | </ul> | ||
| 213 | <p>To find text inside the open file, use Edit ▸ Find (see <a href="02-the-editor.html">The editor</a>).</p> | ||
| 214 | <h2 id="the-outline-pane">The outline pane</h2> | ||
| 215 | <p>The outline pane lists the headings of the open org file, indented by level. Headings without a title show as <code class="verbatim">(untitled)</code>. Click a heading to move the caret to it; folded headings around it unfold. A file without headings shows "No headings"; a file that isn't org shows "No outline".</p> | ||
| 216 | <p>The outline follows your edits after a short pause in typing.</p> | ||
| 217 | <h3 id="backlinks">Backlinks</h3> | ||
| 218 | <p>Under the outline, the backlinks pane lists headings in your folders that link to the current file (a link before a file's first heading is listed under the file's name) (<code class="verbatim">Links to this file</code>) and to the heading at the caret (<code class="verbatim">Links to</code> followed by the heading's title). It updates as you move the caret. Click an entry to open it. Turn the pane off with View ▸ Show or Hide Backlinks. Which links count is covered in <a href="09-links.html">Links</a>.</p> | ||
| 219 | <h3 id="inspector">Inspector</h3> | ||
| 220 | <p>View ▸ Show or Hide Columns and Clock (<code class="verbatim">⌥⌘I</code>) opens a pane on the right with column view and clocked time for the file or the current subtree. See <a href="04-outlines.html">Outlines</a> and <a href="06-dates-and-clocking.html">Dates and clocking</a>.</p> | ||
| 221 | <h2 id="saving">Saving</h2> | ||
| 222 | <p>Settings ▸ General ▸ Save files has two modes; the <code class="verbatim">config.toml</code> setting is <code class="verbatim">save</code> in <code class="verbatim">[orgstar]</code>.</p> | ||
| 223 | <ul> | ||
| 224 | <li><strong>Automatically, when typing stops</strong> (<code class="verbatim">automatic</code>, the default). Each buffer saves one second after its last change, including buffers that are not showing. Quitting and closing buffers save without asking.</li> | ||
| 225 | <li><strong>Only with File ▸ Save (⌘S)</strong> (<code class="verbatim">explicit</code>). Nothing is written until you save. Closing a buffer or quitting with unsaved edits asks first.</li> | ||
| 226 | </ul> | ||
| 227 | <table> | ||
| 228 | <thead> | ||
| 229 | <tr><th>Command</th><th>Menu</th><th>Shortcut</th><th>Emacs preset</th><th>Doom</th></tr> | ||
| 230 | </thead> | ||
| 231 | <tbody> | ||
| 232 | <tr><td>Save</td><td>File ▸ Save</td><td><code class="verbatim">⌘S</code></td><td><code class="verbatim">C-x C-s</code></td><td><code class="verbatim">SPC f s</code>, <code class="verbatim">SPC b s</code>, <code class="verbatim">:w</code>; <code class="verbatim">:wq</code> and <code class="verbatim">:x</code> save and close the window</td></tr> | ||
| 233 | <tr><td>Save All</td><td>File ▸ Save All</td><td><code class="verbatim">⌥⌘S</code></td><td><code class="verbatim">C-x s</code></td><td><code class="verbatim">SPC b S</code></td></tr> | ||
| 234 | </tbody> | ||
| 235 | </table> | ||
| 236 | <p>Save is disabled for a read-only file. Save All is disabled when nothing is unsaved.</p> | ||
| 237 | <p>The modeline shows a dot while the current buffer has unsaved edits. Buffers with unsaved edits show a dot in the tab bar.</p> | ||
| 238 | <h3 id="how-a-save-works">How a save works</h3> | ||
| 239 | <p>orgstar does not assume it is the only program writing your files. Emacs, Syncthing, iCloud and Git may change them too. Each save:</p> | ||
| 240 | <ol> | ||
| 241 | <li>Reads the file on disk. If it has changed since orgstar last read or wrote it, orgstar merges those changes into the buffer first (see <em>External changes</em> below). If they conflict with yours, nothing is written and the buffer has a conflict.</li> | ||
| 242 | <li>Checks the file again, then writes the buffer to a temporary file in the same folder and replaces the original with it, so the file is never half-written.</li> | ||
| 243 | <li>Reads the file back. If another program wrote it at the same moment, the version that lost goes to recovery and the other program's changes are merged where possible.</li> | ||
| 244 | </ol> | ||
| 245 | <p>Every version a save displaces goes to recovery first (see <em>Recovery versions</em> below). Reads and writes go through macOS file coordination, so iCloud and other coordinating programs see a consistent file.</p> | ||
| 246 | <p>A save keeps the file's encoding details: a UTF-8 byte order mark stays, and text you didn't change keeps its exact bytes, including CRLF line endings. Lines you add end in LF.</p> | ||
| 247 | <h2 id="external-changes">External changes</h2> | ||
| 248 | <p>orgstar watches the files in your folders. When a file with an open buffer changes on disk:</p> | ||
| 249 | <ul> | ||
| 250 | <li>If the buffer has no unsaved edits, it reloads. The caret and folds stay where they were, mapped through the change.</li> | ||
| 251 | <li>If the buffer has unsaved edits, orgstar merges the change into the buffer line by line, against the version both started from. Lines changed on one side take that side; lines changed the same way on both sides are taken once. The merged buffer still has unsaved edits and saves as usual.</li> | ||
| 252 | <li>If both sides changed the same lines differently, the buffer has a conflict.</li> | ||
| 253 | </ul> | ||
| 254 | <p>Reloading or merging clears the buffer's undo history.</p> | ||
| 255 | <p>If an open file is deleted on disk, its buffer stays open with its text. Saving it writes the file again.</p> | ||
| 256 | <p>To throw away your unsaved edits and load the file as it is on disk, choose File ▸ Revert to File on Disk (also in the palette; <code class="verbatim">:e</code> in Doom). Your edits go to recovery.</p> | ||
| 257 | <h3 id="conflicts">Conflicts</h3> | ||
| 258 | <p>When a buffer conflicts with its file, automatic saving stops for that buffer, the <code class="verbatim">Conflict</code> button appears in the toolbar, and the conflict sheet opens. The sheet shows the differences: lines marked <code class="verbatim">-</code> are on disk, lines marked <code class="verbatim">+</code> are in your version, with three lines of context around each change. Choose:</p> | ||
| 259 | <table> | ||
| 260 | <thead> | ||
| 261 | <tr><th>Button</th><th>What it does</th></tr> | ||
| 262 | </thead> | ||
| 263 | <tbody> | ||
| 264 | <tr><td>Keep Mine</td><td>Writes your version over the file. The disk version goes to recovery. This is the default button.</td></tr> | ||
| 265 | <tr><td>Use Disk Version</td><td>Loads the file as it is on disk. Your version goes to recovery.</td></tr> | ||
| 266 | <tr><td>Merge with Markers</td><td>Puts both sets of changes in the buffer, as <code class="verbatim">git merge</code> leaves a conflict: non-conflicting changes merged, conflicting lines between markers. Your version as it was goes to recovery.</td></tr> | ||
| 267 | <tr><td>Decide Later</td><td>Closes the sheet. The conflict stays; click <code class="verbatim">Conflict</code> in the toolbar to reopen it.</td></tr> | ||
| 268 | </tbody> | ||
| 269 | </table> | ||
| 270 | <p>After Merge with Markers the buffer holds blocks like this, which you edit and save:</p> | ||
| 271 | <pre><code class="language-text"><<<<<<< yours | ||
| 272 | - [ ] Call the plumber on Monday | ||
| 273 | ======= | ||
| 274 | - [X] Call the plumber | ||
| 275 | >>>>>>> disk</code></pre> | ||
| 276 | <p>While a conflict is unresolved, saving that buffer does nothing except reopen the sheet.</p> | ||
| 277 | <h3 id="syncthing-conflict-copies">Syncthing conflict copies</h3> | ||
| 278 | <p>When two devices change a file before Syncthing syncs them, Syncthing keeps one version as a conflict copy beside the file, named like <code class="verbatim">notes.sync-conflict-20260301-142233-ABCDEF7.org</code>. orgstar lists these in the sidebar in orange with a warning icon, and leaves them out of search, the agenda, ID lookup and Quick Open.</p> | ||
| 279 | <p>When you open a file that has conflict copies, the echo area says how many there are. Choose File ▸ Resolve Sync Conflicts… to compare them. Pick a copy from the menu at the top; lines marked <code class="verbatim">-</code> are in the file (as the buffer holds it) and lines marked <code class="verbatim">+</code> are in the copy. Then choose:</p> | ||
| 280 | <table> | ||
| 281 | <thead> | ||
| 282 | <tr><th>Button</th><th>What it does</th></tr> | ||
| 283 | </thead> | ||
| 284 | <tbody> | ||
| 285 | <tr><td>Keep File</td><td>Leaves the buffer as it is.</td></tr> | ||
| 286 | <tr><td>Use Copy</td><td>Replaces the buffer's text with the copy's.</td></tr> | ||
| 287 | <tr><td>Merge with Markers</td><td>Puts every difference between the buffer and the copy between conflict markers, labelled with the two file names. There is no common base to merge against, so every difference is marked.</td></tr> | ||
| 288 | </tbody> | ||
| 289 | </table> | ||
| 290 | <p>Each choice moves the copy to recovery and deletes it from the folder. The buffer changes as an edit you can undo, and is saved according to your save mode. When no copies are left the sheet closes.</p> | ||
| 291 | <h3 id="recovery-versions">Recovery versions</h3> | ||
| 292 | <p>Whenever orgstar replaces a version of a file, it keeps a copy: your buffer when you take the disk version, the disk version when you keep yours, a version another program wrote while orgstar saved, and resolved Syncthing copies. It also keeps a snapshot of the file as it was before a save, at most once an hour, so there is a version of your own writing to go back to. orgstar keeps the last 20 replaced versions and the last 10 snapshots per file in <code class="verbatim">~/Library/Application Support/Orgstar/Recovery</code> (in the Mac App Store version, the same folder inside its container).</p> | ||
| 293 | <p>Choose File ▸ Recovery Versions… to see the open file's versions, newest first, each with its date and why it was kept:</p> | ||
| 294 | <table> | ||
| 295 | <thead> | ||
| 296 | <tr><th>Label</th><th>Meaning</th></tr> | ||
| 297 | </thead> | ||
| 298 | <tbody> | ||
| 299 | <tr><td>Your version, replaced</td><td>Your buffer, before it was replaced</td></tr> | ||
| 300 | <tr><td>Disk version, replaced</td><td>The file on disk, before orgstar wrote over it</td></tr> | ||
| 301 | <tr><td>Sync conflict copy</td><td>A Syncthing conflict copy you resolved</td></tr> | ||
| 302 | </tbody> | ||
| 303 | </table> | ||
| 304 | <p>Select a version to see how it differs from the buffer (<code class="verbatim">-</code> in the buffer, <code class="verbatim">+</code> in the kept version). <code class="verbatim">Restore</code> puts the kept version's text in the buffer as one edit, which undo reverses; the buffer as it was goes to recovery first. <code class="verbatim">Show in Finder</code> reveals the kept file.</p> | ||
| 305 | <h3 id="icloud">iCloud</h3> | ||
| 306 | <p>Files in iCloud Drive that aren't downloaded to the Mac show in the sidebar with a cloud icon and grey text, with the tooltip "Downloading from iCloud". orgstar asks iCloud to download them, and indexes them and lets you open them when they arrive. Files iCloud removes from the Mac to save space keep their index entries until they are back, so search and the agenda still find them.</p> | ||
| 307 | <h2 id="encodings-and-line-endings">Encodings and line endings</h2> | ||
| 308 | <p>orgstar edits UTF-8 files, with or without a byte order mark.</p> | ||
| 309 | <ul> | ||
| 310 | <li>A file that is not valid UTF-8 opens read-only. Its text shows with replacement characters where bytes don't decode, the window subtitle reads <code class="verbatim">Read-only: not UTF-8</code>, the modeline shows <code class="verbatim">Read-only</code>, and commands that would change it report <code class="verbatim">This file is read-only.</code> orgstar never writes such a file, and refiling or archiving into it is refused.</li> | ||
| 311 | <li>A file with a UTF-8 byte order mark keeps it when saved; the modeline shows <code class="verbatim">BOM</code>.</li> | ||
| 312 | <li>A file containing CRLF line endings shows <code class="verbatim">CRLF</code> in the modeline. Existing line endings are kept.</li> | ||
| 313 | <li>LaTeX export, and <code class="verbatim">#+INCLUDE</code> in every export, read line endings as Emacs does: a file whose lines all end in CRLF, or all in CR, is read as LF lines; in a file with mixed endings the CRs stay in the text.</li> | ||
| 314 | </ul> | ||
| 315 | <p>orgstar does not convert between encodings or line endings.</p> | ||
| 316 | <h2 id="on-ios">On iOS</h2> | ||
| 317 | <p>The iOS app adds folders from its Folders screen and lists only org files there. Conflicts, Syncthing copies and recovery versions are in the editor's menu. Files are watched through file presenters rather than FSEvents. See <a href="14-ios.html">iOS</a>.</p> | ||
| 318 | </main> | ||
| 319 | <footer class="site"> | ||
| 320 | © 2026 Christian Cleberg · <a href="https://krz.sh/apps/orgstar/">krz.sh/apps/orgstar</a> · <a href="/orgstar/third-party.html">third-party notices</a> | ||
| 321 | </footer> | ||
| 322 | </body> | ||
| 323 | </html>\ No newline at end of file | ||
guide/02-the-editor.html added +407
| @@ -0,0 +1,407 @@ | |||
| 1 | <!DOCTYPE html> | ||
| 2 | <html lang="en"> | ||
| 3 | <head> | ||
| 4 | <meta charset="utf-8"> | ||
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
| 6 | <title>The editor · orgstar</title> | ||
| 7 | <meta name="description" content="How the editor displays org text, folds it, reports state in the modeline and echo area, completes, checks spelling, pairs brackets, wraps lines and…"> | ||
| 8 | <link rel="icon" href="../favicon.svg" type="image/svg+xml"> | ||
| 9 | <link rel="stylesheet" href="../theme.css"> | ||
| 10 | <link rel="stylesheet" href="../syntax.css"> | ||
| 11 | <link rel="stylesheet" href="../style.css"> | ||
| 12 | </head> | ||
| 13 | <body> | ||
| 14 | <header class="site"> | ||
| 15 | <a class="site-title" href="../index.html">orgstar</a> | ||
| 16 | <nav> | ||
| 17 | <a href="../install.html">Install</a> | ||
| 18 | <a href="../quickstart.html">Quick start</a> | ||
| 19 | <a href="index.html">Manual</a> | ||
| 20 | </nav> | ||
| 21 | </header> | ||
| 22 | <main> | ||
| 23 | <h1>The editor</h1> | ||
| 24 | <p class="lede">The editor shows an org file as plain text with its markup styled or hidden, folds headings, drawers and blocks the way Org does, and reports position and state in a modeline and echo area below the text.</p> | ||
| 25 | <nav class="toc" aria-label="On this page"> | ||
| 26 | <h2>On this page</h2> | ||
| 27 | <ul> | ||
| 28 | <li><a href="#what-the-editor-shows">What the editor shows</a> | ||
| 29 | <ul> | ||
| 30 | <li><a href="#markup">Markup</a></li> | ||
| 31 | <li><a href="#styling">Styling</a></li> | ||
| 32 | <li><a href="#adding-emphasis">Adding emphasis</a></li> | ||
| 33 | <li><a href="#indentation-and-stars">Indentation and stars</a></li> | ||
| 34 | <li><a href="#entities">Entities</a></li> | ||
| 35 | <li><a href="#inline-images">Inline images</a></li> | ||
| 36 | <li><a href="#latex-previews">LaTeX previews</a></li> | ||
| 37 | <li><a href="#what-isn-t-rendered">What isn't rendered</a></li> | ||
| 38 | </ul></li> | ||
| 39 | <li><a href="#folding">Folding</a> | ||
| 40 | <ul> | ||
| 41 | <li><a href="#cycling">Cycling</a></li> | ||
| 42 | <li><a href="#folding-when-a-file-opens">Folding when a file opens</a></li> | ||
| 43 | </ul></li> | ||
| 44 | <li><a href="#panes-and-windows">Panes and windows</a></li> | ||
| 45 | <li><a href="#the-modeline">The modeline</a></li> | ||
| 46 | <li><a href="#the-echo-area">The echo area</a> | ||
| 47 | <ul> | ||
| 48 | <li><a href="#prompts">Prompts</a></li> | ||
| 49 | </ul></li> | ||
| 50 | <li><a href="#completion">Completion</a></li> | ||
| 51 | <li><a href="#electric-pairs">Electric pairs</a></li> | ||
| 52 | <li><a href="#spell-checking">Spell checking</a></li> | ||
| 53 | <li><a href="#wrapping-and-filling">Wrapping and filling</a></li> | ||
| 54 | <li><a href="#view-toggles">View toggles</a> | ||
| 55 | <ul> | ||
| 56 | <li><a href="#line-numbers">Line numbers</a></li> | ||
| 57 | </ul></li> | ||
| 58 | <li><a href="#themes">Themes</a></li> | ||
| 59 | <li><a href="#undo">Undo</a></li> | ||
| 60 | <li><a href="#finding-text-in-a-file">Finding text in a file</a></li> | ||
| 61 | <li><a href="#accessibility">Accessibility</a></li> | ||
| 62 | </ul> | ||
| 63 | </nav> | ||
| 64 | <h2 id="what-the-editor-shows">What the editor shows</h2> | ||
| 65 | <p>The editor holds the file's text exactly as it is on disk. Styling, hidden markup, indentation and images are display only; none of them change the file.</p> | ||
| 66 | <p>Org files open with the caret at the start of the file, as in Emacs. Buffers you had open when you quit reopen with the caret where you left it.</p> | ||
| 67 | <h3 id="markup">Markup</h3> | ||
| 68 | <p>View ▸ Show Markup (<code class="verbatim">⇧⌘M</code>; palette: Show or Hide Markup) is off by default. While it is off:</p> | ||
| 69 | <ul> | ||
| 70 | <li>Link brackets and targets are hidden, so <code class="verbatim">[[https://orgmode.org][Org]]</code> shows as an underlined <code class="verbatim">Org</code>, as with <code class="verbatim">org-link-descriptive</code>.</li> | ||
| 71 | <li>Emphasis markers (the <code class="verbatim">*</code> of bold, the <code class="verbatim">=</code> of verbatim and so on) are hidden when <code class="verbatim">org-hide-emphasis-markers</code> is on, which is the default.</li> | ||
| 72 | <li>Entities and sub- and superscripts are drawn as characters when <code class="verbatim">org-pretty-entities</code> is on, which is the default (see <em>Entities</em> below).</li> | ||
| 73 | </ul> | ||
| 74 | <p>The line with the caret always shows its markup, so you can edit it. Moving to another line hides it again. Turn Show Markup on to see all markup everywhere. The <code class="verbatim">config.toml</code> setting is <code class="verbatim">show-markup</code> in <code class="verbatim">[orgstar]</code>.</p> | ||
| 75 | <p>The two Org options are in Settings ▸ Editing as "Emacs hides emphasis markers (org-hide-emphasis-markers)" and "Emacs shows entities as characters (org-pretty-entities)", and in <code class="verbatim">config.toml</code> as <code class="verbatim">org-hide-emphasis-markers</code> and <code class="verbatim">org-pretty-entities</code>. They also tell orgstar how wide your Emacs displays text, so tag alignment, table alignment and <code class="verbatim">M-q</code> produce the same file Emacs would. Set them to match your Emacs.</p> | ||
| 76 | <h3 id="styling">Styling</h3> | ||
| 77 | <ul> | ||
| 78 | <li>Headings are bold and coloured by level (eight colours, as <code class="verbatim">org-level-1</code> to <code class="verbatim">org-level-8</code>). Levels 1 to 3 are larger than body text: each level is a step larger than the one below it, and level 4 and deeper are body size. The step is Settings ▸ Appearance ▸ "Headings grow by N pt a level" (1 pt by default, 0 to 8).</li> | ||
| 79 | <li>TODO and DONE keywords are bold, in the TODO or DONE colour, or a colour you set for that keyword.</li> | ||
| 80 | <li>Priorities, tags, timestamps, comments, keywords (<code class="verbatim">#+TITLE:</code> and the like), planning lines and drawers, block delimiters and tables each have a colour; footnotes, targets, macros and LaTeX share one.</li> | ||
| 81 | <li>Bold, italic, underline and strike-through are drawn as such; verbatim and code get their own colour and background.</li> | ||
| 82 | <li>Links are underlined.</li> | ||
| 83 | <li>Blocks (<code class="verbatim">#+BEGIN_…</code> to <code class="verbatim">#+END_…</code>), dynamic blocks and fixed-width lines are drawn on a shaded band across the whole width of the editor, as Emacs extends the <code class="verbatim">org-block</code> face. Code in src blocks is highlighted for its language (see <a href="11-code-blocks.html">Code blocks</a>).</li> | ||
| 84 | <li>A folded heading shows an ellipsis after its line.</li> | ||
| 85 | </ul> | ||
| 86 | <p>Colours come from the theme and follow the system's light or dark appearance. The font, size, line spacing and text width are in Settings ▸ Appearance; colours are set in <code class="verbatim">config.toml</code>. See <a href="13-configuration.html">Configuration</a>. The font should be monospaced, since tags and tables line up by columns. A body font for prose can be set beside it, as <code class="verbatim">mixed-pitch-mode</code> does in Emacs: prose and headings use it, and tables, code, dates, tags, drawers and the start of each line keep the monospaced font.</p> | ||
| 87 | <h3 id="adding-emphasis">Adding emphasis</h3> | ||
| 88 | <p>Emphasize… (<code class="verbatim">C-c C-x C-f</code> in the Emacs and Doom presets, <code class="verbatim">org-emphasize</code>) asks for a marker: <code class="verbatim">*</code> bold, <code class="verbatim">/</code> italic, <code class="verbatim">_</code> underline, <code class="verbatim">=</code> verbatim, <code class="verbatim">~</code> code, <code class="verbatim">+</code> strike-through, or <code class="verbatim">SPC</code> to remove emphasis. With a selection it wraps the selection in the marker, replacing one the selection already has. Without one it inserts a pair of markers with the caret between them. A space goes before or after the markers where the text next to them couldn't border emphasis, as Org adds it.</p> | ||
| 89 | <p>The Mac preset binds <code class="verbatim">⌘B</code>, <code class="verbatim">⌘I</code> and <code class="verbatim">⌘U</code> to bold, italic and underline. Each marker is also a command of its own in the palette (Bold, Italic, Underline, Verbatim, Code, Strike-Through), for binding in <code class="verbatim">keymap.toml</code>; see <a href="03-keys.html">Keys and commands</a>. On iOS the key bar has Bold, Italic and Code.</p> | ||
| 90 | <h3 id="indentation-and-stars">Indentation and stars</h3> | ||
| 91 | <p>Org files display as <code class="verbatim">org-indent-mode</code> shows them, by default: each heading's body is indented to start one column past its stars, all stars but the last are hidden, and a wrapped heading title continues under the title. The indentation is display only; the file keeps its text at the left margin.</p> | ||
| 92 | <p>Body lines that wrap continue under their own text: past leading spaces, and past a list item's bullet and checkbox, as <code class="verbatim">adaptive-wrap</code> does.</p> | ||
| 93 | <table> | ||
| 94 | <thead> | ||
| 95 | <tr><th>Setting</th><th>Default</th><th>What it does</th></tr> | ||
| 96 | </thead> | ||
| 97 | <tbody> | ||
| 98 | <tr><td><code class="verbatim">org-startup-indented</code></td><td>on</td><td>Indent bodies under their headings. <code class="verbatim">#+STARTUP: indent</code> or <code class="verbatim">noindent</code> overrides it per file.</td></tr> | ||
| 99 | <tr><td><code class="verbatim">org-hide-leading-stars</code></td><td>off</td><td>Without indentation, show only a heading's last star. <code class="verbatim">#+STARTUP: hidestars</code> or <code class="verbatim">showstars</code> overrides it.</td></tr> | ||
| 100 | </tbody> | ||
| 101 | </table> | ||
| 102 | <p>With both off, headings show all their stars and bodies start at the left margin. Both settings are in <code class="verbatim">config.toml</code> only, and are read when a file opens.</p> | ||
| 103 | <h3 id="entities">Entities</h3> | ||
| 104 | <p>When <code class="verbatim">org-pretty-entities</code> is on and Show Markup is off:</p> | ||
| 105 | <ul> | ||
| 106 | <li>An entity such as <code class="verbatim">\alpha</code> or <code class="verbatim">\to</code> is drawn as its character (<code class="verbatim">α</code>, <code class="verbatim">→</code>), taking one column.</li> | ||
| 107 | <li><code class="verbatim">x_{1}</code> and <code class="verbatim">x^{2}</code> are drawn lowered and raised, without their markers. Braces are required: <code class="verbatim">x_1</code> is left as typed.</li> | ||
| 108 | </ul> | ||
| 109 | <p>Entities are left as typed on the caret's line, in comment lines and inside blocks. Sub- and superscripts are left as typed inside emphasis, links and keywords.</p> | ||
| 110 | <h3 id="inline-images">Inline images</h3> | ||
| 111 | <p>Org ▸ Show or Hide Inline Images (<code class="verbatim">C-c C-x C-v</code> in the Emacs and Doom presets), as <code class="verbatim">org-toggle-inline-images</code> does, draws images in place of their links. The echo area reports how many images it displayed.</p> | ||
| 112 | <p>A line shows as an image when it holds nothing but a <code class="verbatim">file:</code> or <code class="verbatim">attachment:</code> link to an image file with no description:</p> | ||
| 113 | <pre><code class="language-org highlight"><span class="text org"><span class="keyword other keyword org">#+ATTR_ORG:</span><span class="string unquoted org"> :width 400</span> | ||
| 114 | <span class="punctuation definition link org">[[</span><span class="markup underline link org">file:images/diagram.png</span><span class="punctuation definition link org">]</span><span class="punctuation definition link org">]</span></span></code></pre> | ||
| 115 | <ul> | ||
| 116 | <li>Recognised extensions: <code class="verbatim">png</code>, <code class="verbatim">jpg</code>, <code class="verbatim">jpeg</code>, <code class="verbatim">gif</code>, <code class="verbatim">svg</code>, <code class="verbatim">webp</code>, <code class="verbatim">tif</code>, <code class="verbatim">tiff</code>, <code class="verbatim">bmp</code>, <code class="verbatim">heic</code>, <code class="verbatim">avif</code>.</li> | ||
| 117 | <li>Paths are relative to the file's folder; <code class="verbatim">~</code> is expanded. Images at http(s) links show when <code class="verbatim">org-display-remote-inline-images</code> is <code class="verbatim">download</code> or <code class="verbatim">cache</code>; see <a href="09-links.org::*Remote images">Remote images</a>.</li> | ||
| 118 | <li><code class="verbatim">attachment:</code> links, such as <code class="verbatim">[[attachment:photo.jpg]]</code>, show the file from the entry's attachment folder, found as following the link finds it: the <code class="verbatim">DIR</code> property, else the <code class="verbatim">ID</code> folder under <code class="verbatim">org-attach-id-dir</code>. See <a href="04-outlines.html">Outlines</a> for attachments.</li> | ||
| 119 | <li><code class="verbatim">#+ATTR_ORG: :width N</code> sets the width in points. Images are never wider than the editor.</li> | ||
| 120 | <li>The link text is hidden while its image shows, except on the caret's line.</li> | ||
| 121 | </ul> | ||
| 122 | <p>To show images when a file opens, add <code class="verbatim">#+STARTUP: inlineimages</code> to the file, or set <code class="verbatim">org-startup-with-inline-images = true</code> in <code class="verbatim">config.toml</code>. <code class="verbatim">#+STARTUP: noinlineimages</code> turns it off for one file.</p> | ||
| 123 | <h3 id="latex-previews">LaTeX previews</h3> | ||
| 124 | <p>Show or Hide LaTeX Previews (<code class="verbatim">C-c C-x C-l</code> in the Emacs and Doom presets, and in the command palette) draws LaTeX fragments and environments as typeset math, as <code class="verbatim">org-latex-preview</code> does. The echo area reports how many fragments it previewed.</p> | ||
| 125 | <pre><code class="language-org highlight"><span class="text org">The area is $\pi r^2$, and \(\sqrt{2}\) is irrational. | ||
| 126 | \begin{equation} | ||
| 127 | \int_0^1 x\,dx = \frac{1}{2} | ||
| 128 | \end{equation}</span></code></pre> | ||
| 129 | <ul> | ||
| 130 | <li><code class="verbatim">$…$</code> and <code class="verbatim">\(…\)</code> are typeset as inline math, <code class="verbatim">$$…$$</code>, <code class="verbatim">\[…\]</code> and environments as display math. <code class="verbatim">equation</code>, <code class="verbatim">align</code>, <code class="verbatim">gather</code> and their starred forms are typeset as their bodies, aligned or gathered.</li> | ||
| 131 | <li>The math is typeset by orgstar itself, with the Latin Modern Math font, in the editor's text color and size; it needs no TeX installation and works on iOS. It reads the math commands LaTeX's <code class="verbatim">amsmath</code> has for formulas, not packages a file loads with <code class="verbatim">#+LATEX_HEADER</code>. A fragment it can't read stays as text.</li> | ||
| 132 | <li>The caret's line shows the source, so you can edit it.</li> | ||
| 133 | <li>Fragments in source and example blocks aren't previewed.</li> | ||
| 134 | </ul> | ||
| 135 | <p>The command switches previews for the whole buffer; Org's <code class="verbatim">C-u</code> forms, which act on the section at point, aren't there. To preview when a file opens, add <code class="verbatim">#+STARTUP: latexpreview</code> to the file, or set <code class="verbatim">org-startup-with-latex-preview = true</code> in <code class="verbatim">config.toml</code>. <code class="verbatim">#+STARTUP: nolatexpreview</code> turns it off for one file. After switching between light and dark appearance, switch previews off and on to redraw them in the new color.</p> | ||
| 136 | <h3 id="what-isn-t-rendered">What isn't rendered</h3> | ||
| 137 | <p>Images in links that have a description, and images on lines with other text, show as links.</p> | ||
| 138 | <h2 id="folding">Folding</h2> | ||
| 139 | <p>Headings, drawers and blocks fold as in Org. Folding is display only and isn't saved in the file.</p> | ||
| 140 | <h3 id="cycling">Cycling</h3> | ||
| 141 | <table> | ||
| 142 | <thead> | ||
| 143 | <tr><th>Action</th><th>Emacs and Mac presets</th><th>Doom</th><th>Org command</th></tr> | ||
| 144 | </thead> | ||
| 145 | <tbody> | ||
| 146 | <tr><td>Cycle the heading or element at the caret</td><td><code class="verbatim">TAB</code></td><td><code class="verbatim">TAB</code> in normal and visual state</td><td><code class="verbatim">org-cycle</code></td></tr> | ||
| 147 | <tr><td>Cycle the whole file</td><td><code class="verbatim">S-TAB</code></td><td><code class="verbatim">S-TAB</code>, <code class="verbatim">z A</code> in normal state; <code class="verbatim">S-TAB</code> in visual state</td><td><code class="verbatim">org-global-cycle</code></td></tr> | ||
| 148 | <tr><td>Open or fold the heading</td><td></td><td><code class="verbatim">z a</code> in normal state</td><td><code class="verbatim">+org/toggle-fold</code></td></tr> | ||
| 149 | <tr><td>Open the heading one level</td><td></td><td><code class="verbatim">z o</code> in normal state</td><td><code class="verbatim">+org/open-fold</code></td></tr> | ||
| 150 | <tr><td>Fold the subtree the caret is in</td><td></td><td><code class="verbatim">z c</code> in normal state</td><td><code class="verbatim">outline-hide-subtree</code></td></tr> | ||
| 151 | </tbody> | ||
| 152 | </table> | ||
| 153 | <p>The titles in the palette and the Org menu are Cycle Visibility, Cycle Global Visibility, Toggle Fold, Open Fold and Close Fold.</p> | ||
| 154 | <p>Toggle Fold and Open Fold act on a heading line: a folded heading opens one level, showing its body and its child headings, each folded. On an open heading, Toggle Fold folds it and Open Fold does nothing. Close Fold folds the subtree of the heading the caret is under, from anywhere in it.</p> | ||
| 155 | <p><code class="verbatim">TAB</code> on a heading line cycles that heading: folded, then its children, then the whole subtree, then folded again. A heading without children goes straight from folded to open. <code class="verbatim">TAB</code> on the first or last line of a drawer or block folds or opens it; drawer and block folds are kept apart from heading folds, so cycling a heading leaves them as they are. Elsewhere <code class="verbatim">TAB</code> does what it otherwise would: in a table it moves to the next field, and in plain text it inserts a tab.</p> | ||
| 156 | <p>In Doom's insert state, <code class="verbatim">TAB</code> and <code class="verbatim">S-TAB</code> on a heading demote and promote it, and on a list item indent and outdent it, as Doom's <code class="verbatim">+org-indent-maybe-h</code> does. Use normal state to fold.</p> | ||
| 157 | <p><code class="verbatim">S-TAB</code> cycles the whole file through three states, starting at the first:</p> | ||
| 158 | <ol> | ||
| 159 | <li>Overview: top-level headings only.</li> | ||
| 160 | <li>Contents: every heading, no bodies.</li> | ||
| 161 | <li>Show all: everything, with blocks opened. Drawers stay folded.</li> | ||
| 162 | </ol> | ||
| 163 | <p>Overview and contents also fold drawers before the first heading.</p> | ||
| 164 | <p>Clicking a heading's stars cycles that heading, as <code class="verbatim">TAB</code> does on it.</p> | ||
| 165 | <p>The caret can't rest in folded text: moving forward into a fold jumps past it, and moving back into one goes to the end of the heading line. Going to a location from the outline pane, search, a link or the agenda opens whatever folds hide it.</p> | ||
| 166 | <h3 id="folding-when-a-file-opens">Folding when a file opens</h3> | ||
| 167 | <p>With no <code class="verbatim">#+STARTUP</code> visibility option, a file opens with every heading shown. Drawers start folded (<code class="verbatim">org-cycle-hide-drawer-startup</code>, on by default); blocks start open (<code class="verbatim">org-cycle-hide-block-startup</code>, off by default). Both settings are in <code class="verbatim">config.toml</code>.</p> | ||
| 168 | <p><code class="verbatim">#+STARTUP</code> options a file can set:</p> | ||
| 169 | <table> | ||
| 170 | <thead> | ||
| 171 | <tr><th>Option</th><th>Effect when the file opens</th></tr> | ||
| 172 | </thead> | ||
| 173 | <tbody> | ||
| 174 | <tr><td><code class="verbatim">overview</code>, <code class="verbatim">fold</code></td><td>Top-level headings only</td></tr> | ||
| 175 | <tr><td><code class="verbatim">content</code></td><td>Every heading, no bodies</td></tr> | ||
| 176 | <tr><td><code class="verbatim">showall</code>, <code class="verbatim">nofold</code></td><td>Everything</td></tr> | ||
| 177 | <tr><td><code class="verbatim">show2levels</code>, <code class="verbatim">show3levels</code>, …</td><td>Headings down to that level, no bodies</td></tr> | ||
| 178 | <tr><td><code class="verbatim">showeverything</code></td><td>Everything, including drawers and blocks; <code class="verbatim">VISIBILITY</code> properties are ignored</td></tr> | ||
| 179 | <tr><td><code class="verbatim">hidedrawers</code>, <code class="verbatim">nohidedrawers</code></td><td>Fold or open drawers</td></tr> | ||
| 180 | <tr><td><code class="verbatim">hideblocks</code>, <code class="verbatim">nohideblocks</code></td><td>Fold or open blocks</td></tr> | ||
| 181 | <tr><td><code class="verbatim">indent</code>, <code class="verbatim">noindent</code></td><td>Indent bodies under headings, or not</td></tr> | ||
| 182 | <tr><td><code class="verbatim">hidestars</code>, <code class="verbatim">showstars</code></td><td>Hide all stars but the last, or not</td></tr> | ||
| 183 | <tr><td><code class="verbatim">inlineimages</code>, <code class="verbatim">noinlineimages</code></td><td>Show image links as images, or not</td></tr> | ||
| 184 | <tr><td><code class="verbatim">latexpreview</code>, <code class="verbatim">nolatexpreview</code></td><td>Show LaTeX fragments as typeset math, or not</td></tr> | ||
| 185 | <tr><td><code class="verbatim">align</code>, <code class="verbatim">noalign</code></td><td>Align every table, or not (<code class="verbatim">org-startup-align-all-tables</code>)</td></tr> | ||
| 186 | <tr><td><code class="verbatim">shrink</code></td><td>Narrow table columns that have width cookies</td></tr> | ||
| 187 | </tbody> | ||
| 188 | </table> | ||
| 189 | <pre><code class="language-org highlight"><span class="text org"><span class="keyword other keyword org">#+STARTUP:</span><span class="string unquoted org"> content hideblocks</span></span></code></pre> | ||
| 190 | <p>When the file sets a visibility (<code class="verbatim">overview</code>, <code class="verbatim">content</code>, <code class="verbatim">showall</code>, <code class="verbatim">showNlevels</code> and the like, but not <code class="verbatim">showeverything</code>), orgstar then applies each heading's <code class="verbatim">VISIBILITY</code> property and folds subtrees tagged <code class="verbatim">ARCHIVE</code>, as <code class="verbatim">org-cycle-set-visibility-according-to-property</code> and <code class="verbatim">org-cycle-hide-archived-subtrees</code> do. <code class="verbatim">VISIBILITY</code> takes <code class="verbatim">folded</code>, <code class="verbatim">children</code>, <code class="verbatim">content</code> or <code class="verbatim">all</code>:</p> | ||
| 191 | <pre><code class="language-org highlight"><span class="text org"><span class="markup heading org"><span class="punctuation definition heading org">*</span> Reference | ||
| 192 | </span>:PROPERTIES: | ||
| 193 | :VISIBILITY: folded | ||
| 194 | :END:</span></code></pre> | ||
| 195 | <p><code class="verbatim">#+STARTUP</code> options are read from the file and from any <code class="verbatim">#+SETUPFILE</code> it names, and take effect when the file opens. To apply changed options to an open file, close its buffer and open it again.</p> | ||
| 196 | <p>Narrowing to a subtree or block, and sparse trees, also hide text; see <a href="04-outlines.html">Outlines</a>.</p> | ||
| 197 | <h2 id="panes-and-windows">Panes and windows</h2> | ||
| 198 | <p>A window can show more than one buffer at once, or one buffer in more than one place, as Emacs windows do. Split Pane Below (<code class="verbatim">C-x 2</code>) and Split Pane Right (<code class="verbatim">C-x 3</code>) divide the pane with the focus in two; the new pane shows the same buffer, and the focus stays where it was. Drag the line between two panes to resize them. Close Pane (<code class="verbatim">C-x 0</code>) removes the focused pane, Close Other Panes (<code class="verbatim">C-x 1</code>) leaves only it, and Next Pane (<code class="verbatim">C-x o</code>) moves the focus through the panes in reading order. With several panes, a bar along the top marks the one with the focus. The sidebar, the outline and the title follow the focused pane. In the Doom preset these are <code class="verbatim">SPC w s</code>, <code class="verbatim">SPC w v</code>, <code class="verbatim">SPC w d</code>, <code class="verbatim">SPC w o</code> and <code class="verbatim">SPC w w</code>, and <code class="verbatim">C-w</code> with the same letters in normal state; the Mac preset and the View menu use <code class="verbatim">⌃⌘2</code>, <code class="verbatim">⌃⌘3</code>, <code class="verbatim">⌃⌘0</code>, <code class="verbatim">⌃⌘1</code> and <code class="verbatim">⌥⌘`</code>.</p> | ||
| 199 | <p>Each pane has its own caret, selection and scroll position, and its own tabs (see <a href="01-files-and-folders.html">Files and folders</a>): the buffers it has shown. Everything else about a buffer is the buffer's, as in Emacs: its text and undo, its folds, narrowing and sparse tree, its evil state and mark, shrunk table columns and inline images. Two panes on one buffer therefore show the same folds, and a fold made in one shows in the other. Closing a pane leaves its buffers open; closing a buffer (<code class="verbatim">C-x k</code>) takes it out of every pane, which falls back to the buffer it showed before.</p> | ||
| 200 | <p>New Window (<code class="verbatim">C-x 5 2</code>, <code class="verbatim">⌥⌘N</code>, File ▸ New Window) opens a window of panes alone, without the sidebar or search, on the buffer the focused pane shows, as a second Emacs frame. Commands act on the pane with the focus whichever window it is in; Quick Open, the palette and search open from the main window and show their result in the focused pane. Closing the window closes its panes and leaves the buffers open.</p> | ||
| 201 | <h2 id="the-modeline">The modeline</h2> | ||
| 202 | <p>The line under the editor shows, from the left:</p> | ||
| 203 | <table> | ||
| 204 | <thead> | ||
| 205 | <tr><th>Item</th><th>Shown when</th><th>What it shows</th></tr> | ||
| 206 | </thead> | ||
| 207 | <tbody> | ||
| 208 | <tr><td>Evil state</td><td>Doom preset</td><td><code class="verbatim">NORMAL</code>, <code class="verbatim">INSERT</code>, <code class="verbatim">VISUAL</code>, <code class="verbatim">V-LINE</code> or <code class="verbatim">V-BLOCK</code>, on a coloured tag</td></tr> | ||
| 209 | <tr><td>Unsaved dot</td><td>the buffer has unsaved edits</td><td>a small dot</td></tr> | ||
| 210 | <tr><td>Outline path</td><td>the caret is under a heading</td><td>the headings containing the caret, outermost first, as <code class="verbatim">Projects › House › Roof</code></td></tr> | ||
| 211 | <tr><td>Running clock</td><td>a clock is running</td><td>elapsed time and the clocked heading; click for Clock Out, Cancel Clock and Go to Clocked Entry</td></tr> | ||
| 212 | <tr><td>Selection counts</td><td>text is selected</td><td>lines, words and characters in the selection, as <code class="verbatim">count-words-region</code></td></tr> | ||
| 213 | <tr><td>Line and column</td><td>always</td><td><code class="verbatim">LINE:COLUMN</code> of the caret (the end of the selection)</td></tr> | ||
| 214 | <tr><td>Word count</td><td>always</td><td>words in the whole file, as <code class="verbatim">count-words</code>; click for the characters and reading time of the file and the selection</td></tr> | ||
| 215 | <tr><td>Encoding notes</td><td>the file differs from UTF-8 with LF</td><td><code class="verbatim">Read-only</code>, <code class="verbatim">BOM</code> and <code class="verbatim">CRLF</code>, in orange</td></tr> | ||
| 216 | <tr><td>Git branch</td><td>the file is in a Git repository</td><td>the checked-out branch, or the first 7 characters of the commit when detached</td></tr> | ||
| 217 | </tbody> | ||
| 218 | </table> | ||
| 219 | <p>Lines count from 1. Columns count from 0, as Emacs's <code class="verbatim">column-number-mode</code> does: a tab advances to the next multiple of 8, and wide characters such as CJK count as two columns. Hover over an item for a description.</p> | ||
| 220 | <p>The word count follows edits after a pause. Reading time is at 230 words a minute, rounded up. The Git branch is read from the repository's <code class="verbatim">HEAD</code> file without running <code class="verbatim">git</code>, and checked again every 5 seconds; worktrees and submodules are followed.</p> | ||
| 221 | <p>The running clock is covered in <a href="06-dates-and-clocking.html">Dates and clocking</a>; the evil states in <a href="03-keys.html">Keys and commands</a>.</p> | ||
| 222 | <h2 id="the-echo-area">The echo area</h2> | ||
| 223 | <p>The line under the modeline is the echo area, as Emacs's minibuffer. It shows:</p> | ||
| 224 | <ul> | ||
| 225 | <li><strong>Messages</strong> from commands, such as <code class="verbatim">Stored: …</code> or <code class="verbatim">Not an org file</code>. A message stays for 4 seconds.</li> | ||
| 226 | <li><strong>A pending key prefix</strong>. After <code class="verbatim">C-c</code> it shows <code class="verbatim">C-c-</code>. If you pause for about 0.6 seconds, a grid of the keys that can follow appears, each with the command it would run at the caret, or <code class="verbatim">+prefix</code> for a further prefix, as <code class="verbatim">which-key</code> shows them. <code class="verbatim">C-g</code> cancels the prefix and shows <code class="verbatim">Quit</code>. A sequence that isn't bound shows, for example, <code class="verbatim">C-c z is undefined</code>, and does nothing; in the Doom preset this includes sequences after <code class="verbatim">SPC</code>.</li> | ||
| 227 | <li><strong>Prompts</strong>, when a command asks a question.</li> | ||
| 228 | </ul> | ||
| 229 | <h3 id="prompts">Prompts</h3> | ||
| 230 | <p>A prompt shows its question and a text field, which takes the keyboard.</p> | ||
| 231 | <ul> | ||
| 232 | <li>Type an answer and press <code class="verbatim">Return</code>.</li> | ||
| 233 | <li>When the prompt has choices (buffers, refile targets, tags), up to 12 of them list above the field, filtered as you type: characters match in order, and the best match is listed first. <code class="verbatim">Tab</code> completes the field to the first match. <code class="verbatim">Return</code> accepts the first match when the prompt requires one of its choices, and the typed text otherwise. Clicking a choice accepts it.</li> | ||
| 234 | <li>Prompts that take several values, such as tags separated by colons, complete only the part after the last separator.</li> | ||
| 235 | <li><code class="verbatim">Escape</code> cancels the prompt; the command reports <code class="verbatim">Quit</code>.</li> | ||
| 236 | </ul> | ||
| 237 | <p>Date prompts also show a date picker, and <code class="verbatim">S-<left></code>, <code class="verbatim">S-<right></code>, <code class="verbatim">S-<up></code> and <code class="verbatim">S-<down></code> move the date by a day or a week; see <a href="06-dates-and-clocking.html">Dates and clocking</a>. TODO keywords and tags with fast-selection keys show a key menu instead of a text field; see <a href="05-todos-and-tags.html">TODOs and tags</a>.</p> | ||
| 238 | <p>When a prompt closes, the keyboard goes back to the editor.</p> | ||
| 239 | <h2 id="completion">Completion</h2> | ||
| 240 | <p>Complete at Point (<code class="verbatim">completion-at-point</code>) completes the word before the caret from what Org knows at that position.</p> | ||
| 241 | <table> | ||
| 242 | <thead> | ||
| 243 | <tr><th>Preset</th><th>Key</th></tr> | ||
| 244 | </thead> | ||
| 245 | <tbody> | ||
| 246 | <tr><td>Emacs</td><td><code class="verbatim">C-M-i</code></td></tr> | ||
| 247 | <tr><td>Doom</td><td><code class="verbatim">C-SPC</code> or <code class="verbatim">C-@</code> in insert state; the list also opens by itself after you type two characters and pause for 0.4 seconds, as Doom's corfu does</td></tr> | ||
| 248 | <tr><td>Mac</td><td>no key; run Complete at Point from the palette, or bind one in <code class="verbatim">keymap.toml</code></td></tr> | ||
| 249 | </tbody> | ||
| 250 | </table> | ||
| 251 | <p>With one candidate, it is inserted. With several, a list opens under the caret, showing up to 16 rows. Nothing is selected until you pick a row.</p> | ||
| 252 | <table> | ||
| 253 | <thead> | ||
| 254 | <tr><th>Key</th><th>In the list</th></tr> | ||
| 255 | </thead> | ||
| 256 | <tbody> | ||
| 257 | <tr><td><code class="verbatim">C-n</code>, <code class="verbatim"><down></code>, <code class="verbatim">C-j</code></td><td>Next candidate; past the last one the selection goes back to what you typed</td></tr> | ||
| 258 | <tr><td><code class="verbatim">C-p</code>, <code class="verbatim"><up></code>, <code class="verbatim">C-k</code></td><td>Previous candidate</td></tr> | ||
| 259 | <tr><td><code class="verbatim">TAB</code></td><td>Insert the selected candidate; with none selected, insert the part all candidates share</td></tr> | ||
| 260 | <tr><td><code class="verbatim">RET</code></td><td>Insert the selected candidate; with none selected, close the list and insert a newline</td></tr> | ||
| 261 | <tr><td><code class="verbatim">ESC</code></td><td>Close the list; the key then does what it otherwise would</td></tr> | ||
| 262 | <tr><td><code class="verbatim">C-g</code></td><td>Close the list</td></tr> | ||
| 263 | </tbody> | ||
| 264 | </table> | ||
| 265 | <p>The list follows what you type and closes when nothing matches. Candidates are those that start with what you typed.</p> | ||
| 266 | <p>What is completed, by position:</p> | ||
| 267 | <table> | ||
| 268 | <thead> | ||
| 269 | <tr><th>Where</th><th>Candidates</th></tr> | ||
| 270 | </thead> | ||
| 271 | <tbody> | ||
| 272 | <tr><td><code class="verbatim">#+</code> at the start of a line</td><td>keyword names (<code class="verbatim">TITLE</code>, <code class="verbatim">STARTUP</code>, <code class="verbatim">OPTIONS</code>, …), in upper and lower case</td></tr> | ||
| 273 | <tr><td>After <code class="verbatim">#+STARTUP:</code></td><td>startup options</td></tr> | ||
| 274 | <tr><td>After <code class="verbatim">#+OPTIONS:</code></td><td>export options</td></tr> | ||
| 275 | <tr><td>After <code class="verbatim">#+DATE:</code></td><td>today's date as a timestamp</td></tr> | ||
| 276 | <tr><td>After <code class="verbatim">#+EXCLUDE_TAGS:</code>, <code class="verbatim">#+SELECT_TAGS:</code>, <code class="verbatim">#+LANGUAGE:</code>, <code class="verbatim">#+PRIORITIES:</code></td><td>the usual values</td></tr> | ||
| 277 | <tr><td><code class="verbatim"><</code> and a letter at the start of a line</td><td>structure templates (<code class="verbatim"><s</code> for a src block and so on); see <a href="11-code-blocks.html">Code blocks</a></td></tr> | ||
| 278 | <tr><td>After <code class="verbatim">#+BEGIN_SRC</code></td><td>languages, then header arguments</td></tr> | ||
| 279 | <tr><td>After <code class="verbatim">#+BEGIN: clocktable</code></td><td>clock table options</td></tr> | ||
| 280 | <tr><td>After <code class="verbatim">[[</code></td><td>link types and the file's link abbreviations</td></tr> | ||
| 281 | <tr><td>After <code class="verbatim">[[*</code></td><td>heading titles in the file</td></tr> | ||
| 282 | <tr><td>After <code class="verbatim">\</code></td><td>entity names</td></tr> | ||
| 283 | <tr><td>After <code class="verbatim">:</code> at the end of a heading</td><td>tags: those in <code class="verbatim">#+TAGS</code>, or else tags used in the file and across your folders</td></tr> | ||
| 284 | <tr><td>After the stars of an empty heading</td><td>TODO keywords</td></tr> | ||
| 285 | <tr><td><code class="verbatim">:</code> at the start of a line in a property drawer</td><td>property names the entry doesn't have yet</td></tr> | ||
| 286 | <tr><td><code class="verbatim">:</code> at the start of a line elsewhere</td><td>drawer names</td></tr> | ||
| 287 | </tbody> | ||
| 288 | </table> | ||
| 289 | <p>Elsewhere, Complete at Point reports <code class="verbatim">No match</code>. Completion is for org files only.</p> | ||
| 290 | <h2 id="electric-pairs">Electric pairs</h2> | ||
| 291 | <p>Typing an opening bracket inserts its closing partner, as <code class="verbatim">electric-pair-mode</code> does. The pairs are <code class="verbatim">()</code>, <code class="verbatim">[]</code>, <code class="verbatim">{}</code>, <code class="verbatim"><></code> and a pair of double quotes.</p> | ||
| 292 | <ul> | ||
| 293 | <li>Typing a closing character in front of the same closer moves over it instead of inserting another, skipping whitespace before it.</li> | ||
| 294 | <li><code class="verbatim">DEL</code> between an empty pair deletes both.</li> | ||
| 295 | <li><code class="verbatim">RET</code> between a pair opens a blank line between them.</li> | ||
| 296 | <li>With text selected, typing an opening or closing character, or a double quote, wraps the selection.</li> | ||
| 297 | <li>No pair is inserted where it would leave the brackets unbalanced (<code class="verbatim">electric-pair-preserve-balance</code>).</li> | ||
| 298 | </ul> | ||
| 299 | <p>Electric pairs are on by default and work in org files only. Set <code class="verbatim">electric-pair-mode = false</code> in <code class="verbatim">config.toml</code> to turn them off. Plain Emacs has them off; Doom pairs with smartparens.</p> | ||
| 300 | <h2 id="spell-checking">Spell checking</h2> | ||
| 301 | <p>Spell checking is off by default. Turn it on for the current buffer with View ▸ Check Spelling While Typing (also in the palette; <code class="verbatim">SPC t s</code> in Doom normal state); the echo area says whether it is now on or off. To have it on in every file, turn on Settings ▸ Editing ▸ Check spelling while typing, or set <code class="verbatim">spell-check = true</code> in <code class="verbatim">config.toml</code>.</p> | ||
| 302 | <p>Misspelt words are underlined, using the macOS spelling dictionary. In org files, orgstar doesn't mark words where spell-fu skips them: code, verbatim, links, timestamps, tags, TODO keywords, priorities, list bullets, checkboxes, keywords and affiliated keywords, planning and clock lines, property drawers, the first and last lines of drawers and blocks, the whole of src, example, export and comment blocks, LaTeX, entities, macros, targets, footnote references, citations, table formulas and fixed-width lines.</p> | ||
| 303 | <p>orgstar never corrects spelling on its own; automatic spelling correction, text replacement and smart quotes and dashes are off.</p> | ||
| 304 | <p>On iOS, spell checking follows <code class="verbatim">spell-check</code> in the synced <code class="verbatim">config.toml</code>, and is off by default. It leaves out the same text as on the Mac: misspelt words get a dotted red underline, and selecting one, or tapping it to show the edit menu, offers guesses and Learn Spelling. The word being typed is checked once the caret leaves it.</p> | ||
| 305 | <h2 id="wrapping-and-filling">Wrapping and filling</h2> | ||
| 306 | <p>Long lines wrap at the edge of the editor by default. View ▸ Truncate or Wrap Long Lines (<code class="verbatim">toggle-truncate-lines</code>) switches the current buffer to long lines that run off the right edge, with a horizontal scroll bar, and back. The echo area says which is now in effect.</p> | ||
| 307 | <table> | ||
| 308 | <thead> | ||
| 309 | <tr><th>Preset</th><th>Key</th></tr> | ||
| 310 | </thead> | ||
| 311 | <tbody> | ||
| 312 | <tr><td>Emacs</td><td><code class="verbatim">C-x x t</code></td></tr> | ||
| 313 | <tr><td>Doom</td><td><code class="verbatim">SPC t w</code> in normal state</td></tr> | ||
| 314 | <tr><td>Mac</td><td>menu or palette only</td></tr> | ||
| 315 | </tbody> | ||
| 316 | </table> | ||
| 317 | <p>To truncate lines in every file, turn on Settings ▸ Editing ▸ "Long lines run off the edge instead of wrapping", or set <code class="verbatim">org-startup-truncated = true</code> in <code class="verbatim">config.toml</code>. The default is to wrap, as Doom does; Emacs's own default is to truncate.</p> | ||
| 318 | <p>Wrapping is display only. To rewrap the text of a paragraph, use Org ▸ Fill Paragraph (<code class="verbatim">org-fill-paragraph</code>), which breaks the paragraph's lines at the fill column: <code class="verbatim">M-q</code> in the Emacs preset and in every Doom state, <code class="verbatim">⌃⌘P</code> in the Mac preset. With a selection, it fills every paragraph the selection touches. In Doom's normal and visual states, <code class="verbatim">gq</code> and <code class="verbatim">gw</code> with a motion fill the paragraphs in the lines it covers (<code class="verbatim">gqq</code> and <code class="verbatim">gww</code> for the current lines); <code class="verbatim">gq</code> leaves the caret on the last line, <code class="verbatim">gw</code> where it was. Unlike Fill Paragraph, <code class="verbatim">gq</code> and <code class="verbatim">gw</code> keep extra spaces between words and at the ends of lines, as Doom does. See <a href="03-keys.html">Keys and commands</a>. The fill column is Settings ▸ Editing ▸ "M-q fills to column N" (80 by default, 40 to 200), or <code class="verbatim">fill-column</code> in <code class="verbatim">config.toml</code>.</p> | ||
| 319 | <p><code class="verbatim">auto-fill-mode</code> breaks lines as you type: typing a space past the fill column breaks the line at the last space before the column, as often as it takes, and the new line starts with the line's fill prefix, as <code class="verbatim">org-auto-fill-function</code> has it: a list item's text lines up under the item, a comment line starts with <code class="verbatim">#</code>, and headings, tables and code aren't broken. Turn it on for every file with <code class="verbatim">auto-fill-mode = true</code> in <code class="verbatim">config.toml</code>, or for the current buffer with View ▸ Turn Auto Fill On or Off (<code class="verbatim">auto-fill-mode</code>, in the palette too); the echo area says <code class="verbatim">Auto-Fill mode enabled in current buffer</code> or <code class="verbatim">disabled</code>. Only a typed space fills, not <code class="verbatim">RET</code>.</p> | ||
| 320 | <h2 id="view-toggles">View toggles</h2> | ||
| 321 | <table> | ||
| 322 | <thead> | ||
| 323 | <tr><th>Toggle</th><th>Menu</th><th>Keys</th><th>Default</th><th><code class="verbatim">config.toml</code></th><th>Scope</th></tr> | ||
| 324 | </thead> | ||
| 325 | <tbody> | ||
| 326 | <tr><td>Show Markup</td><td>View ▸ Show Markup</td><td><code class="verbatim">⇧⌘M</code></td><td>off</td><td><code class="verbatim">show-markup</code></td><td>every buffer</td></tr> | ||
| 327 | <tr><td>Show Line Numbers</td><td>View ▸ Show Line Numbers</td><td><code class="verbatim">⇧⌘L</code></td><td>off</td><td><code class="verbatim">display-line-numbers-type</code></td><td>every buffer</td></tr> | ||
| 328 | <tr><td>Auto fill</td><td>View ▸ Turn Auto Fill On or Off</td><td>palette</td><td>off</td><td><code class="verbatim">auto-fill-mode</code></td><td>current buffer</td></tr> | ||
| 329 | <tr><td>Inline images</td><td>Org ▸ Show or Hide Inline Images</td><td><code class="verbatim">C-c C-x C-v</code> (Emacs, Doom)</td><td>off</td><td><code class="verbatim">org-startup-with-inline-images</code></td><td>current buffer</td></tr> | ||
| 330 | <tr><td>LaTeX previews</td><td>palette</td><td><code class="verbatim">C-c C-x C-l</code> (Emacs, Doom)</td><td>off</td><td><code class="verbatim">org-startup-with-latex-preview</code></td><td>current buffer</td></tr> | ||
| 331 | <tr><td>Spell checking</td><td>View ▸ Check Spelling While Typing</td><td><code class="verbatim">SPC t s</code> (Doom)</td><td>off</td><td><code class="verbatim">spell-check</code></td><td>current buffer</td></tr> | ||
| 332 | <tr><td>Truncate long lines</td><td>View ▸ Truncate or Wrap Long Lines</td><td><code class="verbatim">C-x x t</code> (Emacs), <code class="verbatim">SPC t w</code> (Doom)</td><td>off</td><td><code class="verbatim">org-startup-truncated</code></td><td>current buffer</td></tr> | ||
| 333 | </tbody> | ||
| 334 | </table> | ||
| 335 | <p>Toggles that apply to the current buffer last until it closes; the <code class="verbatim">config.toml</code> setting decides how each file starts. Changing those settings, and <code class="verbatim">org-startup-indented</code> and <code class="verbatim">org-hide-leading-stars</code>, affects files opened afterwards, not buffers already open.</p> | ||
| 336 | <h3 id="line-numbers">Line numbers</h3> | ||
| 337 | <p>Line numbers show in a margin left of the text, as <code class="verbatim">display-line-numbers-mode</code> shows them: one number per line of the file, so wrapped lines are numbered once and folded lines are skipped. The caret's line number is brighter. Line numbers are off by default, as in Emacs.</p> | ||
| 338 | <p>View ▸ Line Numbers chooses how they count, as <code class="verbatim">display-line-numbers-type</code> does in <code class="verbatim">config.toml</code>:</p> | ||
| 339 | <table> | ||
| 340 | <thead> | ||
| 341 | <tr><th>View ▸ Line Numbers</th><th><code class="verbatim">display-line-numbers-type</code></th><th>Numbers</th></tr> | ||
| 342 | </thead> | ||
| 343 | <tbody> | ||
| 344 | <tr><td>Absolute</td><td><code class="verbatim">true</code></td><td>The line's number in the file.</td></tr> | ||
| 345 | <tr><td>Relative</td><td><code class="verbatim">"relative"</code></td><td>How many lines of the file away from the caret's line.</td></tr> | ||
| 346 | <tr><td>Visual</td><td><code class="verbatim">"visual"</code></td><td>How many lines on the screen away from the caret's, counting each wrapped line.</td></tr> | ||
| 347 | </tbody> | ||
| 348 | </table> | ||
| 349 | <p>In the relative and visual kinds the caret's line shows its own number, as <code class="verbatim">display-line-numbers-current-absolute</code> does. <code class="verbatim">display-line-numbers-type = false</code> turns the numbers off. The iOS editor has no line numbers.</p> | ||
| 350 | <h2 id="themes">Themes</h2> | ||
| 351 | <p>The editor's font, size, line spacing and heading sizes are in Settings ▸ Appearance. Settings ▸ Appearance ▸ Theme chooses a built-in theme for the light appearance and one for the dark: Default, Solarized Light, Gruvbox Light, Modus Operandi, Catppuccin Latte, Tomorrow or Paper; and Default, Solarized Dark, Gruvbox Dark, Modus Vivendi, Catppuccin Mocha, Nord, Dracula, Tokyo Night or doom-one. They are <code class="verbatim">light-theme</code> and <code class="verbatim">dark-theme</code> under <code class="verbatim">[theme]</code> in <code class="verbatim">config.toml</code>. Colours set in <code class="verbatim">config.toml</code>, under <code class="verbatim">[theme]</code> for both appearances, <code class="verbatim">[theme.light]</code> and <code class="verbatim">[theme.dark]</code> for one and <code class="verbatim">[theme.todo]</code> for TODO keywords, apply on top, as do those of a theme file named by <code class="verbatim">theme-file</code>. Copy to Config Folder writes the two chosen themes, every colour, into <code class="verbatim">my-theme.toml</code> and makes it the theme file, to start a theme of your own. Show Default Theme opens <code class="verbatim">default-theme.toml</code>, which lists every colour with its default value. Changes apply while orgstar runs. See <a href="13-configuration.html">Configuration</a>.</p> | ||
| 352 | <p>Settings ▸ Appearance ▸ App Icon chooses the icon the Dock shows while orgstar runs. Finder, and the Dock once orgstar has quit, show the default icon, in the system's icon style (Default, Dark or Tinted).</p> | ||
| 353 | <p>The iOS editor uses the same theme and display settings, read from the synced <code class="verbatim">config.toml</code>; see <a href="14-ios.html">iPhone and iPad</a>.</p> | ||
| 354 | <h2 id="undo">Undo</h2> | ||
| 355 | <p>Each buffer has its own undo history, kept while other buffers show.</p> | ||
| 356 | <table> | ||
| 357 | <thead> | ||
| 358 | <tr><th>Action</th><th>Menu</th><th>Mac</th><th>Emacs preset</th><th>Doom (normal state)</th></tr> | ||
| 359 | </thead> | ||
| 360 | <tbody> | ||
| 361 | <tr><td>Undo</td><td>Edit ▸ Undo</td><td><code class="verbatim">⌘Z</code></td><td><code class="verbatim">⌘Z</code>, <code class="verbatim">C-/</code>, <code class="verbatim">C-_</code>, <code class="verbatim">C-x u</code></td><td><code class="verbatim">u</code></td></tr> | ||
| 362 | <tr><td>Redo</td><td>Edit ▸ Redo</td><td><code class="verbatim">⇧⌘Z</code></td><td><code class="verbatim">⇧⌘Z</code></td><td><code class="verbatim">C-r</code></td></tr> | ||
| 363 | </tbody> | ||
| 364 | </table> | ||
| 365 | <p>A command's whole change undoes in one step, separately from the typing around it. Restoring a recovery version and resolving a Syncthing conflict copy can be undone too.</p> | ||
| 366 | <p>The undo history is cleared when the buffer reloads or merges changes from disk, and when you take the disk version or merge with markers to settle a conflict; see <a href="01-files-and-folders.html">Files, folders and buffers</a>. The Emacs preset has no redo key other than <code class="verbatim">⇧⌘Z</code>, and undo is linear, not Emacs's undo tree.</p> | ||
| 367 | <h2 id="finding-text-in-a-file">Finding text in a file</h2> | ||
| 368 | <p><code class="verbatim">C-s</code> and <code class="verbatim">C-r</code> in the Emacs preset search as you type (<code class="verbatim">isearch-forward</code>, <code class="verbatim">isearch-backward</code>): the echo area shows <code class="verbatim">I-search:</code> and what you have typed, the next match is selected as each character goes in, and the other matches are highlighted. While searching:</p> | ||
| 369 | <table> | ||
| 370 | <thead> | ||
| 371 | <tr><th>Key</th><th>What it does</th></tr> | ||
| 372 | </thead> | ||
| 373 | <tbody> | ||
| 374 | <tr><td>characters</td><td>Add to the search string.</td></tr> | ||
| 375 | <tr><td><code class="verbatim">C-s</code>, <code class="verbatim">C-r</code></td><td>The next or previous match; with nothing typed yet, the last search again. After <code class="verbatim">Failing I-search</code>, the search wraps around the file (<code class="verbatim">Wrapped I-search</code>).</td></tr> | ||
| 376 | <tr><td><code class="verbatim">DEL</code></td><td>Undo the last key: a character, or a move to another match.</td></tr> | ||
| 377 | <tr><td><code class="verbatim">RET</code></td><td>Stop, with the caret after the match (before it going backward).</td></tr> | ||
| 378 | <tr><td><code class="verbatim">C-g</code></td><td>With a failing search, take off the part that fails; otherwise stop and go back to where the search began.</td></tr> | ||
| 379 | <tr><td>other keys</td><td>Stop where the search is, then run as usual.</td></tr> | ||
| 380 | </tbody> | ||
| 381 | </table> | ||
| 382 | <p>A space matches any run of spaces and tabs, and an upper-case letter makes the search case-sensitive, as Emacs's defaults have it. <code class="verbatim">C-M-s</code> and <code class="verbatim">C-M-r</code> search with a regular expression (<code class="verbatim">isearch-forward-regexp</code>); patterns are ICU regular expressions. Folded text opens around a match. In Doom, <code class="verbatim">/</code> and <code class="verbatim">?</code> search the same way with a regular expression, the echo area showing <code class="verbatim">/</code> or <code class="verbatim">?</code> and the pattern; <code class="verbatim">RET</code> ends it as Vim's search does, so <code class="verbatim">n</code> and <code class="verbatim">N</code> repeat it, and <code class="verbatim">Esc</code> or <code class="verbatim">C-g</code> go back. On iOS, <code class="verbatim">C-s</code> and <code class="verbatim">C-r</code> work with a hardware keyboard, and Incremental Search is in Commands; typing on the on-screen keyboard adds to the search. iOS doesn't highlight the other matches.</p> | ||
| 383 | <p>Edit ▸ Find opens the find bar above the text.</p> | ||
| 384 | <table> | ||
| 385 | <thead> | ||
| 386 | <tr><th>Menu item</th><th>Shortcut</th><th>Emacs preset</th><th>Doom</th></tr> | ||
| 387 | </thead> | ||
| 388 | <tbody> | ||
| 389 | <tr><td>Edit ▸ Find ▸ Find…</td><td><code class="verbatim">⌘F</code></td><td></td><td><code class="verbatim">SPC s s</code></td></tr> | ||
| 390 | <tr><td>Edit ▸ Find ▸ Find and Replace…</td><td><code class="verbatim">⌥⌘F</code></td><td><code class="verbatim">M-%</code></td><td></td></tr> | ||
| 391 | <tr><td>Edit ▸ Find ▸ Find Next</td><td><code class="verbatim">⌘G</code></td><td></td><td></td></tr> | ||
| 392 | <tr><td>Edit ▸ Find ▸ Find Previous</td><td><code class="verbatim">⇧⌘G</code></td><td></td><td></td></tr> | ||
| 393 | <tr><td>Edit ▸ Find ▸ Use Selection for Find</td><td><code class="verbatim">⌘E</code></td><td></td><td></td></tr> | ||
| 394 | </tbody> | ||
| 395 | </table> | ||
| 396 | <p>In Doom, <code class="verbatim">:s/PATTERN/REPLACEMENT/</code> and <code class="verbatim">:%s/…/…/</code> with the <code class="verbatim">g</code> and <code class="verbatim">i</code> flags substitute with regular expressions on the current line or in the whole file.</p> | ||
| 397 | <p>To search all your files, use the toolbar's search field; see <a href="01-files-and-folders.html">Files, folders and buffers</a>.</p> | ||
| 398 | <h2 id="accessibility">Accessibility</h2> | ||
| 399 | <p>The editor works with VoiceOver. VoiceOver reads the text as it is shown rather than as stored: hidden link brackets and targets, hidden emphasis markers and hidden stars are skipped, entities are read as the characters drawn for them, and narrowed table columns are read as drawn. Folded text is still read, so the whole file is available. Lines, the caret position and the selection are reported in terms of the shown text.</p> | ||
| 400 | <p>Other parts of the window are labelled: tabs in the tab bar are buttons, with the current one marked selected, and each close button names its buffer and says whether it is unsaved; the modeline's unsaved dot reads "Unsaved changes", and the Doom state tag reads, for example, "Normal state".</p> | ||
| 401 | <p>The editor keeps the system's keyboard navigation and text editing; the presets only add bindings. See <a href="03-keys.html">Keys and commands</a>.</p> | ||
| 402 | </main> | ||
| 403 | <footer class="site"> | ||
| 404 | © 2026 Christian Cleberg · <a href="https://krz.sh/apps/orgstar/">krz.sh/apps/orgstar</a> · <a href="/orgstar/third-party.html">third-party notices</a> | ||
| 405 | </footer> | ||
| 406 | </body> | ||
| 407 | </html>\ No newline at end of file | ||
guide/03-keys.html added +1271
| @@ -0,0 +1,1271 @@ | |||
| 1 | <!DOCTYPE html> | ||
| 2 | <html lang="en"> | ||
| 3 | <head> | ||
| 4 | <meta charset="utf-8"> | ||
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
| 6 | <title>Keys and commands · orgstar</title> | ||
| 7 | <meta name="description" content="The three key presets, prefix keys and key hints, the echo area, the command palette, Option as Meta, keymap.toml, Vim editing in the Doom preset,…"> | ||
| 8 | <link rel="icon" href="../favicon.svg" type="image/svg+xml"> | ||
| 9 | <link rel="stylesheet" href="../theme.css"> | ||
| 10 | <link rel="stylesheet" href="../syntax.css"> | ||
| 11 | <link rel="stylesheet" href="../style.css"> | ||
| 12 | </head> | ||
| 13 | <body> | ||
| 14 | <header class="site"> | ||
| 15 | <a class="site-title" href="../index.html">orgstar</a> | ||
| 16 | <nav> | ||
| 17 | <a href="../install.html">Install</a> | ||
| 18 | <a href="../quickstart.html">Quick start</a> | ||
| 19 | <a href="index.html">Manual</a> | ||
| 20 | </nav> | ||
| 21 | </header> | ||
| 22 | <main> | ||
| 23 | <h1>Keys and commands</h1> | ||
| 24 | <p class="lede">Every action in orgstar is a named command; a keymap preset decides which keys run which commands, and keymap.toml lets you change that.</p> | ||
| 25 | <nav class="toc" aria-label="On this page"> | ||
| 26 | <h2>On this page</h2> | ||
| 27 | <ul> | ||
| 28 | <li><a href="#commands-and-keymaps">Commands and keymaps</a></li> | ||
| 29 | <li><a href="#choosing-a-preset">Choosing a preset</a></li> | ||
| 30 | <li><a href="#option-as-meta">Option as Meta</a></li> | ||
| 31 | <li><a href="#how-keys-reach-commands">How keys reach commands</a> | ||
| 32 | <ul> | ||
| 33 | <li><a href="#contexts">Contexts</a></li> | ||
| 34 | <li><a href="#prefix-keys-and-key-hints">Prefix keys and key hints</a></li> | ||
| 35 | </ul></li> | ||
| 36 | <li><a href="#the-echo-area">The echo area</a></li> | ||
| 37 | <li><a href="#the-command-palette">The command palette</a></li> | ||
| 38 | <li><a href="#menu-shortcuts">Menu shortcuts</a></li> | ||
| 39 | <li><a href="#speed-keys">Speed keys</a></li> | ||
| 40 | <li><a href="#customizing-keys-keymap-toml">Customizing keys: keymap.toml</a> | ||
| 41 | <ul> | ||
| 42 | <li><a href="#format">Format</a></li> | ||
| 43 | <li><a href="#key-notation">Key notation</a></li> | ||
| 44 | <li><a href="#priority">Priority</a></li> | ||
| 45 | <li><a href="#unbinding">Unbinding</a></li> | ||
| 46 | <li><a href="#doom-states">Doom states</a></li> | ||
| 47 | <li><a href="#more-examples">More examples</a></li> | ||
| 48 | <li><a href="#reloading-and-errors">Reloading and errors</a></li> | ||
| 49 | <li><a href="#importing-from-emacs">Importing from Emacs</a></li> | ||
| 50 | </ul></li> | ||
| 51 | <li><a href="#vim-editing-doom-preset">Vim editing (Doom preset)</a> | ||
| 52 | <ul> | ||
| 53 | <li><a href="#how-keys-are-handled">How keys are handled</a></li> | ||
| 54 | <li><a href="#states">States</a></li> | ||
| 55 | <li><a href="#motions">Motions</a></li> | ||
| 56 | <li><a href="#operators">Operators</a></li> | ||
| 57 | <li><a href="#text-objects">Text objects</a></li> | ||
| 58 | <li><a href="#counts-and-registers">Counts and registers</a></li> | ||
| 59 | <li><a href="#repeat">Repeat</a></li> | ||
| 60 | <li><a href="#macros">Macros</a></li> | ||
| 61 | <li><a href="#marks-and-jumps">Marks and jumps</a></li> | ||
| 62 | <li><a href="#visual-states">Visual states</a></li> | ||
| 63 | <li><a href="#surround">Surround</a></li> | ||
| 64 | <li><a href="#commenting">Commenting</a></li> | ||
| 65 | <li><a href="#org-keys-in-normal-state">Org keys in normal state</a></li> | ||
| 66 | <li><a href="#the-leader">The leader</a></li> | ||
| 67 | <li><a href="#ex-commands">Ex commands</a></li> | ||
| 68 | <li><a href="#not-available">Not available</a></li> | ||
| 69 | </ul></li> | ||
| 70 | <li><a href="#keys-in-other-windows">Keys in other windows</a></li> | ||
| 71 | <li><a href="#ios-and-ipados">iOS and iPadOS</a></li> | ||
| 72 | <li><a href="#key-reference">Key reference</a> | ||
| 73 | <ul> | ||
| 74 | <li><a href="#movement-and-the-region">Movement and the region</a></li> | ||
| 75 | <li><a href="#editing">Editing</a></li> | ||
| 76 | <li><a href="#outline-visibility-and-narrowing">Outline: visibility and narrowing</a></li> | ||
| 77 | <li><a href="#outline-headings-and-subtrees">Outline: headings and subtrees</a></li> | ||
| 78 | <li><a href="#lists-and-checkboxes">Lists and checkboxes</a></li> | ||
| 79 | <li><a href="#todo-priority-and-tags">TODO, priority and tags</a></li> | ||
| 80 | <li><a href="#properties-and-column-view">Properties and column view</a></li> | ||
| 81 | <li><a href="#dates-and-clocking">Dates and clocking</a></li> | ||
| 82 | <li><a href="#tables">Tables</a></li> | ||
| 83 | <li><a href="#links-and-footnotes">Links and footnotes</a></li> | ||
| 84 | <li><a href="#code-blocks-and-c-c-c-c">Code blocks and C-c C-c</a></li> | ||
| 85 | <li><a href="#agenda-and-capture">Agenda and capture</a></li> | ||
| 86 | <li><a href="#export">Export</a></li> | ||
| 87 | <li><a href="#files-buffers-and-the-app">Files, buffers and the app</a></li> | ||
| 88 | <li><a href="#attachments">Attachments</a></li> | ||
| 89 | <li><a href="#notes-and-daily-notes">Notes and daily notes</a></li> | ||
| 90 | <li><a href="#unbound-commands">Unbound commands</a></li> | ||
| 91 | <li><a href="#speed-keys-reference">Speed keys reference</a></li> | ||
| 92 | </ul></li> | ||
| 93 | </ul> | ||
| 94 | </nav> | ||
| 95 | <h2 id="commands-and-keymaps">Commands and keymaps</h2> | ||
| 96 | <p>Each action has a command id such as <code class="verbatim">org.todo.cycle</code> and a title such as <em>Cycle TODO State</em>. Keys, the Org menu, the command palette and the iOS key bar all run commands by id. A keymap maps key sequences to command ids. orgstar ships three keymaps, called presets, and reads your own bindings from <code class="verbatim">keymap.toml</code> on top of the one you choose.</p> | ||
| 97 | <p>Ids starting with <code class="verbatim">org.</code> are Org commands and run only in Org files. Ids starting with <code class="verbatim">edit.</code> are text-system actions (movement, killing, find). Ids starting with <code class="verbatim">app.</code> are carried out by the app: saving, buffers, windows, export. <code class="verbatim">editor.</code> ids change how the editor behaves. The <a href="#key-reference">key reference</a> at the end of this chapter lists every bound command with its keys in each preset.</p> | ||
| 98 | <h2 id="choosing-a-preset">Choosing a preset</h2> | ||
| 99 | <p>Choose a preset in Settings ▸ General ▸ Keys, or with <code class="verbatim">keymap</code> in the <code class="verbatim">[orgstar]</code> table of <code class="verbatim">config.toml</code> (see <a href="13-configuration.html">Configuration</a>). The change applies at once.</p> | ||
| 100 | <table> | ||
| 101 | <thead> | ||
| 102 | <tr><th>Preset</th><th><code class="verbatim">config.toml</code> value</th><th>What it is</th></tr> | ||
| 103 | </thead> | ||
| 104 | <tbody> | ||
| 105 | <tr><td>Emacs</td><td><code class="verbatim">"emacs"</code></td><td>Emacs and Org keys: <code class="verbatim">C-f</code>, <code class="verbatim">C-k</code>, <code class="verbatim">C-x C-s</code>, <code class="verbatim">C-c C-t</code>, <code class="verbatim">M-RET</code>, <code class="verbatim">M-<left></code>. The default.</td></tr> | ||
| 106 | <tr><td>Mac</td><td><code class="verbatim">"mac"</code></td><td>Standard macOS text keys stay as they are. Org commands use Control-Command chords (<code class="verbatim">⌃⌘T</code>, <code class="verbatim">⌃⌘←</code>), which macOS text editing leaves free.</td></tr> | ||
| 107 | <tr><td>Doom (Vim keys)</td><td><code class="verbatim">"doom"</code></td><td>Modal editing as in Doom Emacs with evil and evil-org: normal, insert and visual states, the <code class="verbatim">SPC</code> leader and <code class="verbatim">SPC m</code> local leader, plus the Emacs preset's Org keys in every state.</td></tr> | ||
| 108 | </tbody> | ||
| 109 | </table> | ||
| 110 | <p>The Mac preset binds fewer commands than the others. <code class="verbatim">⌃⌘X</code> is its <code class="verbatim">C-c C-c</code>, <code class="verbatim">⌘K</code> inserts a link and <code class="verbatim">⇧⌘E</code> opens the export sheet; the <a href="#key-reference">key reference</a> lists the rest. It has no keys for agenda, capture or the single export formats. Run those from the Org menu, from the command palette (<code class="verbatim">⇧⌘P</code>), from a menu shortcut (Agenda <code class="verbatim">⇧⌘A</code>, Capture <code class="verbatim">⇧⌘N</code>), or bind them yourself in <code class="verbatim">keymap.toml</code>.</p> | ||
| 111 | <p>In the Emacs and Mac presets, and in Doom's insert state, macOS's own text keys keep working where the preset does not bind the key: <code class="verbatim">⌥←</code>, <code class="verbatim">⌘←</code>, <code class="verbatim">⇧</code> with arrows to select, and the Control keys the macOS text system provides (<code class="verbatim">⌃A</code>, <code class="verbatim">⌃E</code>, <code class="verbatim">⌃K</code> and so on). Menu shortcuts such as <code class="verbatim">⌘S</code> and <code class="verbatim">⌘F</code> work in every preset; see <a href="#menu-shortcuts">Menu shortcuts</a>.</p> | ||
| 112 | <h2 id="option-as-meta">Option as Meta</h2> | ||
| 113 | <p>Emacs notation writes Meta as <code class="verbatim">M-</code>. On a Mac keyboard Meta is the Option key, but Option also types characters such as <code class="verbatim">é</code> and <code class="verbatim">ø</code>. Settings ▸ General ▸ Option as Meta picks which Option keys act as Meta:</p> | ||
| 114 | <table> | ||
| 115 | <thead> | ||
| 116 | <tr><th>Choice</th><th><code class="verbatim">config.toml</code> (<code class="verbatim">option-as-meta</code> in <code class="verbatim">[orgstar]</code>)</th><th>Effect</th></tr> | ||
| 117 | </thead> | ||
| 118 | <tbody> | ||
| 119 | <tr><td>Left Option</td><td><code class="verbatim">"left"</code></td><td>The left Option key is Meta; the right one types characters. The default.</td></tr> | ||
| 120 | <tr><td>Right Option</td><td><code class="verbatim">"right"</code></td><td>The right Option key is Meta.</td></tr> | ||
| 121 | <tr><td>Both</td><td><code class="verbatim">"both"</code></td><td>Both are Meta; Option no longer types special characters in the editor.</td></tr> | ||
| 122 | <tr><td>Neither</td><td><code class="verbatim">"none"</code></td><td>Option always types characters. Plain <code class="verbatim">M-</code> keys such as <code class="verbatim">M-f</code> cannot be typed; chords that also use Control or Command still work.</td></tr> | ||
| 123 | </tbody> | ||
| 124 | </table> | ||
| 125 | <p>Option pressed together with Control or Command always counts as Meta, whatever this setting says, so chords such as <code class="verbatim">C-M-i</code> (<code class="verbatim">⌃⌥I</code>) and the Mac preset's <code class="verbatim">⌃⌥⌘←</code> always work.</p> | ||
| 126 | <h2 id="how-keys-reach-commands">How keys reach commands</h2> | ||
| 127 | <h3 id="contexts">Contexts</h3> | ||
| 128 | <p>One key can run different commands depending on where the caret is. In the Emacs preset <code class="verbatim">M-<right></code> demotes a heading, indents a list item and moves a table column right. Each binding can name a context, and orgstar tries the bindings for a key from the highest priority down. The first one whose context holds and whose command can run at the caret wins.</p> | ||
| 129 | <table> | ||
| 130 | <thead> | ||
| 131 | <tr><th>Context</th><th>Holds when</th></tr> | ||
| 132 | </thead> | ||
| 133 | <tbody> | ||
| 134 | <tr><td><code class="verbatim">heading</code></td><td>The caret is on a heading line.</td></tr> | ||
| 135 | <tr><td><code class="verbatim">item</code></td><td>The caret is inside a list item.</td></tr> | ||
| 136 | <tr><td><code class="verbatim">table</code></td><td>The caret is inside a table.</td></tr> | ||
| 137 | <tr><td><code class="verbatim">tblfm</code></td><td>The caret is on a <code class="verbatim">#+TBLFM:</code> line.</td></tr> | ||
| 138 | <tr><td><code class="verbatim">timestamp</code></td><td>The caret is on a timestamp.</td></tr> | ||
| 139 | <tr><td><code class="verbatim">property</code></td><td>The caret is on a property line in a property drawer.</td></tr> | ||
| 140 | <tr><td><code class="verbatim">src</code></td><td>The caret is inside a src block.</td></tr> | ||
| 141 | <tr><td><code class="verbatim">dblock</code></td><td>The caret is on the <code class="verbatim">#+BEGIN:</code> line of a dynamic block.</td></tr> | ||
| 142 | <tr><td><code class="verbatim">fold-line</code></td><td>The caret is on the first or last line of a drawer or block, where <code class="verbatim">TAB</code> folds it.</td></tr> | ||
| 143 | <tr><td><code class="verbatim">region</code></td><td>Text is selected.</td></tr> | ||
| 144 | <tr><td><code class="verbatim">speed</code></td><td>Speed keys are on, nothing is selected, and the caret is at the very start of a heading line. See <a href="04-outlines.html#speed-keys">Speed keys</a>.</td></tr> | ||
| 145 | </tbody> | ||
| 146 | </table> | ||
| 147 | <p>When no binding for a key applies:</p> | ||
| 148 | <ul> | ||
| 149 | <li>In the Emacs and Mac presets, a single key goes to the text system and does what it normally does. <code class="verbatim">TAB</code> outside a heading, drawer edge or table types a tab; <code class="verbatim">S-<right></code> on plain text extends the selection.</li> | ||
| 150 | <li>A key sequence of two or more keys runs its highest-priority command anyway, so you see that command's message (for example "Not on a heading").</li> | ||
| 151 | <li>In the Doom preset the keys go on to the Vim engine (see <a href="#vim-editing-doom-preset">Vim editing</a>).</li> | ||
| 152 | </ul> | ||
| 153 | <p>In a file that is not an Org file, <code class="verbatim">org.</code> commands never apply, so their keys fall through as above.</p> | ||
| 154 | <h3 id="prefix-keys-and-key-hints">Prefix keys and key hints</h3> | ||
| 155 | <p>A prefix is a key that starts longer sequences, such as <code class="verbatim">C-c</code>, <code class="verbatim">C-c C-x</code>, <code class="verbatim">C-x n</code> or, in the Doom preset, <code class="verbatim">SPC</code> and <code class="verbatim">SPC m</code>. After a prefix, orgstar waits for the next key and shows the keys typed so far in the echo area, followed by a dash: <code class="verbatim">C-c C-x-</code>.</p> | ||
| 156 | <p>If you pause on a prefix for 0.6 seconds, a panel of key hints opens above the echo area. It lists each key that can follow, sorted by key, with the title of the command it runs, or <code class="verbatim">+prefix</code> when it leads to a longer sequence. This is orgstar's version of <code class="verbatim">which-key</code>. The hints follow the current keymap, including your <code class="verbatim">keymap.toml</code>, and in the Doom preset the current evil state. When a key has several contexts (<code class="verbatim">C-c C-c</code> is the common case), the hint shows the command that would run at the caret; where none of them applies, it shows the highest-priority one.</p> | ||
| 157 | <p><code class="verbatim">C-g</code> during a prefix cancels it; in the Emacs and Mac presets the echo area shows <code class="verbatim">Quit</code>. A sequence that nothing binds shows, for example, <code class="verbatim">C-c z is undefined</code> and does nothing. In the Doom preset this holds for sequences that start with <code class="verbatim">SPC</code> or with a Control or Meta key; see <a href="#how-keys-are-handled">How keys are handled</a> for the others.</p> | ||
| 158 | <p>A key bound by itself cannot also be a prefix. When a keymap binds both <code class="verbatim">C-c</code> and <code class="verbatim">C-c C-t</code>, <code class="verbatim">C-c</code> always waits for the next key, so the binding for <code class="verbatim">C-c</code> alone never runs.</p> | ||
| 159 | <h2 id="the-echo-area">The echo area</h2> | ||
| 160 | <p>The echo area is the line at the bottom of the window, below the modeline. It shows, in order of priority:</p> | ||
| 161 | <ul> | ||
| 162 | <li>A question a command is asking, with a text field: a refile target, a date, a property value, a sparse-tree match, a Vim search or ex command. <code class="verbatim">Return</code> answers, <code class="verbatim">Esc</code> cancels. When the question has choices, they are listed above the field and filtered as you type with fuzzy matching; <code class="verbatim">Tab</code> completes the best match. Date questions show a calendar, and <code class="verbatim">S-<left></code>, <code class="verbatim">S-<right></code>, <code class="verbatim">S-<up></code> and <code class="verbatim">S-<down></code> move the date by a day or a week, as in <code class="verbatim">org-read-date</code>.</li> | ||
| 163 | <li>Fast selection for TODO keywords and tags when the file defines keys for them (see <a href="05-todos-and-tags.html">TODOs and tags</a>).</li> | ||
| 164 | <li>The pending prefix, such as <code class="verbatim">C-c C-x-</code>.</li> | ||
| 165 | <li>The last message from a command or from the keymap, for four seconds.</li> | ||
| 166 | </ul> | ||
| 167 | <p>In the Doom preset the modeline shows the evil state as a tag: <code class="verbatim">NORMAL</code>, <code class="verbatim">INSERT</code>, <code class="verbatim">VISUAL</code>, <code class="verbatim">V-LINE</code> or <code class="verbatim">V-BLOCK</code>. See <a href="02-the-editor.html">The editor</a> for the rest of the modeline.</p> | ||
| 168 | <h2 id="the-command-palette">The command palette</h2> | ||
| 169 | <p>The palette lists every command by title with its keys in the current keymap. Open it with:</p> | ||
| 170 | <ul> | ||
| 171 | <li><code class="verbatim">⇧⌘P</code> or File ▸ Command Palette… in every preset,</li> | ||
| 172 | <li><code class="verbatim">M-x</code> in the Emacs and Doom presets (<code class="verbatim">execute-extended-command</code>),</li> | ||
| 173 | <li><code class="verbatim">SPC :</code> in Doom normal state.</li> | ||
| 174 | </ul> | ||
| 175 | <p>Type part of a title; matching is fuzzy and the best matches come first. <code class="verbatim">Return</code> runs the top match, a click runs any row, and <code class="verbatim">Esc</code> closes the palette. Each row shows up to two key sequences; in the Doom preset these are normal-state keys first, then insert-state keys.</p> | ||
| 176 | <p>The palette leaves out text-system movement and editing commands (Forward Character, Kill Line, Set Mark and the like), which only make sense from keys. Every other command is in it, including the ones no preset binds, such as Show or Hide Backlinks, Import Table from File…, Recovery Versions… and Delete Property…. The Mac App Store version leaves out the Emacs exports and Attach File as Hard Link… and as Symbolic Link…; a key bound to Export to PDF with Emacs runs Export to PDF. Commands that cannot run at the caret show a message instead.</p> | ||
| 177 | <p>The Org menu in the menu bar lists every <code class="verbatim">org.</code> command with its keys in the current keymap, and is a way to find a key without the palette. Its Clock submenu lists the clock commands the same way, followed by the recently clocked entries.</p> | ||
| 178 | <h2 id="menu-shortcuts">Menu shortcuts</h2> | ||
| 179 | <p>These come from the menu bar and work in every preset. In the Doom preset, keys with <code class="verbatim">⌘</code> always go to the menus.</p> | ||
| 180 | <table> | ||
| 181 | <thead> | ||
| 182 | <tr><th>Menu</th><th>Item</th><th>Key</th></tr> | ||
| 183 | </thead> | ||
| 184 | <tbody> | ||
| 185 | <tr><td>orgstar</td><td>Settings…</td><td><code class="verbatim">⌘,</code></td></tr> | ||
| 186 | <tr><td>orgstar</td><td>Edit Config File</td><td><code class="verbatim">⌥⌘,</code></td></tr> | ||
| 187 | <tr><td>File</td><td>Add Folder…</td><td><code class="verbatim">⇧⌘O</code></td></tr> | ||
| 188 | <tr><td>File</td><td>Quick Open…</td><td><code class="verbatim">⌘P</code></td></tr> | ||
| 189 | <tr><td>File</td><td>Command Palette…</td><td><code class="verbatim">⇧⌘P</code></td></tr> | ||
| 190 | <tr><td>File</td><td>Capture…</td><td><code class="verbatim">⇧⌘N</code></td></tr> | ||
| 191 | <tr><td>File</td><td>Close Buffer (closes other windows themselves)</td><td><code class="verbatim">⌘W</code></td></tr> | ||
| 192 | <tr><td>File</td><td>Close Window</td><td><code class="verbatim">⇧⌘W</code></td></tr> | ||
| 193 | <tr><td>File</td><td>Save</td><td><code class="verbatim">⌘S</code></td></tr> | ||
| 194 | <tr><td>File</td><td>Save All</td><td><code class="verbatim">⌥⌘S</code></td></tr> | ||
| 195 | <tr><td>Edit ▸ Find</td><td>Find…</td><td><code class="verbatim">⌘F</code></td></tr> | ||
| 196 | <tr><td>Edit ▸ Find</td><td>Find and Replace…</td><td><code class="verbatim">⌥⌘F</code></td></tr> | ||
| 197 | <tr><td>Edit ▸ Find</td><td>Find Next</td><td><code class="verbatim">⌘G</code></td></tr> | ||
| 198 | <tr><td>Edit ▸ Find</td><td>Find Previous</td><td><code class="verbatim">⇧⌘G</code></td></tr> | ||
| 199 | <tr><td>Edit ▸ Find</td><td>Use Selection for Find</td><td><code class="verbatim">⌘E</code></td></tr> | ||
| 200 | <tr><td>Edit</td><td>Cancel Running Task</td><td><code class="verbatim">⌘.</code></td></tr> | ||
| 201 | <tr><td>Edit</td><td>Search Notes</td><td><code class="verbatim">⇧⌘F</code></td></tr> | ||
| 202 | <tr><td>View</td><td>Show Markup</td><td><code class="verbatim">⇧⌘M</code></td></tr> | ||
| 203 | <tr><td>View</td><td>Show Line Numbers</td><td><code class="verbatim">⇧⌘L</code></td></tr> | ||
| 204 | <tr><td>View</td><td>Split Pane Below</td><td><code class="verbatim">⌃⌘2</code></td></tr> | ||
| 205 | <tr><td>View</td><td>Split Pane Right</td><td><code class="verbatim">⌃⌘3</code></td></tr> | ||
| 206 | <tr><td>View</td><td>Close Pane</td><td><code class="verbatim">⌃⌘0</code></td></tr> | ||
| 207 | <tr><td>View</td><td>Close Other Panes</td><td><code class="verbatim">⌃⌘1</code></td></tr> | ||
| 208 | <tr><td>View</td><td>Next Pane</td><td><code class="verbatim">⌥⌘`</code></td></tr> | ||
| 209 | <tr><td>View</td><td>Show or Hide Outline</td><td><code class="verbatim">⌥⌘O</code></td></tr> | ||
| 210 | <tr><td>View</td><td>Show or Hide Columns and Clock</td><td><code class="verbatim">⌥⌘I</code></td></tr> | ||
| 211 | <tr><td>Window</td><td>Agenda</td><td><code class="verbatim">⇧⌘A</code></td></tr> | ||
| 212 | <tr><td>Window</td><td>Board</td><td><code class="verbatim">⇧⌘B</code></td></tr> | ||
| 213 | <tr><td>Window</td><td>Next Buffer</td><td><code class="verbatim">⇧⌘]</code></td></tr> | ||
| 214 | <tr><td>Window</td><td>Previous Buffer</td><td><code class="verbatim">⇧⌘[</code></td></tr> | ||
| 215 | <tr><td>File</td><td>New Window</td><td><code class="verbatim">⌥⌘N</code></td></tr> | ||
| 216 | </tbody> | ||
| 217 | </table> | ||
| 218 | <p>View ▸ Show or Hide Backlinks and Show Tab Bar, Window ▸ Switch to Buffer…, and the items of File ▸ Export have no shortcut.</p> | ||
| 219 | <p>With Settings ▸ Capture ▸ "⌃⌥Space opens Capture from any app" on (the default), <code class="verbatim">⌃⌥Space</code> opens the Capture window from any application (see <a href="08-capture.html">Capture</a>).</p> | ||
| 220 | <h2 id="speed-keys">Speed keys</h2> | ||
| 221 | <p>With Settings ▸ Editing ▸ Speed keys on (<code class="verbatim">org-use-speed-commands</code> in <code class="verbatim">config.toml</code>), single letters typed at the very start of a heading line, before the stars, run commands instead of inserting text (<code class="verbatim">org-speed-commands</code>). Anywhere else the letters type as usual. The setting is off by default.</p> | ||
| 222 | <p>Speed keys work in the Emacs and Mac presets, and in the Doom preset in insert state. The full list is in the <a href="#speed-keys-reference">speed keys reference</a>.</p> | ||
| 223 | <h2 id="customizing-keys-keymap-toml">Customizing keys: keymap.toml</h2> | ||
| 224 | <p>Your own bindings go in <code class="verbatim">keymap.toml</code> in the configuration folder: <code class="verbatim">$XDG_CONFIG_HOME/orgstar/keymap.toml</code> when <code class="verbatim">XDG_CONFIG_HOME</code> is set, otherwise <code class="verbatim">~/.config/orgstar/keymap.toml</code>. The Mac App Store version uses its own configuration folder (see <a href="13-configuration.html">Configuration</a>). Settings ▸ General shows the path under the Keys picker. The file does not exist until you create it. If you used an earlier version that kept it in <code class="verbatim">~/Library/Application Support/Orgstar/</code>, that copy is read, and reloaded when you save it, until one exists in the configuration folder.</p> | ||
| 225 | <p>The bindings in the file are layered on top of the chosen preset. They apply to whichever preset is chosen, so a file written for the Emacs preset does nothing useful under Doom unless its bindings name a <code class="verbatim">mode</code>.</p> | ||
| 226 | <h3 id="format">Format</h3> | ||
| 227 | <p>The file is a list of <code class="verbatim">[[bind]]</code> tables, one per binding:</p> | ||
| 228 | <pre><code class="language-toml highlight"><span class="source toml"><span class="comment line number-sign toml"><span class="punctuation definition comment toml">#</span> C-c t cycles the TODO keyword. | ||
| 229 | </span><span class="punctuation definition table array toml">[[</span><span class="entity name section toml">bind</span><span class="punctuation definition table array toml">]]</span> | ||
| 230 | <span class="variable other key toml">keys</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>C-c t<span class="punctuation definition string end toml">"</span></span> | ||
| 231 | <span class="variable other key toml">command</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>org.todo.cycle<span class="punctuation definition string end toml">"</span></span></span></code></pre> | ||
| 232 | <table> | ||
| 233 | <thead> | ||
| 234 | <tr><th>Field</th><th>Required</th><th>Meaning</th></tr> | ||
| 235 | </thead> | ||
| 236 | <tbody> | ||
| 237 | <tr><td><code class="verbatim">keys</code></td><td>yes</td><td>The key sequence, in Emacs notation, chords separated by spaces.</td></tr> | ||
| 238 | <tr><td><code class="verbatim">command</code></td><td>yes</td><td>A command id, or <code class="verbatim">"none"</code> to unbind.</td></tr> | ||
| 239 | <tr><td><code class="verbatim">when</code></td><td>no</td><td>A context from the table in <a href="#contexts">Contexts</a>. Without it the binding holds everywhere.</td></tr> | ||
| 240 | <tr><td><code class="verbatim">mode</code></td><td>no</td><td>An evil state for the Doom preset: <code class="verbatim">"normal"</code>, <code class="verbatim">"insert"</code> or <code class="verbatim">"visual"</code>.</td></tr> | ||
| 241 | </tbody> | ||
| 242 | </table> | ||
| 243 | <p>The <a href="#key-reference">key reference</a> gives each command's id after its title. Commands no preset binds are listed under <a href="#unbound-commands">Unbound commands</a>. A binding whose command id orgstar does not know is skipped and reported when the file loads (see <a href="#reloading-and-errors">Reloading and errors</a>).</p> | ||
| 244 | <p>orgstar reads a subset of TOML: <code class="verbatim">[[bind]]</code> headers, <code class="verbatim">key = value</code> lines, basic <code class="verbatim">"..."</code> and literal <code class="verbatim">'...'</code> strings, <code class="verbatim">true</code> and <code class="verbatim">false</code>, integers, and <code class="verbatim">#</code> comments. Arrays, inline tables and multi-line strings are not supported.</p> | ||
| 245 | <h3 id="key-notation">Key notation</h3> | ||
| 246 | <table> | ||
| 247 | <thead> | ||
| 248 | <tr><th>Notation</th><th>Key</th></tr> | ||
| 249 | </thead> | ||
| 250 | <tbody> | ||
| 251 | <tr><td><code class="verbatim">C-</code></td><td>Control (<code class="verbatim">⌃</code>)</td></tr> | ||
| 252 | <tr><td><code class="verbatim">M-</code></td><td>Meta: Option (<code class="verbatim">⌥</code>), as set in <a href="#option-as-meta">Option as Meta</a></td></tr> | ||
| 253 | <tr><td><code class="verbatim">S-</code></td><td>Shift (<code class="verbatim">⇧</code>)</td></tr> | ||
| 254 | <tr><td><code class="verbatim">s-</code></td><td>Command (<code class="verbatim">⌘</code>)</td></tr> | ||
| 255 | <tr><td><code class="verbatim">a</code>, <code class="verbatim">%</code>, <code class="verbatim">/</code></td><td>A single character</td></tr> | ||
| 256 | <tr><td><code class="verbatim">TAB</code>, <code class="verbatim">RET</code>, <code class="verbatim">SPC</code>, <code class="verbatim">ESC</code>, <code class="verbatim">DEL</code></td><td>Tab, Return, Space, Escape, Delete (backspace)</td></tr> | ||
| 257 | <tr><td><code class="verbatim"><left></code>, <code class="verbatim"><right></code>, <code class="verbatim"><up></code>, <code class="verbatim"><down></code></td><td>Arrow keys</td></tr> | ||
| 258 | <tr><td><code class="verbatim"><home></code>, <code class="verbatim"><end></code>, <code class="verbatim"><prior></code>, <code class="verbatim"><next></code></td><td>Home, End, Page Up, Page Down</td></tr> | ||
| 259 | <tr><td><code class="verbatim"><delete></code></td><td>Forward delete (<code class="verbatim">⌦</code>)</td></tr> | ||
| 260 | <tr><td><code class="verbatim"><f1></code> to <code class="verbatim"><f12></code></td><td>Function keys</td></tr> | ||
| 261 | </tbody> | ||
| 262 | </table> | ||
| 263 | <p>Modifiers combine: <code class="verbatim">C-M-s-<left></code> is <code class="verbatim">⌃⌥⌘←</code>. <code class="verbatim"><tab></code>, <code class="verbatim"><return></code>, <code class="verbatim"><escape></code> and <code class="verbatim"><backspace></code> are accepted as other names for <code class="verbatim">TAB</code>, <code class="verbatim">RET</code>, <code class="verbatim">ESC</code> and <code class="verbatim">DEL</code>, and <code class="verbatim"><backtab></code> for <code class="verbatim">S-TAB</code>.</p> | ||
| 264 | <p>Shift with a letter is written as the capital letter: <code class="verbatim">S-a</code> and <code class="verbatim">A</code> are the same key, and so are <code class="verbatim">C-S-h</code> and <code class="verbatim">C-H</code>. With other keys Shift stays a modifier: <code class="verbatim">S-TAB</code>, <code class="verbatim">S-<up></code>, <code class="verbatim">M-S-RET</code>.</p> | ||
| 265 | <p>A backslash in a basic string must be doubled. These two lines are the same key, <code class="verbatim">⌃⌘\</code>:</p> | ||
| 266 | <pre><code class="language-toml highlight"><span class="source toml"><span class="variable other key toml">keys</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>C-s-<span class="constant character escape toml">\\</span><span class="punctuation definition string end toml">"</span></span> | ||
| 267 | <span class="variable other key toml">keys</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted single toml"><span class="punctuation definition string begin toml">'</span>C-s-\<span class="punctuation definition string end toml">'</span></span></span></code></pre> | ||
| 268 | <h3 id="priority">Priority</h3> | ||
| 269 | <p>Bindings are read in order: the preset first, then your file from top to bottom. When several bindings have the same keys, later ones are tried first. A binding in your file without <code class="verbatim">when</code> therefore takes its keys everywhere, hiding every context-specific preset binding for them. A binding with <code class="verbatim">when</code> is tried first only in its context; elsewhere the preset's bindings still apply.</p> | ||
| 270 | <pre><code class="language-toml highlight"><span class="source toml"><span class="comment line number-sign toml"><span class="punctuation definition comment toml">#</span> M-RET in a table inserts a row; on headings and items it does what the preset says. | ||
| 271 | </span><span class="punctuation definition table array toml">[[</span><span class="entity name section toml">bind</span><span class="punctuation definition table array toml">]]</span> | ||
| 272 | <span class="variable other key toml">keys</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>M-RET<span class="punctuation definition string end toml">"</span></span> | ||
| 273 | <span class="variable other key toml">command</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>org.table.insert-row<span class="punctuation definition string end toml">"</span></span> | ||
| 274 | <span class="variable other key toml">when</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>table<span class="punctuation definition string end toml">"</span></span></span></code></pre> | ||
| 275 | <h3 id="unbinding">Unbinding</h3> | ||
| 276 | <p>Set <code class="verbatim">command</code> to <code class="verbatim">"none"</code> to remove a key. A <code class="verbatim">"none"</code> binding without <code class="verbatim">when</code> hides every earlier binding of exactly those keys, so the key goes to the text system (or, in the Doom preset, to Vim):</p> | ||
| 277 | <pre><code class="language-toml highlight"><span class="source toml"><span class="comment line number-sign toml"><span class="punctuation definition comment toml">#</span> Leave C-t to macOS's transpose and C-k to its kill. | ||
| 278 | </span><span class="punctuation definition table array toml">[[</span><span class="entity name section toml">bind</span><span class="punctuation definition table array toml">]]</span> | ||
| 279 | <span class="variable other key toml">keys</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>C-t<span class="punctuation definition string end toml">"</span></span> | ||
| 280 | <span class="variable other key toml">command</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>none<span class="punctuation definition string end toml">"</span></span> | ||
| 281 | <span class="punctuation definition table array toml">[[</span><span class="entity name section toml">bind</span><span class="punctuation definition table array toml">]]</span> | ||
| 282 | <span class="variable other key toml">keys</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>C-k<span class="punctuation definition string end toml">"</span></span> | ||
| 283 | <span class="variable other key toml">command</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>none<span class="punctuation definition string end toml">"</span></span></span></code></pre> | ||
| 284 | <p>Limitations:</p> | ||
| 285 | <ul> | ||
| 286 | <li>A <code class="verbatim">"none"</code> binding with <code class="verbatim">when</code> has no effect. You cannot unbind a key in one context only; bind it to another command in that context instead.</li> | ||
| 287 | <li>Unbinding a prefix does not remove the longer sequences under it. Unbinding <code class="verbatim">C-c C-x</code> leaves <code class="verbatim">C-c C-x C-i</code> and the rest working. Unbind each sequence you want gone.</li> | ||
| 288 | </ul> | ||
| 289 | <h3 id="doom-states">Doom states</h3> | ||
| 290 | <p>In the Doom preset every binding belongs to a state. A binding without <code class="verbatim">mode</code> never runs in the Doom preset, and a binding with <code class="verbatim">mode</code> never runs in the Emacs or Mac preset. <code class="verbatim">mode = "visual"</code> covers visual, visual-line and visual-block. To bind a key in more than one state, write one table per state:</p> | ||
| 291 | <pre><code class="language-toml highlight"><span class="source toml"><span class="comment line number-sign toml"><span class="punctuation definition comment toml">#</span> SPC n a opens the agenda. | ||
| 292 | </span><span class="punctuation definition table array toml">[[</span><span class="entity name section toml">bind</span><span class="punctuation definition table array toml">]]</span> | ||
| 293 | <span class="variable other key toml">keys</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>SPC n a<span class="punctuation definition string end toml">"</span></span> | ||
| 294 | <span class="variable other key toml">command</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>app.agenda<span class="punctuation definition string end toml">"</span></span> | ||
| 295 | <span class="variable other key toml">mode</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>normal<span class="punctuation definition string end toml">"</span></span> | ||
| 296 | |||
| 297 | <span class="comment line number-sign toml"><span class="punctuation definition comment toml">#</span> C-c n inserts a heading in normal and insert state. | ||
| 298 | </span><span class="punctuation definition table array toml">[[</span><span class="entity name section toml">bind</span><span class="punctuation definition table array toml">]]</span> | ||
| 299 | <span class="variable other key toml">keys</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>C-c n<span class="punctuation definition string end toml">"</span></span> | ||
| 300 | <span class="variable other key toml">command</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>org.heading.insert<span class="punctuation definition string end toml">"</span></span> | ||
| 301 | <span class="variable other key toml">mode</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>normal<span class="punctuation definition string end toml">"</span></span> | ||
| 302 | <span class="punctuation definition table array toml">[[</span><span class="entity name section toml">bind</span><span class="punctuation definition table array toml">]]</span> | ||
| 303 | <span class="variable other key toml">keys</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>C-c n<span class="punctuation definition string end toml">"</span></span> | ||
| 304 | <span class="variable other key toml">command</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>org.heading.insert<span class="punctuation definition string end toml">"</span></span> | ||
| 305 | <span class="variable other key toml">mode</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>insert<span class="punctuation definition string end toml">"</span></span></span></code></pre> | ||
| 306 | <p>A <code class="verbatim">mode</code> other than <code class="verbatim">normal</code>, <code class="verbatim">insert</code> or <code class="verbatim">visual</code> (including <code class="verbatim">visual-line</code>) is reported when the file loads, and the binding is skipped.</p> | ||
| 307 | <h3 id="more-examples">More examples</h3> | ||
| 308 | <pre><code class="language-toml highlight"><span class="source toml"><span class="comment line number-sign toml"><span class="punctuation definition comment toml">#</span> Mac preset: ⌃⌘U goes up to the parent heading, ⌃⌘R opens column view, ⌃⌘; toggles COMMENT. | ||
| 309 | </span><span class="punctuation definition table array toml">[[</span><span class="entity name section toml">bind</span><span class="punctuation definition table array toml">]]</span> | ||
| 310 | <span class="variable other key toml">keys</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>C-s-u<span class="punctuation definition string end toml">"</span></span> | ||
| 311 | <span class="variable other key toml">command</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>org.heading.up<span class="punctuation definition string end toml">"</span></span> | ||
| 312 | <span class="punctuation definition table array toml">[[</span><span class="entity name section toml">bind</span><span class="punctuation definition table array toml">]]</span> | ||
| 313 | <span class="variable other key toml">keys</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>C-s-r<span class="punctuation definition string end toml">"</span></span> | ||
| 314 | <span class="variable other key toml">command</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>org.columns<span class="punctuation definition string end toml">"</span></span> | ||
| 315 | <span class="punctuation definition table array toml">[[</span><span class="entity name section toml">bind</span><span class="punctuation definition table array toml">]]</span> | ||
| 316 | <span class="variable other key toml">keys</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>C-s-;<span class="punctuation definition string end toml">"</span></span> | ||
| 317 | <span class="variable other key toml">command</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>org.heading.toggle-comment<span class="punctuation definition string end toml">"</span></span> | ||
| 318 | |||
| 319 | <span class="comment line number-sign toml"><span class="punctuation definition comment toml">#</span> Emacs preset: C-c b opens the board, C-c r reloads this file. | ||
| 320 | </span><span class="punctuation definition table array toml">[[</span><span class="entity name section toml">bind</span><span class="punctuation definition table array toml">]]</span> | ||
| 321 | <span class="variable other key toml">keys</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>C-c b<span class="punctuation definition string end toml">"</span></span> | ||
| 322 | <span class="variable other key toml">command</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>app.board<span class="punctuation definition string end toml">"</span></span> | ||
| 323 | <span class="punctuation definition table array toml">[[</span><span class="entity name section toml">bind</span><span class="punctuation definition table array toml">]]</span> | ||
| 324 | <span class="variable other key toml">keys</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>C-c r<span class="punctuation definition string end toml">"</span></span> | ||
| 325 | <span class="variable other key toml">command</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>app.reload-keymap<span class="punctuation definition string end toml">"</span></span> | ||
| 326 | </span></code></pre> | ||
| 327 | <h3 id="reloading-and-errors">Reloading and errors</h3> | ||
| 328 | <p>orgstar watches the configuration folder and reloads <code class="verbatim">keymap.toml</code> when you save it. It also reloads when you change the preset, and when you run Reload Keymap (<code class="verbatim">app.reload-keymap</code>, in the palette, and <code class="verbatim">SPC h r r</code> in Doom normal state), which shows <code class="verbatim">Keymap reloaded</code>.</p> | ||
| 329 | <p>Problems are reported in the echo area with the line number, for example <code class="verbatim">keymap.toml: line 12: unknown context tabel (and 1 more)</code>. A binding with bad or missing <code class="verbatim">keys</code>, a missing <code class="verbatim">command</code>, a command id orgstar does not know, an unknown <code class="verbatim">when</code> or <code class="verbatim">mode</code>, or a table other than <code class="verbatim">[[bind]]</code> is skipped; the rest of the file still applies. A file that is not valid TOML is ignored as a whole and the error is shown; the preset alone applies until you fix it.</p> | ||
| 330 | <h3 id="importing-from-emacs">Importing from Emacs</h3> | ||
| 331 | <p>Settings ▸ General ▸ Import from Emacs… reads your Emacs or Doom configuration and offers, among other things, the key bindings it finds: <code class="verbatim">global-set-key</code>, <code class="verbatim">keymap-global-set</code>, <code class="verbatim">define-key</code>, <code class="verbatim">keymap-set</code>, <code class="verbatim">evil-define-key</code> and Doom's <code class="verbatim">map!</code> with <code class="verbatim">:leader</code>, <code class="verbatim">:localleader</code>, state keywords and <code class="verbatim">:prefix</code>. Bindings to commands orgstar has are appended to <code class="verbatim">keymap.toml</code> under a <code class="verbatim"># Imported from Emacs.</code> comment, leaving out bindings the file already has. Keys written as vectors, such as <code class="verbatim">[f5]</code>, are skipped. See <a href="15-alongside-emacs.html">Alongside Emacs</a>.</p> | ||
| 332 | <h2 id="vim-editing-doom-preset">Vim editing (Doom preset)</h2> | ||
| 333 | <p>The Doom preset edits modally, as Doom Emacs does with <code class="verbatim">evil</code>, <code class="verbatim">evil-org</code>, <code class="verbatim">evil-surround</code>, <code class="verbatim">evil-snipe</code> and <code class="verbatim">evil-nerd-commenter</code>. orgstar implements these itself; none of them are Emacs packages running inside it. The caret is a block in normal and visual states and a bar in insert state, and the modeline shows the state.</p> | ||
| 334 | <h3 id="how-keys-are-handled">How keys are handled</h3> | ||
| 335 | <p>Each key goes first to the keymap for the current state, then to the Vim engine:</p> | ||
| 336 | <ol> | ||
| 337 | <li>Keys with <code class="verbatim">⌘</code> go to the menus.</li> | ||
| 338 | <li>If a Vim command is half typed (after <code class="verbatim">d</code>, <code class="verbatim">"a</code>, <code class="verbatim">3</code> and so on), the key goes to Vim.</li> | ||
| 339 | <li>Otherwise the keymap gets the key. A prefix such as <code class="verbatim">SPC</code>, <code class="verbatim">g</code>, <code class="verbatim">z</code>, <code class="verbatim">[</code>, <code class="verbatim">]</code>, <code class="verbatim">C-c</code> or <code class="verbatim">C-x</code> waits for the next key, with key hints as described above. A complete sequence runs its command if the binding's context holds and the command can run at the caret.</li> | ||
| 340 | <li>Anything the keymap does not take goes to Vim, as typed. In insert state, keys Vim does not handle are typed as text.</li> | ||
| 341 | </ol> | ||
| 342 | <p>Two consequences:</p> | ||
| 343 | <ul> | ||
| 344 | <li>Keymap commands do not take counts or registers. Once you type a count or a register, the following keys go straight to Vim.</li> | ||
| 345 | <li>A sequence the keymap does not complete after <code class="verbatim">SPC</code>, <code class="verbatim">C-c</code>, <code class="verbatim">C-x</code> or another Control or Meta prefix is undefined: the echo area shows, for example, <code class="verbatim">SPC j is undefined</code>, and nothing runs. After <code class="verbatim">g</code>, <code class="verbatim">z</code>, <code class="verbatim">[</code> or <code class="verbatim">]</code>, which are Vim prefixes too, the keys are replayed into Vim, so <code class="verbatim">gu</code> and <code class="verbatim">gq</code> reach the Vim engine although the keymap binds other <code class="verbatim">g</code> keys.</li> | ||
| 346 | </ul> | ||
| 347 | <h3 id="states">States</h3> | ||
| 348 | <table> | ||
| 349 | <thead> | ||
| 350 | <tr><th>State</th><th>Enter with</th><th>Leave with</th></tr> | ||
| 351 | </thead> | ||
| 352 | <tbody> | ||
| 353 | <tr><td>Normal</td><td><code class="verbatim">ESC</code>, <code class="verbatim">C-[</code> or <code class="verbatim">C-g</code> from insert state; <code class="verbatim">ESC</code> from visual</td><td>—</td></tr> | ||
| 354 | <tr><td>Insert</td><td><code class="verbatim">i</code>, <code class="verbatim">a</code>, <code class="verbatim">I</code>, <code class="verbatim">A</code>, <code class="verbatim">o</code>, <code class="verbatim">O</code>, <code class="verbatim">c</code> commands, <code class="verbatim">cc</code>, <code class="verbatim">C</code>, block <code class="verbatim">I</code>, <code class="verbatim">A</code>, <code class="verbatim">c</code></td><td><code class="verbatim">ESC</code>, <code class="verbatim">C-[</code>, <code class="verbatim">C-g</code></td></tr> | ||
| 355 | <tr><td>Visual</td><td><code class="verbatim">v</code></td><td><code class="verbatim">v</code>, <code class="verbatim">ESC</code></td></tr> | ||
| 356 | <tr><td>Visual line</td><td><code class="verbatim">V</code></td><td><code class="verbatim">V</code>, <code class="verbatim">ESC</code></td></tr> | ||
| 357 | <tr><td>Visual block</td><td><code class="verbatim">C-v</code></td><td><code class="verbatim">C-v</code>, <code class="verbatim">ESC</code></td></tr> | ||
| 358 | </tbody> | ||
| 359 | </table> | ||
| 360 | <p>Leaving insert state moves the caret back one character, as in Vim. A mouse click leaves visual state. In the keymap, <code class="verbatim">"visual"</code> is the state name for all three visual states.</p> | ||
| 361 | <p>In insert state, <code class="verbatim">C-w</code> deletes the word before the caret and <code class="verbatim">C-u</code> deletes back to the line's indentation (or to the start of the line when the caret is already there). The rest of insert state is the Emacs preset's Org keys, the Doom insert-state keys in the reference (<code class="verbatim">TAB</code> and <code class="verbatim">S-TAB</code> on headings, items and tables, <code class="verbatim">C-t</code> and <code class="verbatim">C-d</code>, <code class="verbatim">C-S-h/j/k/l</code>, <code class="verbatim">C-SPC</code> for completion) and ordinary typing.</p> | ||
| 362 | <h3 id="motions">Motions</h3> | ||
| 363 | <p>Motions move the caret in normal state, extend the selection in visual states, and give the range for an operator. A count before a motion repeats it.</p> | ||
| 364 | <table> | ||
| 365 | <thead> | ||
| 366 | <tr><th>Keys</th><th>Moves</th></tr> | ||
| 367 | </thead> | ||
| 368 | <tbody> | ||
| 369 | <tr><td><code class="verbatim">h</code>, <code class="verbatim">l</code>, <code class="verbatim"><left></code>, <code class="verbatim"><right></code>, <code class="verbatim">DEL</code></td><td>Left, right; <code class="verbatim">DEL</code> is <code class="verbatim">h</code>. Stays on the line.</td></tr> | ||
| 370 | <tr><td><code class="verbatim">j</code>, <code class="verbatim">k</code>, <code class="verbatim"><down></code>, <code class="verbatim"><up></code></td><td>Down, up, keeping the column.</td></tr> | ||
| 371 | <tr><td><code class="verbatim">gj</code>, <code class="verbatim">gk</code></td><td>In Org files, to the next or previous Org element (<code class="verbatim">org-forward-element</code>, <code class="verbatim">org-backward-element</code>, as evil-org binds them); counts are ignored. On a heading, <code class="verbatim">gj</code> goes to the next heading after the subtree and <code class="verbatim">gk</code> to the previous heading at the same level or higher. In other files, down and up by screen lines in wrapped text.</td></tr> | ||
| 372 | <tr><td><code class="verbatim">+</code>, <code class="verbatim">-</code>, <code class="verbatim">RET</code></td><td>First non-blank of the next or previous line. In Org files <code class="verbatim">RET</code> runs Act at Point instead.</td></tr> | ||
| 373 | <tr><td><code class="verbatim">w</code>, <code class="verbatim">b</code>, <code class="verbatim">e</code>, <code class="verbatim">ge</code></td><td>Next word start, previous word start, word end, previous word end.</td></tr> | ||
| 374 | <tr><td><code class="verbatim">W</code>, <code class="verbatim">B</code>, <code class="verbatim">E</code>, <code class="verbatim">gE</code></td><td>The same for blank-separated WORDs.</td></tr> | ||
| 375 | <tr><td><code class="verbatim">0</code>, <code class="verbatim"><home></code></td><td>Start of the line.</td></tr> | ||
| 376 | <tr><td><code class="verbatim">$</code>, <code class="verbatim"><end></code></td><td>End of the line; with a count, of the line count − 1 lines down.</td></tr> | ||
| 377 | <tr><td><code class="verbatim">g_</code></td><td>Last non-blank of the line.</td></tr> | ||
| 378 | <tr><td><code class="verbatim">gg</code>, <code class="verbatim">G</code></td><td>First line, last line; with a count, that line. The column is kept (<code class="verbatim">evil-start-of-line</code> nil).</td></tr> | ||
| 379 | <tr><td><code class="verbatim">f</code> <em>x</em>, <code class="verbatim">F</code> <em>x</em>, <code class="verbatim">t</code> <em>x</em>, <code class="verbatim">T</code> <em>x</em></td><td>To, or to just before, the next or previous <em>x</em> on the line. These are one-character snipes, as Doom's <code class="verbatim">evil-snipe-override-mode</code> makes them. <em>x</em> also matches its accented and other variants, as Doom's <code class="verbatim">evil-snipe-char-fold</code> makes it: <code class="verbatim">a</code> matches <code class="verbatim">à</code>, <code class="verbatim">À</code>, <code class="verbatim">ª</code> and <code class="verbatim">a</code>. A lowercase <em>x</em> matches either case, a capital only capitals; <code class="verbatim">t</code> and <code class="verbatim">T</code> skip a match right next to the caret; <code class="verbatim">f SPC</code> and <code class="verbatim">t SPC</code> skip a run of blanks after the caret and stop at the last blank before the next word, or just before it.</td></tr> | ||
| 380 | <tr><td><code class="verbatim">;</code>, <code class="verbatim">,</code></td><td>Repeats the last snipe (<code class="verbatim">s</code>, <code class="verbatim">S</code>, <code class="verbatim">f</code>, <code class="verbatim">F</code>, <code class="verbatim">t</code> or <code class="verbatim">T</code>), forward or reversed. A repeat searches all the text the window shows, so it can go past the caret's line (<code class="verbatim">evil-snipe-repeat-scope</code>, as Doom sets it). Right after a snipe, its own key repeats it: <code class="verbatim">f</code> goes on in the same direction and <code class="verbatim">F</code> reverses, and the same for <code class="verbatim">t</code> and <code class="verbatim">T</code> and for <code class="verbatim">s</code> and <code class="verbatim">S</code>. A count typed right after a snipe ends this: the key after the count starts a new snipe with that count, so <code class="verbatim">f a 2 f a</code> goes to the next <em>a</em>, then to the second <em>a</em> after it.</td></tr> | ||
| 381 | <tr><td><code class="verbatim">s</code> <em>xy</em>, <code class="verbatim">S</code> <em>xy</em></td><td>evil-snipe: to the next or previous <em>xy</em> on the line. Each character matches its variants as for <code class="verbatim">f</code>, and <em>xy</em> without a capital matches case-insensitively. <code class="verbatim">SPC</code> and <code class="verbatim">TAB</code> are read as a space and a tab. Not available after an operator.</td></tr> | ||
| 382 | <tr><td><code class="verbatim">%</code></td><td>The bracket matching the next <code class="verbatim">()</code>, <code class="verbatim">[]</code> or <code class="verbatim">{}</code> on the line.</td></tr> | ||
| 383 | <tr><td><code class="verbatim">{</code>, <code class="verbatim">}</code></td><td>Previous, next blank line.</td></tr> | ||
| 384 | <tr><td><code class="verbatim">/</code>, <code class="verbatim">?</code></td><td>Searches forward or backward as you type a regular expression, the match selected and the others highlighted; <code class="verbatim">RET</code> goes there, wrapping around the file, and <code class="verbatim">Esc</code> goes back. On iOS, asks in the echo area instead.</td></tr> | ||
| 385 | <tr><td><code class="verbatim">n</code>, <code class="verbatim">N</code></td><td>Repeats the last search in the same or the opposite direction.</td></tr> | ||
| 386 | <tr><td><code class="verbatim">*</code>, <code class="verbatim">#</code></td><td>Searches forward or backward for the whole word under the caret.</td></tr> | ||
| 387 | <tr><td><code class="verbatim">C-d</code>, <code class="verbatim">C-u</code></td><td>Down, up half the window's height; with a count, that many lines.</td></tr> | ||
| 388 | <tr><td><code class="verbatim">H</code>, <code class="verbatim">M</code>, <code class="verbatim">L</code></td><td>First non-blank of the top, middle or bottom line the window shows. With a count, <code class="verbatim">H</code> goes to that line from the top and <code class="verbatim">L</code> from the bottom. Lines are text lines, not wrapped screen lines. Linewise after an operator.</td></tr> | ||
| 389 | <tr><td><code class="verbatim">'</code> <em>a</em>, <code class="verbatim">`</code> <em>a</em></td><td>To mark <em>a</em>: its line's first non-blank, or its exact position. See <a href="#marks-and-jumps">Marks and jumps</a>.</td></tr> | ||
| 390 | </tbody> | ||
| 391 | </table> | ||
| 392 | <p>Search patterns are ICU regular expressions as macOS uses them, close to PCRE; Emacs and Vim regexp syntax such as <code class="verbatim">\(...\)</code> or <code class="verbatim">\<</code> does not work. <code class="verbatim">:noh</code> is accepted and does nothing; matches are highlighted only while <code class="verbatim">/</code> or <code class="verbatim">?</code> is being typed.</p> | ||
| 393 | <h3 id="operators">Operators</h3> | ||
| 394 | <table> | ||
| 395 | <thead> | ||
| 396 | <tr><th>Keys</th><th>Does</th></tr> | ||
| 397 | </thead> | ||
| 398 | <tbody> | ||
| 399 | <tr><td><code class="verbatim">d</code> <em>motion</em></td><td>Deletes. <code class="verbatim">dd</code> deletes lines.</td></tr> | ||
| 400 | <tr><td><code class="verbatim">c</code> <em>motion</em></td><td>Deletes and enters insert state. <code class="verbatim">cc</code> keeps the line's indentation; <code class="verbatim">cw</code> changes to the end of the word, as <code class="verbatim">ce</code>.</td></tr> | ||
| 401 | <tr><td><code class="verbatim">y</code> <em>motion</em></td><td>Yanks (copies). <code class="verbatim">yy</code> yanks lines.</td></tr> | ||
| 402 | <tr><td><code class="verbatim">></code> <em>motion</em>, <code class="verbatim"><</code> <em>motion</em></td><td>Indents or outdents lines by 8 spaces (<code class="verbatim">evil-shift-width</code>, which Doom sets to Org's <code class="verbatim">tab-width</code>). <code class="verbatim">>></code> and <code class="verbatim"><<</code> act on lines.</td></tr> | ||
| 403 | <tr><td><code class="verbatim">g~</code> <em>motion</em>, <code class="verbatim">gu</code> <em>motion</em>, <code class="verbatim">gU</code> <em>motion</em></td><td>Toggles case, lowercases, uppercases. <code class="verbatim">g~~</code>, <code class="verbatim">guu</code>, <code class="verbatim">gUU</code> act on lines.</td></tr> | ||
| 404 | <tr><td><code class="verbatim">gc</code> <em>motion</em></td><td>Comments or uncomments lines with <code class="verbatim">#</code> (<code class="verbatim">evilnc-comment-operator</code>). <code class="verbatim">gcc</code> acts on lines. See <a href="#commenting">Commenting</a>.</td></tr> | ||
| 405 | <tr><td><code class="verbatim">gq</code> <em>motion</em>, <code class="verbatim">gw</code> <em>motion</em></td><td>Fills the paragraphs in the motion's lines to the fill column, as Fill Paragraph does; other elements in the lines are left alone. <code class="verbatim">gq</code> leaves the caret on the first non-blank of the last line, <code class="verbatim">gw</code> where it was. Extra spaces between words and at the ends of lines are kept, as Doom fills without squeezing them. <code class="verbatim">gqq</code> and <code class="verbatim">gww</code> act on lines.</td></tr> | ||
| 406 | </tbody> | ||
| 407 | </table> | ||
| 408 | <p><code class="verbatim">M-q</code> runs Fill Paragraph in normal, insert and visual state. In visual and visual-line state it fills every paragraph the selection touches and leaves the caret where it was. In visual-block state it fills the paragraph at the caret, as evil does with <code class="verbatim">transient-mark-mode</code> off. In each, if the text changed, the editor returns to normal state, otherwise the selection stays.</p> | ||
| 409 | <p>Counts multiply: <code class="verbatim">2d3w</code> deletes six words. Doubling an operator with a count acts on that many lines: <code class="verbatim">3dd</code>.</p> | ||
| 410 | <p>Single-key changes:</p> | ||
| 411 | <table> | ||
| 412 | <thead> | ||
| 413 | <tr><th>Keys</th><th>Does</th></tr> | ||
| 414 | </thead> | ||
| 415 | <tbody> | ||
| 416 | <tr><td><code class="verbatim">x</code>, <code class="verbatim"><delete></code></td><td>Deletes the character under the caret (count: that many, within the line).</td></tr> | ||
| 417 | <tr><td><code class="verbatim">X</code></td><td>Deletes the character before the caret.</td></tr> | ||
| 418 | <tr><td><code class="verbatim">D</code>, <code class="verbatim">C</code></td><td>Deletes, or changes, to the end of the line.</td></tr> | ||
| 419 | <tr><td><code class="verbatim">Y</code></td><td>Yanks to the end of the line (<code class="verbatim">evil-want-Y-yank-to-eol</code>, as Doom sets it).</td></tr> | ||
| 420 | <tr><td><code class="verbatim">p</code>, <code class="verbatim">P</code></td><td>Pastes after or before the caret; whole lines go below or above the current line. A count pastes that many times.</td></tr> | ||
| 421 | <tr><td><code class="verbatim">J</code></td><td>Joins the next line (count: that many lines) with one space.</td></tr> | ||
| 422 | <tr><td><code class="verbatim">~</code></td><td>Toggles the case of the character under the caret and moves right.</td></tr> | ||
| 423 | <tr><td><code class="verbatim">r</code> <em>x</em></td><td>Replaces the character under the caret (count: that many) with <em>x</em>; <code class="verbatim">r RET</code> splits the line.</td></tr> | ||
| 424 | <tr><td><code class="verbatim">R</code></td><td>Replace state: what you type overwrites the line's characters, and past the line's end adds to it. <code class="verbatim">RET</code> breaks the line, <code class="verbatim">DEL</code> gives back what was overwritten, <code class="verbatim">ESC</code> returns to normal state. A count types the text that many times.</td></tr> | ||
| 425 | <tr><td><code class="verbatim">g=</code>, <code class="verbatim">g-</code>, <code class="verbatim">C-a</code></td><td>Adds the count (1) to the number at or after the caret on its line, or with <code class="verbatim">g-</code> takes it away, as evil-numbers does on Doom's <code class="verbatim">g=</code> and <code class="verbatim">g-</code>: decimal, <code class="verbatim">0x</code> hex and <code class="verbatim">0b</code> binary numbers, keeping leading zeros and the hex digits' case. In visual state <code class="verbatim">g=</code> and <code class="verbatim">g-</code> change every number in the selection, the nth by n times the count; <code class="verbatim">g+</code> and <code class="verbatim">C-a</code> by the count. <code class="verbatim">C-x</code> stays the Emacs prefix, as in Doom.</td></tr> | ||
| 426 | <tr><td><code class="verbatim">zz</code>, <code class="verbatim">zt</code>, <code class="verbatim">zb</code></td><td>Scrolls the caret's line to the middle, top or bottom of the window. <code class="verbatim">z.</code>, <code class="verbatim">z RET</code> and <code class="verbatim">z-</code> do the same and go to its first non-blank. A count names the line.</td></tr> | ||
| 427 | <tr><td><code class="verbatim">u</code>, <code class="verbatim">C-r</code></td><td>Undo, redo, with counts.</td></tr> | ||
| 428 | <tr><td><code class="verbatim">.</code></td><td>Repeats the last change.</td></tr> | ||
| 429 | <tr><td><code class="verbatim">ZZ</code></td><td>Saves the file and closes the window, as <code class="verbatim">:wq</code>.</td></tr> | ||
| 430 | <tr><td><code class="verbatim">ZQ</code></td><td>Closes the window, as <code class="verbatim">:q!</code>.</td></tr> | ||
| 431 | </tbody> | ||
| 432 | </table> | ||
| 433 | <p><code class="verbatim">o</code> and <code class="verbatim">O</code> open a line below or above with Org's indentation: under a list item, aligned with the item's text; under a heading, none; otherwise the line's own indentation.</p> | ||
| 434 | <h3 id="text-objects">Text objects</h3> | ||
| 435 | <p>After an operator, or in visual state to select, <code class="verbatim">i</code> takes the inner object and <code class="verbatim">a</code> the object with its surrounding space or delimiters.</p> | ||
| 436 | <table> | ||
| 437 | <thead> | ||
| 438 | <tr><th>Keys</th><th>Object</th></tr> | ||
| 439 | </thead> | ||
| 440 | <tbody> | ||
| 441 | <tr><td><code class="verbatim">iw</code>, <code class="verbatim">aw</code>, <code class="verbatim">iW</code>, <code class="verbatim">aW</code></td><td>Word, WORD.</td></tr> | ||
| 442 | <tr><td><code class="verbatim">i"</code>, <code class="verbatim">a"</code>, <code class="verbatim">i'</code>, <code class="verbatim">a'</code>, <code class="verbatim">i`</code>, <code class="verbatim">a`</code></td><td>Quoted text on the line.</td></tr> | ||
| 443 | <tr><td><code class="verbatim">i(</code>, <code class="verbatim">a(</code>, <code class="verbatim">i)</code>, <code class="verbatim">a)</code>, <code class="verbatim">ib</code>, <code class="verbatim">ab</code></td><td>Parentheses.</td></tr> | ||
| 444 | <tr><td><code class="verbatim">i[</code>, <code class="verbatim">a[</code>, <code class="verbatim">i]</code>, <code class="verbatim">a]</code></td><td>Square brackets.</td></tr> | ||
| 445 | <tr><td><code class="verbatim">i{</code>, <code class="verbatim">a{</code>, <code class="verbatim">i}</code>, <code class="verbatim">a}</code>, <code class="verbatim">iB</code>, <code class="verbatim">aB</code></td><td>Braces.</td></tr> | ||
| 446 | <tr><td><code class="verbatim">i<</code>, <code class="verbatim">a<</code>, <code class="verbatim">i></code>, <code class="verbatim">a></code></td><td>Angle brackets.</td></tr> | ||
| 447 | <tr><td><code class="verbatim">ip</code>, <code class="verbatim">ap</code></td><td>Paragraph: lines up to a blank line.</td></tr> | ||
| 448 | <tr><td><code class="verbatim">ie</code>, <code class="verbatim">ae</code></td><td>Org object at the caret: emphasis, a link, a timestamp, a footnote reference, an entity, a macro and the like (<code class="verbatim">evil-org-inner-object</code>, <code class="verbatim">evil-org-an-object</code>). <code class="verbatim">ie</code> on emphasis takes the text inside the markers, on a link its description. With no object at the caret, the element.</td></tr> | ||
| 449 | <tr><td><code class="verbatim">iE</code>, <code class="verbatim">aE</code></td><td>Org element: a paragraph, a list, a table, a block, a drawer (<code class="verbatim">evil-org-inner-element</code>, <code class="verbatim">evil-org-an-element</code>).</td></tr> | ||
| 450 | <tr><td><code class="verbatim">ir</code>, <code class="verbatim">ar</code></td><td>Org greater element: the list, table, drawer, block or section that contains the element (<code class="verbatim">evil-org-inner-greater-element</code>, <code class="verbatim">evil-org-a-greater-element</code>).</td></tr> | ||
| 451 | <tr><td><code class="verbatim">iR</code>, <code class="verbatim">aR</code></td><td>Org subtree: <code class="verbatim">aR</code> is the heading and its subtree, <code class="verbatim">iR</code> its contents without the heading line (<code class="verbatim">evil-org-inner-subtree</code>, <code class="verbatim">evil-org-a-subtree</code>).</td></tr> | ||
| 452 | </tbody> | ||
| 453 | </table> | ||
| 454 | <p>Tag objects (<code class="verbatim">it</code>, <code class="verbatim">at</code>) and sentence objects (<code class="verbatim">is</code>, <code class="verbatim">as</code>) are not available.</p> | ||
| 455 | <h3 id="counts-and-registers">Counts and registers</h3> | ||
| 456 | <p>A count is digits before a command; <code class="verbatim">0</code> only counts after another digit. A register is <code class="verbatim">"</code> and a name before the count and command: <code class="verbatim">"ayy</code>, <code class="verbatim">"a3dd</code>, <code class="verbatim">"ap</code>.</p> | ||
| 457 | <table> | ||
| 458 | <thead> | ||
| 459 | <tr><th>Register</th><th>Holds</th></tr> | ||
| 460 | </thead> | ||
| 461 | <tbody> | ||
| 462 | <tr><td><code class="verbatim">"a</code> to <code class="verbatim">"z</code></td><td>Named registers. Yanking or deleting into <code class="verbatim">A</code> to <code class="verbatim">Z</code> appends to the lowercase one. Writing to a named register leaves the clipboard alone.</td></tr> | ||
| 463 | <tr><td><code class="verbatim">"0</code></td><td>The last yank.</td></tr> | ||
| 464 | <tr><td><code class="verbatim">""</code>, <code class="verbatim">"+</code>, <code class="verbatim">"*</code></td><td>The system clipboard. This is the unnamed register: every yank, delete and change without a register goes to the clipboard, and <code class="verbatim">p</code> without a register pastes from it.</td></tr> | ||
| 465 | <tr><td><code class="verbatim">"_</code></td><td>The black hole: deletes without saving the text.</td></tr> | ||
| 466 | </tbody> | ||
| 467 | </table> | ||
| 468 | <p>Pasting from the clipboard is linewise when its text is what the last linewise yank or delete put there; text copied in another app pastes as characters. Numbered registers <code class="verbatim">"1</code> to <code class="verbatim">"9</code>, and the read-only registers such as <code class="verbatim">"%</code>, are not available.</p> | ||
| 469 | <p>Registers and macros are shared by every buffer, as in evil: a yank into <code class="verbatim">"a</code> in one file pastes with <code class="verbatim">"ap</code> in another. Lowercase marks and the jump list belong to the buffer and are gone when it closes. Nothing is kept when orgstar quits.</p> | ||
| 470 | <h3 id="repeat">Repeat</h3> | ||
| 471 | <p><code class="verbatim">.</code> repeats the last change made in normal state, including text typed in insert state that the change began: <code class="verbatim">ciwfoo ESC</code> then <code class="verbatim">.</code> changes the next word to <code class="verbatim">foo</code>. A count before <code class="verbatim">.</code> replaces the original count.</p> | ||
| 472 | <p>Changes made from visual or visual-block state, visual <code class="verbatim">S</code> surrounds, and keymap commands (such as <code class="verbatim">M-l</code> or <code class="verbatim">SPC m t</code>) are not repeated by <code class="verbatim">.</code>.</p> | ||
| 473 | <h3 id="macros">Macros</h3> | ||
| 474 | <table> | ||
| 475 | <thead> | ||
| 476 | <tr><th>Keys</th><th>Does</th></tr> | ||
| 477 | </thead> | ||
| 478 | <tbody> | ||
| 479 | <tr><td><code class="verbatim">q</code> <em>a</em></td><td>Starts recording keys into macro register <em>a</em> (a letter or digit). The echo area shows <code class="verbatim">Defining keyboard macro…</code>.</td></tr> | ||
| 480 | <tr><td><code class="verbatim">q</code></td><td>Stops recording: <code class="verbatim">Keyboard macro defined</code>.</td></tr> | ||
| 481 | <tr><td><code class="verbatim">@</code> <em>a</em></td><td>Plays macro <em>a</em>. A count plays it that many times.</td></tr> | ||
| 482 | <tr><td><code class="verbatim">@@</code></td><td>Plays the last macro played.</td></tr> | ||
| 483 | </tbody> | ||
| 484 | </table> | ||
| 485 | <p>A macro replays the keys you typed, including keymap commands, leader keys and insert-state typing. Keys with <code class="verbatim">⌘</code> are not recorded. Macros are kept apart from text registers: <code class="verbatim">"ap</code> does not paste a macro, and <code class="verbatim">"ay</code> does not change one. Macros can call macros up to 20 deep.</p> | ||
| 486 | <h3 id="marks-and-jumps">Marks and jumps</h3> | ||
| 487 | <p><code class="verbatim">m</code> <em>a</em> sets mark <em>a</em> (any letter) at the caret. Marks move with the text as you edit. <code class="verbatim">'</code> <em>a</em> goes to the first non-blank of the mark's line, <code class="verbatim">`</code> <em>a</em> to its exact position. <code class="verbatim">''</code> and <code class="verbatim">``</code> go back to where the last jump started.</p> | ||
| 488 | <p>Jumps are <code class="verbatim">G</code>, <code class="verbatim">gg</code>, <code class="verbatim">%</code>, <code class="verbatim">{</code>, <code class="verbatim">}</code>, <code class="verbatim">n</code>, <code class="verbatim">N</code>, <code class="verbatim">*</code>, <code class="verbatim">#</code>, <code class="verbatim">'</code>, <code class="verbatim">`</code>, <code class="verbatim">H</code>, <code class="verbatim">M</code>, <code class="verbatim">L</code>, the snipes <code class="verbatim">s</code>, <code class="verbatim">S</code>, <code class="verbatim">f</code>, <code class="verbatim">F</code>, <code class="verbatim">t</code> and <code class="verbatim">T</code>, and searches with <code class="verbatim">/</code> and <code class="verbatim">?</code>. Each jump adds its starting point to the jump list, which keeps the last 100. <code class="verbatim">C-o</code> goes back through the list and <code class="verbatim">C-i</code> forward again. A new jump after <code class="verbatim">C-o</code> drops the places you went back past.</p> | ||
| 489 | <p>Lowercase marks belong to the buffer, and so do <code class="verbatim">C-o</code> and <code class="verbatim">C-i</code>. Uppercase marks (<code class="verbatim">mA</code> to <code class="verbatim">mZ</code>) are file marks, shared by every buffer: <code class="verbatim">'A</code> or <code class="verbatim">`A</code> in another buffer shows the buffer the mark was set in, at the mark. A file mark goes away when its buffer closes.</p> | ||
| 490 | <h3 id="visual-states">Visual states</h3> | ||
| 491 | <p><code class="verbatim">v</code> selects characters, <code class="verbatim">V</code> whole lines, <code class="verbatim">C-v</code> a rectangular block. Motions and text objects extend the selection; <code class="verbatim">o</code> moves the caret to the other end. <code class="verbatim">gv</code> in normal state selects the last visual selection again.</p> | ||
| 492 | <p>In visual and visual-line state:</p> | ||
| 493 | <table> | ||
| 494 | <thead> | ||
| 495 | <tr><th>Keys</th><th>Does</th></tr> | ||
| 496 | </thead> | ||
| 497 | <tbody> | ||
| 498 | <tr><td><code class="verbatim">d</code>, <code class="verbatim">x</code></td><td>Deletes the selection.</td></tr> | ||
| 499 | <tr><td><code class="verbatim">c</code></td><td>Deletes it and enters insert state.</td></tr> | ||
| 500 | <tr><td><code class="verbatim">y</code></td><td>Yanks it.</td></tr> | ||
| 501 | <tr><td><code class="verbatim">></code>, <code class="verbatim"><</code></td><td>Indents or outdents its lines.</td></tr> | ||
| 502 | <tr><td><code class="verbatim">~</code>, <code class="verbatim">u</code>, <code class="verbatim">U</code>, <code class="verbatim">g~</code>, <code class="verbatim">gu</code>, <code class="verbatim">gU</code></td><td>Toggles case, lowercases, uppercases.</td></tr> | ||
| 503 | <tr><td><code class="verbatim">gc</code></td><td>Comments or uncomments its lines.</td></tr> | ||
| 504 | <tr><td><code class="verbatim">gq</code>, <code class="verbatim">gw</code></td><td>Fills the paragraphs in its lines.</td></tr> | ||
| 505 | <tr><td><code class="verbatim">J</code></td><td>Joins its lines.</td></tr> | ||
| 506 | <tr><td><code class="verbatim">p</code>, <code class="verbatim">P</code></td><td>Replaces it with the clipboard or a register; the replaced text goes to the clipboard.</td></tr> | ||
| 507 | <tr><td><code class="verbatim">S</code> <em>x</em></td><td>Surrounds it with <em>x</em> (see below). Linewise selections get the delimiters on lines of their own.</td></tr> | ||
| 508 | <tr><td><code class="verbatim">v</code>, <code class="verbatim">V</code>, <code class="verbatim">C-v</code></td><td>Switches to another visual state, or leaves when it is the current one.</td></tr> | ||
| 509 | <tr><td><code class="verbatim">TAB</code>, <code class="verbatim">S-TAB</code></td><td>Cycles visibility, as in normal state.</td></tr> | ||
| 510 | </tbody> | ||
| 511 | </table> | ||
| 512 | <p>The Emacs preset's Org keys (<code class="verbatim">C-c ...</code>, <code class="verbatim">M-h/j/k/l</code>, <code class="verbatim">M-<left></code> and so on) also work in visual state.</p> | ||
| 513 | <p>In visual-block state:</p> | ||
| 514 | <table> | ||
| 515 | <thead> | ||
| 516 | <tr><th>Keys</th><th>Does</th></tr> | ||
| 517 | </thead> | ||
| 518 | <tbody> | ||
| 519 | <tr><td>Motions, <code class="verbatim">o</code>, <code class="verbatim">O</code></td><td>Change the block; <code class="verbatim">o</code> and <code class="verbatim">O</code> move the caret to the opposite corner.</td></tr> | ||
| 520 | <tr><td><code class="verbatim">d</code>, <code class="verbatim">x</code></td><td>Deletes the block.</td></tr> | ||
| 521 | <tr><td><code class="verbatim">y</code></td><td>Yanks the block's lines, joined by newlines.</td></tr> | ||
| 522 | <tr><td><code class="verbatim">c</code></td><td>Deletes the block and enters insert state; what you type is copied to every line when you press <code class="verbatim">ESC</code>.</td></tr> | ||
| 523 | <tr><td><code class="verbatim">I</code>, <code class="verbatim">A</code></td><td>Inserts before or after the block on every line. <code class="verbatim">A</code> pads short lines with spaces; after <code class="verbatim">$</code>, it appends at each line's end.</td></tr> | ||
| 524 | <tr><td><code class="verbatim">r</code> <em>x</em></td><td>Replaces every character of the block with <em>x</em>.</td></tr> | ||
| 525 | <tr><td><code class="verbatim">~</code>, <code class="verbatim">u</code>, <code class="verbatim">U</code></td><td>Toggles case, lowercases, uppercases the block.</td></tr> | ||
| 526 | <tr><td><code class="verbatim">></code>, <code class="verbatim"><</code></td><td>Indents or outdents the block's lines.</td></tr> | ||
| 527 | <tr><td><code class="verbatim">v</code>, <code class="verbatim">V</code></td><td>Switches to visual or visual-line state.</td></tr> | ||
| 528 | </tbody> | ||
| 529 | </table> | ||
| 530 | <p>Block <code class="verbatim">I</code>, <code class="verbatim">A</code> and <code class="verbatim">c</code> copy the typed text to the other lines only when it contains no newline. A yanked block pastes as ordinary lines, not as a block.</p> | ||
| 531 | <h3 id="surround">Surround</h3> | ||
| 532 | <p>As <code class="verbatim">evil-surround</code>:</p> | ||
| 533 | <table> | ||
| 534 | <thead> | ||
| 535 | <tr><th>Keys</th><th>Does</th></tr> | ||
| 536 | </thead> | ||
| 537 | <tbody> | ||
| 538 | <tr><td><code class="verbatim">ys</code> <em>motion</em> <em>x</em></td><td>Surrounds the motion's text with <em>x</em>: <code class="verbatim">ys$*</code> makes the rest of the line bold. Trailing blanks stay outside.</td></tr> | ||
| 539 | <tr><td><code class="verbatim">ys</code> <code class="verbatim">i</code> <em>obj</em> <em>x</em>, <code class="verbatim">ys</code> <code class="verbatim">a</code> <em>obj</em> <em>x</em></td><td>Surrounds a text object: <code>ysiw=</code> wraps the word in <code>=</code> for verbatim.</td></tr> | ||
| 540 | <tr><td><code class="verbatim">yss</code> <em>x</em></td><td>Surrounds the line, from its first non-blank.</td></tr> | ||
| 541 | <tr><td><code class="verbatim">ds</code> <em>x</em></td><td>Deletes the surrounding <em>x</em>. With an opening bracket, the blanks inside go too.</td></tr> | ||
| 542 | <tr><td><code class="verbatim">cs</code> <em>x</em> <em>y</em></td><td>Changes the surrounding <em>x</em> to <em>y</em>.</td></tr> | ||
| 543 | <tr><td><code class="verbatim">S</code> <em>x</em> (visual)</td><td>Surrounds the selection.</td></tr> | ||
| 544 | </tbody> | ||
| 545 | </table> | ||
| 546 | <table> | ||
| 547 | <thead> | ||
| 548 | <tr><th><em>x</em></th><th>Delimiters</th></tr> | ||
| 549 | </thead> | ||
| 550 | <tbody> | ||
| 551 | <tr><td><code class="verbatim">(</code>, <code class="verbatim">[</code>, <code class="verbatim">{</code>, <code class="verbatim"><</code></td><td>The pair with a space inside each: <code class="verbatim">( text )</code>.</td></tr> | ||
| 552 | <tr><td><code class="verbatim">)</code>, <code class="verbatim">b</code></td><td><code class="verbatim">(text)</code></td></tr> | ||
| 553 | <tr><td><code class="verbatim">]</code>, <code class="verbatim">r</code></td><td><code class="verbatim">[text]</code></td></tr> | ||
| 554 | <tr><td><code class="verbatim">}</code>, <code class="verbatim">B</code></td><td><code class="verbatim">{text}</code></td></tr> | ||
| 555 | <tr><td><code class="verbatim">></code>, <code class="verbatim">a</code></td><td><code class="verbatim"><text></code></td></tr> | ||
| 556 | <tr><td><code class="verbatim">SPC</code></td><td>A space on each side.</td></tr> | ||
| 557 | <tr><td>Any other character</td><td>That character on both sides: <code class="verbatim">*</code>, <code class="verbatim">/</code>, <code class="verbatim">_</code>, <code class="verbatim">+</code>, <code>=</code>, <code class="verbatim">~</code>, <code class="verbatim">"</code>, <code class="verbatim">'</code>.</td></tr> | ||
| 558 | </tbody> | ||
| 559 | </table> | ||
| 560 | <p>For <code class="verbatim">ds</code> and <code class="verbatim">cs</code>, brackets are found across lines; any other character is matched on the caret's line. Tags (<code class="verbatim">t</code>) and functions (<code class="verbatim">f</code>) are not supported.</p> | ||
| 561 | <h3 id="commenting">Commenting</h3> | ||
| 562 | <p><code class="verbatim">gc</code> with a motion or text object, <code class="verbatim">gcc</code> for lines, and <code class="verbatim">gc</code> in visual state toggle Org comments. Lines get <code class="verbatim">#</code> followed by a space at the shallowest indentation among them; blank lines are left alone. When every non-blank line is already a comment, the comments are removed instead. This is <code class="verbatim">comment-or-uncomment-region</code> in Org, as <code class="verbatim">evilnc-comment-operator</code> runs it.</p> | ||
| 563 | <h3 id="org-keys-in-normal-state">Org keys in normal state</h3> | ||
| 564 | <p>Besides the leader, the preset binds these evil-org and Doom keys in normal state. <code class="verbatim">TAB</code>, <code class="verbatim">S-TAB</code> and <code class="verbatim">RET</code> in normal state, and the Emacs preset's Org keys in every state, are listed in the <a href="#key-reference">key reference</a>. <code class="verbatim">gj</code> and <code class="verbatim">gk</code> move by Org element; see <a href="#motions">Motions</a>.</p> | ||
| 565 | <table> | ||
| 566 | <thead> | ||
| 567 | <tr><th>Keys</th><th>Command</th></tr> | ||
| 568 | </thead> | ||
| 569 | <tbody> | ||
| 570 | <tr><td><code class="verbatim">TAB</code></td><td>Cycle Visibility (<code class="verbatim">org-cycle</code>). Also in visual state.</td></tr> | ||
| 571 | <tr><td><code class="verbatim">S-TAB</code></td><td>Cycle Global Visibility. Also in visual and insert state.</td></tr> | ||
| 572 | <tr><td><code class="verbatim">RET</code></td><td>Act at Point (<code class="verbatim">+org/dwim-at-point</code>).</td></tr> | ||
| 573 | <tr><td><code class="verbatim">z a</code></td><td>Toggle Fold (<code class="verbatim">+org/toggle-fold</code>). On a heading line: a folded heading opens one level, showing its body and its child headings folded; an open one folds.</td></tr> | ||
| 574 | <tr><td><code class="verbatim">z o</code></td><td>Open Fold (<code class="verbatim">+org/open-fold</code>). On a heading line, a folded heading opens one level; an open one stays as it is.</td></tr> | ||
| 575 | <tr><td><code class="verbatim">z c</code></td><td>Close Fold (<code class="verbatim">outline-hide-subtree</code>). Folds the subtree the caret is in, from anywhere inside it.</td></tr> | ||
| 576 | <tr><td><code class="verbatim">z A</code></td><td>Cycle Global Visibility.</td></tr> | ||
| 577 | <tr><td><code class="verbatim">g h</code></td><td>Up to Parent Heading.</td></tr> | ||
| 578 | <tr><td><code class="verbatim">] h</code>, <code class="verbatim">[ h</code></td><td>Next or previous heading at the same level.</td></tr> | ||
| 579 | <tr><td><code class="verbatim">] b</code>, <code class="verbatim">[ b</code></td><td>Next or previous buffer.</td></tr> | ||
| 580 | <tr><td><code class="verbatim">M-h</code>, <code class="verbatim">M-j</code>, <code class="verbatim">M-k</code>, <code class="verbatim">M-l</code></td><td><code class="verbatim">M-<left></code>, <code class="verbatim">M-<down></code>, <code class="verbatim">M-<up></code>, <code class="verbatim">M-<right></code>: promote, move down, move up, demote on headings; the same for items; move columns and rows in tables. Also in insert and visual state.</td></tr> | ||
| 581 | <tr><td><code class="verbatim">M-H</code>, <code class="verbatim">M-J</code>, <code class="verbatim">M-K</code>, <code class="verbatim">M-L</code></td><td>The <code class="verbatim">M-S-</code> arrow forms: subtree promote and demote, table row and column insert and delete. Also in insert and visual state.</td></tr> | ||
| 582 | <tr><td><code class="verbatim">C-S-h</code>, <code class="verbatim">C-S-j</code>, <code class="verbatim">C-S-k</code>, <code class="verbatim">C-S-l</code></td><td>The <code class="verbatim">S-</code> arrow forms: TODO keyword, priority, timestamp, property value and list bullet changes. Also in insert state.</td></tr> | ||
| 583 | </tbody> | ||
| 584 | </table> | ||
| 585 | <h3 id="the-leader">The leader</h3> | ||
| 586 | <p><code class="verbatim">SPC</code> in normal state is Doom's leader and <code class="verbatim">SPC m</code> its local leader for Org. Pause after <code class="verbatim">SPC</code> to see the key hints.</p> | ||
| 587 | <table> | ||
| 588 | <thead> | ||
| 589 | <tr><th>Keys</th><th>Command</th></tr> | ||
| 590 | </thead> | ||
| 591 | <tbody> | ||
| 592 | <tr><td><code class="verbatim">SPC ,</code></td><td>Switch to Buffer… (<code class="verbatim">app.buffer.switch</code>)</td></tr> | ||
| 593 | <tr><td><code class="verbatim">SPC .</code></td><td>Quick Open… (<code class="verbatim">app.quick-open</code>)</td></tr> | ||
| 594 | <tr><td><code class="verbatim">SPC /</code></td><td>Search Notes (<code class="verbatim">app.search</code>)</td></tr> | ||
| 595 | <tr><td><code class="verbatim">SPC :</code></td><td>Command Palette… (<code class="verbatim">app.palette</code>)</td></tr> | ||
| 596 | <tr><td><code class="verbatim">SPC `</code></td><td>Last Buffer (<code class="verbatim">app.buffer.last</code>)</td></tr> | ||
| 597 | <tr><td><code class="verbatim">SPC b B</code></td><td>Switch to Buffer… (<code class="verbatim">app.buffer.switch</code>)</td></tr> | ||
| 598 | <tr><td><code class="verbatim">SPC b K</code></td><td>Close All Buffers (<code class="verbatim">app.buffer.kill-all</code>)</td></tr> | ||
| 599 | <tr><td><code class="verbatim">SPC b O</code></td><td>Close Other Buffers (<code class="verbatim">app.buffer.kill-others</code>)</td></tr> | ||
| 600 | <tr><td><code class="verbatim">SPC b S</code></td><td>Save All Buffers (<code class="verbatim">app.save-all</code>)</td></tr> | ||
| 601 | <tr><td><code class="verbatim">SPC b [</code></td><td>Previous Buffer (<code class="verbatim">app.buffer.previous</code>)</td></tr> | ||
| 602 | <tr><td><code class="verbatim">SPC b ]</code></td><td>Next Buffer (<code class="verbatim">app.buffer.next</code>)</td></tr> | ||
| 603 | <tr><td><code class="verbatim">SPC b b</code></td><td>Switch to Buffer… (<code class="verbatim">app.buffer.switch</code>)</td></tr> | ||
| 604 | <tr><td><code class="verbatim">SPC b d</code></td><td>Close Buffer (<code class="verbatim">app.buffer.kill</code>)</td></tr> | ||
| 605 | <tr><td><code class="verbatim">SPC b k</code></td><td>Close Buffer (<code class="verbatim">app.buffer.kill</code>)</td></tr> | ||
| 606 | <tr><td><code class="verbatim">SPC b n</code></td><td>Next Buffer (<code class="verbatim">app.buffer.next</code>)</td></tr> | ||
| 607 | <tr><td><code class="verbatim">SPC b p</code></td><td>Previous Buffer (<code class="verbatim">app.buffer.previous</code>)</td></tr> | ||
| 608 | <tr><td><code class="verbatim">SPC b s</code></td><td>Save (<code class="verbatim">app.save</code>)</td></tr> | ||
| 609 | <tr><td><code class="verbatim">SPC f f</code></td><td>Quick Open… (<code class="verbatim">app.quick-open</code>)</td></tr> | ||
| 610 | <tr><td><code class="verbatim">SPC f s</code></td><td>Save (<code class="verbatim">app.save</code>)</td></tr> | ||
| 611 | <tr><td><code class="verbatim">SPC h r r</code></td><td>Reload Keymap (<code class="verbatim">app.reload-keymap</code>)</td></tr> | ||
| 612 | <tr><td><code class="verbatim">SPC n l</code></td><td>Store Link (<code class="verbatim">org.link.store</code>)</td></tr> | ||
| 613 | <tr><td><code class="verbatim">SPC o a</code></td><td>Agenda (<code class="verbatim">app.agenda</code>)</td></tr> | ||
| 614 | <tr><td><code class="verbatim">SPC w c</code></td><td>Close Pane (<code class="verbatim">app.pane-close</code>)</td></tr> | ||
| 615 | <tr><td><code class="verbatim">SPC w d</code></td><td>Close Pane (<code class="verbatim">app.pane-close</code>)</td></tr> | ||
| 616 | <tr><td><code class="verbatim">SPC w n</code></td><td>New Window (<code class="verbatim">app.window-new</code>)</td></tr> | ||
| 617 | <tr><td><code class="verbatim">SPC w o</code></td><td>Close Other Panes (<code class="verbatim">app.pane-only</code>)</td></tr> | ||
| 618 | <tr><td><code class="verbatim">SPC w s</code></td><td>Split Pane Below (<code class="verbatim">app.split-below</code>)</td></tr> | ||
| 619 | <tr><td><code class="verbatim">SPC w v</code></td><td>Split Pane Right (<code class="verbatim">app.split-right</code>)</td></tr> | ||
| 620 | <tr><td><code class="verbatim">SPC w w</code></td><td>Next Pane (<code class="verbatim">app.pane-next</code>)</td></tr> | ||
| 621 | <tr><td><code class="verbatim">SPC q q</code></td><td>Quit orgstar (<code class="verbatim">app.quit</code>)</td></tr> | ||
| 622 | <tr><td><code class="verbatim">SPC s p</code></td><td>Search Notes (<code class="verbatim">app.search</code>)</td></tr> | ||
| 623 | <tr><td><code class="verbatim">SPC s s</code></td><td>Find (<code class="verbatim">edit.find</code>)</td></tr> | ||
| 624 | <tr><td><code class="verbatim">SPC SPC</code></td><td>Quick Open… (<code class="verbatim">app.quick-open</code>)</td></tr> | ||
| 625 | <tr><td><code class="verbatim">SPC t s</code></td><td>Check Spelling While Typing (<code class="verbatim">editor.toggle-spell-check</code>)</td></tr> | ||
| 626 | <tr><td><code class="verbatim">SPC t w</code></td><td>Truncate or Wrap Long Lines (<code class="verbatim">editor.toggle-truncate-lines</code>)</td></tr> | ||
| 627 | <tr><td><code class="verbatim">SPC X</code></td><td>Capture… (<code class="verbatim">app.capture</code>)</td></tr> | ||
| 628 | <tr><td><code class="verbatim">SPC z t</code></td><td>Clock Report (<code class="verbatim">app.clock.report</code>)</td></tr> | ||
| 629 | <tr><td><code class="verbatim">SPC m '</code></td><td>Edit Block (<code class="verbatim">org.edit-special</code>)</td></tr> | ||
| 630 | <tr><td><code class="verbatim">SPC m .</code></td><td>Go to Heading… (<code class="verbatim">org.goto</code>)</td></tr> | ||
| 631 | <tr><td><code class="verbatim">SPC m A</code></td><td>Archive Subtree (<code class="verbatim">app.archive</code>)</td></tr> | ||
| 632 | <tr><td><code class="verbatim">SPC m b -</code></td><td>Insert Table Rule (<code class="verbatim">org.table.insert-hline</code>)</td></tr> | ||
| 633 | <tr><td><code class="verbatim">SPC m b a</code></td><td>Align Table (<code class="verbatim">org.table.align</code>)</td></tr> | ||
| 634 | <tr><td><code class="verbatim">SPC m b d c</code></td><td>Delete Table Column (<code class="verbatim">org.table.delete-column</code>)</td></tr> | ||
| 635 | <tr><td><code class="verbatim">SPC m b d r</code></td><td>Delete Table Row (<code class="verbatim">org.table.kill-row</code>)</td></tr> | ||
| 636 | <tr><td><code class="verbatim">SPC m b i c</code></td><td>Insert Table Column (<code class="verbatim">org.table.insert-column</code>)</td></tr> | ||
| 637 | <tr><td><code class="verbatim">SPC m b i h</code></td><td>Insert Table Rule (<code class="verbatim">org.table.insert-hline</code>)</td></tr> | ||
| 638 | <tr><td><code class="verbatim">SPC m b i r</code></td><td>Insert Table Row (<code class="verbatim">org.table.insert-row</code>)</td></tr> | ||
| 639 | <tr><td><code class="verbatim">SPC m b r</code></td><td>Recalculate Table (<code class="verbatim">org.table.recalc-all</code>)</td></tr> | ||
| 640 | <tr><td><code class="verbatim">SPC m c E</code></td><td>Set Effort (<code class="verbatim">org.effort.set</code>)</td></tr> | ||
| 641 | <tr><td><code class="verbatim">SPC m c G</code></td><td>Go to Recent Clocked Entry… (<code class="verbatim">app.clock.goto-recent</code>)</td></tr> | ||
| 642 | <tr><td><code class="verbatim">SPC m c I</code></td><td>Clock In to Last Entry (<code class="verbatim">app.clock.in-last</code>)</td></tr> | ||
| 643 | <tr><td><code class="verbatim">SPC m c R</code></td><td>Clock Report (<code class="verbatim">app.clock.report</code>)</td></tr> | ||
| 644 | <tr><td><code class="verbatim">SPC m c c</code></td><td>Cancel Clock (<code class="verbatim">app.clock.cancel</code>)</td></tr> | ||
| 645 | <tr><td><code class="verbatim">SPC m c d</code></td><td>Mark as Default Clock Task (<code class="verbatim">app.clock.default</code>)</td></tr> | ||
| 646 | <tr><td><code class="verbatim">SPC m c g</code></td><td>Go to Clocked Entry (<code class="verbatim">app.clock.goto</code>)</td></tr> | ||
| 647 | <tr><td><code class="verbatim">SPC m c i</code></td><td>Clock In (<code class="verbatim">app.clock.in</code>)</td></tr> | ||
| 648 | <tr><td><code class="verbatim">SPC m c o</code></td><td>Clock Out (<code class="verbatim">app.clock.out</code>)</td></tr> | ||
| 649 | <tr><td><code class="verbatim">SPC m c r</code></td><td>Resolve Open Clocks… (<code class="verbatim">app.clock.resolve</code>)</td></tr> | ||
| 650 | <tr><td><code class="verbatim">SPC m d T</code></td><td>Insert Inactive Timestamp (<code class="verbatim">org.timestamp.inactive</code>)</td></tr> | ||
| 651 | <tr><td><code class="verbatim">SPC m d d</code></td><td>Set Deadline (<code class="verbatim">org.deadline</code>)</td></tr> | ||
| 652 | <tr><td><code class="verbatim">SPC m d s</code></td><td>Schedule (<code class="verbatim">org.schedule</code>)</td></tr> | ||
| 653 | <tr><td><code class="verbatim">SPC m d t</code></td><td>Insert Timestamp (<code class="verbatim">org.timestamp.active</code>)</td></tr> | ||
| 654 | <tr><td><code class="verbatim">SPC m e h h</code></td><td>Export to HTML (<code class="verbatim">app.export.html</code>)</td></tr> | ||
| 655 | <tr><td><code class="verbatim">SPC m e h o</code></td><td>Export to HTML and Open (<code class="verbatim">app.export.html-open</code>)</td></tr> | ||
| 656 | <tr><td><code class="verbatim">SPC m e l p</code></td><td>Export to PDF with Emacs (<code class="verbatim">app.export.pdf</code>)</td></tr> | ||
| 657 | <tr><td><code class="verbatim">SPC m e m m</code></td><td>Export to Markdown (<code class="verbatim">app.export.markdown</code>)</td></tr> | ||
| 658 | <tr><td><code class="verbatim">SPC m h</code></td><td>Toggle Heading (<code class="verbatim">org.heading.toggle</code>)</td></tr> | ||
| 659 | <tr><td><code class="verbatim">SPC m i</code></td><td>Toggle Item (<code class="verbatim">org.item.toggle</code>)</td></tr> | ||
| 660 | <tr><td><code class="verbatim">SPC m l i</code></td><td>Store ID Link (<code class="verbatim">org.id.store-link</code>)</td></tr> | ||
| 661 | <tr><td><code class="verbatim">SPC m l l</code></td><td>Insert Link… (<code class="verbatim">org.link.insert</code>)</td></tr> | ||
| 662 | <tr><td><code class="verbatim">SPC m l s</code></td><td>Store Link (<code class="verbatim">org.link.store</code>)</td></tr> | ||
| 663 | <tr><td><code class="verbatim">SPC m o</code></td><td>Set Property… (<code class="verbatim">org.property.read-and-set</code>)</td></tr> | ||
| 664 | <tr><td><code class="verbatim">SPC m p d</code></td><td>Lower Priority (<code class="verbatim">org.priority.down</code>)</td></tr> | ||
| 665 | <tr><td><code class="verbatim">SPC m p p</code></td><td>Set Priority… (<code class="verbatim">org.priority.set</code>)</td></tr> | ||
| 666 | <tr><td><code class="verbatim">SPC m p u</code></td><td>Raise Priority (<code class="verbatim">org.priority.up</code>)</td></tr> | ||
| 667 | <tr><td><code class="verbatim">SPC m q</code></td><td>Set Tags (<code class="verbatim">org.tags.set</code>)</td></tr> | ||
| 668 | <tr><td><code class="verbatim">SPC m r r</code></td><td>Refile… (<code class="verbatim">app.refile</code>)</td></tr> | ||
| 669 | <tr><td><code class="verbatim">SPC u SPC m r r</code></td><td>Go to Refile Target… (<code class="verbatim">app.refile.goto</code>)</td></tr> | ||
| 670 | <tr><td><code class="verbatim">SPC m s A</code></td><td>Archive Subtree (<code class="verbatim">app.archive</code>)</td></tr> | ||
| 671 | <tr><td><code class="verbatim">SPC m s N</code></td><td>Widen (<code class="verbatim">org.widen</code>)</td></tr> | ||
| 672 | <tr><td><code class="verbatim">SPC m s S</code></td><td>Sort Entries (<code class="verbatim">org.sort</code>)</td></tr> | ||
| 673 | <tr><td><code class="verbatim">SPC m s a</code></td><td>Toggle ARCHIVE Tag (<code class="verbatim">org.archive.toggle-tag</code>)</td></tr> | ||
| 674 | <tr><td><code class="verbatim">SPC m s c</code></td><td>Clone Subtree with Time Shift (<code class="verbatim">org.subtree.clone</code>)</td></tr> | ||
| 675 | <tr><td><code class="verbatim">SPC m s d</code></td><td>Cut Subtree (<code class="verbatim">org.subtree.cut</code>)</td></tr> | ||
| 676 | <tr><td><code class="verbatim">SPC m s h</code></td><td>Promote Subtree (<code class="verbatim">org.subtree.promote</code>)</td></tr> | ||
| 677 | <tr><td><code class="verbatim">SPC m s j</code></td><td>Move Subtree Down (<code class="verbatim">org.subtree.down</code>)</td></tr> | ||
| 678 | <tr><td><code class="verbatim">SPC m s k</code></td><td>Move Subtree Up (<code class="verbatim">org.subtree.up</code>)</td></tr> | ||
| 679 | <tr><td><code class="verbatim">SPC m s l</code></td><td>Demote Subtree (<code class="verbatim">org.subtree.demote</code>)</td></tr> | ||
| 680 | <tr><td><code class="verbatim">SPC m s n</code></td><td>Narrow to Subtree (<code class="verbatim">org.narrow.subtree</code>)</td></tr> | ||
| 681 | <tr><td><code class="verbatim">SPC m s r</code></td><td>Refile… (<code class="verbatim">app.refile</code>)</td></tr> | ||
| 682 | <tr><td><code class="verbatim">SPC m s s</code></td><td>Sparse Tree… (<code class="verbatim">org.sparse-tree</code>)</td></tr> | ||
| 683 | <tr><td><code class="verbatim">SPC m t</code></td><td>Cycle TODO State (<code class="verbatim">org.todo.cycle</code>)</td></tr> | ||
| 684 | <tr><td><code class="verbatim">SPC m x</code></td><td>Toggle Checkbox (<code class="verbatim">org.checkbox.toggle</code>)</td></tr> | ||
| 685 | </tbody> | ||
| 686 | </table> | ||
| 687 | <h3 id="ex-commands">Ex commands</h3> | ||
| 688 | <p><code class="verbatim">:</code> opens a prompt in the echo area. orgstar understands these:</p> | ||
| 689 | <table> | ||
| 690 | <thead> | ||
| 691 | <tr><th>Command</th><th>Does</th></tr> | ||
| 692 | </thead> | ||
| 693 | <tbody> | ||
| 694 | <tr><td><code class="verbatim">:w</code>, <code class="verbatim">:write</code></td><td>Saves the file.</td></tr> | ||
| 695 | <tr><td><code class="verbatim">:q</code>, <code class="verbatim">:quit</code>, <code class="verbatim">:q!</code></td><td>Closes the window. Closing the last window quits orgstar, which asks about unsaved changes as usual.</td></tr> | ||
| 696 | <tr><td><code class="verbatim">:wq</code>, <code class="verbatim">:wq!</code>, <code class="verbatim">:x</code></td><td>Saves, then closes the window.</td></tr> | ||
| 697 | <tr><td><code class="verbatim">:e</code> <em>file</em>, <code class="verbatim">:edit</code> <em>file</em></td><td>Opens <em>file</em>, relative to the current file's folder; <code class="verbatim">~</code> is expanded.</td></tr> | ||
| 698 | <tr><td><code class="verbatim">:e</code>, <code class="verbatim">:e!</code>, <code class="verbatim">:edit</code>, <code class="verbatim">:edit!</code></td><td>Reloads the file from disk; unsaved changes go to the recovery versions.</td></tr> | ||
| 699 | <tr><td><code class="verbatim">:bn</code>, <code class="verbatim">:bnext</code></td><td>Next buffer.</td></tr> | ||
| 700 | <tr><td><code class="verbatim">:bp</code>, <code class="verbatim">:bprevious</code>, <code class="verbatim">:bN</code>, <code class="verbatim">:bNext</code></td><td>Previous buffer.</td></tr> | ||
| 701 | <tr><td><code class="verbatim">:bd</code>, <code class="verbatim">:bdelete</code>, <code class="verbatim">:bd!</code>, <code class="verbatim">:bw</code>, <code class="verbatim">:bwipeout</code></td><td>Closes the buffer.</td></tr> | ||
| 702 | <tr><td><code class="verbatim">:b</code>, <code class="verbatim">:buffer</code>, <code class="verbatim">:ls</code>, <code class="verbatim">:buffers</code>, <code class="verbatim">:files</code></td><td>Asks for a buffer to switch to.</td></tr> | ||
| 703 | <tr><td><code class="verbatim">:</code> <em>N</em></td><td>Goes to line <em>N</em>.</td></tr> | ||
| 704 | <tr><td><code class="verbatim">:s/</code> <em>pattern</em> <code class="verbatim">/</code> <em>replacement</em> <code class="verbatim">/</code> <em>flags</em></td><td>Replaces on the current line. Flags: <code class="verbatim">g</code> for every match on the line, <code class="verbatim">i</code> to ignore case. <code class="verbatim">\1</code> in the replacement is the first group.</td></tr> | ||
| 705 | <tr><td><code class="verbatim">:%s/</code> <em>pattern</em> <code class="verbatim">/</code> <em>replacement</em> <code class="verbatim">/</code> <em>flags</em></td><td>The same on every line.</td></tr> | ||
| 706 | <tr><td><code class="verbatim">:noh</code>, <code class="verbatim">:nohlsearch</code></td><td>Accepted; does nothing.</td></tr> | ||
| 707 | </tbody> | ||
| 708 | </table> | ||
| 709 | <p><code class="verbatim">q:</code> opens the ex prompt with your earlier commands listed, most recent first, to pick and edit; <code class="verbatim">q/</code> and <code class="verbatim">q?</code> do the same for searches.</p> | ||
| 710 | <p>Anything else shows <code class="verbatim">Not an editor command</code>. Ranges other than <code class="verbatim">%</code>, the <code class="verbatim">c</code> flag, <code class="verbatim">:g</code>, <code class="verbatim">:normal</code> and <code class="verbatim">:set</code> are not available, and <code class="verbatim">:</code> does not work in visual state.</p> | ||
| 711 | <h3 id="not-available">Not available</h3> | ||
| 712 | <p>Things evil users may reach for that orgstar does not have: the fold <code class="verbatim">z</code> commands other than <code class="verbatim">za</code>, <code class="verbatim">zc</code>, <code class="verbatim">zo</code> and <code class="verbatim">zA</code>, and scrolling by lines (<code class="verbatim">zh</code>, <code class="verbatim">zl</code>, <code class="verbatim">C-e</code>, <code class="verbatim">C-y</code>); <code class="verbatim">gi</code>, <code class="verbatim">g;</code>, <code class="verbatim">gJ</code>; <code class="verbatim">&</code>; the numbered and read-only registers; tag and sentence text objects.</p> | ||
| 713 | <h2 id="keys-in-other-windows">Keys in other windows</h2> | ||
| 714 | <p>The block editor, opened by Edit Block (<code class="verbatim">C-c '</code>) or Edit Table Field (<code class="verbatim">C-c `</code>), is a plain editor with its own two bindings in every preset: <code class="verbatim">C-c '</code> or <code class="verbatim">⌘↩</code> saves and returns, <code class="verbatim">Esc</code> or <code class="verbatim">C-c C-k</code> leaves without saving. It does not use the Doom preset's Vim editing or your <code class="verbatim">keymap.toml</code>. See <a href="11-code-blocks.html">Code blocks</a>.</p> | ||
| 715 | <p>The Agenda window has its own keys, modelled on <code class="verbatim">org-agenda-mode</code>, which <code class="verbatim">keymap.toml</code> does not change:</p> | ||
| 716 | <table> | ||
| 717 | <thead> | ||
| 718 | <tr><th>Key</th><th>Does</th></tr> | ||
| 719 | </thead> | ||
| 720 | <tbody> | ||
| 721 | <tr><td><code class="verbatim">n</code>, <code class="verbatim">p</code>, <code class="verbatim">C-n</code>, <code class="verbatim">C-p</code>, <code class="verbatim">↓</code>, <code class="verbatim">↑</code></td><td>Next or previous line.</td></tr> | ||
| 722 | <tr><td><code class="verbatim">RET</code>, <code class="verbatim">TAB</code></td><td>Opens the selected entry, or a calendar event in Calendar.</td></tr> | ||
| 723 | <tr><td><code class="verbatim">SPC</code></td><td>Shows the selected entry in the main window, keeping the agenda in front.</td></tr> | ||
| 724 | <tr><td><code class="verbatim">f</code>, <code class="verbatim">b</code></td><td>Next or previous span (agenda views).</td></tr> | ||
| 725 | <tr><td><code class="verbatim">.</code></td><td>Back to today (agenda views).</td></tr> | ||
| 726 | <tr><td><code class="verbatim">j</code></td><td>Go to a date (agenda views).</td></tr> | ||
| 727 | <tr><td><code class="verbatim">v d</code>, <code class="verbatim">v w</code>, <code class="verbatim">v m</code></td><td>Day, week or month view (agenda views).</td></tr> | ||
| 728 | <tr><td><code class="verbatim">d</code>, <code class="verbatim">w</code></td><td>Day or week view (agenda views).</td></tr> | ||
| 729 | <tr><td><code class="verbatim">k</code></td><td>Capture an entry scheduled on the selected line's day (agenda views).</td></tr> | ||
| 730 | <tr><td><code class="verbatim">s</code></td><td>Save every file.</td></tr> | ||
| 731 | <tr><td><code class="verbatim">\</code></td><td>Tag filter (<code class="verbatim">+tag-tag</code>).</td></tr> | ||
| 732 | <tr><td><code>=</code></td><td>Regexp filter (<code class="verbatim">-re</code> drops matches).</td></tr> | ||
| 733 | <tr><td><code class="verbatim"><</code></td><td>Filter to the selected entry's category, or clear the category filter.</td></tr> | ||
| 734 | <tr><td>|</td><td>Removes every filter.</td></tr> | ||
| 735 | <tr><td><code class="verbatim">l</code></td><td>Log mode on or off (agenda views).</td></tr> | ||
| 736 | <tr><td><code class="verbatim">g</code>, <code class="verbatim">r</code></td><td>Rebuilds the views.</td></tr> | ||
| 737 | <tr><td><code class="verbatim">t</code></td><td>Cycle TODO State.</td></tr> | ||
| 738 | <tr><td><code class="verbatim">+</code>, <code class="verbatim">-</code></td><td>Raise or lower priority.</td></tr> | ||
| 739 | <tr><td><code class="verbatim">,</code></td><td>Set priority.</td></tr> | ||
| 740 | <tr><td><code class="verbatim">:</code></td><td>Set tags.</td></tr> | ||
| 741 | <tr><td><code class="verbatim">S-<right></code>, <code class="verbatim">S-<left></code></td><td>Moves the entry's timestamp a day later or earlier.</td></tr> | ||
| 742 | <tr><td><code class="verbatim">I</code>, <code class="verbatim">O</code>, <code class="verbatim">X</code></td><td>Clock in, clock out, cancel the clock.</td></tr> | ||
| 743 | <tr><td><code class="verbatim">m</code>, <code class="verbatim">u</code>, <code class="verbatim">U</code></td><td>Marks, unmarks, unmarks all entries for bulk actions.</td></tr> | ||
| 744 | <tr><td><code class="verbatim">B</code></td><td>Bulk action on the marked entries.</td></tr> | ||
| 745 | <tr><td><code class="verbatim">C-c C-t</code></td><td>Cycle TODO State.</td></tr> | ||
| 746 | <tr><td><code class="verbatim">C-c C-s</code>, <code class="verbatim">C-c C-d</code></td><td>Schedule, set deadline.</td></tr> | ||
| 747 | <tr><td><code class="verbatim">C-c C-q</code></td><td>Set tags.</td></tr> | ||
| 748 | <tr><td><code class="verbatim">C-c C-w</code></td><td>Refile.</td></tr> | ||
| 749 | <tr><td><code class="verbatim">C-c $</code>, <code class="verbatim">C-c C-x C-s</code></td><td>Archive.</td></tr> | ||
| 750 | </tbody> | ||
| 751 | </table> | ||
| 752 | <p><code class="verbatim">s</code> saves, as in <code class="verbatim">org-agenda-mode</code>. The text search that <code class="verbatim">s</code> starts from Org's agenda dispatcher is Search… in the view menu, and <code class="verbatim">S</code> is TODO Search….</p> | ||
| 753 | <p>See <a href="07-agenda.html">Agenda</a> for what these do. In the Capture window, typing a template's key picks it, <code class="verbatim">⌘↩</code> files the entry and <code class="verbatim">Esc</code> cancels; see <a href="08-capture.html">Capture</a>.</p> | ||
| 754 | <h2 id="ios-and-ipados">iOS and iPadOS</h2> | ||
| 755 | <p>With a hardware keyboard, the iOS app runs the preset <code class="verbatim">keymap</code> names in the folder's <code class="verbatim">config.toml</code>, with the folder's <code class="verbatim">keymap.toml</code> on it, as the Mac does. With <code class="verbatim">doom</code>, Vim keys work as on the Mac: normal, insert, visual and replace states, operators, motions, text objects, counts, registers, <code class="verbatim">.</code>, macros, marks, <code class="verbatim">/</code>, <code class="verbatim">?</code> and the ex commands <code class="verbatim">:w</code>, <code class="verbatim">:N</code> and <code class="verbatim">:s</code>, with a block cursor outside insert state. Typing on the on-screen keyboard in normal state goes in as insert state. Block selections show as one selection, and the clipboard is read only when <code class="verbatim">p</code> or <code class="verbatim">P</code> pastes, so iOS doesn't ask for it on every key.</p> | ||
| 756 | <ul> | ||
| 757 | <li>Option acts as Meta when the key starts a binding (<code class="verbatim">M-RET</code>, <code class="verbatim">M-<left></code>); otherwise Option types characters as usual.</li> | ||
| 758 | <li>Keys with <code class="verbatim">⌘</code> are left to iOS.</li> | ||
| 759 | <li>Movement and editing keys bound to <code class="verbatim">edit.</code> commands (<code class="verbatim">C-a</code>, <code class="verbatim">C-e</code>, <code class="verbatim">C-k</code> and so on) are left to the iOS text system, except undo.</li> | ||
| 760 | <li>Of the <code class="verbatim">app.</code> commands only the clock commands run from keys: <code class="verbatim">C-c C-x C-i</code>, <code class="verbatim">C-c C-x C-o</code>, <code class="verbatim">C-c C-x C-q</code>, <code class="verbatim">C-c C-x C-j</code>, <code class="verbatim">C-c C-x C-x</code> and <code class="verbatim">C-c C-x C-z</code>. Other <code class="verbatim">app.</code> keys, and editor commands such as narrowing, show <code class="verbatim">Not available on iOS yet</code>.</li> | ||
| 761 | <li>A sequence of two or more keys whose command cannot run at the caret runs it anyway and shows its message, as on the Mac (for example <code class="verbatim">Not on a heading</code>).</li> | ||
| 762 | <li>A pending prefix shows as a message, without key hints.</li> | ||
| 763 | </ul> | ||
| 764 | <p>The on-screen key bar's buttons run what their Emacs keys run at the caret (Fold is <code class="verbatim">TAB</code>, Promote is <code class="verbatim">M-<left></code>, TODO is <code class="verbatim">C-c C-t</code>). See <a href="14-ios.html">iOS</a>.</p> | ||
| 765 | <h2 id="key-reference">Key reference</h2> | ||
| 766 | <p>Every binding in the three presets, generated from the presets themselves. Each command's id, for <code class="verbatim">keymap.toml</code>, follows its title.</p> | ||
| 767 | <ul> | ||
| 768 | <li><strong>Emacs</strong> lists the Emacs preset's keys.</li> | ||
| 769 | <li><strong>Mac</strong> lists the Mac preset's keys, with macOS symbols. <code class="verbatim">⇥</code> is Tab and <code class="verbatim">↩</code> Return.</li> | ||
| 770 | <li><strong>Doom</strong> lists the keys the Doom preset adds. Every Emacs-preset key that starts with <code class="verbatim">C-c</code> or <code class="verbatim">C-x</code>, the <code class="verbatim">M-</code> and <code class="verbatim">S-</code> arrow keys, <code class="verbatim">M-RET</code>, <code class="verbatim">M-S-RET</code>, <code class="verbatim">C-RET</code>, <code class="verbatim">M-x</code> and <code class="verbatim">M-q</code> also work in the Doom preset, in normal, insert and visual states, so they are not repeated in the Doom column. Doom keys marked (N), (I) or (V) work only in normal, insert or visual state; unmarked ones work in all three.</li> | ||
| 771 | </ul> | ||
| 772 | <p>When a key appears in several rows, it runs the command whose condition holds at the caret: for example <code class="verbatim">M-<right></code> demotes a heading, indents a list item and moves a table column. The descriptions say where each one applies. Movement and text editing in the Doom preset are the Vim keys above, so the Doom column is empty for those rows.</p> | ||
| 773 | <h3 id="movement-and-the-region">Movement and the region</h3> | ||
| 774 | <table> | ||
| 775 | <thead> | ||
| 776 | <tr><th>Command</th><th>Emacs</th><th>Mac</th><th>Doom</th><th>What it does</th></tr> | ||
| 777 | </thead> | ||
| 778 | <tbody> | ||
| 779 | <tr><td>Forward Character (<code class="verbatim">edit.forward-char</code>)</td><td><code class="verbatim">C-f</code></td><td>—</td><td>—</td><td>Moves forward one character (<code class="verbatim">forward-char</code>).</td></tr> | ||
| 780 | <tr><td>Backward Character (<code class="verbatim">edit.backward-char</code>)</td><td><code class="verbatim">C-b</code></td><td>—</td><td>—</td><td>Moves back one character (<code class="verbatim">backward-char</code>).</td></tr> | ||
| 781 | <tr><td>Next Line (<code class="verbatim">edit.next-line</code>)</td><td><code class="verbatim">C-n</code></td><td>—</td><td>—</td><td>Moves down one line (<code class="verbatim">next-line</code>).</td></tr> | ||
| 782 | <tr><td>Previous Line (<code class="verbatim">edit.previous-line</code>)</td><td><code class="verbatim">C-p</code></td><td>—</td><td>—</td><td>Moves up one line (<code class="verbatim">previous-line</code>).</td></tr> | ||
| 783 | <tr><td>Beginning of Line (<code class="verbatim">edit.beginning-of-line</code>)</td><td><code class="verbatim">C-a</code></td><td>—</td><td>—</td><td>Moves to the start of the line (<code class="verbatim">move-beginning-of-line</code>).</td></tr> | ||
| 784 | <tr><td>End of Line (<code class="verbatim">edit.end-of-line</code>)</td><td><code class="verbatim">C-e</code></td><td>—</td><td>—</td><td>Moves to the end of the line (<code class="verbatim">move-end-of-line</code>).</td></tr> | ||
| 785 | <tr><td>Forward Word (<code class="verbatim">edit.forward-word</code>)</td><td><code class="verbatim">M-f</code></td><td>—</td><td>—</td><td>Moves forward one word (<code class="verbatim">forward-word</code>).</td></tr> | ||
| 786 | <tr><td>Backward Word (<code class="verbatim">edit.backward-word</code>)</td><td><code class="verbatim">M-b</code></td><td>—</td><td>—</td><td>Moves back one word (<code class="verbatim">backward-word</code>).</td></tr> | ||
| 787 | <tr><td>Beginning of Buffer (<code class="verbatim">edit.beginning-of-buffer</code>)</td><td><code class="verbatim">M-<</code></td><td>—</td><td>—</td><td>Moves to the start of the file (<code class="verbatim">beginning-of-buffer</code>).</td></tr> | ||
| 788 | <tr><td>End of Buffer (<code class="verbatim">edit.end-of-buffer</code>)</td><td><code class="verbatim">M-></code></td><td>—</td><td>—</td><td>Moves to the end of the file (<code class="verbatim">end-of-buffer</code>).</td></tr> | ||
| 789 | <tr><td>Scroll Up (<code class="verbatim">edit.scroll-up</code>)</td><td><code class="verbatim">C-v</code></td><td>—</td><td>—</td><td>Scrolls down one screen (<code class="verbatim">scroll-up-command</code>).</td></tr> | ||
| 790 | <tr><td>Scroll Down (<code class="verbatim">edit.scroll-down</code>)</td><td><code class="verbatim">M-v</code></td><td>—</td><td>—</td><td>Scrolls up one screen (<code class="verbatim">scroll-down-command</code>).</td></tr> | ||
| 791 | <tr><td>Recenter (<code class="verbatim">edit.recenter</code>)</td><td><code class="verbatim">C-l</code></td><td>—</td><td>—</td><td>Scrolls so the caret's line is in the middle of the window (<code class="verbatim">recenter-top-bottom</code>, without the cycling).</td></tr> | ||
| 792 | <tr><td>Set Mark (<code class="verbatim">edit.set-mark</code>)</td><td><code class="verbatim">C-SPC</code></td><td>—</td><td>—</td><td>Sets the mark at the caret. Until the next command that is not a movement, movement keys extend the selection (<code class="verbatim">set-mark-command</code>).</td></tr> | ||
| 793 | <tr><td>Quit (<code class="verbatim">edit.keyboard-quit</code>)</td><td><code class="verbatim">C-g</code></td><td>—</td><td>—</td><td>Drops the mark and the selection, and shows <code class="verbatim">Quit</code> (<code class="verbatim">keyboard-quit</code>).</td></tr> | ||
| 794 | <tr><td>Select All (<code class="verbatim">edit.select-all</code>)</td><td><code class="verbatim">C-x h</code></td><td>—</td><td>—</td><td>Selects the whole file (<code class="verbatim">mark-whole-buffer</code>).</td></tr> | ||
| 795 | </tbody> | ||
| 796 | </table> | ||
| 797 | <h3 id="editing">Editing</h3> | ||
| 798 | <table> | ||
| 799 | <thead> | ||
| 800 | <tr><th>Command</th><th>Emacs</th><th>Mac</th><th>Doom</th><th>What it does</th></tr> | ||
| 801 | </thead> | ||
| 802 | <tbody> | ||
| 803 | <tr><td>Delete Character (<code class="verbatim">edit.delete-char</code>)</td><td><code class="verbatim">C-d</code></td><td>—</td><td>—</td><td>Deletes the character after the caret (<code class="verbatim">delete-char</code>).</td></tr> | ||
| 804 | <tr><td>Kill Word (<code class="verbatim">edit.kill-word</code>)</td><td><code class="verbatim">M-d</code></td><td>—</td><td>—</td><td>Deletes to the end of the word (<code class="verbatim">kill-word</code>).</td></tr> | ||
| 805 | <tr><td>Kill Word Backward (<code class="verbatim">edit.backward-kill-word</code>)</td><td><code class="verbatim">M-DEL</code></td><td>—</td><td>—</td><td>Deletes to the start of the word (<code class="verbatim">backward-kill-word</code>).</td></tr> | ||
| 806 | <tr><td>Kill Line (<code class="verbatim">edit.kill-line</code>)</td><td><code class="verbatim">C-k</code></td><td>—</td><td>—</td><td>Deletes to the end of the line, or the newline at its end, into the macOS kill buffer (<code class="verbatim">kill-line</code>).</td></tr> | ||
| 807 | <tr><td>Kill Region (<code class="verbatim">edit.kill-region</code>)</td><td><code class="verbatim">C-w</code></td><td>—</td><td>—</td><td>Cuts the selection to the clipboard (<code class="verbatim">kill-region</code>).</td></tr> | ||
| 808 | <tr><td>Copy Region (<code class="verbatim">edit.copy-region</code>)</td><td><code class="verbatim">M-w</code></td><td>—</td><td>—</td><td>Copies the selection to the clipboard (<code class="verbatim">kill-ring-save</code>).</td></tr> | ||
| 809 | <tr><td>Yank (<code class="verbatim">edit.yank</code>)</td><td><code class="verbatim">C-y</code></td><td>—</td><td>—</td><td>Inserts the text last deleted with Kill Line, from the macOS kill buffer, not the clipboard (<code class="verbatim">yank</code>). There is no kill ring.</td></tr> | ||
| 810 | <tr><td>Undo (<code class="verbatim">edit.undo</code>)</td><td><code class="verbatim">C-/</code>, <code class="verbatim">C-_</code>, <code class="verbatim">C-x u</code></td><td>—</td><td>—</td><td>Undoes the last change (<code class="verbatim">undo</code>).</td></tr> | ||
| 811 | <tr><td>Transpose Characters (<code class="verbatim">edit.transpose-chars</code>)</td><td><code class="verbatim">C-t</code></td><td>—</td><td>—</td><td>Swaps the characters around the caret (<code class="verbatim">transpose-chars</code>).</td></tr> | ||
| 812 | <tr><td>Find (<code class="verbatim">edit.find</code>)</td><td>—</td><td><code class="verbatim">⌘F</code></td><td><code class="verbatim">SPC s s</code> (N)</td><td>Opens the find bar.</td></tr> | ||
| 813 | <tr><td>Incremental Search (<code class="verbatim">edit.isearch-forward</code>)</td><td><code class="verbatim">C-s</code></td><td>—</td><td>—</td><td>Searches forward as you type (<code class="verbatim">isearch-forward</code>). See <a href="02-the-editor.html">The editor</a>.</td></tr> | ||
| 814 | <tr><td>Incremental Search Backward (<code class="verbatim">edit.isearch-backward</code>)</td><td><code class="verbatim">C-r</code></td><td>—</td><td>—</td><td>Searches backward as you type (<code class="verbatim">isearch-backward</code>).</td></tr> | ||
| 815 | <tr><td>Incremental Regexp Search (<code class="verbatim">edit.isearch-forward-regexp</code>)</td><td><code class="verbatim">C-M-s</code></td><td>—</td><td>—</td><td>The same with a regular expression (<code class="verbatim">isearch-forward-regexp</code>).</td></tr> | ||
| 816 | <tr><td>Incremental Regexp Search Backward (<code class="verbatim">edit.isearch-backward-regexp</code>)</td><td><code class="verbatim">C-M-r</code></td><td>—</td><td>—</td><td>The same backward (<code class="verbatim">isearch-backward-regexp</code>).</td></tr> | ||
| 817 | <tr><td>Turn Auto Fill On or Off (<code class="verbatim">editor.toggle-auto-fill</code>)</td><td>—</td><td>—</td><td>—</td><td>Turns <code class="verbatim">auto-fill-mode</code> on or off in the current buffer.</td></tr> | ||
| 818 | <tr><td>Find and Replace (<code class="verbatim">edit.replace</code>)</td><td><code class="verbatim">M-%</code></td><td>—</td><td>—</td><td>Opens the find bar with replace (<code class="verbatim">query-replace</code>).</td></tr> | ||
| 819 | <tr><td>Find Next (<code class="verbatim">edit.find-next</code>)</td><td>—</td><td>—</td><td>—</td><td>Goes to the next match of the find bar's text.</td></tr> | ||
| 820 | <tr><td>Find Previous (<code class="verbatim">edit.find-previous</code>)</td><td>—</td><td>—</td><td>—</td><td>Goes to the previous match.</td></tr> | ||
| 821 | <tr><td>Use Selection for Find (<code class="verbatim">edit.use-selection-for-find</code>)</td><td>—</td><td>—</td><td>—</td><td>Puts the selection in the find bar.</td></tr> | ||
| 822 | <tr><td>Complete at Point (<code class="verbatim">editor.complete</code>)</td><td><code class="verbatim">C-M-i</code></td><td>—</td><td><code class="verbatim">C-SPC</code> (I), <code class="verbatim">C-@</code> (I)</td><td>Completes what is typed at the caret: <code class="verbatim">#+</code> keywords and their values, link types, entities, tags, TODO keywords, headings, drawers, properties, src languages and header arguments, and <code class="verbatim"><s</code>-style templates (<code class="verbatim">completion-at-point</code>). One candidate is inserted; several open a list.</td></tr> | ||
| 823 | <tr><td>Fill Paragraph (<code class="verbatim">org.fill-paragraph</code>)</td><td><code class="verbatim">M-q</code></td><td><code class="verbatim">⌃⌘P</code></td><td>—</td><td>Refills the paragraph or list item to the fill column (<code class="verbatim">org-fill-paragraph</code>); with a selection, every paragraph it touches. In the Doom preset, <code class="verbatim">gq</code> and <code class="verbatim">gw</code> fill the lines a motion covers; see <a href="#operators">Operators</a>.</td></tr> | ||
| 824 | </tbody> | ||
| 825 | </table> | ||
| 826 | <h3 id="outline-visibility-and-narrowing">Outline: visibility and narrowing</h3> | ||
| 827 | <table> | ||
| 828 | <thead> | ||
| 829 | <tr><th>Command</th><th>Emacs</th><th>Mac</th><th>Doom</th><th>What it does</th></tr> | ||
| 830 | </thead> | ||
| 831 | <tbody> | ||
| 832 | <tr><td>Cycle Visibility (<code class="verbatim">org.cycle</code>)</td><td><code class="verbatim">TAB</code></td><td><code class="verbatim">⇥</code></td><td><code class="verbatim">TAB</code> (N, V)</td><td>On a heading, cycles its subtree through folded, children and everything; on the first or last line of a drawer or block, folds or unfolds it (<code class="verbatim">org-cycle</code>). Elsewhere, <code class="verbatim">TAB</code> types a tab in the Emacs and Mac presets.</td></tr> | ||
| 833 | <tr><td>Toggle Fold (<code class="verbatim">org.fold.toggle</code>)</td><td>—</td><td>—</td><td><code class="verbatim">z a</code> (N)</td><td>On a heading line, opens a folded heading one level or folds an open one (<code class="verbatim">+org/toggle-fold</code>).</td></tr> | ||
| 834 | <tr><td>Open Fold (<code class="verbatim">org.fold.open</code>)</td><td>—</td><td>—</td><td><code class="verbatim">z o</code> (N)</td><td>On a heading line, opens a folded heading one level (<code class="verbatim">+org/open-fold</code>).</td></tr> | ||
| 835 | <tr><td>Close Fold (<code class="verbatim">org.fold.close</code>)</td><td>—</td><td>—</td><td><code class="verbatim">z c</code> (N)</td><td>Folds the subtree the caret is in (<code class="verbatim">outline-hide-subtree</code>).</td></tr> | ||
| 836 | <tr><td>Cycle Global Visibility (<code class="verbatim">org.cycle-global</code>)</td><td><code class="verbatim">S-TAB</code></td><td><code class="verbatim">⇧⇥</code></td><td><code class="verbatim">S-TAB</code>, <code class="verbatim">z A</code> (N)</td><td>Cycles the whole file through overview, contents and everything (<code class="verbatim">org-global-cycle</code>).</td></tr> | ||
| 837 | <tr><td>Narrow to Subtree (<code class="verbatim">org.narrow.subtree</code>)</td><td><code class="verbatim">C-x n s</code></td><td>—</td><td><code class="verbatim">SPC m s n</code> (N)</td><td>Shows only the current subtree (<code class="verbatim">org-narrow-to-subtree</code>).</td></tr> | ||
| 838 | <tr><td>Narrow to Block (<code class="verbatim">org.narrow.block</code>)</td><td><code class="verbatim">C-x n b</code></td><td>—</td><td>—</td><td>Shows only the current block (<code class="verbatim">org-narrow-to-block</code>).</td></tr> | ||
| 839 | <tr><td>Widen (<code class="verbatim">org.widen</code>)</td><td><code class="verbatim">C-x n w</code></td><td>—</td><td><code class="verbatim">SPC m s N</code> (N)</td><td>Shows the whole file again (<code class="verbatim">widen</code>).</td></tr> | ||
| 840 | <tr><td>Narrow to Subtree or Widen (<code class="verbatim">org.narrow.toggle</code>)</td><td>—</td><td><code class="verbatim">⌃⌘N</code></td><td>—</td><td>Narrows to the subtree, or widens when already narrowed (<code class="verbatim">org-toggle-narrow-to-subtree</code>).</td></tr> | ||
| 841 | <tr><td>Sparse Tree… (<code class="verbatim">org.sparse-tree</code>)</td><td><code class="verbatim">C-c /</code></td><td>—</td><td><code class="verbatim">SPC m s s</code> (N)</td><td>Asks for a match and shows only the matching entries and their context (<code class="verbatim">org-sparse-tree</code>). <code class="verbatim">C-c C-c</code> clears the highlights.</td></tr> | ||
| 842 | <tr><td>Show or Hide Inline Images (<code class="verbatim">org.toggle-inline-images</code>)</td><td><code class="verbatim">C-c C-x C-v</code></td><td>—</td><td>—</td><td>Shows or hides image links as images (<code class="verbatim">org-toggle-inline-images</code>).</td></tr> | ||
| 843 | <tr><td>Show or Hide LaTeX Previews (<code class="verbatim">org.latex-preview</code>)</td><td><code class="verbatim">C-c C-x C-l</code></td><td>—</td><td>—</td><td>Shows or hides LaTeX fragments as typeset math (<code class="verbatim">org-latex-preview</code>).</td></tr> | ||
| 844 | </tbody> | ||
| 845 | </table> | ||
| 846 | <h3 id="outline-headings-and-subtrees">Outline: headings and subtrees</h3> | ||
| 847 | <table> | ||
| 848 | <thead> | ||
| 849 | <tr><th>Command</th><th>Emacs</th><th>Mac</th><th>Doom</th><th>What it does</th></tr> | ||
| 850 | </thead> | ||
| 851 | <tbody> | ||
| 852 | <tr><td>Next Heading (<code class="verbatim">org.heading.next</code>)</td><td><code class="verbatim">C-c C-n</code></td><td><code class="verbatim">⌥⌘↓</code></td><td>—</td><td>Moves to the next heading (<code class="verbatim">org-next-visible-heading</code>).</td></tr> | ||
| 853 | <tr><td>Previous Heading (<code class="verbatim">org.heading.previous</code>)</td><td><code class="verbatim">C-c C-p</code></td><td><code class="verbatim">⌥⌘↑</code></td><td>—</td><td>Moves to the previous heading (<code class="verbatim">org-previous-visible-heading</code>).</td></tr> | ||
| 854 | <tr><td>Next Heading at Same Level (<code class="verbatim">org.heading.forward-same-level</code>)</td><td><code class="verbatim">C-c C-f</code></td><td><code class="verbatim">⌥⇧⌘↓</code></td><td><code class="verbatim">] h</code> (N)</td><td>Moves to the next heading at the same level (<code class="verbatim">org-forward-heading-same-level</code>).</td></tr> | ||
| 855 | <tr><td>Previous Heading at Same Level (<code class="verbatim">org.heading.backward-same-level</code>)</td><td><code class="verbatim">C-c C-b</code></td><td><code class="verbatim">⌥⇧⌘↑</code></td><td><code class="verbatim">[ h</code> (N)</td><td>Moves to the previous heading at the same level (<code class="verbatim">org-backward-heading-same-level</code>).</td></tr> | ||
| 856 | <tr><td>Up to Parent Heading (<code class="verbatim">org.heading.up</code>)</td><td><code class="verbatim">C-c C-u</code></td><td>—</td><td><code class="verbatim">g h</code> (N)</td><td>Moves to the parent heading (<code class="verbatim">outline-up-heading</code>).</td></tr> | ||
| 857 | <tr><td>Go to Heading… (<code class="verbatim">org.goto</code>)</td><td><code class="verbatim">C-c C-j</code></td><td>—</td><td><code class="verbatim">SPC m .</code> (N)</td><td>Asks for a heading of this file by its outline path and jumps to it (<code class="verbatim">org-goto</code>).</td></tr> | ||
| 858 | <tr><td>Insert Heading (<code class="verbatim">org.heading.insert</code>)</td><td><code class="verbatim">M-RET</code></td><td><code class="verbatim">⌘↩</code></td><td>—</td><td>Inserts a heading at the current level; on a list item, see Insert Item (<code class="verbatim">org-meta-return</code>, <code class="verbatim">org-insert-heading</code>).</td></tr> | ||
| 859 | <tr><td>Insert Heading After Subtree (<code class="verbatim">org.heading.insert-after-subtree</code>)</td><td><code class="verbatim">C-RET</code></td><td><code class="verbatim">⌃⌘↩</code></td><td>—</td><td>Inserts a heading after the current subtree (<code class="verbatim">org-insert-heading-respect-content</code>).</td></tr> | ||
| 860 | <tr><td>Insert TODO Heading (<code class="verbatim">org.heading.insert-todo</code>)</td><td><code class="verbatim">M-S-RET</code></td><td><code class="verbatim">⇧⌘↩</code></td><td>—</td><td>Inserts a heading with the first TODO keyword (<code class="verbatim">org-insert-todo-heading</code>).</td></tr> | ||
| 861 | <tr><td>Promote Heading (<code class="verbatim">org.heading.promote</code>)</td><td><code class="verbatim">M-<left></code></td><td><code class="verbatim">⌃⌘←</code></td><td><code class="verbatim">M-h</code>, <code class="verbatim">C-d</code> (I), <code class="verbatim">S-TAB</code> (I)</td><td>On a heading, raises it one level (<code class="verbatim">org-do-promote</code>).</td></tr> | ||
| 862 | <tr><td>Demote Heading (<code class="verbatim">org.heading.demote</code>)</td><td><code class="verbatim">M-<right></code></td><td><code class="verbatim">⌃⌘→</code></td><td><code class="verbatim">M-l</code>, <code class="verbatim">C-t</code> (I), <code class="verbatim">TAB</code> (I)</td><td>On a heading, lowers it one level (<code class="verbatim">org-do-demote</code>).</td></tr> | ||
| 863 | <tr><td>Promote Subtree (<code class="verbatim">org.subtree.promote</code>)</td><td><code class="verbatim">M-S-<left></code></td><td><code class="verbatim">⌃⌥⌘←</code></td><td><code class="verbatim">M-H</code>, <code class="verbatim">SPC m s h</code> (N)</td><td>On a heading, raises it and its subtree (<code class="verbatim">org-promote-subtree</code>).</td></tr> | ||
| 864 | <tr><td>Demote Subtree (<code class="verbatim">org.subtree.demote</code>)</td><td><code class="verbatim">M-S-<right></code></td><td><code class="verbatim">⌃⌥⌘→</code></td><td><code class="verbatim">M-L</code>, <code class="verbatim">SPC m s l</code> (N)</td><td>On a heading, lowers it and its subtree (<code class="verbatim">org-demote-subtree</code>).</td></tr> | ||
| 865 | <tr><td>Move Subtree Up (<code class="verbatim">org.subtree.up</code>)</td><td><code class="verbatim">M-<up></code></td><td><code class="verbatim">⌃⌥⌘↑</code></td><td><code class="verbatim">M-k</code>, <code class="verbatim">SPC m s k</code> (N)</td><td>On a heading, swaps the subtree with the one above (<code class="verbatim">org-move-subtree-up</code>).</td></tr> | ||
| 866 | <tr><td>Move Subtree Down (<code class="verbatim">org.subtree.down</code>)</td><td><code class="verbatim">M-<down></code></td><td><code class="verbatim">⌃⌥⌘↓</code></td><td><code class="verbatim">M-j</code>, <code class="verbatim">SPC m s j</code> (N)</td><td>On a heading, swaps the subtree with the one below (<code class="verbatim">org-move-subtree-down</code>).</td></tr> | ||
| 867 | <tr><td>Mark Subtree (<code class="verbatim">org.subtree.mark</code>)</td><td><code class="verbatim">C-c @</code></td><td>—</td><td>—</td><td>Selects the current subtree (<code class="verbatim">org-mark-subtree</code>).</td></tr> | ||
| 868 | <tr><td>Cut Subtree (<code class="verbatim">org.subtree.cut</code>)</td><td><code class="verbatim">C-c C-x C-w</code></td><td>—</td><td><code class="verbatim">SPC m s d</code> (N)</td><td>Cuts the subtree to the clipboard (<code class="verbatim">org-cut-subtree</code>).</td></tr> | ||
| 869 | <tr><td>Copy Subtree (<code class="verbatim">org.subtree.copy</code>)</td><td><code class="verbatim">C-c C-x M-w</code></td><td>—</td><td>—</td><td>Copies the subtree to the clipboard (<code class="verbatim">org-copy-subtree</code>).</td></tr> | ||
| 870 | <tr><td>Paste Subtree (<code class="verbatim">org.subtree.paste</code>)</td><td><code class="verbatim">C-c C-x C-y</code></td><td>—</td><td>—</td><td>Pastes a subtree from the clipboard, its levels adjusted to fit (<code class="verbatim">org-paste-subtree</code>).</td></tr> | ||
| 871 | <tr><td>Clone Subtree with Time Shift (<code class="verbatim">org.subtree.clone</code>)</td><td><code class="verbatim">C-c C-x c</code></td><td>—</td><td><code class="verbatim">SPC m s c</code> (N)</td><td>Asks for a count and a time shift, then inserts shifted copies of the subtree (<code class="verbatim">org-clone-subtree-with-time-shift</code>).</td></tr> | ||
| 872 | <tr><td>Sort Entries (<code class="verbatim">org.sort</code>)</td><td><code class="verbatim">C-c ^</code></td><td><code class="verbatim">⌃⇧⌘S</code></td><td><code class="verbatim">SPC m s S</code> (N)</td><td>Sorts by a key you pick: the lines of a table in a table, the list on an item, otherwise the children of the current heading (<code class="verbatim">org-sort</code>).</td></tr> | ||
| 873 | <tr><td>Toggle Heading (<code class="verbatim">org.heading.toggle</code>)</td><td><code class="verbatim">C-c *</code></td><td>—</td><td><code class="verbatim">SPC m h</code> (N)</td><td>Outside a table, turns headings into text and lines or items into headings (<code class="verbatim">org-toggle-heading</code>).</td></tr> | ||
| 874 | <tr><td>Toggle COMMENT (<code class="verbatim">org.heading.toggle-comment</code>)</td><td><code class="verbatim">C-c ;</code></td><td>—</td><td>—</td><td>Adds or removes the <code class="verbatim">COMMENT</code> keyword (<code class="verbatim">org-toggle-comment</code>).</td></tr> | ||
| 875 | <tr><td>Refile… (<code class="verbatim">app.refile</code>)</td><td><code class="verbatim">C-c C-w</code></td><td><code class="verbatim">⌃⌘W</code></td><td><code class="verbatim">SPC m r r</code> (N), <code class="verbatim">SPC m s r</code> (N)</td><td>Asks for a target heading in your folders and moves the subtree there (<code class="verbatim">org-refile</code>).</td></tr> | ||
| 876 | <tr><td>Copy to Refile Target… (<code class="verbatim">app.refile.copy</code>)</td><td><code class="verbatim">C-c M-w</code></td><td>—</td><td><code class="verbatim">C-c M-w</code></td><td>Asks for a target and copies the subtree there (<code class="verbatim">org-copy</code>).</td></tr> | ||
| 877 | <tr><td>Go to Refile Target… (<code class="verbatim">app.refile.goto</code>)</td><td><code class="verbatim">C-u C-c C-w</code></td><td>—</td><td><code class="verbatim">SPC u SPC m r r</code> (N)</td><td>Asks for a target and jumps to it (<code class="verbatim">org-refile</code> with a prefix).</td></tr> | ||
| 878 | <tr><td>Drag Element Backward (<code class="verbatim">org.element.drag-backward</code>)</td><td><code class="verbatim">M-<up></code></td><td>—</td><td><code class="verbatim">M-k</code></td><td>Away from headings, items and tables, swaps the element with the one before it (<code class="verbatim">org-drag-element-backward</code>).</td></tr> | ||
| 879 | <tr><td>Drag Element Forward (<code class="verbatim">org.element.drag-forward</code>)</td><td><code class="verbatim">M-<down></code></td><td>—</td><td><code class="verbatim">M-j</code></td><td>Away from headings, items and tables, swaps the element with the one after it (<code class="verbatim">org-drag-element-forward</code>).</td></tr> | ||
| 880 | <tr><td>Insert Drawer (<code class="verbatim">org.drawer.insert</code>)</td><td><code class="verbatim">C-c C-x d</code></td><td>—</td><td><code class="verbatim">C-c C-x d</code></td><td>Asks for a name and inserts a drawer, or puts the selected lines in one (<code class="verbatim">org-insert-drawer</code>).</td></tr> | ||
| 881 | <tr><td>Archive Subtree (<code class="verbatim">app.archive</code>)</td><td><code class="verbatim">C-c C-x C-s</code>, <code class="verbatim">C-c $</code></td><td><code class="verbatim">⌃⌘A</code></td><td><code class="verbatim">SPC m A</code> (N), <code class="verbatim">SPC m s A</code> (N)</td><td>Moves the subtree to the archive file (<code class="verbatim">org-archive-subtree</code>).</td></tr> | ||
| 882 | <tr><td>Toggle ARCHIVE Tag (<code class="verbatim">org.archive.toggle-tag</code>)</td><td><code class="verbatim">C-c C-x a</code></td><td>—</td><td><code class="verbatim">SPC m s a</code> (N)</td><td>Adds or removes the <code class="verbatim">ARCHIVE</code> tag (<code class="verbatim">org-toggle-archive-tag</code>).</td></tr> | ||
| 883 | <tr><td>Archive to Archive Sibling (<code class="verbatim">org.archive.to-sibling</code>)</td><td><code class="verbatim">C-c C-x A</code></td><td>—</td><td>—</td><td>Moves the subtree under an <code class="verbatim">Archive</code> sibling heading (<code class="verbatim">org-archive-to-archive-sibling</code>).</td></tr> | ||
| 884 | </tbody> | ||
| 885 | </table> | ||
| 886 | <h3 id="lists-and-checkboxes">Lists and checkboxes</h3> | ||
| 887 | <table> | ||
| 888 | <thead> | ||
| 889 | <tr><th>Command</th><th>Emacs</th><th>Mac</th><th>Doom</th><th>What it does</th></tr> | ||
| 890 | </thead> | ||
| 891 | <tbody> | ||
| 892 | <tr><td>Insert Item (<code class="verbatim">org.item.insert</code>)</td><td><code class="verbatim">M-RET</code></td><td><code class="verbatim">⌘↩</code></td><td>—</td><td>In a list, inserts a new item (<code class="verbatim">org-insert-item</code>).</td></tr> | ||
| 893 | <tr><td>Insert Checkbox Item (<code class="verbatim">org.item.insert-checkbox</code>)</td><td><code class="verbatim">M-S-RET</code></td><td><code class="verbatim">⇧⌘↩</code></td><td>—</td><td>In a list, inserts a new item with a checkbox.</td></tr> | ||
| 894 | <tr><td>Indent Item (<code class="verbatim">org.item.indent</code>)</td><td><code class="verbatim">M-<right></code></td><td><code class="verbatim">⌃⌘→</code></td><td><code class="verbatim">M-l</code>, <code class="verbatim">C-t</code> (I)</td><td>In a list, indents the item (<code class="verbatim">org-indent-item</code>).</td></tr> | ||
| 895 | <tr><td>Outdent Item (<code class="verbatim">org.item.outdent</code>)</td><td><code class="verbatim">M-<left></code></td><td><code class="verbatim">⌃⌘←</code></td><td><code class="verbatim">M-h</code>, <code class="verbatim">C-d</code> (I)</td><td>In a list, outdents the item (<code class="verbatim">org-outdent-item</code>).</td></tr> | ||
| 896 | <tr><td>Indent Item and Children (<code class="verbatim">org.item.indent-tree</code>)</td><td><code class="verbatim">M-S-<right></code></td><td><code class="verbatim">⌃⌥⌘→</code></td><td><code class="verbatim">M-L</code>, <code class="verbatim">TAB</code> (I)</td><td>In a list, indents the item and its children (<code class="verbatim">org-indent-item-tree</code>).</td></tr> | ||
| 897 | <tr><td>Outdent Item and Children (<code class="verbatim">org.item.outdent-tree</code>)</td><td><code class="verbatim">M-S-<left></code></td><td><code class="verbatim">⌃⌥⌘←</code></td><td><code class="verbatim">M-H</code>, <code class="verbatim">S-TAB</code> (I)</td><td>In a list, outdents the item and its children (<code class="verbatim">org-outdent-item-tree</code>).</td></tr> | ||
| 898 | <tr><td>Move Item Up (<code class="verbatim">org.item.up</code>)</td><td><code class="verbatim">M-<up></code></td><td><code class="verbatim">⌃⌥⌘↑</code></td><td><code class="verbatim">M-k</code></td><td>In a list, swaps the item with the one above (<code class="verbatim">org-move-item-up</code>).</td></tr> | ||
| 899 | <tr><td>Move Item Down (<code class="verbatim">org.item.down</code>)</td><td><code class="verbatim">M-<down></code></td><td><code class="verbatim">⌃⌥⌘↓</code></td><td><code class="verbatim">M-j</code></td><td>In a list, swaps the item with the one below (<code class="verbatim">org-move-item-down</code>).</td></tr> | ||
| 900 | <tr><td>Toggle Checkbox (<code class="verbatim">org.checkbox.toggle</code>)</td><td><code class="verbatim">C-c C-x C-b</code></td><td><code class="verbatim">⌃⌘C</code></td><td><code class="verbatim">SPC m x</code> (N)</td><td>Checks or unchecks the item's checkbox (<code class="verbatim">org-toggle-checkbox</code>).</td></tr> | ||
| 901 | <tr><td>Next Bullet Type (<code class="verbatim">org.item.bullet-next</code>)</td><td><code class="verbatim">S-<right></code></td><td>—</td><td><code class="verbatim">C-S-l</code> (N, I)</td><td>On an item, gives the list the next bullet type (<code class="verbatim">org-cycle-list-bullet</code>).</td></tr> | ||
| 902 | <tr><td>Previous Bullet Type (<code class="verbatim">org.item.bullet-previous</code>)</td><td><code class="verbatim">S-<left></code></td><td>—</td><td><code class="verbatim">C-S-h</code> (N, I)</td><td>On an item, gives the list the previous bullet type (<code class="verbatim">org-cycle-list-bullet</code> with <code class="verbatim">previous</code>).</td></tr> | ||
| 903 | <tr><td>Toggle Item (<code class="verbatim">org.item.toggle</code>)</td><td><code class="verbatim">C-c -</code></td><td>—</td><td><code class="verbatim">SPC m i</code> (N)</td><td>Outside a table: on an item, cycles the list's bullet style; elsewhere turns lines into items and items into text (<code class="verbatim">org-ctrl-c-minus</code>).</td></tr> | ||
| 904 | </tbody> | ||
| 905 | </table> | ||
| 906 | <h3 id="todo-priority-and-tags">TODO, priority and tags</h3> | ||
| 907 | <table> | ||
| 908 | <thead> | ||
| 909 | <tr><th>Command</th><th>Emacs</th><th>Mac</th><th>Doom</th><th>What it does</th></tr> | ||
| 910 | </thead> | ||
| 911 | <tbody> | ||
| 912 | <tr><td>Cycle TODO State (<code class="verbatim">org.todo.cycle</code>)</td><td><code class="verbatim">C-c C-t</code></td><td><code class="verbatim">⌃⌘T</code></td><td><code class="verbatim">SPC m t</code> (N)</td><td>Cycles the TODO keyword; with fast-selection keys in <code class="verbatim">#+TODO</code>, asks for one (<code class="verbatim">org-todo</code>).</td></tr> | ||
| 913 | <tr><td>Next TODO Keyword (<code class="verbatim">org.todo.next</code>)</td><td><code class="verbatim">S-<right></code></td><td><code class="verbatim">⌃⇧⌘→</code></td><td><code class="verbatim">C-S-l</code> (N, I)</td><td>On a heading, sets the next keyword across all sequences (<code class="verbatim">org-shiftright</code>).</td></tr> | ||
| 914 | <tr><td>Previous TODO Keyword (<code class="verbatim">org.todo.previous</code>)</td><td><code class="verbatim">S-<left></code></td><td><code class="verbatim">⌃⇧⌘←</code></td><td><code class="verbatim">C-S-h</code> (N, I)</td><td>On a heading, sets the previous keyword (<code class="verbatim">org-shiftleft</code>).</td></tr> | ||
| 915 | <tr><td>Toggle ORDERED Property (<code class="verbatim">org.property.toggle-ordered</code>)</td><td><code class="verbatim">C-c C-x o</code></td><td>—</td><td>—</td><td>Sets or removes <code class="verbatim">:ORDERED: t</code>, which makes the entry's TODO children be done in order (<code class="verbatim">org-toggle-ordered-property</code>).</td></tr> | ||
| 916 | <tr><td>Raise Priority (<code class="verbatim">org.priority.up</code>)</td><td><code class="verbatim">S-<up></code></td><td><code class="verbatim">⌃⌘↑</code></td><td><code class="verbatim">C-S-k</code> (N, I), <code class="verbatim">SPC m p u</code> (N)</td><td>On a heading, raises the priority (<code class="verbatim">org-priority-up</code>).</td></tr> | ||
| 917 | <tr><td>Lower Priority (<code class="verbatim">org.priority.down</code>)</td><td><code class="verbatim">S-<down></code></td><td><code class="verbatim">⌃⌘↓</code></td><td><code class="verbatim">C-S-j</code> (N, I), <code class="verbatim">SPC m p d</code> (N)</td><td>On a heading, lowers the priority (<code class="verbatim">org-priority-down</code>).</td></tr> | ||
| 918 | <tr><td>Set Priority… (<code class="verbatim">org.priority.set</code>)</td><td><code class="verbatim">C-c ,</code></td><td><code class="verbatim">⌃⌘,</code></td><td><code class="verbatim">SPC m p p</code> (N)</td><td>Asks for a priority; <code class="verbatim">SPC</code> removes it (<code class="verbatim">org-priority</code>).</td></tr> | ||
| 919 | <tr><td>Set Priority A (<code class="verbatim">org.priority.set-a</code>)</td><td>—</td><td>—</td><td>—</td><td>Sets priority A. Bound only as a speed key.</td></tr> | ||
| 920 | <tr><td>Set Priority B (<code class="verbatim">org.priority.set-b</code>)</td><td>—</td><td>—</td><td>—</td><td>Sets priority B. Bound only as a speed key.</td></tr> | ||
| 921 | <tr><td>Set Priority C (<code class="verbatim">org.priority.set-c</code>)</td><td>—</td><td>—</td><td>—</td><td>Sets priority C. Bound only as a speed key.</td></tr> | ||
| 922 | <tr><td>Remove Priority (<code class="verbatim">org.priority.remove</code>)</td><td>—</td><td>—</td><td>—</td><td>Removes the priority. Bound only as a speed key.</td></tr> | ||
| 923 | <tr><td>Set Tags (<code class="verbatim">org.tags.set</code>)</td><td><code class="verbatim">C-c C-q</code></td><td><code class="verbatim">⌃⌘G</code></td><td><code class="verbatim">SPC m q</code> (N)</td><td>Sets the heading's tags, with fast selection when <code class="verbatim">#+TAGS</code> has keys (<code class="verbatim">org-set-tags-command</code>).</td></tr> | ||
| 924 | </tbody> | ||
| 925 | </table> | ||
| 926 | <h3 id="properties-and-column-view">Properties and column view</h3> | ||
| 927 | <table> | ||
| 928 | <thead> | ||
| 929 | <tr><th>Command</th><th>Emacs</th><th>Mac</th><th>Doom</th><th>What it does</th></tr> | ||
| 930 | </thead> | ||
| 931 | <tbody> | ||
| 932 | <tr><td>Set Property… (<code class="verbatim">org.property.read-and-set</code>)</td><td><code class="verbatim">C-c C-x p</code></td><td><code class="verbatim">⌃⇧⌘P</code></td><td><code class="verbatim">SPC m o</code> (N)</td><td>Asks for a property and a value and sets it (<code class="verbatim">org-set-property</code>).</td></tr> | ||
| 933 | <tr><td>Next Allowed Value (<code class="verbatim">org.property.next-value</code>)</td><td><code class="verbatim">S-<right></code></td><td><code class="verbatim">⌃⇧⌘→</code></td><td><code class="verbatim">C-S-l</code> (N, I)</td><td>On a property line, sets the next allowed value (<code class="verbatim">org-property-next-allowed-value</code>).</td></tr> | ||
| 934 | <tr><td>Previous Allowed Value (<code class="verbatim">org.property.previous-value</code>)</td><td><code class="verbatim">S-<left></code></td><td><code class="verbatim">⌃⇧⌘←</code></td><td><code class="verbatim">C-S-h</code> (N, I)</td><td>On a property line, sets the previous allowed value (<code class="verbatim">org-property-previous-allowed-value</code>).</td></tr> | ||
| 935 | <tr><td>Set Effort (<code class="verbatim">org.effort.set</code>)</td><td><code class="verbatim">C-c C-x e</code></td><td><code class="verbatim">⌃⇧⌘E</code></td><td><code class="verbatim">SPC m c E</code> (N)</td><td>Sets the <code class="verbatim">Effort</code> property, offering <code class="verbatim">Effort_ALL</code> values (<code class="verbatim">org-set-effort</code>).</td></tr> | ||
| 936 | <tr><td>Column View (<code class="verbatim">org.columns</code>)</td><td><code class="verbatim">C-c C-x C-c</code></td><td>—</td><td>—</td><td>Shows the column view of the entries, where values can be edited (<code class="verbatim">org-columns</code>).</td></tr> | ||
| 937 | <tr><td>Insert Column View Table (<code class="verbatim">org.columns.insert-dblock</code>)</td><td><code class="verbatim">C-c C-x i</code></td><td>—</td><td>—</td><td>Inserts a <code class="verbatim">columnview</code> dynamic block (<code class="verbatim">org-columns-insert-dblock</code>).</td></tr> | ||
| 938 | <tr><td>Update Dynamic Block (<code class="verbatim">org.dblock.update</code>)</td><td><code class="verbatim">C-c C-x C-u</code>, <code class="verbatim">C-c C-c</code></td><td><code class="verbatim">⌃⌘X</code></td><td>—</td><td>Updates the dynamic block at point, such as a clock table; <code class="verbatim">C-c C-c</code> and <code class="verbatim">⌃⌘X</code> do it on the block's <code class="verbatim">#+BEGIN</code> line (<code class="verbatim">org-update-dblock</code>).</td></tr> | ||
| 939 | </tbody> | ||
| 940 | </table> | ||
| 941 | <h3 id="dates-and-clocking">Dates and clocking</h3> | ||
| 942 | <table> | ||
| 943 | <thead> | ||
| 944 | <tr><th>Command</th><th>Emacs</th><th>Mac</th><th>Doom</th><th>What it does</th></tr> | ||
| 945 | </thead> | ||
| 946 | <tbody> | ||
| 947 | <tr><td>Insert Timestamp (<code class="verbatim">org.timestamp.active</code>)</td><td><code class="verbatim">C-c .</code></td><td><code class="verbatim">⌃⌘.</code></td><td><code class="verbatim">SPC m d t</code> (N)</td><td>Asks for a date and inserts an active timestamp, or changes the one at point (<code class="verbatim">org-timestamp</code>).</td></tr> | ||
| 948 | <tr><td>Insert Inactive Timestamp (<code class="verbatim">org.timestamp.inactive</code>)</td><td><code class="verbatim">C-c !</code></td><td><code class="verbatim">⌃⌥⌘.</code></td><td><code class="verbatim">SPC m d T</code> (N)</td><td>Same, inactive (<code class="verbatim">org-timestamp-inactive</code>).</td></tr> | ||
| 949 | <tr><td>Schedule (<code class="verbatim">org.schedule</code>)</td><td><code class="verbatim">C-c C-s</code></td><td><code class="verbatim">⌃⌘S</code></td><td><code class="verbatim">SPC m d s</code> (N)</td><td>Asks for a date and sets <code class="verbatim">SCHEDULED</code> (<code class="verbatim">org-schedule</code>).</td></tr> | ||
| 950 | <tr><td>Set Deadline (<code class="verbatim">org.deadline</code>)</td><td><code class="verbatim">C-c C-d</code></td><td><code class="verbatim">⌃⌘E</code></td><td><code class="verbatim">SPC m d d</code> (N)</td><td>Asks for a date and sets <code class="verbatim">DEADLINE</code> (<code class="verbatim">org-deadline</code>).</td></tr> | ||
| 951 | <tr><td>Remove Schedule (<code class="verbatim">org.schedule.remove</code>)</td><td><code class="verbatim">C-u C-c C-s</code></td><td><code class="verbatim">⌃⌥⌘S</code></td><td><code class="verbatim">SPC u SPC m d s</code> (N)</td><td>Removes <code class="verbatim">SCHEDULED</code> (<code class="verbatim">org-schedule</code> with <code class="verbatim">C-u</code>).</td></tr> | ||
| 952 | <tr><td>Remove Deadline (<code class="verbatim">org.deadline.remove</code>)</td><td><code class="verbatim">C-u C-c C-d</code></td><td><code class="verbatim">⌃⌥⌘E</code></td><td><code class="verbatim">SPC u SPC m d d</code> (N)</td><td>Removes <code class="verbatim">DEADLINE</code> (<code class="verbatim">org-deadline</code> with <code class="verbatim">C-u</code>).</td></tr> | ||
| 953 | <tr><td>Increase Timestamp Part (<code class="verbatim">org.timestamp.up</code>)</td><td><code class="verbatim">S-<up></code></td><td><code class="verbatim">⌃⌘↑</code></td><td><code class="verbatim">C-S-k</code> (N, I)</td><td>On a timestamp, increases the part under the caret: year, month, day, hour or minute (<code class="verbatim">org-timestamp-up</code>).</td></tr> | ||
| 954 | <tr><td>Decrease Timestamp Part (<code class="verbatim">org.timestamp.down</code>)</td><td><code class="verbatim">S-<down></code></td><td><code class="verbatim">⌃⌘↓</code></td><td><code class="verbatim">C-S-j</code> (N, I)</td><td>On a timestamp, decreases the part under the caret (<code class="verbatim">org-timestamp-down</code>).</td></tr> | ||
| 955 | <tr><td>Timestamp One Day Later (<code class="verbatim">org.timestamp.day-later</code>)</td><td><code class="verbatim">S-<right></code></td><td><code class="verbatim">⌃⌘→</code></td><td><code class="verbatim">C-S-l</code> (N, I)</td><td>On a timestamp, moves it one day later (<code class="verbatim">org-timestamp-up-day</code>).</td></tr> | ||
| 956 | <tr><td>Timestamp One Day Earlier (<code class="verbatim">org.timestamp.day-earlier</code>)</td><td><code class="verbatim">S-<left></code></td><td><code class="verbatim">⌃⌘←</code></td><td><code class="verbatim">C-S-h</code> (N, I)</td><td>On a timestamp, moves it one day earlier (<code class="verbatim">org-timestamp-down-day</code>).</td></tr> | ||
| 957 | <tr><td>Evaluate Time Range (<code class="verbatim">org.timestamp.evaluate-range</code>)</td><td><code class="verbatim">C-c C-y</code></td><td>—</td><td>—</td><td>Shows how long the time range lasts, or updates a clock line (<code class="verbatim">org-evaluate-time-range</code>).</td></tr> | ||
| 958 | <tr><td>Clock In (<code class="verbatim">app.clock.in</code>)</td><td><code class="verbatim">C-c C-x C-i</code></td><td><code class="verbatim">⌃⌘I</code></td><td><code class="verbatim">SPC m c i</code> (N)</td><td>Starts the clock on the current entry (<code class="verbatim">org-clock-in</code>).</td></tr> | ||
| 959 | <tr><td>Clock In to Recent Entry… (<code class="verbatim">app.clock.in-recent</code>)</td><td>—</td><td><code class="verbatim">⌃⌥⌘I</code></td><td>—</td><td>Asks for an entry from the clock history and clocks in to it (<code class="verbatim">org-clock-in</code> with <code class="verbatim">C-u</code>).</td></tr> | ||
| 960 | <tr><td>Clock In to Last Entry (<code class="verbatim">app.clock.in-last</code>)</td><td><code class="verbatim">C-c C-x C-x</code></td><td>—</td><td><code class="verbatim">SPC m c I</code> (N)</td><td>Clocks in to the most recently clocked entry (<code class="verbatim">org-clock-in-last</code>).</td></tr> | ||
| 961 | <tr><td>Clock Out (<code class="verbatim">app.clock.out</code>)</td><td><code class="verbatim">C-c C-x C-o</code></td><td><code class="verbatim">⌃⇧⌘I</code></td><td><code class="verbatim">SPC m c o</code> (N)</td><td>Stops the clock (<code class="verbatim">org-clock-out</code>).</td></tr> | ||
| 962 | <tr><td>Cancel Clock (<code class="verbatim">app.clock.cancel</code>)</td><td><code class="verbatim">C-c C-x C-q</code></td><td><code class="verbatim">⌃⌘K</code></td><td><code class="verbatim">SPC m c c</code> (N)</td><td>Stops the clock and removes the running clock line (<code class="verbatim">org-clock-cancel</code>).</td></tr> | ||
| 963 | <tr><td>Go to Clocked Entry (<code class="verbatim">app.clock.goto</code>)</td><td><code class="verbatim">C-c C-x C-j</code></td><td><code class="verbatim">⌃⌘J</code></td><td><code class="verbatim">SPC m c g</code> (N)</td><td>Opens the entry the clock is running on, or the most recently clocked one (<code class="verbatim">org-clock-goto</code>).</td></tr> | ||
| 964 | <tr><td>Go to Recent Clocked Entry… (<code class="verbatim">app.clock.goto-recent</code>)</td><td>—</td><td><code class="verbatim">⌃⌥⌘J</code></td><td><code class="verbatim">SPC m c G</code> (N)</td><td>Asks for an entry from the clock history and opens it (<code class="verbatim">org-clock-goto</code> with <code class="verbatim">C-u</code>).</td></tr> | ||
| 965 | <tr><td>Mark as Default Clock Task (<code class="verbatim">app.clock.default</code>)</td><td>—</td><td>—</td><td><code class="verbatim">SPC m c d</code> (N)</td><td>Makes the current entry the default task, <code class="verbatim">d</code> in the clock selection (<code class="verbatim">org-clock-mark-default-task</code>).</td></tr> | ||
| 966 | <tr><td>Resolve Open Clocks… (<code class="verbatim">app.clock.resolve</code>)</td><td><code class="verbatim">C-c C-x C-z</code></td><td>—</td><td><code class="verbatim">SPC m c r</code> (N)</td><td>Asks what to do with each open <code class="verbatim">CLOCK:</code> line in your folders (<code class="verbatim">org-resolve-clocks</code>).</td></tr> | ||
| 967 | <tr><td>Clock Report (<code class="verbatim">app.clock.report</code>)</td><td>—</td><td>—</td><td><code class="verbatim">SPC z t</code> (N), <code class="verbatim">SPC m c R</code> (N)</td><td>Opens the Clock Report window.</td></tr> | ||
| 968 | <tr><td>Insert or Update Clock Table (<code class="verbatim">org.clock.report</code>)</td><td><code class="verbatim">C-c C-x C-r</code></td><td>—</td><td>—</td><td>Inserts a clock table, or updates the one at point (<code class="verbatim">org-clock-report</code>).</td></tr> | ||
| 969 | <tr><td>Start Timer (<code class="verbatim">org.timer.start</code>)</td><td><code class="verbatim">C-c C-x 0</code></td><td>—</td><td>—</td><td>Starts the relative timer (<code class="verbatim">org-timer-start</code>). See <a href="06-dates-and-clocking.html">Dates and clocking</a>.</td></tr> | ||
| 970 | <tr><td>Start Timer with Offset… (<code class="verbatim">org.timer.start-offset</code>)</td><td><code class="verbatim">C-u C-c C-x 0</code></td><td>—</td><td>—</td><td>Starts the timer from a value asked for (<code class="verbatim">org-timer-start</code> with <code class="verbatim">C-u</code>).</td></tr> | ||
| 971 | <tr><td>Shift Timer Values in Region… (<code class="verbatim">org.timer.change-times</code>)</td><td><code class="verbatim">C-u C-u C-c C-x 0</code></td><td>—</td><td>—</td><td>Moves every timer value in the selection by a difference (<code class="verbatim">org-timer-change-times-in-region</code>).</td></tr> | ||
| 972 | <tr><td>Insert Timer Value (<code class="verbatim">org.timer.insert</code>)</td><td><code class="verbatim">C-c C-x .</code></td><td>—</td><td>—</td><td>Inserts the timer's value, starting the timer if needed (<code class="verbatim">org-timer</code>).</td></tr> | ||
| 973 | <tr><td>Insert Timer Item (<code class="verbatim">org.timer.item</code>)</td><td><code class="verbatim">C-c C-x -</code></td><td>—</td><td>—</td><td>Inserts a timer list item (<code class="verbatim">org-timer-item</code>).</td></tr> | ||
| 974 | <tr><td>Pause or Continue Timer (<code class="verbatim">org.timer.pause</code>)</td><td><code class="verbatim">C-c C-x ,</code></td><td>—</td><td>—</td><td>Pauses or continues the timer (<code class="verbatim">org-timer-pause-or-continue</code>).</td></tr> | ||
| 975 | <tr><td>Stop Timer (<code class="verbatim">org.timer.stop</code>)</td><td><code class="verbatim">C-c C-x _</code>, <code class="verbatim">C-u C-c C-x ,</code></td><td>—</td><td>—</td><td>Stops the timer (<code class="verbatim">org-timer-stop</code>).</td></tr> | ||
| 976 | <tr><td>Set Countdown Timer… (<code class="verbatim">org.timer.set</code>)</td><td><code class="verbatim">C-c C-x ;</code></td><td>—</td><td>—</td><td>Starts a countdown (<code class="verbatim">org-timer-set-timer</code>).</td></tr> | ||
| 977 | <tr><td>Show Remaining Countdown Time (<code class="verbatim">org.timer.show-remaining</code>)</td><td>—</td><td>—</td><td>—</td><td>Says how long the countdown has left (<code class="verbatim">org-timer-show-remaining-time</code>).</td></tr> | ||
| 978 | </tbody> | ||
| 979 | </table> | ||
| 980 | <h3 id="tables">Tables</h3> | ||
| 981 | <table> | ||
| 982 | <thead> | ||
| 983 | <tr><th>Command</th><th>Emacs</th><th>Mac</th><th>Doom</th><th>What it does</th></tr> | ||
| 984 | </thead> | ||
| 985 | <tbody> | ||
| 986 | <tr><td>Create Table (<code class="verbatim">org.table.create</code>)</td><td><code class="verbatim">C-c</code> |</td><td><code class="verbatim">⌃⌘\</code></td><td>—</td><td>Asks for a size and inserts an empty table (<code class="verbatim">org-table-create</code>).</td></tr> | ||
| 987 | <tr><td>Next Table Field (<code class="verbatim">org.table.next-field</code>)</td><td><code class="verbatim">TAB</code></td><td><code class="verbatim">⇥</code></td><td><code class="verbatim">TAB</code> (I)</td><td>In a table, aligns it and moves to the next field, adding a row at the end (<code class="verbatim">org-table-next-field</code>).</td></tr> | ||
| 988 | <tr><td>Previous Table Field (<code class="verbatim">org.table.previous-field</code>)</td><td><code class="verbatim">S-TAB</code></td><td><code class="verbatim">⇧⇥</code></td><td><code class="verbatim">S-TAB</code> (I)</td><td>In a table, moves to the previous field (<code class="verbatim">org-table-previous-field</code>).</td></tr> | ||
| 989 | <tr><td>Next Table Row (<code class="verbatim">org.table.next-row</code>)</td><td><code class="verbatim">RET</code></td><td><code class="verbatim">↩</code></td><td><code class="verbatim">RET</code> (I)</td><td>In a table, moves to the same field in the next row, adding a row at the end (<code class="verbatim">org-table-next-row</code>).</td></tr> | ||
| 990 | <tr><td>Align Table (<code class="verbatim">org.table.align</code>)</td><td>—</td><td>—</td><td><code class="verbatim">SPC m b a</code> (N)</td><td>In a table, aligns it (<code class="verbatim">org-table-align</code>). <code class="verbatim">C-c C-c</code> in a table also aligns it; see Act at Point.</td></tr> | ||
| 991 | <tr><td>Move Table Row Up (<code class="verbatim">org.table.row-up</code>)</td><td><code class="verbatim">M-<up></code></td><td><code class="verbatim">⌃⌘↑</code></td><td><code class="verbatim">M-k</code></td><td>In a table, moves the row up (<code class="verbatim">org-table-move-row-up</code>).</td></tr> | ||
| 992 | <tr><td>Move Table Row Down (<code class="verbatim">org.table.row-down</code>)</td><td><code class="verbatim">M-<down></code></td><td><code class="verbatim">⌃⌘↓</code></td><td><code class="verbatim">M-j</code></td><td>In a table, moves the row down (<code class="verbatim">org-table-move-row-down</code>).</td></tr> | ||
| 993 | <tr><td>Move Table Column Left (<code class="verbatim">org.table.column-left</code>)</td><td><code class="verbatim">M-<left></code></td><td><code class="verbatim">⌃⌘←</code></td><td><code class="verbatim">M-h</code>, <code class="verbatim">C-d</code> (I)</td><td>In a table, moves the column left (<code class="verbatim">org-table-move-column-left</code>).</td></tr> | ||
| 994 | <tr><td>Move Table Column Right (<code class="verbatim">org.table.column-right</code>)</td><td><code class="verbatim">M-<right></code></td><td><code class="verbatim">⌃⌘→</code></td><td><code class="verbatim">M-l</code>, <code class="verbatim">C-t</code> (I)</td><td>In a table, moves the column right (<code class="verbatim">org-table-move-column-right</code>).</td></tr> | ||
| 995 | <tr><td>Insert Table Column (<code class="verbatim">org.table.insert-column</code>)</td><td><code class="verbatim">M-S-<right></code></td><td><code class="verbatim">⌃⌥⌘→</code></td><td><code class="verbatim">M-L</code>, <code class="verbatim">SPC m b i c</code> (N)</td><td>In a table, inserts a column (<code class="verbatim">org-table-insert-column</code>).</td></tr> | ||
| 996 | <tr><td>Delete Table Column (<code class="verbatim">org.table.delete-column</code>)</td><td><code class="verbatim">M-S-<left></code></td><td><code class="verbatim">⌃⌥⌘←</code></td><td><code class="verbatim">M-H</code>, <code class="verbatim">SPC m b d c</code> (N)</td><td>In a table, deletes the column (<code class="verbatim">org-table-delete-column</code>).</td></tr> | ||
| 997 | <tr><td>Insert Table Row (<code class="verbatim">org.table.insert-row</code>)</td><td><code class="verbatim">M-S-<down></code></td><td><code class="verbatim">⌃⌥⌘↓</code></td><td><code class="verbatim">M-J</code>, <code class="verbatim">SPC m b i r</code> (N)</td><td>In a table, inserts a row (<code class="verbatim">org-table-insert-row</code>).</td></tr> | ||
| 998 | <tr><td>Delete Table Row (<code class="verbatim">org.table.kill-row</code>)</td><td><code class="verbatim">M-S-<up></code></td><td><code class="verbatim">⌃⌥⌘↑</code></td><td><code class="verbatim">M-K</code>, <code class="verbatim">SPC m b d r</code> (N)</td><td>In a table, deletes the row (<code class="verbatim">org-table-kill-row</code>).</td></tr> | ||
| 999 | <tr><td>Insert Table Rule (<code class="verbatim">org.table.insert-hline</code>)</td><td><code class="verbatim">C-c -</code></td><td><code class="verbatim">⌃⌘-</code></td><td><code class="verbatim">SPC m b -</code> (N), <code class="verbatim">SPC m b i h</code> (N)</td><td>In a table, inserts a horizontal rule (<code class="verbatim">org-table-insert-hline</code>).</td></tr> | ||
| 1000 | <tr><td>Recalculate Table Row (<code class="verbatim">org.table.recalc</code>)</td><td><code class="verbatim">C-c *</code></td><td><code class="verbatim">⌃⌘*</code></td><td>—</td><td>In a table, recalculates the current row (<code class="verbatim">org-table-recalculate</code>). On a US keyboard, <code class="verbatim">⌃⌘*</code> is typed <code class="verbatim">⌃⇧⌘8</code>.</td></tr> | ||
| 1001 | <tr><td>Recalculate Table (<code class="verbatim">org.table.recalc-all</code>)</td><td><code class="verbatim">C-c C-c</code>, <code class="verbatim">C-u C-c *</code></td><td><code class="verbatim">⌃⌘X</code></td><td><code class="verbatim">SPC m b r</code> (N)</td><td>Recalculates the whole table; <code class="verbatim">C-c C-c</code> and <code class="verbatim">⌃⌘X</code> run it on a <code class="verbatim">#+TBLFM</code> line (<code class="verbatim">org-table-recalculate</code> with <code class="verbatim">C-u</code>).</td></tr> | ||
| 1002 | <tr><td>Iterate Table Formulas (<code class="verbatim">org.table.iterate</code>)</td><td><code class="verbatim">C-u C-u C-c *</code></td><td>—</td><td>—</td><td>Recalculates the whole table until it stops changing, at most ten times (<code class="verbatim">org-table-iterate</code>).</td></tr> | ||
| 1003 | <tr><td>Next table.el Cell (<code class="verbatim">org.table-el.next-cell</code>)</td><td><code class="verbatim">TAB</code></td><td><code class="verbatim">⇥</code></td><td><code class="verbatim">TAB</code></td><td>In a table.el table, lines up its borders and moves to the next cell (<code class="verbatim">table-forward-cell</code>).</td></tr> | ||
| 1004 | <tr><td>Previous table.el Cell (<code class="verbatim">org.table-el.previous-cell</code>)</td><td><code class="verbatim">S-TAB</code></td><td><code class="verbatim">⇧⇥</code></td><td><code class="verbatim">S-TAB</code></td><td>The same, to the previous cell (<code class="verbatim">table-backward-cell</code>).</td></tr> | ||
| 1005 | <tr><td>Align table.el Table (<code class="verbatim">org.table-el.align</code>)</td><td><code class="verbatim">C-c C-c</code></td><td><code class="verbatim">⌃⌘X</code></td><td><code class="verbatim">C-c C-c</code></td><td>In a table.el table, lines up its borders.</td></tr> | ||
| 1006 | <tr><td>Set Column Formula (<code class="verbatim">org.table.column-formula</code>)</td><td><code>C-c =</code></td><td>—</td><td>—</td><td>Asks for the column's formula, offering the stored one (<code class="verbatim">org-table-eval-formula</code>).</td></tr> | ||
| 1007 | <tr><td>Edit Table Field (<code class="verbatim">org.table.edit-field</code>)</td><td><code class="verbatim">C-c `</code></td><td>—</td><td>—</td><td>In a table, edits the field in a separate editor (<code class="verbatim">org-table-edit-field</code>).</td></tr> | ||
| 1008 | <tr><td>Shrink or Expand Table Column (<code class="verbatim">org.table.toggle-column-width</code>)</td><td><code class="verbatim">C-c TAB</code></td><td>—</td><td>—</td><td>In a table, shrinks or expands the column (<code class="verbatim">org-table-toggle-column-width</code>).</td></tr> | ||
| 1009 | </tbody> | ||
| 1010 | </table> | ||
| 1011 | <h3 id="links-and-footnotes">Links and footnotes</h3> | ||
| 1012 | <table> | ||
| 1013 | <thead> | ||
| 1014 | <tr><th>Command</th><th>Emacs</th><th>Mac</th><th>Doom</th><th>What it does</th></tr> | ||
| 1015 | </thead> | ||
| 1016 | <tbody> | ||
| 1017 | <tr><td>Open Link (<code class="verbatim">org.link.open</code>)</td><td><code class="verbatim">C-c C-o</code></td><td><code class="verbatim">⌃⌘O</code></td><td>—</td><td>Follows the link or timestamp at the caret (<code class="verbatim">org-open-at-point</code>).</td></tr> | ||
| 1018 | <tr><td>Emphasize… (<code class="verbatim">org.emphasize</code>)</td><td><code class="verbatim">C-c C-x C-f</code></td><td>—</td><td>—</td><td>Asks for a marker and wraps the selection in it, or inserts a pair with the caret between (<code class="verbatim">org-emphasize</code>).</td></tr> | ||
| 1019 | <tr><td>Bold (<code class="verbatim">org.emphasize.bold</code>)</td><td>—</td><td><code class="verbatim">⌘B</code></td><td>—</td><td><code class="verbatim">org-emphasize</code> with <code class="verbatim">*</code>.</td></tr> | ||
| 1020 | <tr><td>Italic (<code class="verbatim">org.emphasize.italic</code>)</td><td>—</td><td><code class="verbatim">⌘I</code></td><td>—</td><td><code class="verbatim">org-emphasize</code> with <code class="verbatim">/</code>.</td></tr> | ||
| 1021 | <tr><td>Underline (<code class="verbatim">org.emphasize.underline</code>)</td><td>—</td><td><code class="verbatim">⌘U</code></td><td>—</td><td><code class="verbatim">org-emphasize</code> with <code class="verbatim">_</code>.</td></tr> | ||
| 1022 | <tr><td>Insert Link… (<code class="verbatim">org.link.insert</code>)</td><td><code class="verbatim">C-c C-l</code></td><td><code class="verbatim">⌘K</code></td><td><code class="verbatim">SPC m l l</code> (N)</td><td>Asks for a link and description and inserts it, offering stored links (<code class="verbatim">org-insert-link</code>).</td></tr> | ||
| 1023 | <tr><td>Store Link (<code class="verbatim">org.link.store</code>)</td><td><code class="verbatim">C-c l</code></td><td><code class="verbatim">⌃⌘L</code></td><td><code class="verbatim">SPC m l s</code> (N), <code class="verbatim">SPC n l</code> (N)</td><td>Stores a link to the current entry for a later Insert Link (<code class="verbatim">org-store-link</code>).</td></tr> | ||
| 1024 | <tr><td>Store ID Link (<code class="verbatim">org.id.store-link</code>)</td><td>—</td><td>—</td><td><code class="verbatim">SPC m l i</code> (N)</td><td>Gives the entry an <code class="verbatim">ID</code> if needed and stores an <code class="verbatim">id:</code> link to it (<code class="verbatim">org-id-store-link</code>).</td></tr> | ||
| 1025 | <tr><td>Footnote Action (<code class="verbatim">org.footnote.action</code>)</td><td><code class="verbatim">C-c C-x f</code></td><td><code class="verbatim">⌃⇧⌘F</code></td><td>—</td><td>On a reference, goes to its definition; on a definition, back to a reference; elsewhere inserts a footnote (<code class="verbatim">org-footnote-action</code>).</td></tr> | ||
| 1026 | </tbody> | ||
| 1027 | </table> | ||
| 1028 | <h3 id="code-blocks-and-c-c-c-c">Code blocks and C-c C-c</h3> | ||
| 1029 | <table> | ||
| 1030 | <thead> | ||
| 1031 | <tr><th>Command</th><th>Emacs</th><th>Mac</th><th>Doom</th><th>What it does</th></tr> | ||
| 1032 | </thead> | ||
| 1033 | <tbody> | ||
| 1034 | <tr><td>Act at Point (C-c C-c) (<code class="verbatim">org.ctrl-c-ctrl-c</code>)</td><td><code class="verbatim">C-c C-c</code></td><td><code class="verbatim">⌃⌘X</code></td><td>—</td><td>Does what fits the context: sets tags on a heading, toggles an item's checkbox, follows a footnote, offers the property menu in a property drawer, updates a clock line, statistics cookie or timestamp, runs a <code class="verbatim">#+CALL:</code> line, inline <code class="verbatim">call_</code> or inline <code class="verbatim">src_</code> block, and refreshes the setup on a <code class="verbatim">#+</code> keyword line (<code class="verbatim">org-ctrl-c-ctrl-c</code>). In a table it evaluates a formula typed in the field (starting with <code>=</code> or <code>:=</code>), then recalculates the row when it is marked <code class="verbatim">#</code> and otherwise aligns the table; at the table's first character it recalculates the whole table. After a sparse tree, the first <code class="verbatim">C-c C-c</code> only clears the highlights. More specific bindings take <code class="verbatim">C-c C-c</code> and <code class="verbatim">⌃⌘X</code> in src blocks, <code class="verbatim">#+TBLFM</code> lines and dynamic blocks.</td></tr> | ||
| 1035 | <tr><td>Act at Point (<code class="verbatim">org.dwim</code>)</td><td>—</td><td>—</td><td><code class="verbatim">RET</code> (N)</td><td>Doom's <code class="verbatim">+org/dwim-at-point</code>: follows a link, runs a src block, recalculates or aligns a table, toggles a checkbox, or switches a heading between TODO and done.</td></tr> | ||
| 1036 | <tr><td>Run Source Block (<code class="verbatim">org.babel.execute</code>)</td><td><code class="verbatim">C-c C-c</code></td><td><code class="verbatim">⌃⌘X</code></td><td>—</td><td>In a src block, runs it and inserts the results (<code class="verbatim">org-babel-execute-src-block</code>).</td></tr> | ||
| 1037 | <tr><td>Tangle File (<code class="verbatim">org.babel.tangle</code>)</td><td><code class="verbatim">C-c C-v t</code>, <code class="verbatim">C-c C-v C-t</code></td><td><code class="verbatim">⌃⌘V</code></td><td>—</td><td>Writes the file's src blocks to their tangle targets (<code class="verbatim">org-babel-tangle</code>).</td></tr> | ||
| 1038 | <tr><td>Tangle Block (<code class="verbatim">org.babel.tangle-block</code>)</td><td>—</td><td><code class="verbatim">⌃⇧⌘V</code></td><td>—</td><td>Tangles only the src block at point (<code class="verbatim">org-babel-tangle</code> with <code class="verbatim">C-u</code>).</td></tr> | ||
| 1039 | <tr><td>Tangle Block's Target (<code class="verbatim">org.babel.tangle-target</code>)</td><td>—</td><td><code class="verbatim">⌃⌥⌘V</code></td><td>—</td><td>Tangles every block that writes to the same file as the block at point (<code class="verbatim">org-babel-tangle</code> with <code class="verbatim">C-u C-u</code>).</td></tr> | ||
| 1040 | <tr><td>Insert Structure Template (<code class="verbatim">org.structure-template</code>)</td><td><code class="verbatim">C-c C-,</code></td><td>—</td><td>—</td><td>Asks for a block type and inserts the block, or wraps the selection (<code class="verbatim">org-insert-structure-template</code>).</td></tr> | ||
| 1041 | <tr><td>Edit Block (<code class="verbatim">org.edit-special</code>)</td><td><code class="verbatim">C-c '</code></td><td><code class="verbatim">⌃⌘'</code></td><td><code class="verbatim">SPC m '</code> (N)</td><td>Edits the src, example or export block at point in a separate editor (<code class="verbatim">org-edit-special</code>).</td></tr> | ||
| 1042 | </tbody> | ||
| 1043 | </table> | ||
| 1044 | <h3 id="agenda-and-capture">Agenda and capture</h3> | ||
| 1045 | <table> | ||
| 1046 | <thead> | ||
| 1047 | <tr><th>Command</th><th>Emacs</th><th>Mac</th><th>Doom</th><th>What it does</th></tr> | ||
| 1048 | </thead> | ||
| 1049 | <tbody> | ||
| 1050 | <tr><td>Agenda (<code class="verbatim">app.agenda</code>)</td><td><code class="verbatim">C-c a</code></td><td>—</td><td><code class="verbatim">SPC o a</code> (N)</td><td>Opens the Agenda window (<code class="verbatim">org-agenda</code>).</td></tr> | ||
| 1051 | <tr><td>Capture… (<code class="verbatim">app.capture</code>)</td><td><code class="verbatim">C-c c</code></td><td>—</td><td><code class="verbatim">SPC X</code> (N)</td><td>Opens the Capture window (<code class="verbatim">org-capture</code>).</td></tr> | ||
| 1052 | </tbody> | ||
| 1053 | </table> | ||
| 1054 | <h3 id="export">Export</h3> | ||
| 1055 | <table> | ||
| 1056 | <thead> | ||
| 1057 | <tr><th>Command</th><th>Emacs</th><th>Mac</th><th>Doom</th><th>What it does</th></tr> | ||
| 1058 | </thead> | ||
| 1059 | <tbody> | ||
| 1060 | <tr><td>Export… (<code class="verbatim">app.export-dialog</code>)</td><td>—</td><td><code class="verbatim">⇧⌘E</code></td><td>—</td><td>Opens the export sheet. In the Emacs and Doom presets <code class="verbatim">C-c C-e</code> is a prefix for the export keys only; pausing after it lists them in the key hints.</td></tr> | ||
| 1061 | <tr><td>Export to HTML (<code class="verbatim">app.export.html</code>)</td><td><code class="verbatim">C-c C-e h h</code></td><td>—</td><td><code class="verbatim">SPC m e h h</code> (N)</td><td>Exports to HTML (<code class="verbatim">org-html-export-to-html</code>).</td></tr> | ||
| 1062 | <tr><td>Export to HTML and Open (<code class="verbatim">app.export.html-open</code>)</td><td><code class="verbatim">C-c C-e h o</code></td><td>—</td><td><code class="verbatim">SPC m e h o</code> (N)</td><td>Exports to HTML and opens the result.</td></tr> | ||
| 1063 | <tr><td>Export to Markdown (<code class="verbatim">app.export.markdown</code>)</td><td><code class="verbatim">C-c C-e m m</code></td><td>—</td><td><code class="verbatim">SPC m e m m</code> (N)</td><td>Exports to Markdown (<code class="verbatim">org-md-export-to-markdown</code>).</td></tr> | ||
| 1064 | <tr><td>Export to PDF (<code class="verbatim">app.export.print-pdf</code>)</td><td>—</td><td>—</td><td>—</td><td>Exports to PDF without Emacs, laid out as the HTML export.</td></tr> | ||
| 1065 | <tr><td>Export to Word (<code class="verbatim">app.export.docx</code>)</td><td>—</td><td>—</td><td>—</td><td>Exports to a Word document (<code class="verbatim">.docx</code>).</td></tr> | ||
| 1066 | <tr><td>Export to RTF (<code class="verbatim">app.export.rtf</code>)</td><td>—</td><td>—</td><td>—</td><td>Exports to Rich Text Format.</td></tr> | ||
| 1067 | <tr><td>Export to Plain Text (<code class="verbatim">app.export.plain-text</code>)</td><td>—</td><td>—</td><td>—</td><td>Exports the text without styles, without Emacs.</td></tr> | ||
| 1068 | <tr><td>Copy as Rich Text (<code class="verbatim">app.copy-rich-text</code>)</td><td>—</td><td>—</td><td>—</td><td>Copies the selection, or the file, as HTML, RTF and plain text.</td></tr> | ||
| 1069 | <tr><td>Export to PDF with Emacs (<code class="verbatim">app.export.pdf</code>)</td><td><code class="verbatim">C-c C-e l p</code></td><td>—</td><td><code class="verbatim">SPC m e l p</code> (N)</td><td>Exports to PDF through Emacs (<code class="verbatim">org-latex-export-to-pdf</code>).</td></tr> | ||
| 1070 | <tr><td>Export to LaTeX (<code class="verbatim">app.export.latex</code>)</td><td><code class="verbatim">C-c C-e l l</code></td><td>—</td><td>—</td><td>Exports to LaTeX without Emacs, as <code class="verbatim">org-latex-export-to-latex</code> does.</td></tr> | ||
| 1071 | <tr><td>Export to ODT (<code class="verbatim">app.export.odt</code>)</td><td><code class="verbatim">C-c C-e o o</code></td><td>—</td><td>—</td><td>Exports to OpenDocument text without Emacs, as <code class="verbatim">org-odt-export-to-odt</code> does.</td></tr> | ||
| 1072 | <tr><td>Export to Plain Text (ASCII) (<code class="verbatim">app.export.text</code>)</td><td><code class="verbatim">C-c C-e t u</code></td><td>—</td><td>—</td><td>Exports to plain text without Emacs, as <code class="verbatim">org-ascii-export-to-ascii</code> does.</td></tr> | ||
| 1073 | <tr><td>Export to iCalendar (<code class="verbatim">app.export.icalendar</code>)</td><td><code class="verbatim">C-c C-e c f</code></td><td>—</td><td>—</td><td>Exports to an <code class="verbatim">.ics</code> calendar (<code class="verbatim">org-icalendar-export-to-ics</code>).</td></tr> | ||
| 1074 | <tr><td>Export Agenda Files to iCalendar (<code class="verbatim">app.export.icalendar-agenda</code>)</td><td><code class="verbatim">C-c C-e c a</code></td><td>—</td><td>—</td><td>Writes an <code class="verbatim">.ics</code> beside each agenda file (<code class="verbatim">org-icalendar-export-agenda-files</code>).</td></tr> | ||
| 1075 | <tr><td>Combine Agenda Files into iCalendar (<code class="verbatim">app.export.icalendar-combined</code>)</td><td><code class="verbatim">C-c C-e c c</code></td><td>—</td><td>—</td><td>Writes the agenda files' entries to one calendar (<code class="verbatim">org-icalendar-combine-agenda-files</code>).</td></tr> | ||
| 1076 | <tr><td>Publish Project… (<code class="verbatim">app.publish</code>)</td><td><code class="verbatim">C-c C-e P x</code></td><td>—</td><td>—</td><td>Publishes a project from <code class="verbatim">config.toml</code> (<code class="verbatim">org-publish</code>).</td></tr> | ||
| 1077 | <tr><td>Publish All Projects (<code class="verbatim">app.publish.all</code>)</td><td><code class="verbatim">C-c C-e P a</code></td><td>—</td><td>—</td><td>Publishes every project (<code class="verbatim">org-publish-all</code>).</td></tr> | ||
| 1078 | <tr><td>Publish Current File (<code class="verbatim">app.publish.current-file</code>)</td><td><code class="verbatim">C-c C-e P f</code></td><td>—</td><td>—</td><td>Publishes the current file (<code class="verbatim">org-publish-current-file</code>).</td></tr> | ||
| 1079 | <tr><td>Publish Current Project (<code class="verbatim">app.publish.current-project</code>)</td><td><code class="verbatim">C-c C-e P p</code></td><td>—</td><td>—</td><td>Publishes the current file's project (<code class="verbatim">org-publish-current-project</code>).</td></tr> | ||
| 1080 | </tbody> | ||
| 1081 | </table> | ||
| 1082 | <h3 id="files-buffers-and-the-app">Files, buffers and the app</h3> | ||
| 1083 | <table> | ||
| 1084 | <thead> | ||
| 1085 | <tr><th>Command</th><th>Emacs</th><th>Mac</th><th>Doom</th><th>What it does</th></tr> | ||
| 1086 | </thead> | ||
| 1087 | <tbody> | ||
| 1088 | <tr><td>Save (<code class="verbatim">app.save</code>)</td><td><code class="verbatim">C-x C-s</code></td><td>—</td><td><code class="verbatim">SPC f s</code> (N), <code class="verbatim">SPC b s</code> (N)</td><td>Saves the file (<code class="verbatim">save-buffer</code>).</td></tr> | ||
| 1089 | <tr><td>Save All Buffers (<code class="verbatim">app.save-all</code>)</td><td><code class="verbatim">C-x s</code></td><td>—</td><td><code class="verbatim">SPC b S</code> (N)</td><td>Saves every open buffer (<code class="verbatim">save-some-buffers</code>).</td></tr> | ||
| 1090 | <tr><td>Quick Open… (<code class="verbatim">app.quick-open</code>)</td><td><code class="verbatim">C-x C-f</code></td><td>—</td><td><code class="verbatim">SPC SPC</code> (N), <code class="verbatim">SPC .</code> (N), <code class="verbatim">SPC f f</code> (N)</td><td>Opens a file of your folders by name (<code class="verbatim">find-file</code>).</td></tr> | ||
| 1091 | <tr><td>Switch to Buffer… (<code class="verbatim">app.buffer.switch</code>)</td><td><code class="verbatim">C-x b</code>, <code class="verbatim">C-x C-b</code></td><td>—</td><td><code class="verbatim">SPC b b</code> (N), <code class="verbatim">SPC b B</code> (N), <code class="verbatim">SPC ,</code> (N)</td><td>Asks for an open buffer and shows it (<code class="verbatim">switch-to-buffer</code>).</td></tr> | ||
| 1092 | <tr><td>Next Buffer (<code class="verbatim">app.buffer.next</code>)</td><td><code class="verbatim">C-x <right></code></td><td><code class="verbatim">⌃⇥</code></td><td><code class="verbatim">SPC b n</code> (N), <code class="verbatim">SPC b ]</code> (N), <code class="verbatim">] b</code> (N)</td><td>Shows the next open buffer (<code class="verbatim">next-buffer</code>).</td></tr> | ||
| 1093 | <tr><td>Previous Buffer (<code class="verbatim">app.buffer.previous</code>)</td><td><code class="verbatim">C-x <left></code></td><td><code class="verbatim">⌃⇧⇥</code></td><td><code class="verbatim">SPC b p</code> (N), <code class="verbatim">SPC b [</code> (N), <code class="verbatim">[ b</code> (N)</td><td>Shows the previous open buffer (<code class="verbatim">previous-buffer</code>).</td></tr> | ||
| 1094 | <tr><td>Last Buffer (<code class="verbatim">app.buffer.last</code>)</td><td>—</td><td>—</td><td><code class="verbatim">SPC `</code> (N)</td><td>Shows the buffer you were in before this one.</td></tr> | ||
| 1095 | <tr><td>Close Buffer (<code class="verbatim">app.buffer.kill</code>)</td><td><code class="verbatim">C-x k</code></td><td>—</td><td><code class="verbatim">SPC b k</code> (N), <code class="verbatim">SPC b d</code> (N)</td><td>Closes the buffer, asking about unsaved changes in explicit save mode (<code class="verbatim">kill-buffer</code>).</td></tr> | ||
| 1096 | <tr><td>Close Other Buffers (<code class="verbatim">app.buffer.kill-others</code>)</td><td>—</td><td>—</td><td><code class="verbatim">SPC b O</code> (N)</td><td>Closes every other buffer.</td></tr> | ||
| 1097 | <tr><td>Split Pane Below (<code class="verbatim">app.split-below</code>)</td><td><code class="verbatim">C-x 2</code></td><td><code class="verbatim">⌃⌘2</code></td><td><code class="verbatim">SPC w s</code> (N), <code class="verbatim">C-w s</code> (N)</td><td>Divides the focused pane in two, one above the other, both showing its buffer (<code class="verbatim">split-window-below</code>).</td></tr> | ||
| 1098 | <tr><td>Split Pane Right (<code class="verbatim">app.split-right</code>)</td><td><code class="verbatim">C-x 3</code></td><td><code class="verbatim">⌃⌘3</code></td><td><code class="verbatim">SPC w v</code> (N), <code class="verbatim">C-w v</code> (N)</td><td>Divides the focused pane in two, side by side (<code class="verbatim">split-window-right</code>).</td></tr> | ||
| 1099 | <tr><td>Close Pane (<code class="verbatim">app.pane-close</code>)</td><td><code class="verbatim">C-x 0</code></td><td><code class="verbatim">⌃⌘0</code></td><td><code class="verbatim">SPC w d</code> (N), <code class="verbatim">SPC w c</code> (N), <code class="verbatim">C-w c</code> (N)</td><td>Removes the focused pane; its buffers stay open (<code class="verbatim">delete-window</code>).</td></tr> | ||
| 1100 | <tr><td>Close Other Panes (<code class="verbatim">app.pane-only</code>)</td><td><code class="verbatim">C-x 1</code></td><td><code class="verbatim">⌃⌘1</code></td><td><code class="verbatim">SPC w o</code> (N), <code class="verbatim">C-w o</code> (N)</td><td>Leaves only the focused pane (<code class="verbatim">delete-other-windows</code>).</td></tr> | ||
| 1101 | <tr><td>Next Pane (<code class="verbatim">app.pane-next</code>)</td><td><code class="verbatim">C-x o</code></td><td><code class="verbatim">⌥⌘`</code></td><td><code class="verbatim">SPC w w</code> (N), <code class="verbatim">C-w w</code> (N)</td><td>Moves the focus to the next pane in reading order (<code class="verbatim">other-window</code>).</td></tr> | ||
| 1102 | <tr><td>New Window (<code class="verbatim">app.window-new</code>)</td><td><code class="verbatim">C-x 5 2</code></td><td><code class="verbatim">⌥⌘N</code></td><td><code class="verbatim">SPC w n</code> (N)</td><td>Opens a window of panes on the focused buffer, without the sidebar (<code class="verbatim">make-frame-command</code>).</td></tr> | ||
| 1103 | <tr><td>Close All Buffers (<code class="verbatim">app.buffer.kill-all</code>)</td><td>—</td><td>—</td><td><code class="verbatim">SPC b K</code> (N)</td><td>Closes every buffer.</td></tr> | ||
| 1104 | <tr><td>Command Palette… (<code class="verbatim">app.palette</code>)</td><td><code class="verbatim">M-x</code></td><td>—</td><td><code class="verbatim">SPC :</code> (N)</td><td>Opens the command palette (<code class="verbatim">execute-extended-command</code>).</td></tr> | ||
| 1105 | <tr><td>Search Notes (<code class="verbatim">app.search</code>)</td><td>—</td><td>—</td><td><code class="verbatim">SPC /</code> (N), <code class="verbatim">SPC s p</code> (N)</td><td>Moves to the search field for searching your notes.</td></tr> | ||
| 1106 | <tr><td>Reload Keymap (<code class="verbatim">app.reload-keymap</code>)</td><td>—</td><td>—</td><td><code class="verbatim">SPC h r r</code> (N)</td><td>Reads <code class="verbatim">keymap.toml</code> again.</td></tr> | ||
| 1107 | <tr><td>Check Spelling While Typing (<code class="verbatim">editor.toggle-spell-check</code>)</td><td>—</td><td>—</td><td><code class="verbatim">SPC t s</code> (N)</td><td>Turns spell checking while typing on or off.</td></tr> | ||
| 1108 | <tr><td>Truncate or Wrap Long Lines (<code class="verbatim">editor.toggle-truncate-lines</code>)</td><td><code class="verbatim">C-x x t</code></td><td>—</td><td><code class="verbatim">SPC t w</code> (N)</td><td>Switches between wrapping and truncating long lines (<code class="verbatim">toggle-truncate-lines</code>).</td></tr> | ||
| 1109 | <tr><td>Quit orgstar (<code class="verbatim">app.quit</code>)</td><td>—</td><td>—</td><td><code class="verbatim">SPC q q</code> (N)</td><td>Quits orgstar (<code class="verbatim">save-buffers-kill-terminal</code>).</td></tr> | ||
| 1110 | </tbody> | ||
| 1111 | </table> | ||
| 1112 | <h3 id="attachments">Attachments</h3> | ||
| 1113 | <p>The Emacs keys also work with Control on the last key (<code class="verbatim">C-c C-a C-a</code>), as in Org's dispatcher. See <a href="04-outlines.html">Outlines</a>.</p> | ||
| 1114 | <table> | ||
| 1115 | <thead> | ||
| 1116 | <tr><th>Command</th><th>Emacs</th><th>Mac</th><th>Doom</th><th>What it does</th></tr> | ||
| 1117 | </thead> | ||
| 1118 | <tbody> | ||
| 1119 | <tr><td>Attach File… (<code class="verbatim">app.attach.attach</code>)</td><td><code class="verbatim">C-c C-a a</code>, <code class="verbatim">C-c C-a c</code></td><td>—</td><td><code class="verbatim">SPC m a a</code> (N)</td><td>Asks for files and copies them into the entry's attachment folder (<code class="verbatim">org-attach-attach</code>).</td></tr> | ||
| 1120 | <tr><td>Attach File by Moving… (<code class="verbatim">app.attach.move</code>)</td><td><code class="verbatim">C-c C-a m</code></td><td>—</td><td>—</td><td>Moves the files there (<code class="verbatim">org-attach-attach-mv</code>).</td></tr> | ||
| 1121 | <tr><td>Attach File as Hard Link… (<code class="verbatim">app.attach.link</code>)</td><td><code class="verbatim">C-c C-a l</code></td><td>—</td><td>—</td><td>Makes hard links to the files there (<code class="verbatim">org-attach-attach-ln</code>).</td></tr> | ||
| 1122 | <tr><td>Attach File as Symbolic Link… (<code class="verbatim">app.attach.symlink</code>)</td><td><code class="verbatim">C-c C-a y</code></td><td>—</td><td>—</td><td>Makes symbolic links to the files there (<code class="verbatim">org-attach-attach-lns</code>).</td></tr> | ||
| 1123 | <tr><td>Attach File from URL… (<code class="verbatim">app.attach.url</code>)</td><td><code class="verbatim">C-c C-a u</code></td><td>—</td><td><code class="verbatim">SPC m a u</code> (N)</td><td>Downloads a URL into the folder (<code class="verbatim">org-attach-url</code>).</td></tr> | ||
| 1124 | <tr><td>New Attachment… (<code class="verbatim">app.attach.new</code>)</td><td><code class="verbatim">C-c C-a n</code></td><td>—</td><td><code class="verbatim">SPC m a n</code> (N)</td><td>Makes an empty file of that name in the folder and opens it (<code class="verbatim">org-attach-new</code>).</td></tr> | ||
| 1125 | <tr><td>Open Attachment… (<code class="verbatim">app.attach.open</code>)</td><td><code class="verbatim">C-c C-a o</code></td><td>—</td><td><code class="verbatim">SPC m a o</code> (N)</td><td>Opens the attachment, asking which when there are several (<code class="verbatim">org-attach-open</code>).</td></tr> | ||
| 1126 | <tr><td>Show Attachment Folder (<code class="verbatim">app.attach.reveal</code>)</td><td><code class="verbatim">C-c C-a f</code></td><td>—</td><td><code class="verbatim">SPC m a r</code> (N)</td><td>Shows the folder in the Finder, or the Files app on iOS, making it if missing (<code class="verbatim">org-attach-reveal</code>).</td></tr> | ||
| 1127 | <tr><td>Delete Attachment… (<code class="verbatim">app.attach.delete</code>)</td><td><code class="verbatim">C-c C-a d</code></td><td>—</td><td><code class="verbatim">SPC m a d</code> (N)</td><td>Deletes one attachment (<code class="verbatim">org-attach-delete-one</code>).</td></tr> | ||
| 1128 | <tr><td>Delete All Attachments… (<code class="verbatim">app.attach.delete-all</code>)</td><td><code class="verbatim">C-c C-a D</code></td><td>—</td><td><code class="verbatim">SPC m a D</code> (N)</td><td>Deletes the folder and removes the <code class="verbatim">ATTACH</code> tag (<code class="verbatim">org-attach-delete-all</code>).</td></tr> | ||
| 1129 | <tr><td>Sync Attachments (<code class="verbatim">app.attach.sync</code>)</td><td><code class="verbatim">C-c C-a z</code></td><td>—</td><td><code class="verbatim">SPC m a S</code> (N)</td><td>Sets or removes the <code class="verbatim">ATTACH</code> tag as the folder has files, and offers to delete an empty folder (<code class="verbatim">org-attach-sync</code>).</td></tr> | ||
| 1130 | <tr><td>Set Attachment Folder… (<code class="verbatim">app.attach.set-directory</code>)</td><td><code class="verbatim">C-c C-a s</code></td><td>—</td><td><code class="verbatim">SPC m a s</code> (N)</td><td>Sets the entry's <code class="verbatim">DIR</code> property (<code class="verbatim">org-attach-set-directory</code>).</td></tr> | ||
| 1131 | <tr><td>Unset Attachment Folder (<code class="verbatim">app.attach.unset-directory</code>)</td><td><code class="verbatim">C-c C-a S</code></td><td>—</td><td>—</td><td>Removes <code class="verbatim">DIR</code> (<code class="verbatim">org-attach-unset-directory</code>).</td></tr> | ||
| 1132 | </tbody> | ||
| 1133 | </table> | ||
| 1134 | <h3 id="notes-and-daily-notes">Notes and daily notes</h3> | ||
| 1135 | <p>See <a href="09-links.html">Links</a>.</p> | ||
| 1136 | <table> | ||
| 1137 | <thead> | ||
| 1138 | <tr><th>Command</th><th>Emacs</th><th>Mac</th><th>Doom</th><th>What it does</th></tr> | ||
| 1139 | </thead> | ||
| 1140 | <tbody> | ||
| 1141 | <tr><td>Find Node… (<code class="verbatim">app.node.find</code>)</td><td><code class="verbatim">C-c n f</code></td><td>—</td><td><code class="verbatim">SPC n r f</code> (N)</td><td>Opens a heading or file with an ID, chosen by title (<code class="verbatim">org-roam-node-find</code>).</td></tr> | ||
| 1142 | <tr><td>Insert Node Link… (<code class="verbatim">app.node.insert</code>)</td><td><code class="verbatim">C-c n i</code></td><td>—</td><td><code class="verbatim">SPC n r i</code> (N)</td><td>Inserts an <code class="verbatim">id:</code> link to a node (<code class="verbatim">org-roam-node-insert</code>).</td></tr> | ||
| 1143 | <tr><td>Show Node Graph (<code class="verbatim">app.node.graph</code>)</td><td><code class="verbatim">C-c n g</code></td><td>—</td><td><code class="verbatim">SPC n r g</code> (N)</td><td>Opens the graph of nodes and the links between them.</td></tr> | ||
| 1144 | <tr><td>Go to Today's Daily Note (<code class="verbatim">app.dailies.today</code>)</td><td><code class="verbatim">C-c n d d</code></td><td>—</td><td><code class="verbatim">SPC n r d t</code> (N)</td><td><code class="verbatim">org-roam-dailies-goto-today</code>.</td></tr> | ||
| 1145 | <tr><td>Go to Yesterday's Daily Note (<code class="verbatim">app.dailies.yesterday</code>)</td><td><code class="verbatim">C-c n d y</code></td><td>—</td><td><code class="verbatim">SPC n r d y</code> (N)</td><td><code class="verbatim">org-roam-dailies-goto-yesterday</code>.</td></tr> | ||
| 1146 | <tr><td>Go to Tomorrow's Daily Note (<code class="verbatim">app.dailies.tomorrow</code>)</td><td><code class="verbatim">C-c n d t</code></td><td>—</td><td><code class="verbatim">SPC n r d m</code> (N)</td><td><code class="verbatim">org-roam-dailies-goto-tomorrow</code>.</td></tr> | ||
| 1147 | <tr><td>Go to Daily Note for Date… (<code class="verbatim">app.dailies.date</code>)</td><td><code class="verbatim">C-c n d c</code></td><td>—</td><td><code class="verbatim">SPC n r d d</code> (N)</td><td><code class="verbatim">org-roam-dailies-goto-date</code>.</td></tr> | ||
| 1148 | <tr><td>Capture to Today's Daily Note (<code class="verbatim">app.dailies.capture-today</code>)</td><td><code class="verbatim">C-c n j</code>, <code class="verbatim">C-c n d n</code></td><td>—</td><td><code class="verbatim">SPC n r d n</code>, <code class="verbatim">SPC n r d T</code> (N)</td><td><code class="verbatim">org-roam-dailies-capture-today</code>.</td></tr> | ||
| 1149 | <tr><td>Capture to Yesterday's Daily Note (<code class="verbatim">app.dailies.capture-yesterday</code>)</td><td>—</td><td>—</td><td><code class="verbatim">SPC n r d Y</code> (N)</td><td><code class="verbatim">org-roam-dailies-capture-yesterday</code>.</td></tr> | ||
| 1150 | <tr><td>Capture to Tomorrow's Daily Note (<code class="verbatim">app.dailies.capture-tomorrow</code>)</td><td>—</td><td>—</td><td><code class="verbatim">SPC n r d M</code> (N)</td><td><code class="verbatim">org-roam-dailies-capture-tomorrow</code>.</td></tr> | ||
| 1151 | <tr><td>Capture to Daily Note for Date… (<code class="verbatim">app.dailies.capture-date</code>)</td><td><code class="verbatim">C-c n d v</code></td><td>—</td><td><code class="verbatim">SPC n r d D</code> (N)</td><td><code class="verbatim">org-roam-dailies-capture-date</code>.</td></tr> | ||
| 1152 | <tr><td>Next Daily Note (<code class="verbatim">app.dailies.next</code>)</td><td><code class="verbatim">C-c n d f</code></td><td>—</td><td><code class="verbatim">SPC n r d f</code> (N)</td><td><code class="verbatim">org-roam-dailies-goto-next-note</code>.</td></tr> | ||
| 1153 | <tr><td>Previous Daily Note (<code class="verbatim">app.dailies.previous</code>)</td><td><code class="verbatim">C-c n d b</code></td><td>—</td><td><code class="verbatim">SPC n r d b</code> (N)</td><td><code class="verbatim">org-roam-dailies-goto-previous-note</code>.</td></tr> | ||
| 1154 | <tr><td>Rename Note from Front Matter (<code class="verbatim">app.node.rename-from-front-matter</code>)</td><td>—</td><td>—</td><td>—</td><td><code class="verbatim">denote-rename-file-using-front-matter</code>.</td></tr> | ||
| 1155 | <tr><td>Rename Note… (<code class="verbatim">app.node.rename</code>)</td><td>—</td><td>—</td><td>—</td><td><code class="verbatim">denote-rename-file</code>.</td></tr> | ||
| 1156 | <tr><td>Rename Notes in Folder from Front Matter… (<code class="verbatim">app.node.rename-folder-from-front-matter</code>)</td><td>—</td><td>—</td><td>—</td><td><code class="verbatim">denote-dired-rename-marked-files-using-front-matter</code>.</td></tr> | ||
| 1157 | <tr><td>Find Note in Silo… (<code class="verbatim">app.node.silo-find</code>)</td><td>—</td><td>—</td><td>—</td><td><code class="verbatim">denote-silo-open-or-create</code>.</td></tr> | ||
| 1158 | <tr><td>New Note in Silo… (<code class="verbatim">app.node.silo-create</code>)</td><td>—</td><td>—</td><td>—</td><td><code class="verbatim">denote-silo-create-note</code>.</td></tr> | ||
| 1159 | <tr><td>New Sequence Note… (<code class="verbatim">app.node.sequence-new-parent</code>)</td><td>—</td><td>—</td><td>—</td><td><code class="verbatim">denote-sequence-new-parent</code>.</td></tr> | ||
| 1160 | <tr><td>New Child Sequence Note… (<code class="verbatim">app.node.sequence-new-child</code>)</td><td>—</td><td>—</td><td>—</td><td><code class="verbatim">denote-sequence-new-child</code>.</td></tr> | ||
| 1161 | <tr><td>New Sibling Sequence Note… (<code class="verbatim">app.node.sequence-new-sibling</code>)</td><td>—</td><td>—</td><td>—</td><td><code class="verbatim">denote-sequence-new-sibling</code>.</td></tr> | ||
| 1162 | <tr><td>New Child of This Note… (<code class="verbatim">app.node.sequence-new-child-of-current</code>)</td><td>—</td><td>—</td><td>—</td><td><code class="verbatim">denote-sequence-new-child-of-current</code>.</td></tr> | ||
| 1163 | <tr><td>New Sibling of This Note… (<code class="verbatim">app.node.sequence-new-sibling-of-current</code>)</td><td>—</td><td>—</td><td>—</td><td><code class="verbatim">denote-sequence-new-sibling-of-current</code>.</td></tr> | ||
| 1164 | <tr><td>Find Sequence Relatives… (<code class="verbatim">app.node.sequence-find</code>)</td><td>—</td><td>—</td><td>—</td><td><code class="verbatim">denote-sequence-find</code>.</td></tr> | ||
| 1165 | <tr><td>Next Sibling Note (<code class="verbatim">app.node.sequence-next-sibling</code>)</td><td>—</td><td>—</td><td>—</td><td><code class="verbatim">denote-sequence-find-next-sibling</code>.</td></tr> | ||
| 1166 | <tr><td>Previous Sibling Note (<code class="verbatim">app.node.sequence-previous-sibling</code>)</td><td>—</td><td>—</td><td>—</td><td><code class="verbatim">denote-sequence-find-previous-sibling</code>.</td></tr> | ||
| 1167 | <tr><td>Reparent Note… (<code class="verbatim">app.node.sequence-reparent</code>)</td><td>—</td><td>—</td><td>—</td><td><code class="verbatim">denote-sequence-reparent</code>.</td></tr> | ||
| 1168 | <tr><td>Reparent Note with Descendants… (<code class="verbatim">app.node.sequence-reparent-recursive</code>)</td><td>—</td><td>—</td><td>—</td><td><code class="verbatim">denote-sequence-reparent-recursive</code>.</td></tr> | ||
| 1169 | <tr><td>Rename Note as Sequence Parent (<code class="verbatim">app.node.sequence-rename-as-parent</code>)</td><td>—</td><td>—</td><td>—</td><td><code class="verbatim">denote-sequence-rename-as-parent</code>.</td></tr> | ||
| 1170 | <tr><td>Convert Note Sequence Scheme (<code class="verbatim">app.node.sequence-convert</code>)</td><td>—</td><td>—</td><td>—</td><td><code class="verbatim">denote-sequence-convert</code>.</td></tr> | ||
| 1171 | <tr><td>Insert Sequence Link… (<code class="verbatim">app.node.sequence-link</code>)</td><td>—</td><td>—</td><td>—</td><td><code class="verbatim">denote-sequence-link</code>.</td></tr> | ||
| 1172 | <tr><td>Sequence Hierarchy… (<code class="verbatim">app.node.sequence-hierarchy</code>)</td><td>—</td><td>—</td><td>—</td><td><code class="verbatim">denote-sequence-view-hierarchy</code>.</td></tr> | ||
| 1173 | <tr><td>Insert Denote Links Block (<code class="verbatim">org.denote.dblock-insert-links</code>)</td><td>—</td><td>—</td><td>—</td><td><code class="verbatim">denote-org-dblock-insert-links</code>.</td></tr> | ||
| 1174 | <tr><td>Insert Denote Missing Links Block (<code class="verbatim">org.denote.dblock-insert-missing-links</code>)</td><td>—</td><td>—</td><td>—</td><td><code class="verbatim">denote-org-dblock-insert-missing-links</code>.</td></tr> | ||
| 1175 | <tr><td>Insert Denote Backlinks Block (<code class="verbatim">org.denote.dblock-insert-backlinks</code>)</td><td>—</td><td>—</td><td>—</td><td><code class="verbatim">denote-org-dblock-insert-backlinks</code>.</td></tr> | ||
| 1176 | <tr><td>Insert Denote Files Block (<code class="verbatim">org.denote.dblock-insert-files</code>)</td><td>—</td><td>—</td><td>—</td><td><code class="verbatim">denote-org-dblock-insert-files</code>.</td></tr> | ||
| 1177 | <tr><td>Insert Denote Files as Headings Block (<code class="verbatim">org.denote.dblock-insert-files-as-headings</code>)</td><td>—</td><td>—</td><td>—</td><td><code class="verbatim">denote-org-dblock-insert-files-as-headings</code>.</td></tr> | ||
| 1178 | <tr><td>Insert Denote Sequence Block (<code class="verbatim">org.denote.dblock-insert-sequence</code>)</td><td>—</td><td>—</td><td>—</td><td><code class="verbatim">denote-org-dblock-insert-sequence</code>.</td></tr> | ||
| 1179 | </tbody> | ||
| 1180 | </table> | ||
| 1181 | <h3 id="unbound-commands">Unbound commands</h3> | ||
| 1182 | <p>No preset binds these. Run them from the palette or a menu, or bind them in <code class="verbatim">keymap.toml</code>.</p> | ||
| 1183 | <table> | ||
| 1184 | <thead> | ||
| 1185 | <tr><th>Command</th><th>What it does</th></tr> | ||
| 1186 | </thead> | ||
| 1187 | <tbody> | ||
| 1188 | <tr><td>Board (<code class="verbatim">app.board</code>)</td><td>Opens the Board window. Window ▸ Board, <code class="verbatim">⇧⌘B</code>.</td></tr> | ||
| 1189 | <tr><td>Show Agenda or Files in Sidebar (<code class="verbatim">app.sidebar-agenda</code>)</td><td>Switches the sidebar between the files and the agenda, as the button at the right of its bar does.</td></tr> | ||
| 1190 | <tr><td>Verbatim, Code, Strike-Through (<code class="verbatim">org.emphasize.verbatim</code>, <code class="verbatim">org.emphasize.code</code>, <code class="verbatim">org.emphasize.strike-through</code>)</td><td><code class="verbatim">org-emphasize</code> with <code class="verbatim">=</code>, <code class="verbatim">~</code> or <code class="verbatim">+</code>.</td></tr> | ||
| 1191 | <tr><td>Cancel Running Task (<code class="verbatim">app.babel.cancel</code>)</td><td>Stops the src block that is running, or an export or table recalculation running in Emacs. Edit ▸ Cancel Running Task, <code class="verbatim">⌘.</code>.</td></tr> | ||
| 1192 | <tr><td>Edit Config File (<code class="verbatim">app.edit-config</code>)</td><td>Opens <code class="verbatim">config.toml</code> in the editor. <code class="verbatim">⌥⌘,</code>.</td></tr> | ||
| 1193 | <tr><td>Import from Emacs… (<code class="verbatim">app.import-emacs</code>)</td><td>Opens Import from Emacs….</td></tr> | ||
| 1194 | <tr><td>Revert to File on Disk (<code class="verbatim">app.revert</code>)</td><td>Replaces the buffer with the file on disk; unsaved changes go to recovery (<code class="verbatim">revert-buffer</code>).</td></tr> | ||
| 1195 | <tr><td>Recovery Versions… (<code class="verbatim">app.recovery</code>)</td><td>Shows the recovery versions of the file.</td></tr> | ||
| 1196 | <tr><td>Resolve Sync Conflicts… (<code class="verbatim">app.sync-conflicts</code>)</td><td>Shows the file's sync conflict copies to resolve them.</td></tr> | ||
| 1197 | <tr><td>Import Table from File… (<code class="verbatim">app.table-import</code>)</td><td>Asks for a CSV, TSV or space-separated file and inserts it as a table (<code class="verbatim">org-table-import</code>).</td></tr> | ||
| 1198 | <tr><td>Export Table to File… (<code class="verbatim">app.table-export</code>)</td><td>Writes the table at point to a CSV or TSV file (<code class="verbatim">org-table-export</code>).</td></tr> | ||
| 1199 | <tr><td>Plot Table (<code class="verbatim">app.plot</code>)</td><td>Plots the table at point as its <code class="verbatim">#+PLOT:</code> lines say (<code class="verbatim">org-plot/gnuplot</code>, <code class="verbatim">C-c " g</code> in the Emacs and Doom presets).</td></tr> | ||
| 1200 | <tr><td>Encrypt Entry… (<code class="verbatim">app.crypt.encrypt-entry</code>)</td><td>Encrypts the entry at point with a passphrase (<code class="verbatim">org-encrypt-entry</code>). See <a href="04-outlines.html">Outlines</a>.</td></tr> | ||
| 1201 | <tr><td>Decrypt Entry… (<code class="verbatim">app.crypt.open-entry</code>)</td><td>Shows the entry's decrypted text in a sheet, to read or change.</td></tr> | ||
| 1202 | <tr><td>Decrypt Entry in File… (<code class="verbatim">app.crypt.decrypt-entry</code>)</td><td>Puts the decrypted text in the file (<code class="verbatim">org-decrypt-entry</code>).</td></tr> | ||
| 1203 | <tr><td>Encrypt Tagged Entries… (<code class="verbatim">app.crypt.encrypt-entries</code>)</td><td>Encrypts every entry with the <code class="verbatim">crypt</code> tag (<code class="verbatim">org-encrypt-entries</code>).</td></tr> | ||
| 1204 | <tr><td>Forget Encryption Passphrase (<code class="verbatim">app.crypt.forget-passphrase</code>)</td><td>Removes the file's passphrase from the Keychain.</td></tr> | ||
| 1205 | <tr><td>Show or Hide Outline (<code class="verbatim">app.toggle-outline</code>)</td><td>Shows or hides the outline pane. View ▸ Show or Hide Outline, <code class="verbatim">⌥⌘O</code>.</td></tr> | ||
| 1206 | <tr><td>Show or Hide Backlinks (<code class="verbatim">app.toggle-backlinks</code>)</td><td>Shows or hides the backlinks pane. View ▸ Show or Hide Backlinks.</td></tr> | ||
| 1207 | <tr><td>Show or Hide Columns and Clock (<code class="verbatim">app.toggle-inspector</code>)</td><td>Shows or hides the columns and clock inspector. View ▸ Show or Hide Columns and Clock, <code class="verbatim">⌥⌘I</code>.</td></tr> | ||
| 1208 | <tr><td>Show or Hide Markup (<code class="verbatim">app.toggle-markup</code>)</td><td>Shows or hides link brackets and emphasis markers. View ▸ Show Markup, <code class="verbatim">⇧⌘M</code>.</td></tr> | ||
| 1209 | <tr><td>Show or Hide Line Numbers (<code class="verbatim">app.toggle-line-numbers</code>)</td><td>Shows or hides line numbers. View ▸ Show Line Numbers, <code class="verbatim">⇧⌘L</code>.</td></tr> | ||
| 1210 | <tr><td>Show or Hide Tab Bar (<code class="verbatim">app.toggle-tab-bar</code>)</td><td>Shows or hides the tab bar. View ▸ Show Tab Bar.</td></tr> | ||
| 1211 | <tr><td>Column View of File (<code class="verbatim">org.columns.global</code>)</td><td>Shows the column view of the whole file (<code class="verbatim">org-columns</code> with <code class="verbatim">C-u</code>).</td></tr> | ||
| 1212 | <tr><td>Create ID (<code class="verbatim">org.id.create</code>)</td><td>Gives the entry an <code class="verbatim">ID</code> property, a lowercase UUID, unless it has one (<code class="verbatim">org-id-get-create</code>).</td></tr> | ||
| 1213 | <tr><td>Delete Property… (<code class="verbatim">org.property.delete</code>)</td><td>Asks for a property of the entry and deletes it (<code class="verbatim">org-delete-property</code>).</td></tr> | ||
| 1214 | <tr><td>Delete Property Everywhere… (<code class="verbatim">org.property.delete-globally</code>)</td><td>Asks for a property and deletes it from every entry in the file (<code class="verbatim">org-delete-property-globally</code>).</td></tr> | ||
| 1215 | <tr><td>Property Action… (<code class="verbatim">org.property.action</code>)</td><td>Offers set, delete and delete globally for the property at point (<code class="verbatim">org-property-action</code>). <code class="verbatim">C-c C-c</code> in a property drawer runs it.</td></tr> | ||
| 1216 | <tr><td>Footnote Menu (<code class="verbatim">org.footnote.menu</code>)</td><td>Offers the footnote commands as a menu (<code class="verbatim">org-footnote-action</code> with <code class="verbatim">C-u</code>).</td></tr> | ||
| 1217 | <tr><td>Set Field Formula (<code class="verbatim">org.table.field-formula</code>)</td><td>Asks for the current field's formula (<code class="verbatim">org-table-eval-formula</code> with <code class="verbatim">C-u</code>).</td></tr> | ||
| 1218 | <tr><td>Sort Table Lines (<code class="verbatim">org.table.sort</code>)</td><td>Asks for alphabetic, numeric or time order, or their reverse, and sorts the table's lines by the current column (<code class="verbatim">org-table-sort-lines</code>). Sort Entries does the same in a table.</td></tr> | ||
| 1219 | <tr><td>Transpose Table (<code class="verbatim">org.table.transpose</code>)</td><td>Swaps the table's rows and columns (<code class="verbatim">org-table-transpose-table-at-point</code>).</td></tr> | ||
| 1220 | <tr><td>Shrink Table Columns with Widths (<code class="verbatim">org.table.shrink</code>)</td><td>Shrinks the table's columns that have a width cookie (<code class="verbatim">org-table-shrink</code>).</td></tr> | ||
| 1221 | <tr><td>Expand Table Columns (<code class="verbatim">org.table.expand</code>)</td><td>Expands the table's shrunk columns (<code class="verbatim">org-table-expand</code>).</td></tr> | ||
| 1222 | </tbody> | ||
| 1223 | </table> | ||
| 1224 | <h3 id="speed-keys-reference">Speed keys reference</h3> | ||
| 1225 | <p>At the very start of a heading line, with <code class="verbatim">org-use-speed-commands</code> on. The same in every preset (Doom: insert state).</p> | ||
| 1226 | <table> | ||
| 1227 | <thead> | ||
| 1228 | <tr><th>Key</th><th>Command</th></tr> | ||
| 1229 | </thead> | ||
| 1230 | <tbody> | ||
| 1231 | <tr><td><code class="verbatim">n</code></td><td>Next Heading (<code class="verbatim">org.heading.next</code>)</td></tr> | ||
| 1232 | <tr><td><code class="verbatim">p</code></td><td>Previous Heading (<code class="verbatim">org.heading.previous</code>)</td></tr> | ||
| 1233 | <tr><td><code class="verbatim">f</code></td><td>Next Heading at Same Level (<code class="verbatim">org.heading.forward-same-level</code>)</td></tr> | ||
| 1234 | <tr><td><code class="verbatim">b</code></td><td>Previous Heading at Same Level (<code class="verbatim">org.heading.backward-same-level</code>)</td></tr> | ||
| 1235 | <tr><td><code class="verbatim">u</code></td><td>Up to Parent Heading (<code class="verbatim">org.heading.up</code>)</td></tr> | ||
| 1236 | <tr><td><code class="verbatim">j</code></td><td>Go to Heading… (<code class="verbatim">org.goto</code>)</td></tr> | ||
| 1237 | <tr><td><code class="verbatim">c</code></td><td>Cycle Visibility (<code class="verbatim">org.cycle</code>)</td></tr> | ||
| 1238 | <tr><td><code class="verbatim">C</code></td><td>Cycle Global Visibility (<code class="verbatim">org.cycle-global</code>)</td></tr> | ||
| 1239 | <tr><td><code class="verbatim">s</code></td><td>Narrow to Subtree or Widen (<code class="verbatim">org.narrow.toggle</code>)</td></tr> | ||
| 1240 | <tr><td><code class="verbatim">k</code></td><td>Cut Subtree (<code class="verbatim">org.subtree.cut</code>)</td></tr> | ||
| 1241 | <tr><td><code class="verbatim">U</code></td><td>Move Subtree Up (<code class="verbatim">org.subtree.up</code>)</td></tr> | ||
| 1242 | <tr><td><code class="verbatim">D</code></td><td>Move Subtree Down (<code class="verbatim">org.subtree.down</code>)</td></tr> | ||
| 1243 | <tr><td><code class="verbatim">r</code></td><td>Demote Heading (<code class="verbatim">org.heading.demote</code>)</td></tr> | ||
| 1244 | <tr><td><code class="verbatim">l</code></td><td>Promote Heading (<code class="verbatim">org.heading.promote</code>)</td></tr> | ||
| 1245 | <tr><td><code class="verbatim">R</code></td><td>Demote Subtree (<code class="verbatim">org.subtree.demote</code>)</td></tr> | ||
| 1246 | <tr><td><code class="verbatim">L</code></td><td>Promote Subtree (<code class="verbatim">org.subtree.promote</code>)</td></tr> | ||
| 1247 | <tr><td><code class="verbatim">i</code></td><td>Insert Heading After Subtree (<code class="verbatim">org.heading.insert-after-subtree</code>)</td></tr> | ||
| 1248 | <tr><td><code class="verbatim">w</code></td><td>Refile… (<code class="verbatim">app.refile</code>)</td></tr> | ||
| 1249 | <tr><td><code class="verbatim">a</code></td><td>Archive Subtree (<code class="verbatim">app.archive</code>)</td></tr> | ||
| 1250 | <tr><td><code class="verbatim">@</code></td><td>Mark Subtree (<code class="verbatim">org.subtree.mark</code>)</td></tr> | ||
| 1251 | <tr><td><code class="verbatim">#</code></td><td>Toggle COMMENT (<code class="verbatim">org.heading.toggle-comment</code>)</td></tr> | ||
| 1252 | <tr><td><code class="verbatim">I</code></td><td>Clock In (<code class="verbatim">app.clock.in</code>)</td></tr> | ||
| 1253 | <tr><td><code class="verbatim">O</code></td><td>Clock Out (<code class="verbatim">app.clock.out</code>)</td></tr> | ||
| 1254 | <tr><td><code class="verbatim">t</code></td><td>Cycle TODO State (<code class="verbatim">org.todo.cycle</code>)</td></tr> | ||
| 1255 | <tr><td><code class="verbatim">,</code></td><td>Set Priority… (<code class="verbatim">org.priority.set</code>)</td></tr> | ||
| 1256 | <tr><td><code class="verbatim">0</code></td><td>Remove Priority (<code class="verbatim">org.priority.remove</code>)</td></tr> | ||
| 1257 | <tr><td><code class="verbatim">1</code></td><td>Set Priority A (<code class="verbatim">org.priority.set-a</code>)</td></tr> | ||
| 1258 | <tr><td><code class="verbatim">2</code></td><td>Set Priority B (<code class="verbatim">org.priority.set-b</code>)</td></tr> | ||
| 1259 | <tr><td><code class="verbatim">3</code></td><td>Set Priority C (<code class="verbatim">org.priority.set-c</code>)</td></tr> | ||
| 1260 | <tr><td><code class="verbatim">:</code></td><td>Set Tags (<code class="verbatim">org.tags.set</code>)</td></tr> | ||
| 1261 | <tr><td><code class="verbatim">e</code></td><td>Set Effort (<code class="verbatim">org.effort.set</code>)</td></tr> | ||
| 1262 | <tr><td><code class="verbatim">v</code></td><td>Agenda (<code class="verbatim">app.agenda</code>)</td></tr> | ||
| 1263 | <tr><td><code class="verbatim">o</code></td><td>Open Link (<code class="verbatim">org.link.open</code>)</td></tr> | ||
| 1264 | </tbody> | ||
| 1265 | </table> | ||
| 1266 | </main> | ||
| 1267 | <footer class="site"> | ||
| 1268 | © 2026 Christian Cleberg · <a href="https://krz.sh/apps/orgstar/">krz.sh/apps/orgstar</a> · <a href="/orgstar/third-party.html">third-party notices</a> | ||
| 1269 | </footer> | ||
| 1270 | </body> | ||
| 1271 | </html>\ No newline at end of file | ||
guide/04-outlines.html added +728
| @@ -0,0 +1,728 @@ | |||
| 1 | <!DOCTYPE html> | ||
| 2 | <html lang="en"> | ||
| 3 | <head> | ||
| 4 | <meta charset="utf-8"> | ||
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
| 6 | <title>Outlines and structure · orgstar</title> | ||
| 7 | <meta name="description" content="Headings, subtrees, plain lists, checkboxes, blocks, drawers, properties, column view, footnotes, refiling and archiving."> | ||
| 8 | <link rel="icon" href="../favicon.svg" type="image/svg+xml"> | ||
| 9 | <link rel="stylesheet" href="../theme.css"> | ||
| 10 | <link rel="stylesheet" href="../syntax.css"> | ||
| 11 | <link rel="stylesheet" href="../style.css"> | ||
| 12 | </head> | ||
| 13 | <body> | ||
| 14 | <header class="site"> | ||
| 15 | <a class="site-title" href="../index.html">orgstar</a> | ||
| 16 | <nav> | ||
| 17 | <a href="../install.html">Install</a> | ||
| 18 | <a href="../quickstart.html">Quick start</a> | ||
| 19 | <a href="index.html">Manual</a> | ||
| 20 | </nav> | ||
| 21 | </header> | ||
| 22 | <main> | ||
| 23 | <h1>Outlines and structure</h1> | ||
| 24 | <p class="lede">An org file is an outline of headings with text, lists and drawers under them; this chapter covers the commands that build and rearrange it.</p> | ||
| 25 | <nav class="toc" aria-label="On this page"> | ||
| 26 | <h2>On this page</h2> | ||
| 27 | <ul> | ||
| 28 | <li><a href="#headings">Headings</a> | ||
| 29 | <ul> | ||
| 30 | <li><a href="#inserting-headings">Inserting headings</a></li> | ||
| 31 | <li><a href="#promoting-and-demoting">Promoting and demoting</a></li> | ||
| 32 | <li><a href="#moving-subtrees">Moving subtrees</a></li> | ||
| 33 | <li><a href="#moving-between-headings">Moving between headings</a></li> | ||
| 34 | <li><a href="#toggling-headings-items-and-comments">Toggling headings, items and comments</a></li> | ||
| 35 | <li><a href="#selecting-a-subtree">Selecting a subtree</a></li> | ||
| 36 | </ul></li> | ||
| 37 | <li><a href="#subtrees-as-text">Subtrees as text</a> | ||
| 38 | <ul> | ||
| 39 | <li><a href="#cut-copy-and-paste">Cut, copy and paste</a></li> | ||
| 40 | <li><a href="#cloning-with-a-time-shift">Cloning with a time shift</a></li> | ||
| 41 | <li><a href="#sorting">Sorting</a></li> | ||
| 42 | </ul></li> | ||
| 43 | <li><a href="#narrowing">Narrowing</a></li> | ||
| 44 | <li><a href="#sparse-trees">Sparse trees</a></li> | ||
| 45 | <li><a href="#plain-lists">Plain lists</a> | ||
| 46 | <ul> | ||
| 47 | <li><a href="#list-commands">List commands</a></li> | ||
| 48 | <li><a href="#bullets-and-numbering">Bullets and numbering</a></li> | ||
| 49 | </ul></li> | ||
| 50 | <li><a href="#checkboxes-and-statistics">Checkboxes and statistics</a> | ||
| 51 | <ul> | ||
| 52 | <li><a href="#checkboxes">Checkboxes</a></li> | ||
| 53 | <li><a href="#radio-lists">Radio lists</a></li> | ||
| 54 | <li><a href="#statistics-cookies">Statistics cookies</a></li> | ||
| 55 | </ul></li> | ||
| 56 | <li><a href="#blocks">Blocks</a> | ||
| 57 | <ul> | ||
| 58 | <li><a href="#structure-templates">Structure templates</a></li> | ||
| 59 | <li><a href="#org-tempo-templates">org-tempo templates</a></li> | ||
| 60 | <li><a href="#folding-and-editing-blocks">Folding and editing blocks</a></li> | ||
| 61 | </ul></li> | ||
| 62 | <li><a href="#drawers">Drawers</a></li> | ||
| 63 | <li><a href="#properties">Properties</a> | ||
| 64 | <ul> | ||
| 65 | <li><a href="#setting-and-deleting">Setting and deleting</a></li> | ||
| 66 | <li><a href="#allowed-values">Allowed values</a></li> | ||
| 67 | <li><a href="#inheritance">Inheritance</a></li> | ||
| 68 | <li><a href="#special-properties">Special properties</a></li> | ||
| 69 | </ul></li> | ||
| 70 | <li><a href="#column-view">Column view</a> | ||
| 71 | <ul> | ||
| 72 | <li><a href="#the-column-view-sheet">The column view sheet</a></li> | ||
| 73 | <li><a href="#the-columns-inspector">The Columns inspector</a></li> | ||
| 74 | <li><a href="#column-view-tables">Column view tables</a></li> | ||
| 75 | </ul></li> | ||
| 76 | <li><a href="#footnotes">Footnotes</a></li> | ||
| 77 | <li><a href="#refiling">Refiling</a></li> | ||
| 78 | <li><a href="#archiving">Archiving</a> | ||
| 79 | <ul> | ||
| 80 | <li><a href="#archive-subtree">Archive Subtree</a></li> | ||
| 81 | <li><a href="#the-archive-tag">The ARCHIVE tag</a></li> | ||
| 82 | <li><a href="#archive-sibling">Archive sibling</a></li> | ||
| 83 | </ul></li> | ||
| 84 | <li><a href="#attachments">Attachments</a></li> | ||
| 85 | <li><a href="#encrypted-entries">Encrypted entries</a></li> | ||
| 86 | <li><a href="#the-outline-pane">The outline pane</a></li> | ||
| 87 | <li><a href="#c-c-c-c">C-c C-c</a></li> | ||
| 88 | <li><a href="#speed-keys">Speed keys</a></li> | ||
| 89 | <li><a href="#not-supported">Not supported</a></li> | ||
| 90 | </ul> | ||
| 91 | </nav> | ||
| 92 | <p>Every command in this chapter is in the Org menu and the command palette (<code class="verbatim">⇧⌘P</code>), under the title given in the tables, whatever keymap you use. The Org menu shows the keys that run each command in your current keymap.</p> | ||
| 93 | <p>Keys are listed for the three presets. The Emacs and Doom presets use Emacs notation (<code class="verbatim">M-RET</code> is Meta-Return, <code class="verbatim">C-c C-w</code> is Control-c then Control-w). The Mac preset uses macOS symbols. The Doom preset has every Emacs-preset key that starts with <code class="verbatim">C-c</code> or <code class="verbatim">C-x</code>, and the <code class="verbatim">M-</code>, <code class="verbatim">S-</code> arrow and <code class="verbatim">RET</code> chords, in normal, insert and visual state, plus the Doom keys listed. Where the Mac column says "menu", the Mac preset has no key for the command; run it from the Org menu or the palette, or bind one in <code class="verbatim">keymap.toml</code> (see <a href="03-keys.html">Keys</a>).</p> | ||
| 94 | <h2 id="headings">Headings</h2> | ||
| 95 | <p>A heading is a line that starts with one or more stars and a space. The number of stars is its level. A heading and everything under it, down to the next heading at the same or a higher level, is a subtree.</p> | ||
| 96 | <pre><code class="language-org highlight"><span class="text org"><span class="markup heading org"><span class="punctuation definition heading org">*</span> Project | ||
| 97 | </span>Notes about the project. | ||
| 98 | <span class="markup heading org"><span class="punctuation definition heading org">**</span> <span class="keyword other todo org">TODO</span> Write the plan | ||
| 99 | </span><span class="markup heading org"><span class="punctuation definition heading org">**</span> Meetings | ||
| 100 | </span><span class="markup heading org"><span class="punctuation definition heading org">***</span> Kickoff</span></span></code></pre> | ||
| 101 | <h3 id="inserting-headings">Inserting headings</h3> | ||
| 102 | <table> | ||
| 103 | <thead> | ||
| 104 | <tr><th>Command</th><th>Org command</th><th>Emacs</th><th>Mac</th><th>Doom</th></tr> | ||
| 105 | </thead> | ||
| 106 | <tbody> | ||
| 107 | <tr><td>Insert Heading</td><td><code class="verbatim">org-insert-heading</code></td><td><code class="verbatim">M-RET</code></td><td><code class="verbatim">⌘↩</code></td><td><code class="verbatim">M-RET</code></td></tr> | ||
| 108 | <tr><td>Insert Heading After Subtree</td><td><code class="verbatim">org-insert-heading-respect-content</code></td><td><code class="verbatim">C-RET</code></td><td><code class="verbatim">⌃⌘↩</code></td><td><code class="verbatim">C-RET</code></td></tr> | ||
| 109 | <tr><td>Insert TODO Heading</td><td><code class="verbatim">org-insert-todo-heading</code></td><td><code class="verbatim">M-S-RET</code></td><td><code class="verbatim">⇧⌘↩</code></td><td><code class="verbatim">M-S-RET</code></td></tr> | ||
| 110 | </tbody> | ||
| 111 | </table> | ||
| 112 | <p>The new heading has the level of the heading the caret is under, or level 1 before the first heading. In a plain list the same keys insert an item instead (see <a href="#plain-lists">Plain lists</a>).</p> | ||
| 113 | <p>Insert TODO Heading gives the new heading the keyword of the previous heading at the same level when that keyword is not a done state, and otherwise the first keyword of the file's TODO sequence. If the parent has a statistics cookie, it is updated.</p> | ||
| 114 | <p>Two settings change where Insert Heading puts the heading. Both are in Settings ▸ Editing and in <code class="verbatim">config.toml</code> under the Emacs variable names:</p> | ||
| 115 | <table> | ||
| 116 | <thead> | ||
| 117 | <tr><th>Setting (<code class="verbatim">config.toml</code>)</th><th>Settings ▸ Editing</th><th>orgstar default</th><th>Org default</th></tr> | ||
| 118 | </thead> | ||
| 119 | <tbody> | ||
| 120 | <tr><td><code class="verbatim">org-insert-heading-respect-content</code></td><td>M-RET adds the new heading after the subtree</td><td><code class="verbatim">false</code></td><td><code class="verbatim">nil</code></td></tr> | ||
| 121 | <tr><td><code class="verbatim">org-M-RET-may-split-line</code></td><td>M-RET splits the line at the caret</td><td><code class="verbatim">false</code></td><td><code class="verbatim">t</code></td></tr> | ||
| 122 | </tbody> | ||
| 123 | </table> | ||
| 124 | <p>With <code class="verbatim">org-insert-heading-respect-content</code> on, Insert Heading behaves as Insert Heading After Subtree: the new heading goes after the end of the current subtree, at the current level. Insert Heading also does this when the caret is in folded text.</p> | ||
| 125 | <p>With it off, Insert Heading works where the caret is:</p> | ||
| 126 | <ul> | ||
| 127 | <li>At the start of a heading line, the new heading is inserted above it.</li> | ||
| 128 | <li>Elsewhere on a heading line, the new heading goes below that line. With <code class="verbatim">org-M-RET-may-split-line</code> on and the caret inside the title, the text after the caret moves to the new heading. Tags stay on the original line and are realigned.</li> | ||
| 129 | <li>In body text, a new heading line is started below. With <code class="verbatim">org-M-RET-may-split-line</code> on, the line is split at the caret first.</li> | ||
| 130 | </ul> | ||
| 131 | <p>orgstar follows Org's <code class="verbatim">org-blank-before-new-entry</code> default of <code class="verbatim">auto</code> for headings: if the heading the caret is in is preceded by a blank line, the new heading is too.</p> | ||
| 132 | <p>Insert Heading After Subtree always inserts after the subtree:</p> | ||
| 133 | <pre><code class="language-org highlight"><span class="text org"><span class="markup heading org"><span class="punctuation definition heading org">*</span> a | ||
| 134 | </span>body | ||
| 135 | <span class="markup heading org"><span class="punctuation definition heading org">**</span> b | ||
| 136 | </span><span class="markup heading org"><span class="punctuation definition heading org">*</span> c</span></span></code></pre> | ||
| 137 | <p>With the caret on <code class="verbatim">* a</code>, <code class="verbatim">C-RET</code> gives:</p> | ||
| 138 | <pre><code class="language-org highlight"><span class="text org"><span class="markup heading org"><span class="punctuation definition heading org">*</span> a | ||
| 139 | </span>body | ||
| 140 | <span class="markup heading org"><span class="punctuation definition heading org">**</span> b | ||
| 141 | </span><span class="markup heading org"><span class="punctuation definition heading org">*</span> | ||
| 142 | </span><span class="markup heading org"><span class="punctuation definition heading org">*</span> c</span></span></code></pre> | ||
| 143 | <h3 id="promoting-and-demoting">Promoting and demoting</h3> | ||
| 144 | <table> | ||
| 145 | <thead> | ||
| 146 | <tr><th>Command</th><th>Org command</th><th>Emacs</th><th>Mac</th><th>Doom</th></tr> | ||
| 147 | </thead> | ||
| 148 | <tbody> | ||
| 149 | <tr><td>Promote Heading</td><td><code class="verbatim">org-promote</code></td><td><code class="verbatim">M-<left></code></td><td><code class="verbatim">⌃⌘←</code></td><td><code class="verbatim">M-h</code>; in insert state <code class="verbatim">S-TAB</code> or <code class="verbatim">C-d</code></td></tr> | ||
| 150 | <tr><td>Demote Heading</td><td><code class="verbatim">org-demote</code></td><td><code class="verbatim">M-<right></code></td><td><code class="verbatim">⌃⌘→</code></td><td><code class="verbatim">M-l</code>; in insert state <code class="verbatim">TAB</code> or <code class="verbatim">C-t</code></td></tr> | ||
| 151 | <tr><td>Promote Subtree</td><td><code class="verbatim">org-promote-subtree</code></td><td><code class="verbatim">M-S-<left></code></td><td><code class="verbatim">⌃⌥⌘←</code></td><td><code class="verbatim">M-H</code>, <code class="verbatim">SPC m s h</code></td></tr> | ||
| 152 | <tr><td>Demote Subtree</td><td><code class="verbatim">org-demote-subtree</code></td><td><code class="verbatim">M-S-<right></code></td><td><code class="verbatim">⌃⌥⌘→</code></td><td><code class="verbatim">M-L</code>, <code class="verbatim">SPC m s l</code></td></tr> | ||
| 153 | </tbody> | ||
| 154 | </table> | ||
| 155 | <p>These run with the caret on a heading line. Promote and Demote Heading change only that line's stars; its children keep their level. The subtree commands change the heading and every heading under it. Tags are realigned after each change. A level 1 heading can't be promoted ("Cannot promote to level 0").</p> | ||
| 156 | <p>On a list item the same keys indent and outdent the item instead.</p> | ||
| 157 | <h3 id="moving-subtrees">Moving subtrees</h3> | ||
| 158 | <table> | ||
| 159 | <thead> | ||
| 160 | <tr><th>Command</th><th>Org command</th><th>Emacs</th><th>Mac</th><th>Doom</th></tr> | ||
| 161 | </thead> | ||
| 162 | <tbody> | ||
| 163 | <tr><td>Move Subtree Up</td><td><code class="verbatim">org-move-subtree-up</code></td><td><code class="verbatim">M-<up></code></td><td><code class="verbatim">⌃⌥⌘↑</code></td><td><code class="verbatim">M-k</code>, <code class="verbatim">SPC m s k</code></td></tr> | ||
| 164 | <tr><td>Move Subtree Down</td><td><code class="verbatim">org-move-subtree-down</code></td><td><code class="verbatim">M-<down></code></td><td><code class="verbatim">⌃⌥⌘↓</code></td><td><code class="verbatim">M-j</code>, <code class="verbatim">SPC m s j</code></td></tr> | ||
| 165 | </tbody> | ||
| 166 | </table> | ||
| 167 | <p>The subtree at the caret swaps places with the previous or next sibling subtree. It can't move past its parent or the start or end of the file. The caret keeps its column.</p> | ||
| 168 | <p>On a list item the same keys move the item; in a table they move the row. On other elements (paragraphs, blocks, drawers, keywords) they drag the element past the one before or after it in the same section, drawer or greater block, as <code class="verbatim">org-drag-element-backward</code> and <code class="verbatim">org-drag-element-forward</code> do. The blank lines between the two stay where they were.</p> | ||
| 169 | <h3 id="moving-between-headings">Moving between headings</h3> | ||
| 170 | <table> | ||
| 171 | <thead> | ||
| 172 | <tr><th>Command</th><th>Org command</th><th>Emacs</th><th>Mac</th><th>Doom</th></tr> | ||
| 173 | </thead> | ||
| 174 | <tbody> | ||
| 175 | <tr><td>Next Heading</td><td><code class="verbatim">org-next-visible-heading</code></td><td><code class="verbatim">C-c C-n</code></td><td><code class="verbatim">⌥⌘↓</code></td><td><code class="verbatim">C-c C-n</code></td></tr> | ||
| 176 | <tr><td>Previous Heading</td><td><code class="verbatim">org-previous-visible-heading</code></td><td><code class="verbatim">C-c C-p</code></td><td><code class="verbatim">⌥⌘↑</code></td><td><code class="verbatim">C-c C-p</code></td></tr> | ||
| 177 | <tr><td>Next Heading at Same Level</td><td><code class="verbatim">org-forward-heading-same-level</code></td><td><code class="verbatim">C-c C-f</code></td><td><code class="verbatim">⌥⇧⌘↓</code></td><td><code class="verbatim">] h</code></td></tr> | ||
| 178 | <tr><td>Previous Heading at Same Level</td><td><code class="verbatim">org-backward-heading-same-level</code></td><td><code class="verbatim">C-c C-b</code></td><td><code class="verbatim">⌥⇧⌘↑</code></td><td><code class="verbatim">[ h</code></td></tr> | ||
| 179 | <tr><td>Up to Parent Heading</td><td><code class="verbatim">outline-up-heading</code></td><td><code class="verbatim">C-c C-u</code></td><td>menu</td><td><code class="verbatim">g h</code></td></tr> | ||
| 180 | <tr><td>Go to Heading…</td><td><code class="verbatim">org-goto</code></td><td><code class="verbatim">C-c C-j</code></td><td>menu</td><td><code class="verbatim">SPC m .</code></td></tr> | ||
| 181 | </tbody> | ||
| 182 | </table> | ||
| 183 | <p>Next and Previous Heading skip headings that are folded out of sight. The same-level commands stop at the parent's boundary. In Doom's normal state, <code class="verbatim">gj</code> and <code class="verbatim">gk</code> move by Org element, as evil-org's <code class="verbatim">org-forward-element</code> and <code class="verbatim">org-backward-element</code>: on a heading line, to the next heading after its subtree, or to the previous heading at the same level or higher (see <a href="03-keys.html">Keys and commands</a>). Go to Heading asks for a heading by its outline path (<code class="verbatim">Project/Meetings/Kickoff</code>) with completion, as <code class="verbatim">org-goto</code> does with <code class="verbatim">outline-path-completion</code>.</p> | ||
| 184 | <h3 id="toggling-headings-items-and-comments">Toggling headings, items and comments</h3> | ||
| 185 | <table> | ||
| 186 | <thead> | ||
| 187 | <tr><th>Command</th><th>Org command</th><th>Emacs</th><th>Mac</th><th>Doom</th></tr> | ||
| 188 | </thead> | ||
| 189 | <tbody> | ||
| 190 | <tr><td>Toggle Heading</td><td><code class="verbatim">org-toggle-heading</code></td><td><code class="verbatim">C-c *</code></td><td>menu</td><td><code class="verbatim">SPC m h</code></td></tr> | ||
| 191 | <tr><td>Toggle Item</td><td><code class="verbatim">org-ctrl-c-minus</code>, <code class="verbatim">org-toggle-item</code></td><td><code class="verbatim">C-c -</code></td><td>menu</td><td><code class="verbatim">SPC m i</code></td></tr> | ||
| 192 | <tr><td>Toggle COMMENT</td><td><code class="verbatim">org-toggle-comment</code></td><td><code class="verbatim">C-c ;</code></td><td>menu</td><td><code class="verbatim">C-c ;</code></td></tr> | ||
| 193 | </tbody> | ||
| 194 | </table> | ||
| 195 | <p>These work on the caret's line, or on every line of the selection.</p> | ||
| 196 | <p>Toggle Heading:</p> | ||
| 197 | <ul> | ||
| 198 | <li>On headings, removes their stars, so they become text.</li> | ||
| 199 | <li>On list items, turns them into headings one level below the entry they are in. A checkbox becomes a keyword: <code class="verbatim">[ ]</code> the first TODO keyword, <code class="verbatim">[X]</code> the first done keyword. Nested items become deeper headings.</li> | ||
| 200 | <li>On other lines, makes each non-blank line a heading one level below the current entry. Comment lines are skipped.</li> | ||
| 201 | </ul> | ||
| 202 | <pre><code class="language-org highlight"><span class="text org"><span class="markup heading org"><span class="punctuation definition heading org">*</span> Shopping | ||
| 203 | </span><span class="punctuation definition list org">- </span><span class="constant language checkbox org">[ ]</span> milk | ||
| 204 | <span class="punctuation definition list org">- </span><span class="constant language checkbox org">[X]</span> bread</span></code></pre> | ||
| 205 | <p>Selecting both items and pressing <code class="verbatim">C-c *</code> gives:</p> | ||
| 206 | <pre><code class="language-org highlight"><span class="text org"><span class="markup heading org"><span class="punctuation definition heading org">*</span> Shopping | ||
| 207 | </span><span class="markup heading org"><span class="punctuation definition heading org">**</span> <span class="keyword other todo org">TODO</span> milk | ||
| 208 | </span><span class="markup heading org"><span class="punctuation definition heading org">**</span> <span class="keyword other todo org">DONE</span> bread</span></span></code></pre> | ||
| 209 | <p>Toggle Item:</p> | ||
| 210 | <ul> | ||
| 211 | <li>On a list item, with no selection, cycles the list's bullets (see <a href="#bullets-and-numbering">Bullets and numbering</a>).</li> | ||
| 212 | <li>On items in a selection, removes their bullets.</li> | ||
| 213 | <li>On headings, turns them into items. The tags, planning line and property drawer are removed. A TODO keyword becomes a checkbox, <code class="verbatim">[X]</code> for a done state and <code class="verbatim">[ ]</code> otherwise. The section's text is indented under the item.</li> | ||
| 214 | <li>On other lines, puts a <code class="verbatim">-</code> bullet and a space in front of each non-blank line.</li> | ||
| 215 | </ul> | ||
| 216 | <p>In a table, <code class="verbatim">C-c *</code> recalculates and <code class="verbatim">C-c -</code> inserts a horizontal line instead (see <a href="10-tables.html">Tables</a>).</p> | ||
| 217 | <p>Toggle COMMENT adds or removes the <code class="verbatim">COMMENT</code> keyword after the stars and TODO keyword. Commented subtrees are left out of export and column view.</p> | ||
| 218 | <h3 id="selecting-a-subtree">Selecting a subtree</h3> | ||
| 219 | <p>Mark Subtree (<code class="verbatim">org-mark-subtree</code>, <code class="verbatim">C-c @</code> in the Emacs and Doom presets) selects the subtree at the caret, from its heading line to the end of its last line.</p> | ||
| 220 | <h2 id="subtrees-as-text">Subtrees as text</h2> | ||
| 221 | <h3 id="cut-copy-and-paste">Cut, copy and paste</h3> | ||
| 222 | <table> | ||
| 223 | <thead> | ||
| 224 | <tr><th>Command</th><th>Org command</th><th>Emacs</th><th>Mac</th><th>Doom</th></tr> | ||
| 225 | </thead> | ||
| 226 | <tbody> | ||
| 227 | <tr><td>Cut Subtree</td><td><code class="verbatim">org-cut-subtree</code></td><td><code class="verbatim">C-c C-x C-w</code></td><td>menu</td><td><code class="verbatim">C-c C-x C-w</code>, <code class="verbatim">SPC m s d</code></td></tr> | ||
| 228 | <tr><td>Copy Subtree</td><td><code class="verbatim">org-copy-subtree</code></td><td><code class="verbatim">C-c C-x M-w</code></td><td>menu</td><td><code class="verbatim">C-c C-x M-w</code></td></tr> | ||
| 229 | <tr><td>Paste Subtree</td><td><code class="verbatim">org-paste-subtree</code></td><td><code class="verbatim">C-c C-x C-y</code></td><td>menu</td><td><code class="verbatim">C-c C-x C-y</code></td></tr> | ||
| 230 | </tbody> | ||
| 231 | </table> | ||
| 232 | <p>The kill ring is the system clipboard. Cut Subtree and Copy Subtree put the subtree at the caret, with the blank lines after it, on the clipboard and report its length.</p> | ||
| 233 | <p>Paste Subtree takes the clipboard's text and adjusts its levels to fit where it lands. The text has to start with a heading and contain no heading above its first one's level; otherwise the command refuses. The level comes from:</p> | ||
| 234 | <ul> | ||
| 235 | <li>an empty heading line, such as <code class="verbatim">***</code> followed by a space, at the caret: that level, and the empty line is replaced;</li> | ||
| 236 | <li>the caret at the start of a heading: that heading's level, pasted before it;</li> | ||
| 237 | <li>otherwise the deeper of the heading above the caret and the heading below it, pasted before the next heading.</li> | ||
| 238 | </ul> | ||
| 239 | <h3 id="cloning-with-a-time-shift">Cloning with a time shift</h3> | ||
| 240 | <p>Clone Subtree with Time Shift (<code class="verbatim">org-clone-subtree-with-time-shift</code>, <code class="verbatim">C-c C-x c</code>, Doom <code class="verbatim">SPC m s c</code>) asks for a number of clones, then, if the subtree has timestamps, for a shift per clone such as <code class="verbatim">+1d</code>, <code class="verbatim">+1w</code>, <code class="verbatim">+2m</code> or <code class="verbatim">+1y</code> (units <code class="verbatim">h</code>, <code class="verbatim">d</code>, <code class="verbatim">w</code>, <code class="verbatim">m</code>, <code class="verbatim">y</code>). Leave the shift empty to copy the dates unchanged.</p> | ||
| 241 | <p>The clones are inserted after the subtree. The nth clone has its dates moved by n times the shift. Clones lose their <code class="verbatim">CLOCK:</code> lines, and drawers left empty by that are removed. An entry with an <code class="verbatim">:ID:</code> property gets a new ID in each clone. When the subtree has a repeating timestamp and a shift is given, the repeater is removed from the clones, and the original, with its repeater, moves after them with its dates shifted past the last clone, as Org does.</p> | ||
| 242 | <h3 id="sorting">Sorting</h3> | ||
| 243 | <p>Sort Entries (<code class="verbatim">org-sort</code>, <code class="verbatim">C-c ^</code>, Mac <code class="verbatim">⌃⇧⌘S</code>, Doom <code class="verbatim">SPC m s S</code>) sorts what the caret is in:</p> | ||
| 244 | <ul> | ||
| 245 | <li>In a table, the table's lines (<code class="verbatim">org-table-sort-lines</code>, see <a href="10-tables.html">Tables</a>).</li> | ||
| 246 | <li>On a list item, the items of that list (<code class="verbatim">org-sort-list</code>).</li> | ||
| 247 | <li>Otherwise headings (<code class="verbatim">org-sort-entries</code>): with a selection, the headings in it; on a heading, its children; before the first heading, the top-level headings.</li> | ||
| 248 | </ul> | ||
| 249 | <p>It then asks for a sort key, one keystroke. A capital letter sorts in reverse.</p> | ||
| 250 | <table> | ||
| 251 | <thead> | ||
| 252 | <tr><th>Key</th><th>Headings</th><th>List items</th></tr> | ||
| 253 | </thead> | ||
| 254 | <tbody> | ||
| 255 | <tr><td><code class="verbatim">a</code></td><td>alphabetically by title</td><td>alphabetically by text</td></tr> | ||
| 256 | <tr><td><code class="verbatim">n</code></td><td>numerically by the title's leading number</td><td>numerically by the text</td></tr> | ||
| 257 | <tr><td><code class="verbatim">p</code></td><td>priority</td><td></td></tr> | ||
| 258 | <tr><td><code class="verbatim">r</code></td><td>a property's value (asks which property)</td><td></td></tr> | ||
| 259 | <tr><td><code class="verbatim">o</code></td><td>TODO keyword, in sequence order</td><td></td></tr> | ||
| 260 | <tr><td><code class="verbatim">t</code></td><td>first active timestamp, else first timestamp</td><td>first timestamp, or a timer</td></tr> | ||
| 261 | <tr><td><code class="verbatim">s</code></td><td><code class="verbatim">SCHEDULED</code> date</td><td></td></tr> | ||
| 262 | <tr><td><code class="verbatim">d</code></td><td><code class="verbatim">DEADLINE</code> date</td><td></td></tr> | ||
| 263 | <tr><td><code class="verbatim">c</code></td><td>creation time: the first inactive timestamp at the start of a line</td><td></td></tr> | ||
| 264 | <tr><td><code class="verbatim">k</code></td><td>clocked time in the subtree</td><td></td></tr> | ||
| 265 | <tr><td><code class="verbatim">x</code></td><td></td><td>checkbox state</td></tr> | ||
| 266 | </tbody> | ||
| 267 | </table> | ||
| 268 | <p>Alphabetical and numeric sorts ignore a leading <code class="verbatim">COMMENT</code>, link brackets and emphasis markers. Sorting is stable, so entries with equal keys keep their order. Entries without a date sort as if dated now. After sorting a list, its numbering is repaired. Org's <code class="verbatim">f</code> (custom function) key is not available.</p> | ||
| 269 | <h2 id="narrowing">Narrowing</h2> | ||
| 270 | <table> | ||
| 271 | <thead> | ||
| 272 | <tr><th>Command</th><th>Org command</th><th>Emacs</th><th>Mac</th><th>Doom</th></tr> | ||
| 273 | </thead> | ||
| 274 | <tbody> | ||
| 275 | <tr><td>Narrow to Subtree</td><td><code class="verbatim">org-narrow-to-subtree</code></td><td><code class="verbatim">C-x n s</code></td><td>menu</td><td><code class="verbatim">SPC m s n</code></td></tr> | ||
| 276 | <tr><td>Narrow to Block</td><td><code class="verbatim">org-narrow-to-block</code></td><td><code class="verbatim">C-x n b</code></td><td>menu</td><td><code class="verbatim">C-x n b</code></td></tr> | ||
| 277 | <tr><td>Widen</td><td><code class="verbatim">widen</code></td><td><code class="verbatim">C-x n w</code></td><td>menu</td><td><code class="verbatim">SPC m s N</code></td></tr> | ||
| 278 | <tr><td>Narrow to Subtree or Widen</td><td><code class="verbatim">org-toggle-narrow-to-subtree</code></td><td>speed key <code class="verbatim">s</code></td><td><code class="verbatim">⌃⌘N</code>, speed key <code class="verbatim">s</code></td><td>speed key <code class="verbatim">s</code></td></tr> | ||
| 279 | </tbody> | ||
| 280 | </table> | ||
| 281 | <p>Narrowing hides everything outside the current subtree or block, so the editor shows only that part of the file. Narrow to Block works on src, example, export, comment and verse blocks (with the blank lines after them) and, for other blocks, on the lines between the opening and closing lines. Edits inside the narrowed text move its bounds as you type. Jumping to a position outside it, from a link, search or the outline pane, widens first.</p> | ||
| 282 | <p>Narrowing is a view. Commands still see the whole file: for example, a new footnote's definition still goes into the <code class="verbatim">Footnotes</code> section at the end of the file, and a sparse tree searches the whole file.</p> | ||
| 283 | <h2 id="sparse-trees">Sparse trees</h2> | ||
| 284 | <p>Sparse Tree… (<code class="verbatim">org-sparse-tree</code>, <code class="verbatim">C-c /</code>, Doom <code class="verbatim">SPC m s s</code>) folds the file to an overview and then shows only the matches and the headings above them. It asks what to match, one keystroke:</p> | ||
| 285 | <table> | ||
| 286 | <thead> | ||
| 287 | <tr><th>Key</th><th>Shows</th><th>Org function</th></tr> | ||
| 288 | </thead> | ||
| 289 | <tbody> | ||
| 290 | <tr><td><code class="verbatim">r</code></td><td>text matching a regular expression (asks for it); case-insensitive</td><td><code class="verbatim">org-occur</code></td></tr> | ||
| 291 | <tr><td><code class="verbatim">t</code></td><td>headings with a TODO keyword that is not a done state</td><td><code class="verbatim">org-show-todo-tree</code></td></tr> | ||
| 292 | <tr><td><code class="verbatim">T</code></td><td>headings with the keywords you give (several separated by a vertical bar)</td><td><code class="verbatim">org-show-todo-tree</code></td></tr> | ||
| 293 | <tr><td><code class="verbatim">m</code></td><td>headings matching a tags and properties match</td><td><code class="verbatim">org-match-sparse-tree</code></td></tr> | ||
| 294 | <tr><td><code class="verbatim">p</code></td><td>headings where a property has a value (asks for both, with completion)</td><td><code class="verbatim">org-match-sparse-tree</code></td></tr> | ||
| 295 | <tr><td><code class="verbatim">d</code></td><td>deadlines past due or due within <code class="verbatim">org-deadline-warning-days</code> (14), in entries not done</td><td><code class="verbatim">org-check-deadlines</code></td></tr> | ||
| 296 | <tr><td><code class="verbatim">b</code></td><td>entries with a <code class="verbatim">SCHEDULED</code> or <code class="verbatim">DEADLINE</code> before a date</td><td><code class="verbatim">org-check-before-date</code></td></tr> | ||
| 297 | <tr><td><code class="verbatim">a</code></td><td>entries with a <code class="verbatim">SCHEDULED</code> or <code class="verbatim">DEADLINE</code> on or after a date</td><td><code class="verbatim">org-check-after-date</code></td></tr> | ||
| 298 | <tr><td><code class="verbatim">D</code></td><td>entries with a <code class="verbatim">SCHEDULED</code> or <code class="verbatim">DEADLINE</code> in a date range</td><td><code class="verbatim">org-check-dates-range</code></td></tr> | ||
| 299 | </tbody> | ||
| 300 | </table> | ||
| 301 | <p>The regular expression uses Emacs syntax. The match syntax for <code class="verbatim">m</code> is the one the agenda's tags search uses (see <a href="07-agenda.html">Agenda</a>). Dates are read as Org reads them (see <a href="06-dates-and-clocking.html">Dates and clocking</a>).</p> | ||
| 302 | <p>For a text match, the whole entry around each match is shown; for heading matches, the heading line. The matched text is highlighted, and the echo area reports the number of matches. Subtrees tagged <code class="verbatim">ARCHIVE</code> stay folded. The highlights go away at the next edit or with <code class="verbatim">C-c C-c</code>. <code class="verbatim">TAB</code> and <code class="verbatim">S-TAB</code> work as usual afterwards; cycling leaves the sparse view.</p> | ||
| 303 | <h2 id="plain-lists">Plain lists</h2> | ||
| 304 | <p>orgstar's list commands are ports of <code class="verbatim">org-list.el</code>. A list item starts with a bullet: <code class="verbatim">-</code>, <code class="verbatim">+</code>, <code class="verbatim">*</code> (not at the left margin, where it would be a heading), or a number followed by <code class="verbatim">.</code> or <code class="verbatim">)</code>. With alphabetical lists on, <code class="verbatim">a.</code>, <code class="verbatim">A.</code>, <code class="verbatim">a)</code> and <code class="verbatim">A)</code> are bullets too. A description item has <code class="verbatim">::</code> after its term:</p> | ||
| 305 | <pre><code class="language-org highlight"><span class="text org"><span class="punctuation definition list org">- </span>milk | ||
| 306 | <span class="punctuation definition list org">- </span>eggs | ||
| 307 | <span class="punctuation definition list org"> 1. </span>free range | ||
| 308 | <span class="punctuation definition list org"> 2. </span>brown | ||
| 309 | <span class="punctuation definition list org">- </span>orgstar :: an org editor for macOS and iOS</span></code></pre> | ||
| 310 | <table> | ||
| 311 | <thead> | ||
| 312 | <tr><th>Setting (<code class="verbatim">config.toml</code>)</th><th>Settings ▸ Editing</th><th>orgstar default</th><th>Org default</th></tr> | ||
| 313 | </thead> | ||
| 314 | <tbody> | ||
| 315 | <tr><td><code class="verbatim">org-list-allow-alphabetical</code></td><td>Lists can use letters (a. b. c.)</td><td><code class="verbatim">true</code></td><td><code class="verbatim">nil</code></td></tr> | ||
| 316 | </tbody> | ||
| 317 | </table> | ||
| 318 | <h3 id="list-commands">List commands</h3> | ||
| 319 | <table> | ||
| 320 | <thead> | ||
| 321 | <tr><th>Command</th><th>Org command</th><th>Emacs</th><th>Mac</th><th>Doom</th></tr> | ||
| 322 | </thead> | ||
| 323 | <tbody> | ||
| 324 | <tr><td>Insert Item</td><td><code class="verbatim">org-insert-item</code></td><td><code class="verbatim">M-RET</code></td><td><code class="verbatim">⌘↩</code></td><td><code class="verbatim">M-RET</code></td></tr> | ||
| 325 | <tr><td>Insert Checkbox Item</td><td><code class="verbatim">org-insert-item</code> with a checkbox</td><td><code class="verbatim">M-S-RET</code></td><td><code class="verbatim">⇧⌘↩</code></td><td><code class="verbatim">M-S-RET</code></td></tr> | ||
| 326 | <tr><td>Indent Item</td><td><code class="verbatim">org-indent-item</code></td><td><code class="verbatim">M-<right></code></td><td><code class="verbatim">⌃⌘→</code></td><td><code class="verbatim">M-l</code>; <code class="verbatim">C-t</code> in insert state</td></tr> | ||
| 327 | <tr><td>Outdent Item</td><td><code class="verbatim">org-outdent-item</code></td><td><code class="verbatim">M-<left></code></td><td><code class="verbatim">⌃⌘←</code></td><td><code class="verbatim">M-h</code>; <code class="verbatim">C-d</code> in insert state</td></tr> | ||
| 328 | <tr><td>Indent Item and Children</td><td><code class="verbatim">org-indent-item-tree</code></td><td><code class="verbatim">M-S-<right></code></td><td><code class="verbatim">⌃⌥⌘→</code></td><td><code class="verbatim">M-L</code>; <code class="verbatim">TAB</code> in insert state</td></tr> | ||
| 329 | <tr><td>Outdent Item and Children</td><td><code class="verbatim">org-outdent-item-tree</code></td><td><code class="verbatim">M-S-<left></code></td><td><code class="verbatim">⌃⌥⌘←</code></td><td><code class="verbatim">M-H</code>; <code class="verbatim">S-TAB</code> in insert state</td></tr> | ||
| 330 | <tr><td>Move Item Up</td><td><code class="verbatim">org-move-item-up</code></td><td><code class="verbatim">M-<up></code></td><td><code class="verbatim">⌃⌥⌘↑</code></td><td><code class="verbatim">M-k</code></td></tr> | ||
| 331 | <tr><td>Move Item Down</td><td><code class="verbatim">org-move-item-down</code></td><td><code class="verbatim">M-<down></code></td><td><code class="verbatim">⌃⌥⌘↓</code></td><td><code class="verbatim">M-j</code></td></tr> | ||
| 332 | <tr><td>Toggle Checkbox</td><td><code class="verbatim">org-toggle-checkbox</code></td><td><code class="verbatim">C-c C-x C-b</code></td><td><code class="verbatim">⌃⌘C</code></td><td><code class="verbatim">SPC m x</code>, <code class="verbatim">RET</code> in normal state</td></tr> | ||
| 333 | <tr><td>Toggle Item</td><td><code class="verbatim">org-ctrl-c-minus</code></td><td><code class="verbatim">C-c -</code></td><td>menu</td><td><code class="verbatim">SPC m i</code></td></tr> | ||
| 334 | </tbody> | ||
| 335 | </table> | ||
| 336 | <p>Insert Item works anywhere inside an item. The new item gets the next bullet: the same symbol, the next number or the next letter. In a description list the new item has an empty term followed by <code class="verbatim">::</code>, with the caret on the term. With <code class="verbatim">org-M-RET-may-split-line</code> on, text after the caret moves to the new item; with it off (the orgstar default), the new item goes after the current one. At the start of an item, the new item is inserted before it. If the list's items are separated by blank lines, so is the new one.</p> | ||
| 337 | <p>The indent, outdent and move commands need the caret on an item's first line.</p> | ||
| 338 | <ul> | ||
| 339 | <li>Indent Item and Outdent Item move one item; its children stay where they are, and an item with children can't be outdented alone ("Cannot outdent an item without its children").</li> | ||
| 340 | <li>The "and Children" variants move the item with its sub-items.</li> | ||
| 341 | <li>On the first item of a list, Indent Item refuses; Indent Item and Children and Outdent Item and Children move the whole list. A list moved to the left margin changes <code class="verbatim">*</code> bullets to <code class="verbatim">-</code>.</li> | ||
| 342 | <li>Move Item Up and Down swap the item, with its children, with the previous or next item at the same level.</li> | ||
| 343 | </ul> | ||
| 344 | <p>After every list command the list is repaired as Org repairs it: bullets are renumbered, indentation is fixed and checkboxes of parent items are updated.</p> | ||
| 345 | <h3 id="bullets-and-numbering">Bullets and numbering</h3> | ||
| 346 | <p>Toggle Item (<code class="verbatim">C-c -</code>) on an item, with no selection, cycles the bullet of the whole list (<code class="verbatim">org-cycle-list-bullet</code>) through:</p> | ||
| 347 | <p><code class="verbatim">-</code>, <code class="verbatim">+</code>, <code class="verbatim">*</code>, <code class="verbatim">1.</code>, <code class="verbatim">1)</code>, then with alphabetical lists <code class="verbatim">a.</code>, <code class="verbatim">A.</code>, <code class="verbatim">a)</code>, <code class="verbatim">A)</code>.</p> | ||
| 348 | <p><code class="verbatim">*</code> is skipped for a list at the left margin. Description lists skip the numbered and lettered bullets. Lettered bullets are offered only when the list has 26 items or fewer. <code class="verbatim">S-<right></code> and <code class="verbatim">S-<left></code> on an item (Doom <code class="verbatim">C-S-l</code> and <code class="verbatim">C-S-h</code>) cycle forward and backward.</p> | ||
| 349 | <p>Numbered and lettered lists are renumbered whenever a list command changes them, and by <code class="verbatim">C-c C-c</code> on any item. To start a list at a given number, put a counter after the bullet, as in Org:</p> | ||
| 350 | <pre><code class="language-org highlight"><span class="text org"><span class="punctuation definition list org">5. </span>[@5] fifth | ||
| 351 | <span class="punctuation definition list org">6. </span>sixth</span></code></pre> | ||
| 352 | <h2 id="checkboxes-and-statistics">Checkboxes and statistics</h2> | ||
| 353 | <h3 id="checkboxes">Checkboxes</h3> | ||
| 354 | <p>An item with <code class="verbatim">[ ]</code> after its bullet has a checkbox. <code class="verbatim">[X]</code> is checked, and <code class="verbatim">[-]</code> marks a parent item whose children are partly checked.</p> | ||
| 355 | <pre><code class="language-org highlight"><span class="text org"><span class="punctuation definition list org">- </span><span class="constant language checkbox org">[-]</span> packing | ||
| 356 | <span class="punctuation definition list org"> - </span><span class="constant language checkbox org">[X]</span> passport | ||
| 357 | <span class="punctuation definition list org"> - </span><span class="constant language checkbox org">[ ]</span> charger</span></code></pre> | ||
| 358 | <p>Toggle Checkbox (<code class="verbatim">C-c C-x C-b</code>) checks or unchecks the item on the caret's line, or every item in the selection. <code class="verbatim">C-c C-c</code> on an item toggles its checkbox too, and on an item without one, repairs the list. A parent item's checkbox follows its children: it can't be checked while children are unchecked ("Cannot toggle this checkbox: unchecked subitems").</p> | ||
| 359 | <p>Toggle Checkbox works only on item lines. Org's behaviour on a heading, toggling the checkboxes of the region or subtree, is not available.</p> | ||
| 360 | <h3 id="radio-lists">Radio lists</h3> | ||
| 361 | <p>A list with <code class="verbatim">:radio</code> in its <code class="verbatim">#+ATTR_ORG:</code> line, other than <code class="verbatim">:radio nil</code>, is a radio list: checking one item unchecks the others. Toggle Checkbox and <code class="verbatim">C-c C-c</code> on an item check it and uncheck the rest of its list (<code class="verbatim">org-toggle-radio-button</code>); items without a checkbox get one.</p> | ||
| 362 | <pre><code class="language-org highlight"><span class="text org"><span class="keyword other keyword org">#+ATTR_ORG:</span><span class="string unquoted org"> :radio t</span> | ||
| 363 | <span class="punctuation definition list org">- </span><span class="constant language checkbox org">[ ]</span> tea | ||
| 364 | <span class="punctuation definition list org">- </span><span class="constant language checkbox org">[X]</span> coffee | ||
| 365 | <span class="punctuation definition list org">- </span><span class="constant language checkbox org">[ ]</span> water</span></code></pre> | ||
| 366 | <p><code class="verbatim">C-c C-c</code> on an <code class="verbatim">#+ATTR_ORG:</code> or other affiliated keyword line of a list repairs the list, as on an item without a checkbox. Org's <code class="verbatim">org-list-checkbox-radio-mode</code>, which makes every list in a buffer a radio list, isn't available.</p> | ||
| 367 | <h3 id="statistics-cookies">Statistics cookies</h3> | ||
| 368 | <p>A cookie <code class="verbatim">[/]</code> or <code class="verbatim">[%]</code> on a heading or an item shows progress:</p> | ||
| 369 | <ul> | ||
| 370 | <li>On an item, it counts that item's direct child checkboxes.</li> | ||
| 371 | <li>On a heading, it counts the checkboxes of the top-level items in the heading's own section. If the section has none, it counts the TODO children: direct child headings with a keyword, and how many of them are in a done state.</li> | ||
| 372 | </ul> | ||
| 373 | <pre><code class="language-org highlight"><span class="text org"><span class="markup heading org"><span class="punctuation definition heading org">*</span> Groceries [1/3] | ||
| 374 | </span><span class="punctuation definition list org">- </span><span class="constant language checkbox org">[X]</span> milk | ||
| 375 | <span class="punctuation definition list org">- </span><span class="constant language checkbox org">[ ]</span> eggs | ||
| 376 | <span class="punctuation definition list org">- </span><span class="constant language checkbox org">[ ]</span> bread | ||
| 377 | |||
| 378 | <span class="markup heading org"><span class="punctuation definition heading org">*</span> Release [50%] | ||
| 379 | </span><span class="markup heading org"><span class="punctuation definition heading org">**</span> <span class="keyword other todo org">DONE</span> Tag the build | ||
| 380 | </span><span class="markup heading org"><span class="punctuation definition heading org">**</span> <span class="keyword other todo org">TODO</span> Write the notes</span></span></code></pre> | ||
| 381 | <p>Cookies update when you toggle or insert a checkbox, when a child heading's TODO state changes, when you archive an entry, and when you press <code class="verbatim">C-c C-c</code> with the caret on the cookie. A cookie with nothing to count shows <code class="verbatim">[0/0]</code> or <code class="verbatim">[100%]</code>. Tags are realigned when the cookie's width changes.</p> | ||
| 382 | <p>The <code class="verbatim">COOKIE_DATA</code> property changes what a heading's cookie counts, as in Org:</p> | ||
| 383 | <table> | ||
| 384 | <thead> | ||
| 385 | <tr><th>Value</th><th>Effect</th></tr> | ||
| 386 | </thead> | ||
| 387 | <tbody> | ||
| 388 | <tr><td><code class="verbatim">todo</code></td><td>count TODO children, not checkboxes</td></tr> | ||
| 389 | <tr><td><code class="verbatim">checkbox</code></td><td>count checkboxes, not TODO children</td></tr> | ||
| 390 | <tr><td><code class="verbatim">recursive</code></td><td>count all descendants, not only direct children</td></tr> | ||
| 391 | </tbody> | ||
| 392 | </table> | ||
| 393 | <p>For TODO statistics, <code class="verbatim">COOKIE_DATA</code> is read with inheritance, from the parent or an ancestor. orgstar counts TODO children hierarchically, as Org does with <code class="verbatim">org-hierarchical-todo-statistics</code> at its default.</p> | ||
| 394 | <h2 id="blocks">Blocks</h2> | ||
| 395 | <p>Blocks are lines between <code class="verbatim">#+BEGIN_name</code> and <code class="verbatim">#+END_name</code>:</p> | ||
| 396 | <pre><code class="language-org highlight"><span class="text org"><span class="markup raw block org"><span class="keyword control block begin org">#+BEGIN_QUOTE</span> | ||
| 397 | Text to quote. | ||
| 398 | <span class="keyword control block end org">#+END_QUOTE</span></span></span></code></pre> | ||
| 399 | <h3 id="structure-templates">Structure templates</h3> | ||
| 400 | <p>Insert Structure Template (<code class="verbatim">org-insert-structure-template</code>, <code class="verbatim">C-c C-,</code> in the Emacs and Doom presets) asks for a block type by key. Org's default keys are:</p> | ||
| 401 | <table> | ||
| 402 | <thead> | ||
| 403 | <tr><th>Key</th><th>Block</th></tr> | ||
| 404 | </thead> | ||
| 405 | <tbody> | ||
| 406 | <tr><td><code class="verbatim">a</code></td><td><code class="verbatim">export ascii</code></td></tr> | ||
| 407 | <tr><td><code class="verbatim">c</code></td><td><code class="verbatim">center</code></td></tr> | ||
| 408 | <tr><td><code class="verbatim">C</code></td><td><code class="verbatim">comment</code></td></tr> | ||
| 409 | <tr><td><code class="verbatim">e</code></td><td><code class="verbatim">example</code></td></tr> | ||
| 410 | <tr><td><code class="verbatim">E</code></td><td><code class="verbatim">export</code></td></tr> | ||
| 411 | <tr><td><code class="verbatim">h</code></td><td><code class="verbatim">export html</code></td></tr> | ||
| 412 | <tr><td><code class="verbatim">l</code></td><td><code class="verbatim">export latex</code></td></tr> | ||
| 413 | <tr><td><code class="verbatim">q</code></td><td><code class="verbatim">quote</code></td></tr> | ||
| 414 | <tr><td><code class="verbatim">s</code></td><td><code class="verbatim">src</code></td></tr> | ||
| 415 | <tr><td><code class="verbatim">v</code></td><td><code class="verbatim">verse</code></td></tr> | ||
| 416 | </tbody> | ||
| 417 | </table> | ||
| 418 | <p>Press <code class="verbatim">TAB</code> to type any other type. <code class="verbatim">[org-structure-template-alist]</code> in <code class="verbatim">config.toml</code> adds templates or changes these (see <a href="13-configuration.html">Configuration</a>). As in Org, keys of two letters take two keystrokes: when several keys start with the same letter, that letter opens a second choice, where <code class="verbatim">TAB</code> picks the one-letter key, so with <code class="verbatim">el</code> for <code class="verbatim">src emacs-lisp</code>, <code class="verbatim">e TAB</code> inserts an example block and <code class="verbatim">e l</code> the Emacs Lisp block. The block is inserted at the caret's indentation. With a selection, the block wraps the selected lines, and for <code class="verbatim">src</code>, <code class="verbatim">example</code>, <code class="verbatim">export</code> and <code class="verbatim">comment</code> blocks, lines that would read as headings or keywords are protected with a leading comma. For <code class="verbatim">src</code> and <code class="verbatim">export</code>, the caret ends on the opening line after a space, ready for the language; otherwise it ends inside the block. The case of <code class="verbatim">BEGIN</code> and <code class="verbatim">END</code> follows the case of the type you typed.</p> | ||
| 419 | <h3 id="org-tempo-templates">org-tempo templates</h3> | ||
| 420 | <p>Typing <code class="verbatim"><</code> and a key at the start of a line (after blanks only) and then completing expands it as <code class="verbatim">org-tempo</code> does. <code class="verbatim"><s</code> becomes:</p> | ||
| 421 | <pre><code class="language-org highlight"><span class="text org"><span class="markup raw block org"><span class="keyword control block begin org">#+begin_src</span> | ||
| 422 | <span class="keyword control block end org">#+end_src</span></span></span></code></pre> | ||
| 423 | <p>with the caret after <code class="verbatim">begin_src</code>. The keys are those of the structure templates above, Org's and any in <code class="verbatim">config.toml</code>, plus <code class="verbatim"><L</code>, <code class="verbatim"><H</code>, <code class="verbatim"><A</code> and <code class="verbatim"><i</code>, which insert <code class="verbatim">#+latex:</code>, <code class="verbatim">#+html:</code>, <code class="verbatim">#+ascii:</code> and <code class="verbatim">#+index:</code> keyword lines.</p> | ||
| 424 | <p>Completion runs with Complete at Point (<code class="verbatim">C-M-i</code> in the Emacs preset, <code class="verbatim">C-SPC</code> in Doom's insert state; in the Mac preset, from the palette). In the Doom preset the completion list also opens by itself after a short pause once you have typed <code class="verbatim"><</code> and a letter, and <code class="verbatim">TAB</code> or <code class="verbatim">RET</code> takes the selected candidate. <code class="verbatim">TAB</code> alone does not expand <code class="verbatim"><s</code> in the Emacs or Mac preset.</p> | ||
| 425 | <h3 id="folding-and-editing-blocks">Folding and editing blocks</h3> | ||
| 426 | <p><code class="verbatim">TAB</code> on a block's first or last line folds or unfolds it. Blocks are open when a file opens unless <code class="verbatim">org-cycle-hide-block-startup</code> is on in <code class="verbatim">config.toml</code> or the file has <code class="verbatim">#+STARTUP: hideblocks</code> (<code class="verbatim">nohideblocks</code> overrides the setting the other way). See <a href="02-the-editor.html">The editor</a> for folding in general.</p> | ||
| 427 | <p>Edit Block (<code class="verbatim">org-edit-special</code>, <code class="verbatim">C-c '</code>, Mac <code class="verbatim">⌃⌘'</code>) edits a src, example or export block in a separate editor. See <a href="11-code-blocks.html">Code blocks</a>.</p> | ||
| 428 | <h2 id="drawers">Drawers</h2> | ||
| 429 | <p>A drawer is a named group of lines between <code class="verbatim">:NAME:</code> and <code class="verbatim">:END:</code>. orgstar writes the <code class="verbatim">PROPERTIES</code> drawer for properties and, depending on <code class="verbatim">org-log-into-drawer</code>, a <code class="verbatim">LOGBOOK</code> drawer for state notes and clock lines (see <a href="05-todos-and-tags.html">TODOs and tags</a> and <a href="06-dates-and-clocking.html">Dates and clocking</a>). You can write any other drawer by hand:</p> | ||
| 430 | <pre><code class="language-org highlight"><span class="text org"><span class="markup heading org"><span class="punctuation definition heading org">*</span> Meeting | ||
| 431 | </span>:NOTES: | ||
| 432 | Private notes, folded away. | ||
| 433 | :END:</span></code></pre> | ||
| 434 | <p><code class="verbatim">TAB</code> on a drawer's first or last line folds or unfolds it. Drawers are folded when a file opens, as with Org's <code class="verbatim">org-cycle-hide-drawer-startup</code> (<code class="verbatim">true</code> by default in <code class="verbatim">config.toml</code>). <code class="verbatim">#+STARTUP: nohidedrawers</code> keeps them open in one file, and <code class="verbatim">#+STARTUP: hidedrawers</code> folds them when the setting is off.</p> | ||
| 435 | <p>Insert Drawer (<code class="verbatim">org-insert-drawer</code>, <code class="verbatim">C-c C-x d</code>) asks for a name. With no selection it inserts an empty drawer on a new line; with a selection it puts the selected lines in the drawer. A selection containing a heading is refused.</p> | ||
| 436 | <h2 id="properties">Properties</h2> | ||
| 437 | <p>Properties are key-value pairs in an entry's <code class="verbatim">PROPERTIES</code> drawer, right after the heading and its planning line:</p> | ||
| 438 | <pre><code class="language-org highlight"><span class="text org"><span class="markup heading org"><span class="punctuation definition heading org">*</span> Laptop | ||
| 439 | </span>:PROPERTIES: | ||
| 440 | :VENDOR: Apple | ||
| 441 | :Effort: 1:00 | ||
| 442 | :END:</span></code></pre> | ||
| 443 | <p>File-wide properties come from <code class="verbatim">#+PROPERTY:</code> lines and from a <code class="verbatim">PROPERTIES</code> drawer before the first heading. A key written <code class="verbatim">KEY+</code> appends its value to the inherited one with a space between.</p> | ||
| 444 | <h3 id="setting-and-deleting">Setting and deleting</h3> | ||
| 445 | <table> | ||
| 446 | <thead> | ||
| 447 | <tr><th>Command</th><th>Org command</th><th>Emacs</th><th>Mac</th><th>Doom</th></tr> | ||
| 448 | </thead> | ||
| 449 | <tbody> | ||
| 450 | <tr><td>Set Property…</td><td><code class="verbatim">org-set-property</code></td><td><code class="verbatim">C-c C-x p</code></td><td><code class="verbatim">⌃⇧⌘P</code></td><td><code class="verbatim">SPC m o</code></td></tr> | ||
| 451 | <tr><td>Delete Property…</td><td><code class="verbatim">org-delete-property</code></td><td>none</td><td>menu</td><td>none</td></tr> | ||
| 452 | <tr><td>Delete Property Everywhere…</td><td><code class="verbatim">org-delete-property-globally</code></td><td>none</td><td>menu</td><td>none</td></tr> | ||
| 453 | <tr><td>Property Action…</td><td><code class="verbatim">org-property-action</code></td><td><code class="verbatim">C-c C-c</code> in a property drawer</td><td><code class="verbatim">⌃⌘X</code> in a property drawer</td><td><code class="verbatim">C-c C-c</code></td></tr> | ||
| 454 | <tr><td>Next Allowed Value</td><td><code class="verbatim">org-property-next-allowed-value</code></td><td><code class="verbatim">S-<right></code> on a property line</td><td><code class="verbatim">⌃⇧⌘→</code> on a property line</td><td><code class="verbatim">S-<right></code>, <code class="verbatim">C-S-l</code></td></tr> | ||
| 455 | <tr><td>Previous Allowed Value</td><td><code class="verbatim">org-property-previous-allowed-value</code></td><td><code class="verbatim">S-<left></code> on a property line</td><td><code class="verbatim">⌃⇧⌘←</code> on a property line</td><td><code class="verbatim">S-<left></code>, <code class="verbatim">C-S-h</code></td></tr> | ||
| 456 | </tbody> | ||
| 457 | </table> | ||
| 458 | <p>Set Property asks for the key, offering the keys used in the file, Org's standard keys and the properties named in <code class="verbatim">COLUMNS</code> formats; on a property line, Return takes that line's key. It then asks for the value. If the key has allowed values, those are offered and required unless the list includes <code class="verbatim">:ETC</code>; otherwise the values the key has elsewhere in the file are offered. An empty answer keeps the current value. The drawer is created if the entry has none, and lines are aligned as Org's <code class="verbatim">org-property-format</code> (<code class="verbatim">"%-10s %s"</code>) aligns them. Setting <code class="verbatim">TODO</code> sets the entry's TODO keyword instead.</p> | ||
| 459 | <p>Delete Property asks which of the entry's properties to remove, when it has more than one, and removes the drawer if it becomes empty. Delete Property Everywhere removes a key from every entry in the file and reports how many it changed. Property Action, run by <code class="verbatim">C-c C-c</code> in a property drawer, asks <code class="verbatim">s</code> (set), <code class="verbatim">d</code> (delete) or <code class="verbatim">D</code> (delete everywhere).</p> | ||
| 460 | <h3 id="allowed-values">Allowed values</h3> | ||
| 461 | <p>A property <code class="verbatim">KEY_ALL</code> lists the values <code class="verbatim">KEY</code> may take, separated by spaces, with quotes around values that contain spaces. orgstar looks for it on the entry, then its ancestors, then the file:</p> | ||
| 462 | <pre><code class="language-org highlight"><span class="text org"><span class="keyword other keyword org">#+PROPERTY:</span><span class="string unquoted org"> Status_ALL open blocked done</span></span></code></pre> | ||
| 463 | <p>Next and Previous Allowed Value step through the list on a property line. <code class="verbatim">TODO</code> and <code class="verbatim">PRIORITY</code> take their values from the file's keywords and priority range. A property whose value is <code class="verbatim">[ ]</code> or <code class="verbatim">[X]</code> toggles between them.</p> | ||
| 464 | <h3 id="inheritance">Inheritance</h3> | ||
| 465 | <p>orgstar inherits properties as Org does with <code class="verbatim">org-use-property-inheritance</code>, set in <code class="verbatim">config.toml</code>: <code class="verbatim">nil</code> (the default), <code class="verbatim">t</code> for all properties, or property names separated by spaces, such as <code class="verbatim">"STYLE TEAM"</code>. An inherited property comes from the nearest ancestor that has it, or from a <code class="verbatim">#+PROPERTY:</code> line. At <code class="verbatim">nil</code>, a property applies only to the entry that has it, with these exceptions:</p> | ||
| 466 | <ul> | ||
| 467 | <li><code class="verbatim">CATEGORY</code>, <code class="verbatim">ARCHIVE</code>, <code class="verbatim">COLUMNS</code>, <code class="verbatim">LOGGING</code> and the <code class="verbatim">header-args</code> properties are always inherited from ancestors and <code class="verbatim">#+PROPERTY:</code> lines.</li> | ||
| 468 | <li><code class="verbatim">ID</code> and <code class="verbatim">CUSTOM_ID</code> are never inherited.</li> | ||
| 469 | <li><code class="verbatim">KEY_ALL</code> allowed values and <code class="verbatim">COOKIE_DATA</code> for TODO statistics are looked up through the ancestors.</li> | ||
| 470 | </ul> | ||
| 471 | <p>The setting applies to property lookups, agenda matches and habits (<code class="verbatim">STYLE</code>), as Org's <code class="verbatim">selective</code> inheritance does.</p> | ||
| 472 | <h3 id="special-properties">Special properties</h3> | ||
| 473 | <p>Org computes some properties instead of reading them from a drawer. orgstar treats these as special and doesn't offer them as allowed-value lists: <code class="verbatim">ALLTAGS</code>, <code class="verbatim">BLOCKED</code>, <code class="verbatim">CLOCKSUM</code>, <code class="verbatim">CLOCKSUM_T</code>, <code class="verbatim">CLOSED</code>, <code class="verbatim">DEADLINE</code>, <code class="verbatim">FILE</code>, <code class="verbatim">ITEM</code>, <code class="verbatim">PRIORITY</code>, <code class="verbatim">SCHEDULED</code>, <code class="verbatim">TAGS</code>, <code class="verbatim">TIMESTAMP</code>, <code class="verbatim">TIMESTAMP_IA</code> and <code class="verbatim">TODO</code>. Column view computes <code class="verbatim">ITEM</code>, <code class="verbatim">TODO</code>, <code class="verbatim">PRIORITY</code>, <code class="verbatim">TAGS</code>, <code class="verbatim">ALLTAGS</code>, <code class="verbatim">DEADLINE</code>, <code class="verbatim">SCHEDULED</code>, <code class="verbatim">CLOSED</code> and <code class="verbatim">CLOCKSUM</code>; the others show as empty there.</p> | ||
| 474 | <h2 id="column-view">Column view</h2> | ||
| 475 | <p>Column view shows entries as rows and properties as columns. The columns come from a <code class="verbatim">COLUMNS</code> format, found in this order:</p> | ||
| 476 | <ol> | ||
| 477 | <li>a <code class="verbatim">COLUMNS</code> property on the entry at the caret or one of its ancestors (the nearest one wins, and that entry becomes the top of the view);</li> | ||
| 478 | <li>a <code class="verbatim">#+COLUMNS:</code> line in the file;</li> | ||
| 479 | <li>Org's default, <code class="verbatim">%25ITEM %TODO %3PRIORITY %TAGS</code>.</li> | ||
| 480 | </ol> | ||
| 481 | <pre><code class="language-org highlight"><span class="text org"><span class="keyword other keyword org">#+COLUMNS:</span><span class="string unquoted org"> %40ITEM %TODO %Effort(Estimate){:} %CLOCKSUM</span></span></code></pre> | ||
| 482 | <p>Each column is <code class="verbatim">%[width]PROPERTY[(title)][{summary}]</code>, as in Org. The width limits the column, the title replaces the property name in the header, and the summary is computed for parent entries from their children. The summary operators are <code class="verbatim">+</code>, <code class="verbatim">$</code>, <code class="verbatim">min</code>, <code class="verbatim">max</code>, <code class="verbatim">mean</code>, <code class="verbatim">X</code>, <code class="verbatim">X/</code>, <code class="verbatim">X%</code>, <code class="verbatim">:</code>, <code class="verbatim">:min</code>, <code class="verbatim">:max</code>, <code class="verbatim">:mean</code>, <code class="verbatim">est+</code>, <code class="verbatim">@min</code>, <code class="verbatim">@max</code> and <code class="verbatim">@mean</code>. The age operators take an active timestamp, as its age now, or a duration, and show the youngest, oldest or mean age in days, hours and minutes (<code class="verbatim">3d 2h 15min</code>); any other value stops the view with "Invalid age". The numeric operators take a format after a semicolon, as in <code class="verbatim">{+;%.1f}</code>.</p> | ||
| 483 | <p>Subtrees tagged <code class="verbatim">ARCHIVE</code> and commented subtrees are left out.</p> | ||
| 484 | <h3 id="the-column-view-sheet">The column view sheet</h3> | ||
| 485 | <table> | ||
| 486 | <thead> | ||
| 487 | <tr><th>Command</th><th>Org command</th><th>Emacs</th><th>Mac</th><th>Doom</th></tr> | ||
| 488 | </thead> | ||
| 489 | <tbody> | ||
| 490 | <tr><td>Column View</td><td><code class="verbatim">org-columns</code></td><td><code class="verbatim">C-c C-x C-c</code></td><td>menu</td><td><code class="verbatim">C-c C-x C-c</code></td></tr> | ||
| 491 | <tr><td>Column View of File</td><td><code class="verbatim">org-columns</code> with a prefix</td><td>none</td><td>menu</td><td>none</td></tr> | ||
| 492 | </tbody> | ||
| 493 | </table> | ||
| 494 | <p>Column View opens a sheet with the entries from the view's top (the entry with the <code class="verbatim">COLUMNS</code> property, or the entry at the caret; the whole file before the first heading). Column View of File shows every entry in the file. Done (or Escape) closes the sheet.</p> | ||
| 495 | <p>Click a cell to select it; the arrow keys move the selection. Go to Entry shows the selected entry's heading in the editor.</p> | ||
| 496 | <table> | ||
| 497 | <thead> | ||
| 498 | <tr><th>Key</th><th>Does</th><th>Org command</th></tr> | ||
| 499 | </thead> | ||
| 500 | <tbody> | ||
| 501 | <tr><td><code class="verbatim">e</code>, Return, double-click</td><td>Edits the value: type it, or pick an allowed value from the menu beside the field; Return sets it, Escape cancels</td><td><code class="verbatim">org-columns-edit-value</code></td></tr> | ||
| 502 | <tr><td><code class="verbatim">n</code></td><td>The next allowed value</td><td><code class="verbatim">org-columns-next-allowed-value</code></td></tr> | ||
| 503 | <tr><td><code class="verbatim">p</code></td><td>The previous allowed value</td><td><code class="verbatim">org-columns-previous-allowed-value</code></td></tr> | ||
| 504 | </tbody> | ||
| 505 | </table> | ||
| 506 | <p>Editing goes through the commands Org uses: <code class="verbatim">ITEM</code> changes the headline, keeping its keyword, priority and tags (<code class="verbatim">org-edit-headline</code>); <code class="verbatim">TODO</code> sets the keyword, with logging and state notes (a note is asked for at the bottom of the sheet); <code class="verbatim">PRIORITY</code>, <code class="verbatim">TAGS</code> (tags separated by spaces or colons), <code class="verbatim">SCHEDULED</code> and <code class="verbatim">DEADLINE</code> set those, an empty value removing them; other columns set the property in the entry's drawer, under the column's name in upper case, as Org writes it. <code class="verbatim">CLOCKSUM</code>, <code class="verbatim">ALLTAGS</code>, <code class="verbatim">CLOSED</code> and the other computed columns can't be edited.</p> | ||
| 507 | <p>The allowed values are the property's <code class="verbatim">_ALL</code> values from the entry, an ancestor or a <code class="verbatim">#+PROPERTY:</code> line, the TODO keywords (and none) for <code class="verbatim">TODO</code>, the priorities for <code class="verbatim">PRIORITY</code>, and <code class="verbatim">[ ]</code> and <code class="verbatim">[X]</code> for a column with an <code class="verbatim">X</code> summary. Without allowed values, <code class="verbatim">n</code> and <code class="verbatim">p</code> say so. On <code class="verbatim">SCHEDULED</code> and <code class="verbatim">DEADLINE</code> they move the date a day later or earlier; Org 9.8.7 signals an error there instead. After each change the sheet captures the view again, so summaries follow. Parent summaries are not written into the file.</p> | ||
| 508 | <p>On iOS, choose Column View or Column View of File from the editor's More menu. The view scrolls both ways; tap a cell to select it. The bar at the bottom has Edit, which asks for the value with the allowed values listed, Previous Value and Next Value (<code class="verbatim">p</code> and <code class="verbatim">n</code>), and Go to Entry. Done closes it.</p> | ||
| 509 | <h3 id="the-columns-inspector">The Columns inspector</h3> | ||
| 510 | <p>View ▸ Show or Hide Columns and Clock opens an inspector beside the editor. Its Columns tab shows the same table for the open file, kept current as you type. Choose File for every entry or Subtree for the entry at the caret. The row of the heading at the caret is shown in bold, and clicking a row goes to it. The Clock tab is described in <a href="06-dates-and-clocking.html">Dates and clocking</a>.</p> | ||
| 511 | <h3 id="column-view-tables">Column view tables</h3> | ||
| 512 | <p>Insert Column View Table (<code class="verbatim">org-columns-insert-dblock</code>, <code class="verbatim">C-c C-x i</code>) asks what to capture: <code class="verbatim">local</code> (the default, the entry at the caret), <code class="verbatim">global</code> (the whole file) or an <code class="verbatim">ID</code> of an entry. It inserts a <code class="verbatim">columnview</code> dynamic block and fills it:</p> | ||
| 513 | <pre><code class="language-org highlight"><span class="text org"><span class="keyword other keyword org">#+BEGIN:</span><span class="string unquoted org"> columnview :hlines 1 :id local</span> | ||
| 514 | <span class="markup other table org">| ITEM | TODO | PRIORITY | TAGS |</span> | ||
| 515 | <span class="markup other table org">|------+------+----------+------|</span> | ||
| 516 | <span class="markup other table org">| ... | | | |</span> | ||
| 517 | <span class="keyword other keyword org">#+END:</span></span></code></pre> | ||
| 518 | <p><code class="verbatim">C-c C-c</code> (Mac <code class="verbatim">⌃⌘X</code>) on the <code class="verbatim">#+BEGIN:</code> line, or <code class="verbatim">C-c C-x C-u</code> anywhere in the block, updates it. Updating writes summary values into the parents' properties, as Org does. The block takes these parameters:</p> | ||
| 519 | <table> | ||
| 520 | <thead> | ||
| 521 | <tr><th>Parameter</th><th>Meaning</th></tr> | ||
| 522 | </thead> | ||
| 523 | <tbody> | ||
| 524 | <tr><td><code class="verbatim">:id</code></td><td><code class="verbatim">local</code>, <code class="verbatim">global</code>, <code class="verbatim">file:PATH</code> (another file, all of it), or an entry's <code class="verbatim">ID</code></td></tr> | ||
| 525 | <tr><td><code class="verbatim">:match</code></td><td>keep entries matching a tag and property match, such as <code class="verbatim">"+work-home"</code></td></tr> | ||
| 526 | <tr><td><code class="verbatim">:format</code></td><td>a column format to use instead of the entry's or file's</td></tr> | ||
| 527 | <tr><td><code class="verbatim">:hlines</code></td><td><code class="verbatim">t</code> for a line between all rows, or N for one before each level N or higher row</td></tr> | ||
| 528 | <tr><td><code class="verbatim">:maxlevel</code></td><td>leave out deeper headings</td></tr> | ||
| 529 | <tr><td><code class="verbatim">:skip-empty-rows</code></td><td>leave out rows whose columns other than <code class="verbatim">ITEM</code> are empty</td></tr> | ||
| 530 | <tr><td><code class="verbatim">:exclude-tags</code></td><td>leave out entries with these tags, as a list</td></tr> | ||
| 531 | <tr><td><code class="verbatim">:indent</code></td><td>indent <code class="verbatim">ITEM</code> by level</td></tr> | ||
| 532 | </tbody> | ||
| 533 | </table> | ||
| 534 | <p>Existing <code class="verbatim">#+TBLFM:</code> lines after the table are kept. A <code class="verbatim">file:</code> path counts from this file's folder. An <code class="verbatim">ID</code> is looked for in this file, then in the agenda files, as <code class="verbatim">org-id-find</code> does. For another file the table is built from the file on disk, and the summaries are not written into it; Org writes them into that file's buffer.</p> | ||
| 535 | <h2 id="footnotes">Footnotes</h2> | ||
| 536 | <table> | ||
| 537 | <thead> | ||
| 538 | <tr><th>Command</th><th>Org command</th><th>Emacs</th><th>Mac</th><th>Doom</th></tr> | ||
| 539 | </thead> | ||
| 540 | <tbody> | ||
| 541 | <tr><td>Footnote Action</td><td><code class="verbatim">org-footnote-action</code></td><td><code class="verbatim">C-c C-x f</code></td><td><code class="verbatim">⌃⇧⌘F</code></td><td><code class="verbatim">C-c C-x f</code></td></tr> | ||
| 542 | <tr><td>Footnote Menu</td><td><code class="verbatim">org-footnote-action</code> with a prefix</td><td>none</td><td>menu</td><td>none</td></tr> | ||
| 543 | </tbody> | ||
| 544 | </table> | ||
| 545 | <p>Footnote Action depends on where the caret is:</p> | ||
| 546 | <ul> | ||
| 547 | <li>On a reference such as <code class="verbatim">[fn:1]</code>, it goes to the definition. If there is none, it asks whether to create one.</li> | ||
| 548 | <li>On a definition's label, it goes back to a reference.</li> | ||
| 549 | <li>Elsewhere, where a footnote is allowed, it inserts a new reference with the next free number and creates its definition.</li> | ||
| 550 | <li>Where a footnote can't go, it shows the footnote menu.</li> | ||
| 551 | </ul> | ||
| 552 | <p><code class="verbatim">C-c C-c</code> on a reference or a definition's label does the same jumps. After a jump to a definition, the echo area says how to get back: <code class="verbatim">Edit definition and go back with `C-c C-c' or `C-c C-x f' on its label.</code></p> | ||
| 553 | <p>New definitions go in a level 1 heading named <code class="verbatim">Footnotes</code> at the end of the file, which is created when needed (Org's <code class="verbatim">org-footnote-section</code>):</p> | ||
| 554 | <pre><code class="language-org highlight"><span class="text org"><span class="markup heading org"><span class="punctuation definition heading org">*</span> Notes | ||
| 555 | </span>orgstar reads org files.<span class="markup other footnote org">[fn:1]</span> | ||
| 556 | |||
| 557 | <span class="markup heading org"><span class="punctuation definition heading org">*</span> Footnotes | ||
| 558 | </span> | ||
| 559 | <span class="markup other footnote org">[fn:1]</span> And writes them.</span></code></pre> | ||
| 560 | <p>The footnote menu asks, one keystroke:</p> | ||
| 561 | <table> | ||
| 562 | <thead> | ||
| 563 | <tr><th>Key</th><th>Action</th><th>Org function</th></tr> | ||
| 564 | </thead> | ||
| 565 | <tbody> | ||
| 566 | <tr><td><code class="verbatim">s</code></td><td>sort definitions into the order of their first reference</td><td><code class="verbatim">org-footnote-sort</code></td></tr> | ||
| 567 | <tr><td><code class="verbatim">r</code></td><td>renumber numeric labels <code class="verbatim">fn:N</code> in order of appearance</td><td><code class="verbatim">org-footnote-renumber-fn:N</code></td></tr> | ||
| 568 | <tr><td><code class="verbatim">S</code></td><td>renumber, then sort</td><td></td></tr> | ||
| 569 | <tr><td><code class="verbatim">n</code></td><td>normalize: number every footnote, labeled, anonymous and inline, and collect all definitions in the footnote section</td><td><code class="verbatim">org-footnote-normalize</code></td></tr> | ||
| 570 | <tr><td><code class="verbatim">d</code></td><td>delete the footnote at the caret: its references and definition</td><td><code class="verbatim">org-footnote-delete</code></td></tr> | ||
| 571 | </tbody> | ||
| 572 | </table> | ||
| 573 | <p>A reference with no definition gets the text <code class="verbatim">DEFINITION NOT FOUND.</code> when sorted or normalized.</p> | ||
| 574 | <h2 id="refiling">Refiling</h2> | ||
| 575 | <p>Refile… (<code class="verbatim">org-refile</code>, <code class="verbatim">C-c C-w</code>, Mac <code class="verbatim">⌃⌘W</code>, Doom <code class="verbatim">SPC m r r</code> or <code class="verbatim">SPC m s r</code>) moves the subtree at the caret under another heading, in this file or another one.</p> | ||
| 576 | <p>It asks for the target with completion. By default the targets are every org file in your folders and every heading down to level 3 in those files, written as the file's path relative to its folder followed by the outline path:</p> | ||
| 577 | <pre>projects.org | ||
| 578 | projects.org/Work | ||
| 579 | projects.org/Work/Website | ||
| 580 | notes/inbox.org/Someday</pre> | ||
| 581 | <p>Choosing a heading makes the subtree its last child, at one level below it. Choosing a file adds the subtree at the end of that file as a level 1 heading. Levels inside the subtree are shifted to match, and tags are realigned. A subtree can't be refiled into itself.</p> | ||
| 582 | <p>For the open file, targets come from the buffer, including unsaved edits. When the target is another file, orgstar writes that file first, into its open buffer if it has one, otherwise through the normal save path, and removes the subtree from the source only after that succeeds. If the target file changed on disk in the meantime, nothing is refiled.</p> | ||
| 583 | <p>Three settings in <code class="verbatim">config.toml</code> change the targets, as in Org (see <a href="13-configuration.html">Configuration</a>):</p> | ||
| 584 | <ul> | ||
| 585 | <li><p><code class="verbatim">org-refile-targets</code>, written as Lisp: a list of <code class="verbatim">(FILES . SPEC)</code>. <code class="verbatim">FILES</code> is <code class="verbatim">nil</code> (the file you refile from), <code class="verbatim">org-agenda-files</code>, a file name, or a list of file names (relative to the current file's folder). <code class="verbatim">SPEC</code> is <code class="verbatim">(:maxlevel . N)</code>, <code class="verbatim">(:level . N)</code>, <code class="verbatim">(:tag . "TAG")</code>, <code class="verbatim">(:todo . "KEYWORD")</code>, <code class="verbatim">(:regexp . "RE")</code> or <code class="verbatim">t</code> for every heading; <code class="verbatim">(nil :maxlevel . 3)</code> is read the same way. The tag, keyword and regexp tests look at heading lines, case-sensitively.</p> | ||
| 586 | <pre><code class="language-toml highlight"><span class="source toml"><span class="variable other key toml">org-refile-targets</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>((nil :maxlevel . 3) (org-agenda-files :tag . <span class="constant character escape toml">\"</span>project<span class="constant character escape toml">\"</span>))<span class="punctuation definition string end toml">"</span></span></span></code></pre> | ||
| 587 | <p>Empty (the default) is the list above: every file, to level 3.</p> | ||
| 588 | </li> | ||
| 589 | <li><code class="verbatim">org-refile-use-outline-path</code>: how targets are written. <code class="verbatim">file</code> (the default) is the file then the outline path; <code class="verbatim">t</code> the outline path alone; <code class="verbatim">nil</code> the heading alone; <code class="verbatim">full-file-path</code> the file's full path then the outline path; <code class="verbatim">title</code> the file's <code class="verbatim">#+TITLE</code> (or its name) then the outline path; <code class="verbatim">buffer-name</code> as <code class="verbatim">file</code>. With <code class="verbatim">nil</code>, <code class="verbatim">t</code> and <code class="verbatim">buffer-name</code>, targets in other files end with the file's name in parentheses, and files are targets only with <code class="verbatim">file</code>, <code class="verbatim">full-file-path</code>, <code class="verbatim">title</code> and <code class="verbatim">buffer-name</code>. A <code class="verbatim">/</code> in a heading is written <code class="verbatim">\/</code>.</li> | ||
| 590 | <li><code class="verbatim">org-refile-allow-creating-parent-nodes</code>: with <code class="verbatim">t</code>, typing <code class="verbatim">TARGET/New heading</code>, where <code class="verbatim">TARGET</code> is one of the targets, adds <code class="verbatim">New heading</code> at the end of <code class="verbatim">TARGET</code> one level below it (or at the end of the file for a file) and refiles there; <code class="verbatim">confirm</code> asks first. On iOS the Refile sheet offers the new heading when the search field holds such a path.</li> | ||
| 591 | </ul> | ||
| 592 | <p>Otherwise this matches Org with <code class="verbatim">org-reverse-note-order</code> <code class="verbatim">nil</code> (new entries go last), <code class="verbatim">org-log-refile</code> <code class="verbatim">nil</code> and <code class="verbatim">org-refile-keep</code> <code class="verbatim">nil</code>. Refiling from the agenda is covered in <a href="07-agenda.html">Agenda</a>.</p> | ||
| 593 | <p>Copy to Refile Target… (<code class="verbatim">org-copy</code>, <code class="verbatim">C-c M-w</code>) asks the same way and copies the subtree there, leaving it in place. Go to Refile Target… (<code class="verbatim">C-u C-c C-w</code>, Doom <code class="verbatim">SPC u SPC m r r</code>) asks the same way and jumps to the heading, or to the end of a file.</p> | ||
| 594 | <h2 id="archiving">Archiving</h2> | ||
| 595 | <h3 id="archive-subtree">Archive Subtree</h3> | ||
| 596 | <p>Archive Subtree (<code class="verbatim">org-archive-subtree</code>, <code class="verbatim">C-c C-x C-s</code> or <code class="verbatim">C-c $</code>, Mac <code class="verbatim">⌃⌘A</code>, Doom <code class="verbatim">SPC m A</code> or <code class="verbatim">SPC m s A</code>) moves the subtree at the caret to an archive.</p> | ||
| 597 | <p>The archive location is read from, in order: the <code class="verbatim">ARCHIVE</code> property of the entry or an ancestor, a <code class="verbatim">#+ARCHIVE:</code> line in the file, and <code class="verbatim">org-archive-location</code> in <code class="verbatim">config.toml</code> (Org's default <code class="verbatim">%s_archive::</code>). A location is <code class="verbatim">file::heading</code>, where <code class="verbatim">%s</code> stands for the current file's name:</p> | ||
| 598 | <table> | ||
| 599 | <thead> | ||
| 600 | <tr><th>Location</th><th>Where the subtree goes</th></tr> | ||
| 601 | </thead> | ||
| 602 | <tbody> | ||
| 603 | <tr><td><code class="verbatim">%s_archive::</code></td><td>the end of <code class="verbatim">notes.org_archive</code> next to <code class="verbatim">notes.org</code>, at level 1</td></tr> | ||
| 604 | <tr><td><code class="verbatim">archive.org::* Old</code></td><td>under the heading <code class="verbatim">* Old</code> in <code class="verbatim">archive.org</code>, created if missing</td></tr> | ||
| 605 | <tr><td><code class="verbatim">::* Archived</code></td><td>under <code class="verbatim">* Archived</code> in the same file</td></tr> | ||
| 606 | <tr><td><code class="verbatim">%s_archive::datetree/</code></td><td>under year, month and day headings in the archive file, for the entry's <code class="verbatim">CLOSED</code> date or today</td></tr> | ||
| 607 | </tbody> | ||
| 608 | </table> | ||
| 609 | <p>Relative paths are relative to the current file's folder, and <code class="verbatim">~</code> is your home folder. A new archive file starts with a line <code class="verbatim">Archived entries from file</code> followed by the source's path.</p> | ||
| 610 | <p>The archived entry gets these properties, as with Org's default <code class="verbatim">org-archive-save-context-info</code>: <code class="verbatim">ARCHIVE_TIME</code>, <code class="verbatim">ARCHIVE_FILE</code>, <code class="verbatim">ARCHIVE_OLPATH</code>, <code class="verbatim">ARCHIVE_CATEGORY</code>, <code class="verbatim">ARCHIVE_TODO</code> and <code class="verbatim">ARCHIVE_ITAGS</code> (empty ones are left out). Within the same file, tags it inherited are added to its heading. After the subtree leaves, the parent's statistics cookies are updated. The entry's TODO state is not changed.</p> | ||
| 611 | <p>If the archive file is open, the subtree goes into its buffer. Otherwise orgstar writes the archive file first and removes the subtree from the source only after that succeeds. Archiving from the agenda is covered in <a href="07-agenda.html">Agenda</a>.</p> | ||
| 612 | <h3 id="the-archive-tag">The ARCHIVE tag</h3> | ||
| 613 | <p>Toggle ARCHIVE Tag (<code class="verbatim">org-toggle-archive-tag</code>, <code class="verbatim">C-c C-x a</code>, Doom <code class="verbatim">SPC m s a</code>) adds or removes the <code class="verbatim">ARCHIVE</code> tag on the entry at the caret. Adding it folds the subtree.</p> | ||
| 614 | <p>Subtrees tagged <code class="verbatim">ARCHIVE</code> stay where they are, but are folded when a file opens and in sparse trees, and are left out of column view. <code class="verbatim">TAB</code> opens an archived subtree like any other; Org's <code class="verbatim">org-cycle-open-archived-trees</code> behaviour, which keeps them closed, is not reproduced. See <a href="05-todos-and-tags.html">TODOs and tags</a> for tags in general.</p> | ||
| 615 | <h3 id="archive-sibling">Archive sibling</h3> | ||
| 616 | <p>Archive to Archive Sibling (<code class="verbatim">org-archive-to-archive-sibling</code>, <code class="verbatim">C-c C-x A</code>) moves the subtree at the caret under a sibling heading named <code class="verbatim">Archive</code> with the <code class="verbatim">ARCHIVE</code> tag, creating it at the end of the parent's children if needed. The moved entry gets an <code class="verbatim">ARCHIVE_TIME</code> property, and the <code class="verbatim">Archive</code> sibling is folded.</p> | ||
| 617 | <h2 id="attachments">Attachments</h2> | ||
| 618 | <p>An entry's attachments are files in a folder that belongs to it, as with org-attach. The folder is the entry's <code class="verbatim">DIR</code> property when it has one, relative to the file's folder unless absolute. Otherwise it comes from the entry's <code class="verbatim">ID</code>: <code class="verbatim">data/ab/cdef…</code> for the ID <code class="verbatim">abcdef…</code>, under the org file's folder. The first attachment gives an entry without either an <code class="verbatim">ID</code> property, and it gets the <code class="verbatim">ATTACH</code> tag. <code class="verbatim">attachment:</code> links open files in the folder (see <a href="09-links.html">Links</a>).</p> | ||
| 619 | <table> | ||
| 620 | <thead> | ||
| 621 | <tr><th>Command</th><th>Emacs</th><th>What it does</th></tr> | ||
| 622 | </thead> | ||
| 623 | <tbody> | ||
| 624 | <tr><td>Attach File…</td><td><code class="verbatim">C-c C-a a</code></td><td>Asks for files or folders and copies them into the folder.</td></tr> | ||
| 625 | <tr><td>Attach File by Moving…, as Hard Link…, as Symbolic Link…</td><td><code class="verbatim">C-c C-a m</code>, <code class="verbatim">l</code>, <code class="verbatim">y</code></td><td>The same, moving the files or linking to them.</td></tr> | ||
| 626 | <tr><td>Attach File from URL…</td><td><code class="verbatim">C-c C-a u</code></td><td>Downloads the URL as the name after its last <code class="verbatim">/</code>.</td></tr> | ||
| 627 | <tr><td>New Attachment…</td><td><code class="verbatim">C-c C-a n</code></td><td>Makes an empty file in the folder and opens it.</td></tr> | ||
| 628 | <tr><td>Open Attachment…</td><td><code class="verbatim">C-c C-a o</code></td><td>Opens the attachment, or asks which. Org files open in orgstar; others open in their app, or in Quick Look on iOS.</td></tr> | ||
| 629 | <tr><td>Show Attachment Folder</td><td><code class="verbatim">C-c C-a f</code></td><td>Shows the folder in the Finder (the Files app on iOS), making it if missing.</td></tr> | ||
| 630 | <tr><td>Delete Attachment…</td><td><code class="verbatim">C-c C-a d</code></td><td>Asks for an attachment and deletes it.</td></tr> | ||
| 631 | <tr><td>Delete All Attachments…</td><td><code class="verbatim">C-c C-a D</code></td><td>Asks, then deletes the folder and everything in it, and removes the <code class="verbatim">ATTACH</code> tag.</td></tr> | ||
| 632 | <tr><td>Sync Attachments</td><td><code class="verbatim">C-c C-a z</code></td><td>Adds <code class="verbatim">ATTACH</code> when the folder has files, removes it when it hasn't, and offers to delete an empty folder.</td></tr> | ||
| 633 | <tr><td>Set Attachment Folder…</td><td><code class="verbatim">C-c C-a s</code></td><td>Asks for a folder and sets <code class="verbatim">DIR</code> to its full path. When the entry had a folder already, offers to copy its files over and to delete it.</td></tr> | ||
| 634 | <tr><td>Unset Attachment Folder</td><td><code class="verbatim">C-c C-a S</code></td><td>Removes <code class="verbatim">DIR</code>, with the same offers when the folder changes.</td></tr> | ||
| 635 | </tbody> | ||
| 636 | </table> | ||
| 637 | <p>The Doom keys are under <code class="verbatim">SPC m a</code>; see <a href="03-keys.html">Keys</a>. Attaching a file stores an <code class="verbatim">attachment:</code> link to it, for Insert Link (<code class="verbatim">C-c C-l</code>). Deleting removes files for good, without the Trash.</p> | ||
| 638 | <p>On iOS the commands are under More ▸ Attachments, with Attach Photo or Video… for the photo library. Moving and linking aren't offered there. Files, photos and videos shared to orgstar from another app are attached too: the share sheet offers Attach, and orgstar asks for the entry when it next opens.</p> | ||
| 639 | <table> | ||
| 640 | <thead> | ||
| 641 | <tr><th>Setting</th><th>Default</th><th>What it does</th></tr> | ||
| 642 | </thead> | ||
| 643 | <tbody> | ||
| 644 | <tr><td><code class="verbatim">org-attach-id-dir</code></td><td><code class="verbatim">"data/"</code></td><td>The folder ID-based folders go in, relative to the org file's folder unless absolute. Folders under <code class="verbatim">data/</code> are still found when it's something else.</td></tr> | ||
| 645 | <tr><td><code class="verbatim">org-attach-use-inheritance</code></td><td><code class="verbatim">"selective"</code></td><td>Whether <code class="verbatim">DIR</code> and <code class="verbatim">ID</code> come from an ancestor: <code class="verbatim">selective</code> follows <code class="verbatim">org-use-property-inheritance</code>, <code class="verbatim">"t"</code> always, <code class="verbatim">"nil"</code> never. Doom sets <code class="verbatim">t</code>.</td></tr> | ||
| 646 | </tbody> | ||
| 647 | </table> | ||
| 648 | <h2 id="encrypted-entries">Encrypted entries</h2> | ||
| 649 | <p>orgstar reads and writes entries encrypted by org-crypt with a passphrase (<code class="verbatim">org-crypt-key</code> nil, symmetric encryption). The text after the entry's planning line, property drawer and logbook, through the end of its subtree, is replaced by an OpenPGP message under the heading:</p> | ||
| 650 | <pre>* Secret :crypt: | ||
| 651 | -----BEGIN PGP MESSAGE----- | ||
| 652 | |||
| 653 | ww0ECQMI… | ||
| 654 | -----END PGP MESSAGE-----</pre> | ||
| 655 | <table> | ||
| 656 | <thead> | ||
| 657 | <tr><th>Command</th><th>What it does</th></tr> | ||
| 658 | </thead> | ||
| 659 | <tbody> | ||
| 660 | <tr><td>Encrypt Entry… (<code class="verbatim">app.crypt.encrypt-entry</code>)</td><td>Asks for a passphrase twice and encrypts the entry at the caret (<code class="verbatim">org-encrypt-entry</code>).</td></tr> | ||
| 661 | <tr><td>Decrypt Entry… (<code class="verbatim">app.crypt.open-entry</code>)</td><td>Asks for the passphrase and shows the decrypted text in a sheet. Save encrypts the edited text again in the message's place; the file never holds the plaintext. Decrypt in File puts the text in the file instead.</td></tr> | ||
| 662 | <tr><td>Decrypt Entry in File… (<code class="verbatim">app.crypt.decrypt-entry</code>)</td><td>Replaces the message with the decrypted text (<code class="verbatim">org-decrypt-entry</code>). Headings in it are moved below the entry's level when they aren't.</td></tr> | ||
| 663 | <tr><td>Encrypt Tagged Entries… (<code class="verbatim">app.crypt.encrypt-entries</code>)</td><td>Encrypts every entry with the <code class="verbatim">crypt</code> tag, its own or inherited, that isn't encrypted yet (<code class="verbatim">org-encrypt-entries</code>). A tagged entry's tagged children go inside its message.</td></tr> | ||
| 664 | <tr><td>Forget Encryption Passphrase (<code class="verbatim">app.crypt.forget-passphrase</code>)</td><td>Removes the current file's passphrase from the Keychain.</td></tr> | ||
| 665 | </tbody> | ||
| 666 | </table> | ||
| 667 | <p>The commands have no keys, as in Org; run them from the command palette, or bind them in <code class="verbatim">keymap.toml</code>. On iOS they are under More ▸ Encryption.</p> | ||
| 668 | <p>Remember in the Keychain stores the passphrase for the file. The next command on that file uses it after Touch ID, Face ID or the device password, without asking. <code class="verbatim">org-crypt-tag-matcher</code> in <code class="verbatim">config.toml</code> sets the tag; it must be a single tag, not a match expression.</p> | ||
| 669 | <p>Messages are written with AES-256 and an iterated and salted SHA-256 key, which GnuPG and Emacs read. Messages using AES-128, AES-192 or AES-256 are read, compressed or not. Messages encrypted to a public key, other ciphers, and AEAD (OpenPGP version 5 and 6) packets are not supported. Saving doesn't encrypt tagged entries, as <code class="verbatim">org-crypt-use-before-save-magic</code> does in Emacs; run Encrypt Tagged Entries….</p> | ||
| 670 | <h2 id="the-outline-pane">The outline pane</h2> | ||
| 671 | <p>The outline pane, to the left of the editor, lists the headings of the open org file, indented by level. Click a heading to go to it; folded text around it opens. A heading with no title is shown as <code class="verbatim">(untitled)</code>.</p> | ||
| 672 | <p>Show or hide it with the toolbar button or View ▸ Show or Hide Outline. orgstar remembers the choice for org files; for other files the pane starts hidden and shows "Only org files have an outline." Drag the divider to resize it. While the search field has text, the pane shows search results instead. The backlinks pane, when shown, sits below the outline (see <a href="09-links.html">Links</a>).</p> | ||
| 673 | <h2 id="c-c-c-c">C-c C-c</h2> | ||
| 674 | <p><code class="verbatim">C-c C-c</code> (<code class="verbatim">org-ctrl-c-ctrl-c</code>) does what fits the caret's position. In the Emacs and Doom presets it is <code class="verbatim">C-c C-c</code>; in the Mac preset it is <code class="verbatim">⌃⌘X</code>. In order, it:</p> | ||
| 675 | <table> | ||
| 676 | <thead> | ||
| 677 | <tr><th>Caret on</th><th>Effect</th></tr> | ||
| 678 | </thead> | ||
| 679 | <tbody> | ||
| 680 | <tr><td>anywhere, while sparse tree highlights show</td><td>removes the highlights, and nothing else (not in a table or src block)</td></tr> | ||
| 681 | <tr><td>a src block, a <code class="verbatim">#+CALL</code> line or inline code</td><td>runs it (see <a href="11-code-blocks.html">Code blocks</a>)</td></tr> | ||
| 682 | <tr><td>a table or <code class="verbatim">#+TBLFM</code> line</td><td>aligns the table, or recalculates it (see <a href="10-tables.html">Tables</a>)</td></tr> | ||
| 683 | <tr><td>a footnote reference or definition label</td><td>jumps between them</td></tr> | ||
| 684 | <tr><td>a blank line</td><td>nothing</td></tr> | ||
| 685 | <tr><td>a <code class="verbatim">CLOCK:</code> line</td><td>fixes the weekdays and writes the duration again</td></tr> | ||
| 686 | <tr><td>a dynamic block's <code class="verbatim">#+BEGIN:</code> line</td><td>updates the block</td></tr> | ||
| 687 | <tr><td>a statistics cookie</td><td>updates it</td></tr> | ||
| 688 | <tr><td>a timestamp</td><td>fixes its weekday</td></tr> | ||
| 689 | <tr><td>a heading</td><td>sets tags (see <a href="05-todos-and-tags.html">TODOs and tags</a>)</td></tr> | ||
| 690 | <tr><td>a list item</td><td>toggles its checkbox, repairs the list and updates cookies</td></tr> | ||
| 691 | <tr><td>a <code class="verbatim">#+KEYWORD:</code> line</td><td>rereads the file's settings and <code class="verbatim">#+SETUPFILE</code></td></tr> | ||
| 692 | <tr><td>a property drawer</td><td>runs Property Action</td></tr> | ||
| 693 | </tbody> | ||
| 694 | </table> | ||
| 695 | <p>Elsewhere it reports that it can do nothing useful.</p> | ||
| 696 | <p>In the Doom preset, <code class="verbatim">RET</code> in normal state runs Doom's <code class="verbatim">+org/dwim-at-point</code> instead. It follows a link, recalculates a table with formulas or aligns one without, runs a src block, toggles an item's checkbox, or on a heading switches between the first TODO and first done keyword of its sequence.</p> | ||
| 697 | <h2 id="speed-keys">Speed keys</h2> | ||
| 698 | <p>With <code class="verbatim">org-use-speed-commands</code> set to <code class="verbatim">true</code> in <code class="verbatim">config.toml</code>, single keys run commands when the caret is at the very start of a heading line, before the stars. These are Org's <code class="verbatim">org-speed-commands</code>; the structure ones are:</p> | ||
| 699 | <table> | ||
| 700 | <thead> | ||
| 701 | <tr><th>Key</th><th>Command</th><th>Key</th><th>Command</th></tr> | ||
| 702 | </thead> | ||
| 703 | <tbody> | ||
| 704 | <tr><td><code class="verbatim">n</code></td><td>Next Heading</td><td><code class="verbatim">U</code></td><td>Move Subtree Up</td></tr> | ||
| 705 | <tr><td><code class="verbatim">p</code></td><td>Previous Heading</td><td><code class="verbatim">D</code></td><td>Move Subtree Down</td></tr> | ||
| 706 | <tr><td><code class="verbatim">f</code></td><td>Next Heading at Same Level</td><td><code class="verbatim">r</code></td><td>Demote Heading</td></tr> | ||
| 707 | <tr><td><code class="verbatim">b</code></td><td>Previous Heading at Same Level</td><td><code class="verbatim">l</code></td><td>Promote Heading</td></tr> | ||
| 708 | <tr><td><code class="verbatim">u</code></td><td>Up to Parent Heading</td><td><code class="verbatim">R</code></td><td>Demote Subtree</td></tr> | ||
| 709 | <tr><td><code class="verbatim">j</code></td><td>Go to Heading…</td><td><code class="verbatim">L</code></td><td>Promote Subtree</td></tr> | ||
| 710 | <tr><td><code class="verbatim">s</code></td><td>Narrow to Subtree or Widen</td><td><code class="verbatim">i</code></td><td>Insert Heading After Subtree</td></tr> | ||
| 711 | <tr><td><code class="verbatim">k</code></td><td>Cut Subtree</td><td><code class="verbatim">^</code></td><td>Sort Entries</td></tr> | ||
| 712 | <tr><td><code class="verbatim">@</code></td><td>Mark Subtree</td><td><code class="verbatim">w</code></td><td>Refile…</td></tr> | ||
| 713 | <tr><td><code class="verbatim">#</code></td><td>Toggle COMMENT</td><td><code class="verbatim">a</code></td><td>Archive Subtree</td></tr> | ||
| 714 | </tbody> | ||
| 715 | </table> | ||
| 716 | <p>The full list is in <a href="03-keys.html">Keys</a>.</p> | ||
| 717 | <h2 id="not-supported">Not supported</h2> | ||
| 718 | <p>These Org structure features are not in orgstar:</p> | ||
| 719 | <ul> | ||
| 720 | <li>Writing summaries from the column view sheet into the file; the <code class="verbatim">columnview</code> dynamic block does write summaries.</li> | ||
| 721 | <li>The <code class="verbatim">ORDERED</code> property in the list commands.</li> | ||
| 722 | </ul> | ||
| 723 | </main> | ||
| 724 | <footer class="site"> | ||
| 725 | © 2026 Christian Cleberg · <a href="https://krz.sh/apps/orgstar/">krz.sh/apps/orgstar</a> · <a href="/orgstar/third-party.html">third-party notices</a> | ||
| 726 | </footer> | ||
| 727 | </body> | ||
| 728 | </html>\ No newline at end of file | ||
guide/05-todos-and-tags.html added +332
| @@ -0,0 +1,332 @@ | |||
| 1 | <!DOCTYPE html> | ||
| 2 | <html lang="en"> | ||
| 3 | <head> | ||
| 4 | <meta charset="utf-8"> | ||
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
| 6 | <title>TODOs and tags · orgstar</title> | ||
| 7 | <meta name="description" content="TODO keywords, state logging, priorities, tags and progress cookies in orgstar."> | ||
| 8 | <link rel="icon" href="../favicon.svg" type="image/svg+xml"> | ||
| 9 | <link rel="stylesheet" href="../theme.css"> | ||
| 10 | <link rel="stylesheet" href="../syntax.css"> | ||
| 11 | <link rel="stylesheet" href="../style.css"> | ||
| 12 | </head> | ||
| 13 | <body> | ||
| 14 | <header class="site"> | ||
| 15 | <a class="site-title" href="../index.html">orgstar</a> | ||
| 16 | <nav> | ||
| 17 | <a href="../install.html">Install</a> | ||
| 18 | <a href="../quickstart.html">Quick start</a> | ||
| 19 | <a href="index.html">Manual</a> | ||
| 20 | </nav> | ||
| 21 | </header> | ||
| 22 | <main> | ||
| 23 | <h1>TODOs and tags</h1> | ||
| 24 | <p class="lede">Mark headings as tasks, record when their state changes, rank them, and label them with tags.</p> | ||
| 25 | <nav class="toc" aria-label="On this page"> | ||
| 26 | <h2>On this page</h2> | ||
| 27 | <ul> | ||
| 28 | <li><a href="#keywords">keywords</a> | ||
| 29 | <ul> | ||
| 30 | <li><a href="#the-default-keywords">The default keywords</a></li> | ||
| 31 | <li><a href="#keywords-in-the-file">Keywords in the file</a></li> | ||
| 32 | <li><a href="#keyword-options">Keyword options</a></li> | ||
| 33 | </ul></li> | ||
| 34 | <li><a href="#changing-the-state">Changing the state</a> | ||
| 35 | <ul> | ||
| 36 | <li><a href="#cycling">Cycling</a></li> | ||
| 37 | <li><a href="#fast-selection">Fast selection</a></li> | ||
| 38 | <li><a href="#inserting-a-todo-heading">Inserting a TODO heading</a></li> | ||
| 39 | <li><a href="#dependencies">Dependencies</a></li> | ||
| 40 | </ul></li> | ||
| 41 | <li><a href="#logging-state-changes">Logging state changes</a> | ||
| 42 | <ul> | ||
| 43 | <li><a href="#closed">CLOSED</a></li> | ||
| 44 | <li><a href="#state-notes">State notes</a></li> | ||
| 45 | <li><a href="#the-logbook-drawer">The LOGBOOK drawer</a></li> | ||
| 46 | <li><a href="#where-the-settings-come-from">Where the settings come from</a></li> | ||
| 47 | </ul></li> | ||
| 48 | <li><a href="#priorities">Priorities</a></li> | ||
| 49 | <li><a href="#tags">Tags</a> | ||
| 50 | <ul> | ||
| 51 | <li><a href="#setting-tags">Setting tags</a></li> | ||
| 52 | <li><a href="#fast-tag-selection">Fast tag selection</a></li> | ||
| 53 | <li><a href="#inheritance">Inheritance</a></li> | ||
| 54 | <li><a href="#alignment">Alignment</a></li> | ||
| 55 | </ul></li> | ||
| 56 | <li><a href="#progress-on-child-tasks">Progress on child tasks</a></li> | ||
| 57 | <li><a href="#related-settings">Related settings</a></li> | ||
| 58 | </ul> | ||
| 59 | </nav> | ||
| 60 | <h2 id="keywords"><span class="todo TODO">TODO</span> keywords</h2> | ||
| 61 | <p>A heading becomes a task when its first word after the stars is a TODO keyword:</p> | ||
| 62 | <pre><code class="language-org highlight"><span class="text org"><span class="markup heading org"><span class="punctuation definition heading org">*</span> <span class="keyword other todo org">TODO</span> Write the quarterly report | ||
| 63 | </span><span class="markup heading org"><span class="punctuation definition heading org">*</span> <span class="keyword other todo org">DONE</span> Book the venue</span></span></code></pre> | ||
| 64 | <p>Keywords come in sequences. Each sequence has active keywords, a <code class="verbatim">|</code>, and done keywords. A keyword after the <code class="verbatim">|</code> counts as done for logging, statistics cookies, repeating tasks and the agenda.</p> | ||
| 65 | <h3 id="the-default-keywords">The default keywords</h3> | ||
| 66 | <p>Files without a <code class="verbatim">#+TODO</code> line use the keywords in Settings ▸ Editing ▸ Default TODO keywords, which is the <code class="verbatim">org-todo-keywords</code> key in <code class="verbatim">config.toml</code>. The default is Org's, <code class="verbatim">TODO | DONE</code>. Doom Emacs's set, which Import from Emacs carries over from a Doom configuration, is:</p> | ||
| 67 | <pre><code class="language-org highlight"><span class="text org">TODO(t) PROJ(p) LOOP(r) STRT(s) WAIT(w) HOLD(h) IDEA(i) | DONE(d) KILL(k)</span></code></pre> | ||
| 68 | <p>A <code class="verbatim">config.toml</code> written by an earlier version keeps the keywords it has. The value uses <code class="verbatim">#+TODO</code> syntax. To define more than one sequence, put one per line (<code class="verbatim">\n</code> in <code class="verbatim">config.toml</code>). orgstar reads this setting at launch, so a change takes effect after you restart the app. See <a href="13-configuration.html">Configuration</a> for the file itself and for keyword colors under <code class="verbatim">[theme.todo]</code>.</p> | ||
| 69 | <h3 id="keywords-in-the-file">Keywords in the file</h3> | ||
| 70 | <p>A file can set its own keywords, which replace the default ones for that file:</p> | ||
| 71 | <pre><code class="language-org highlight"><span class="text org"><span class="keyword other keyword org">#+TODO:</span><span class="string unquoted org"> TODO NEXT WAIT | DONE CANCELED</span> | ||
| 72 | <span class="keyword other keyword org">#+TODO:</span><span class="string unquoted org"> BUG(b) | FIXED(f)</span> | ||
| 73 | <span class="keyword other keyword org">#+SEQ_TODO:</span><span class="string unquoted org"> DRAFT REVIEW | PUBLISHED</span> | ||
| 74 | <span class="keyword other keyword org">#+TYP_TODO:</span><span class="string unquoted org"> ALICE BOB | DONE</span></span></code></pre> | ||
| 75 | <ul> | ||
| 76 | <li>Each line is one sequence. <code class="verbatim">#+SEQ_TODO</code> means the same as <code class="verbatim">#+TODO</code>.</li> | ||
| 77 | <li>Without a <code class="verbatim">|</code>, the last word is the done keyword.</li> | ||
| 78 | <li><code class="verbatim">#+TYP_TODO</code> marks a sequence of types (<code class="verbatim">org-todo-interpretation</code> <code class="verbatim">type</code>). Cycling with <code class="verbatim">C-c C-t</code> from a type keyword goes to the sequence's first done keyword (see <em>Cycling</em>), and a repeating entry returns to the keyword it had before it was done, instead of to the first keyword of the sequence.</li> | ||
| 79 | <li>The order of sequences is the order Org uses: <code class="verbatim">#+TYP_TODO</code> lines first, then <code class="verbatim">#+TODO</code>, then <code class="verbatim">#+SEQ_TODO</code>.</li> | ||
| 80 | <li>Lines inside blocks are ignored. Lines from a <code class="verbatim">#+SETUPFILE</code> count as if they came first in the file.</li> | ||
| 81 | </ul> | ||
| 82 | <p>Edits to these lines take effect as you type. If the keywords come from a setup file you changed, press <code class="verbatim">C-c C-c</code> on any <code class="verbatim">#+</code> keyword line to read the setup files again (<code class="verbatim">org-mode-restart</code>).</p> | ||
| 83 | <h3 id="keyword-options">Keyword options</h3> | ||
| 84 | <p>The parentheses after a keyword hold a fast-selection key and logging flags, as in Org:</p> | ||
| 85 | <table> | ||
| 86 | <thead> | ||
| 87 | <tr><th>Form</th><th>Meaning</th></tr> | ||
| 88 | </thead> | ||
| 89 | <tbody> | ||
| 90 | <tr><td><code class="verbatim">WAIT(w)</code></td><td>Fast-selection key <code class="verbatim">w</code></td></tr> | ||
| 91 | <tr><td><code class="verbatim">WAIT(w!)</code></td><td>Key <code class="verbatim">w</code>, record the time when entering the state</td></tr> | ||
| 92 | <tr><td><code class="verbatim">WAIT(w@)</code></td><td>Key <code class="verbatim">w</code>, ask for a note when entering the state</td></tr> | ||
| 93 | <tr><td><code class="verbatim">WAIT(w@/!)</code></td><td>Note when entering, time when leaving to a state that logs nothing</td></tr> | ||
| 94 | <tr><td><code class="verbatim">WAIT(@/!)</code></td><td>No key, same logging</td></tr> | ||
| 95 | </tbody> | ||
| 96 | </table> | ||
| 97 | <p>Logging is described under "Logging state changes" below.</p> | ||
| 98 | <h2 id="changing-the-state">Changing the state</h2> | ||
| 99 | <table> | ||
| 100 | <thead> | ||
| 101 | <tr><th>Command</th><th>Org command</th><th>Emacs, Doom</th><th>Mac</th><th>Doom leader</th></tr> | ||
| 102 | </thead> | ||
| 103 | <tbody> | ||
| 104 | <tr><td>Cycle TODO State</td><td><code class="verbatim">org-todo</code></td><td><code class="verbatim">C-c C-t</code></td><td>⌃⌘T</td><td><code class="verbatim">SPC m t</code></td></tr> | ||
| 105 | <tr><td>Next TODO Keyword</td><td><code class="verbatim">org-shiftright</code></td><td><code class="verbatim">S-<right></code></td><td>⌃⇧⌘→</td><td></td></tr> | ||
| 106 | <tr><td>Previous TODO Keyword</td><td><code class="verbatim">org-shiftleft</code></td><td><code class="verbatim">S-<left></code></td><td>⌃⇧⌘←</td><td></td></tr> | ||
| 107 | </tbody> | ||
| 108 | </table> | ||
| 109 | <p><code class="verbatim">S-<right></code> and <code class="verbatim">S-<left></code> act on the TODO keyword when the caret is on a heading line and not on a timestamp. In the Doom preset they also work in normal and insert state, and <code class="verbatim">C-S-l</code> and <code class="verbatim">C-S-h</code> do the same. The Mac preset's <code class="verbatim">⌃⇧⌘→</code> and <code class="verbatim">⌃⇧⌘←</code> act on the keyword when the caret is on a heading line.</p> | ||
| 110 | <p>With speed commands on (<code class="verbatim">org-use-speed-commands</code>), <code class="verbatim">t</code> at the start of a heading line runs Cycle TODO State.</p> | ||
| 111 | <h3 id="cycling">Cycling</h3> | ||
| 112 | <p><code class="verbatim">C-c C-t</code> behaves in one of two ways:</p> | ||
| 113 | <ul> | ||
| 114 | <li>If any keyword in the file has a fast-selection key, it opens fast selection (<code class="verbatim">org-use-fast-todo-selection</code> <code class="verbatim">auto</code>). The default keywords have no keys, so <code class="verbatim">C-c C-t</code> cycles until you define keywords with keys, as Doom's set has them.</li> | ||
| 115 | <li>Otherwise it cycles: no keyword, then each keyword of the first sequence in order, then no keyword again. From a keyword in another sequence it moves through that sequence and then to no keyword. From a <code class="verbatim">#+TYP_TODO</code> keyword it goes straight to the sequence's first done keyword, as Org does; pressing <code class="verbatim">C-c C-t</code> again right away moves to the next type keyword instead. In the iOS app and the agenda, each press on a type keyword goes to the done keyword.</li> | ||
| 116 | </ul> | ||
| 117 | <p><code class="verbatim">S-<right></code> and <code class="verbatim">S-<left></code> never use fast selection. They step through every keyword of every sequence in order, then to no keyword, and wrap around.</p> | ||
| 118 | <h3 id="fast-selection">Fast selection</h3> | ||
| 119 | <p>Fast selection appears in the echo area under the editor. Each sequence is shown on its own row in braces, with the key in brackets before each keyword.</p> | ||
| 120 | <table> | ||
| 121 | <thead> | ||
| 122 | <tr><th>Key</th><th>Effect</th></tr> | ||
| 123 | </thead> | ||
| 124 | <tbody> | ||
| 125 | <tr><td>a keyword's key</td><td>Set that keyword</td></tr> | ||
| 126 | <tr><td><code class="verbatim">SPC</code></td><td>Remove the keyword</td></tr> | ||
| 127 | <tr><td><code class="verbatim">Esc</code>, <code class="verbatim">C-g</code>, any other key</td><td>Quit without changing anything</td></tr> | ||
| 128 | </tbody> | ||
| 129 | </table> | ||
| 130 | <p>Keywords without a key in parentheses get one: the first letter of the keyword not already taken (a leading <code class="verbatim">@</code> is skipped), and failing that a digit counting up from <code class="verbatim">0</code>. When two sequences use the same key, the key picks the keyword from the current keyword's sequence.</p> | ||
| 131 | <h3 id="inserting-a-todo-heading">Inserting a TODO heading</h3> | ||
| 132 | <p>Insert TODO Heading (<code class="verbatim">org-insert-todo-heading</code>, <code class="verbatim">M-S-RET</code> in Emacs and Doom, ⌘⇧↩ on Mac) adds a heading with the current entry's keyword when that keyword is active, and with the first keyword otherwise. See <a href="04-outlines.html">Outlines</a>.</p> | ||
| 133 | <h3 id="dependencies">Dependencies</h3> | ||
| 134 | <p>With <code class="verbatim">org-enforce-todo-dependencies</code> on, an entry can't move to a done keyword while one of its descendants has an active keyword. Descendants without a keyword don't count. orgstar refuses the change with Org's message:</p> | ||
| 135 | <pre>TODO state change from TODO to DONE blocked (by "TODO Pack the kitchen")</pre> | ||
| 136 | <p>The <code class="verbatim">ORDERED</code> property adds an order. Under a parent with <code class="verbatim">:ORDERED: t</code>, an entry can't be done while any heading between the parent and the entry has an active keyword: an earlier sibling, or an open child of one. The order also reaches down. When an entry with an active keyword is held back this way, its descendants can't be done either, as long as every heading between them has an active keyword too. <code class="verbatim">ORDERED</code> counts only on the direct parent, not inherited from higher up or from <code class="verbatim">#+PROPERTY</code>. Any value but <code class="verbatim">nil</code> turns it on, including an empty one.</p> | ||
| 137 | <pre><code class="language-org highlight"><span class="text org"><span class="markup heading org"><span class="punctuation definition heading org">*</span> Move house | ||
| 138 | </span>:PROPERTIES: | ||
| 139 | :ORDERED: t | ||
| 140 | :END: | ||
| 141 | <span class="markup heading org"><span class="punctuation definition heading org">**</span> <span class="keyword other todo org">TODO</span> Hire a van | ||
| 142 | </span><span class="markup heading org"><span class="punctuation definition heading org">**</span> <span class="keyword other todo org">TODO</span> Pack the kitchen</span></span></code></pre> | ||
| 143 | <p>Here Pack the kitchen can't be done until Hire a van is. Toggle ORDERED Property (<code class="verbatim">org-toggle-ordered-property</code>, <code class="verbatim">C-c C-x o</code> in Emacs and Doom) adds <code class="verbatim">:ORDERED: t</code> to the entry's property drawer, or removes the property when it is set. With <code class="verbatim">org-track-ordered-property-with-tag</code> set in <code class="verbatim">config.toml</code>, it adds or removes that tag too (<code class="verbatim">ORDERED</code> for <code class="verbatim">"t"</code>), so ordered entries show in the heading line.</p> | ||
| 144 | <p>With <code class="verbatim">org-enforce-todo-checkbox-dependencies</code> on, an entry can't be done while its own text has an unchecked (<code class="verbatim">[ ]</code>) or partly checked (<code class="verbatim">[-]</code>) checkbox. Checkboxes in child entries and in src, example, export and verse blocks don't count. The message ends in <code class="verbatim">(by contained checkboxes)</code>; when both settings would refuse the change, it names the checkboxes.</p> | ||
| 145 | <p>The check applies to every change to a done keyword: <code class="verbatim">C-c C-t</code>, fast selection, <code class="verbatim">S-<right></code> and <code class="verbatim">S-<left></code>, Doom's <code class="verbatim">RET</code> and the agenda's TODO actions on both platforms. A blocked repeating entry doesn't repeat. Changes from a done keyword, and changes to an active keyword or to none, are never refused. An entry with a <code class="verbatim">NOBLOCKING</code> property (any value but <code class="verbatim">nil</code>) is never blocked.</p> | ||
| 146 | <p>Both settings are off by default, as in Org. They are under Settings ▸ Editing and in <code class="verbatim">config.toml</code>. The agenda dims blocked entries; see <a href="07-agenda.html">The agenda</a>.</p> | ||
| 147 | <h2 id="logging-state-changes">Logging state changes</h2> | ||
| 148 | <p>orgstar logs state changes as <code class="verbatim">org-todo</code> does in Org 9.8.</p> | ||
| 149 | <h3 id="closed">CLOSED</h3> | ||
| 150 | <p>When <code class="verbatim">org-log-done</code> is <code class="verbatim">time</code> and an entry moves from an active keyword to a done one, orgstar adds a <code class="verbatim">CLOSED</code> stamp to its planning line:</p> | ||
| 151 | <pre><code class="language-org highlight"><span class="text org"><span class="markup heading org"><span class="punctuation definition heading org">*</span> <span class="keyword other todo org">DONE</span> Book the venue | ||
| 152 | </span>CLOSED: <span class="constant other timestamp org">[2026-10-07 Wed 14:32]</span></span></code></pre> | ||
| 153 | <p>With <code class="verbatim">note</code>, it also asks for a closing note. Moving the entry back to an active keyword, or removing the keyword, removes <code class="verbatim">CLOSED</code>. This happens only while some logging is on (<code class="verbatim">org-log-done</code> or a keyword with <code class="verbatim">!</code> or <code class="verbatim">@</code>); with no logging at all, an existing <code class="verbatim">CLOSED</code> stamp stays.</p> | ||
| 154 | <h3 id="state-notes">State notes</h3> | ||
| 155 | <p>A keyword with <code class="verbatim">!</code> or <code class="verbatim">@</code> records a note when the entry enters it, and the part after <code class="verbatim">/</code> records one when the entry leaves it for a state that logs nothing on entry. <code class="verbatim">!</code> records the time; <code class="verbatim">@</code> asks for a note in the echo area:</p> | ||
| 156 | <pre><code class="language-org highlight"><span class="text org"><span class="keyword other keyword org">#+TODO:</span><span class="string unquoted org"> TODO(t) WAIT(w@/!) | DONE(d!) CANCELED(c@)</span> | ||
| 157 | |||
| 158 | <span class="markup heading org"><span class="punctuation definition heading org">*</span> WAIT Call the supplier | ||
| 159 | </span><span class="punctuation definition list org">- </span>State "WAIT" from "TODO" <span class="constant other timestamp org">[2026-10-07 Wed 09:15]</span> \\ | ||
| 160 | Left a message, waiting for a reply.</span></code></pre> | ||
| 161 | <p>Notes go first in the entry, after the planning line and property drawer, newest first (<code class="verbatim">org-log-states-order-reversed</code> <code class="verbatim">t</code>). The note text is indented under the item; lines starting with <code class="verbatim">#</code> and a space are dropped. If the keyword's own flag and <code class="verbatim">org-log-done</code> both apply, the keyword's flag wins.</p> | ||
| 162 | <p>The headings are Org's default <code class="verbatim">org-log-note-headings</code>:</p> | ||
| 163 | <table> | ||
| 164 | <thead> | ||
| 165 | <tr><th>Event</th><th>Note heading</th></tr> | ||
| 166 | </thead> | ||
| 167 | <tbody> | ||
| 168 | <tr><td>State change</td><td><code class="verbatim">State "DONE" from "TODO" [timestamp]</code></td></tr> | ||
| 169 | <tr><td>Closing note</td><td><code class="verbatim">CLOSING NOTE [timestamp]</code></td></tr> | ||
| 170 | <tr><td>Rescheduled</td><td><code class="verbatim">Rescheduled from "[old date]" on [timestamp]</code></td></tr> | ||
| 171 | <tr><td>Schedule removed</td><td><code class="verbatim">Not scheduled, was "[old date]" on [timestamp]</code></td></tr> | ||
| 172 | <tr><td>New deadline</td><td><code class="verbatim">New deadline from "[old date]" on [timestamp]</code></td></tr> | ||
| 173 | <tr><td>Deadline removed</td><td><code class="verbatim">Removed deadline, was "[old date]" on [timestamp]</code></td></tr> | ||
| 174 | </tbody> | ||
| 175 | </table> | ||
| 176 | <p>Rescheduling and deadline notes are covered in <a href="06-dates-and-clocking.html">Dates, scheduling and clocking</a>. orgstar has no command to add a free note to an entry (<code class="verbatim">org-add-note</code>).</p> | ||
| 177 | <h3 id="the-logbook-drawer">The LOGBOOK drawer</h3> | ||
| 178 | <p>With <code class="verbatim">org-log-into-drawer</code> set to a drawer name, notes go at the top of that drawer, which orgstar creates when it is missing:</p> | ||
| 179 | <pre><code class="language-org highlight"><span class="text org"><span class="markup heading org"><span class="punctuation definition heading org">*</span> <span class="keyword other todo org">DONE</span> Book the venue | ||
| 180 | </span>CLOSED: <span class="constant other timestamp org">[2026-10-07 Wed 14:32]</span> | ||
| 181 | :LOGBOOK: | ||
| 182 | <span class="punctuation definition list org">- </span>State "DONE" from "TODO" <span class="constant other timestamp org">[2026-10-07 Wed 14:32]</span> | ||
| 183 | :END:</span></code></pre> | ||
| 184 | <p>In <code class="verbatim">config.toml</code>, <code class="verbatim">"LOGBOOK"</code> is the equivalent of Emacs's <code class="verbatim">t</code>, and <code class="verbatim">""</code> (the default) means no drawer. Clock lines always go into a <code class="verbatim">LOGBOOK</code> drawer, whatever this setting says.</p> | ||
| 185 | <h3 id="where-the-settings-come-from">Where the settings come from</h3> | ||
| 186 | <p>Later sources override earlier ones:</p> | ||
| 187 | <ol> | ||
| 188 | <li><code class="verbatim">config.toml</code>: <code class="verbatim">org-log-done</code>, <code class="verbatim">org-log-reschedule</code>, <code class="verbatim">org-log-redeadline</code> (each <code class="verbatim">nil</code>, <code class="verbatim">time</code> or <code class="verbatim">note</code>, default <code class="verbatim">nil</code>) and <code class="verbatim">org-log-into-drawer</code> (default <code class="verbatim">""</code>). <code class="verbatim">org-log-done</code> and <code class="verbatim">org-log-into-drawer</code> are also in Settings ▸ Editing; the other two are in the file only. <code class="verbatim">org-log-repeat</code> is always <code class="verbatim">time</code> unless the file changes it.</li> | ||
| 189 | <li>Keyword flags such as <code class="verbatim">DONE(d!)</code>.</li> | ||
| 190 | <li><code class="verbatim">#+STARTUP</code> words in the file or its setup files.</li> | ||
| 191 | <li>The <code class="verbatim">LOGGING</code> property, inherited from ancestors.</li> | ||
| 192 | <li>The <code class="verbatim">LOG_INTO_DRAWER</code> property, inherited from ancestors: <code class="verbatim">t</code> for <code class="verbatim">LOGBOOK</code>, <code class="verbatim">nil</code> for none, or a drawer name.</li> | ||
| 193 | </ol> | ||
| 194 | <table> | ||
| 195 | <thead> | ||
| 196 | <tr><th><code class="verbatim">#+STARTUP</code> word</th><th>Effect</th></tr> | ||
| 197 | </thead> | ||
| 198 | <tbody> | ||
| 199 | <tr><td><code class="verbatim">logdone</code>, <code class="verbatim">lognotedone</code>, <code class="verbatim">nologdone</code></td><td><code class="verbatim">org-log-done</code> <code class="verbatim">time</code>, <code class="verbatim">note</code>, <code class="verbatim">nil</code></td></tr> | ||
| 200 | <tr><td><code class="verbatim">logrepeat</code>, <code class="verbatim">lognoterepeat</code>, <code class="verbatim">nologrepeat</code></td><td><code class="verbatim">org-log-repeat</code> <code class="verbatim">time</code>, <code class="verbatim">note</code>, <code class="verbatim">nil</code></td></tr> | ||
| 201 | <tr><td><code class="verbatim">logreschedule</code>, <code class="verbatim">lognotereschedule</code>, <code class="verbatim">nologreschedule</code></td><td><code class="verbatim">org-log-reschedule</code></td></tr> | ||
| 202 | <tr><td><code class="verbatim">logredeadline</code>, <code class="verbatim">lognoteredeadline</code>, <code class="verbatim">nologredeadline</code></td><td><code class="verbatim">org-log-redeadline</code></td></tr> | ||
| 203 | <tr><td><code class="verbatim">logdrawer</code>, <code class="verbatim">nologdrawer</code></td><td><code class="verbatim">org-log-into-drawer</code> <code class="verbatim">LOGBOOK</code> or none</td></tr> | ||
| 204 | </tbody> | ||
| 205 | </table> | ||
| 206 | <p>A <code class="verbatim">LOGGING</code> property (<code class="verbatim">org-local-logging</code>) replaces the done, repeat and per-keyword settings for its subtree. It takes the <code class="verbatim">logdone</code> and <code class="verbatim">logrepeat</code> words above and keyword specifications such as <code class="verbatim">WAIT(@)</code>; <code class="verbatim">nil</code> turns them all off:</p> | ||
| 207 | <pre><code class="language-org highlight"><span class="text org"><span class="markup heading org"><span class="punctuation definition heading org">*</span> Errands | ||
| 208 | </span>:PROPERTIES: | ||
| 209 | :LOGGING: DONE(!) WAIT(@) logrepeat | ||
| 210 | :LOG<span class="markup underline org">_INTO_</span>DRAWER: NOTES | ||
| 211 | :END:</span></code></pre> | ||
| 212 | <h2 id="priorities">Priorities</h2> | ||
| 213 | <p>A priority cookie goes after the keyword:</p> | ||
| 214 | <pre><code class="language-org highlight"><span class="text org"><span class="markup heading org"><span class="punctuation definition heading org">*</span> <span class="keyword other todo org">TODO</span> <span class="constant other priority org">[#A]</span> Renew the passport</span></span></code></pre> | ||
| 215 | <p>The range is <code class="verbatim">A</code> (highest) to <code class="verbatim">C</code> (lowest), with <code class="verbatim">B</code> as the default. A file can change it with <code class="verbatim">#+PRIORITIES: highest lowest default</code>, using letters or numbers:</p> | ||
| 216 | <pre><code class="language-org highlight"><span class="text org"><span class="keyword other keyword org">#+PRIORITIES:</span><span class="string unquoted org"> A E C</span> | ||
| 217 | <span class="keyword other keyword org">#+PRIORITIES:</span><span class="string unquoted org"> 1 10 5</span></span></code></pre> | ||
| 218 | <table> | ||
| 219 | <thead> | ||
| 220 | <tr><th>Command</th><th>Org command</th><th>Emacs, Doom</th><th>Mac</th><th>Doom leader</th></tr> | ||
| 221 | </thead> | ||
| 222 | <tbody> | ||
| 223 | <tr><td>Set Priority…</td><td><code class="verbatim">org-priority</code></td><td><code class="verbatim">C-c ,</code></td><td>⌃⌘,</td><td><code class="verbatim">SPC m p p</code></td></tr> | ||
| 224 | <tr><td>Raise Priority</td><td><code class="verbatim">org-priority-up</code></td><td><code class="verbatim">S-<up></code></td><td>⌃⌘↑</td><td><code class="verbatim">SPC m p u</code></td></tr> | ||
| 225 | <tr><td>Lower Priority</td><td><code class="verbatim">org-priority-down</code></td><td><code class="verbatim">S-<down></code></td><td>⌃⌘↓</td><td><code class="verbatim">SPC m p d</code></td></tr> | ||
| 226 | </tbody> | ||
| 227 | </table> | ||
| 228 | <p><code class="verbatim">S-<up></code> and <code class="verbatim">S-<down></code> act on the priority when the caret is on a heading line and not on a timestamp; Doom also binds <code class="verbatim">C-S-k</code> and <code class="verbatim">C-S-j</code>.</p> | ||
| 229 | <ul> | ||
| 230 | <li>Set Priority shows the priorities with their keys (lowercase letters, or the digits of a numeric range) and <code class="verbatim">SPC</code> to remove the cookie. When the lowest numeric priority is 10 or more, it asks you to type the number instead.</li> | ||
| 231 | <li>Raise and Lower start at the default priority when the heading has none (<code class="verbatim">org-priority-start-cycle-with-default</code>). Going past the highest or lowest priority removes the cookie.</li> | ||
| 232 | <li>With speed commands on, <code class="verbatim">,</code> runs Set Priority, <code class="verbatim">1</code>, <code class="verbatim">2</code> and <code class="verbatim">3</code> set <code class="verbatim">A</code>, <code class="verbatim">B</code> and <code class="verbatim">C</code>, and <code class="verbatim">0</code> removes the priority.</li> | ||
| 233 | </ul> | ||
| 234 | <p>The agenda sorts by priority; see <a href="07-agenda.html">The agenda</a>.</p> | ||
| 235 | <h2 id="tags">Tags</h2> | ||
| 236 | <p>Tags go at the end of a heading, between colons:</p> | ||
| 237 | <pre><code class="language-org highlight"><span class="text org"><span class="markup heading org"><span class="punctuation definition heading org">*</span> <span class="keyword other todo org">TODO</span> Order parts <span class="entity name tag org">:work:urgent:</span></span></span></code></pre> | ||
| 238 | <p>A tag consists of letters, digits, <code class="verbatim">_</code>, <code class="verbatim">@</code>, <code class="verbatim">#</code> and <code class="verbatim">%</code>.</p> | ||
| 239 | <h3 id="setting-tags">Setting tags</h3> | ||
| 240 | <table> | ||
| 241 | <thead> | ||
| 242 | <tr><th>Command</th><th>Org command</th><th>Emacs, Doom</th><th>Mac</th><th>Doom leader</th></tr> | ||
| 243 | </thead> | ||
| 244 | <tbody> | ||
| 245 | <tr><td>Set Tags</td><td><code class="verbatim">org-set-tags-command</code></td><td><code class="verbatim">C-c C-q</code></td><td>⌃⌘G</td><td><code class="verbatim">SPC m q</code></td></tr> | ||
| 246 | </tbody> | ||
| 247 | </table> | ||
| 248 | <p><code class="verbatim">C-c C-c</code> (Mac <code class="verbatim">⌃⌘X</code>) on a heading line also runs Set Tags, and so does <code class="verbatim">:</code> as a speed command.</p> | ||
| 249 | <p>Without fast selection (see below), Set Tags asks for the tags in the echo area, starting with the current ones. Completion offers the tags in the file's <code class="verbatim">#+TAGS</code> lines, or, without those, every tag used in the file and its <code class="verbatim">#+FILETAGS</code>, and in both cases the tags used across your folders. You can type tags that are not offered. Spaces, commas and colons all separate tags; an empty answer removes all tags.</p> | ||
| 250 | <p>Setting tags on the text before the first heading (file tags) is not supported; edit the <code class="verbatim">#+FILETAGS</code> line directly.</p> | ||
| 251 | <p>Typing <code class="verbatim">:</code> at the end of a heading line also completes tags: from the <code class="verbatim">#+TAGS</code> lines when the file has any, and otherwise from the file's tags and those used across your folders. Tags the heading already has are left out. See <a href="02-the-editor.html">The editor</a> for how completion works.</p> | ||
| 252 | <h3 id="fast-tag-selection">Fast tag selection</h3> | ||
| 253 | <p>A file without <code class="verbatim">#+TAGS</code> lines uses <code class="verbatim">org-tag-alist</code> from <code class="verbatim">config.toml</code> instead, written as a <code class="verbatim">#+TAGS</code> line; separate rows with <code class="verbatim">\n</code>: <code class="verbatim">org-tag-alist = "work(w) home(h)\n{ @office(o) @home(H) }"</code>.</p> | ||
| 254 | <p>When a <code class="verbatim">#+TAGS</code> line gives at least one tag a key, Set Tags opens fast selection (<code class="verbatim">org-fast-tag-selection</code>):</p> | ||
| 255 | <pre><code class="language-org highlight"><span class="text org"><span class="keyword other keyword org">#+TAGS:</span><span class="string unquoted org"> { @office(o) @home(h) @errand(e) } laptop(l) phone(p)</span> | ||
| 256 | <span class="keyword other keyword org">#+TAGS:</span><span class="string unquoted org"> [ Project : alpha beta ]</span></span></code></pre> | ||
| 257 | <table> | ||
| 258 | <thead> | ||
| 259 | <tr><th>Key</th><th>Effect</th></tr> | ||
| 260 | </thead> | ||
| 261 | <tbody> | ||
| 262 | <tr><td>a tag's key</td><td>Toggle that tag</td></tr> | ||
| 263 | <tr><td><code class="verbatim">SPC</code></td><td>Remove all tags</td></tr> | ||
| 264 | <tr><td><code class="verbatim">TAB</code></td><td>Type a tag by name, then <code class="verbatim">RET</code></td></tr> | ||
| 265 | <tr><td><code class="verbatim">RET</code></td><td>Apply the selection</td></tr> | ||
| 266 | <tr><td><code class="verbatim">q</code></td><td>Quit, unless a tag uses <code class="verbatim">q</code> as its key</td></tr> | ||
| 267 | <tr><td><code class="verbatim">Esc</code>, <code class="verbatim">C-g</code></td><td>Quit</td></tr> | ||
| 268 | </tbody> | ||
| 269 | </table> | ||
| 270 | <p>The view shows the inherited tags, the current selection, and each tag with its key, in the rows and groups of the <code class="verbatim">#+TAGS</code> lines.</p> | ||
| 271 | <ul> | ||
| 272 | <li>Tags between <code class="verbatim">{</code> and <code class="verbatim">}</code> exclude each other: selecting one removes the others in the group.</li> | ||
| 273 | <li>Tags between <code class="verbatim">[</code> and <code class="verbatim">]</code>, with <code class="verbatim">:</code> after the first, form a group tag. The selection shows them as written; they do not change how keys act. Searching by group tag is part of <a href="07-agenda.html">The agenda</a>.</li> | ||
| 274 | <li>Tags without a key get one: their first letter if it is free, otherwise the next free character from <code class="verbatim">a–z</code>, <code class="verbatim">A–Z</code> and <code class="verbatim">{|}~</code>.</li> | ||
| 275 | <li>The selected tags are written in the order of the <code class="verbatim">#+TAGS</code> lines, followed by any others.</li> | ||
| 276 | </ul> | ||
| 277 | <p><code class="verbatim">#+TAGS</code> lines come from the file and its setup files, and <code class="verbatim">org-tag-alist</code> in <code class="verbatim">config.toml</code> stands in when there are none. Tags used across your folders are offered for completion only.</p> | ||
| 278 | <h3 id="inheritance">Inheritance</h3> | ||
| 279 | <p>An entry inherits the tags of its ancestors and the file's <code class="verbatim">#+FILETAGS</code> (<code class="verbatim">org-use-tag-inheritance</code> <code class="verbatim">t</code>). Fast selection lists inherited tags separately. Agenda matches, column view's <code class="verbatim">ALLTAGS</code>, archiving and clock tables with <code class="verbatim">:tags t</code> use the inherited tags too.</p> | ||
| 280 | <p><code class="verbatim">org-use-tag-inheritance</code> in <code class="verbatim">config.toml</code> limits which tags inherit: <code class="verbatim">"nil"</code> none, tag names separated by spaces only those, or a regular expression in braces, <code class="verbatim">"{^@}"</code>, the tags it matches. <code class="verbatim">org-tags-exclude-from-inheritance</code> names tags that never inherit, such as <code class="verbatim">crypt</code>; as in Org, it applies when inheritance is <code class="verbatim">t</code> or a regular expression, not with a list of names. Both are read at launch.</p> | ||
| 281 | <pre><code class="language-org highlight"><span class="text org"><span class="keyword other keyword org">#+FILETAGS:</span><span class="string unquoted org"> :home:</span> | ||
| 282 | |||
| 283 | <span class="markup heading org"><span class="punctuation definition heading org">*</span> Garden <span class="entity name tag org">:outdoor: | ||
| 284 | </span></span><span class="markup heading org"><span class="punctuation definition heading org">**</span> <span class="keyword other todo org">TODO</span> Prune the roses</span></span></code></pre> | ||
| 285 | <p>Here "Prune the roses" has the tags <code class="verbatim">home</code> and <code class="verbatim">outdoor</code> through inheritance.</p> | ||
| 286 | <h3 id="alignment">Alignment</h3> | ||
| 287 | <p>orgstar aligns tags whenever it changes a heading line: setting tags, changing the TODO keyword or the priority, and updating a statistics cookie. The column is <code class="verbatim">org-tags-column</code>, under Settings ▸ Editing ▸ Tags:</p> | ||
| 288 | <table> | ||
| 289 | <thead> | ||
| 290 | <tr><th>Value</th><th>Placement</th></tr> | ||
| 291 | </thead> | ||
| 292 | <tbody> | ||
| 293 | <tr><td><code class="verbatim">-77</code></td><td>Tags end at column 77 (the default)</td></tr> | ||
| 294 | <tr><td><code class="verbatim">0</code></td><td>One space after the title</td></tr> | ||
| 295 | <tr><td>negative N</td><td>Tags end at column N</td></tr> | ||
| 296 | <tr><td>positive N</td><td>Tags start at column N</td></tr> | ||
| 297 | </tbody> | ||
| 298 | </table> | ||
| 299 | <p>The Settings window offers <code class="verbatim">-77</code> and <code class="verbatim">0</code>; other values go in <code class="verbatim">config.toml</code>. Columns are counted as Emacs displays the line, so links count as their description and, when <code class="verbatim">org-hide-emphasis-markers</code> is on, emphasis markers do not count. A heading always keeps at least one space before its tags.</p> | ||
| 300 | <h2 id="progress-on-child-tasks">Progress on child tasks</h2> | ||
| 301 | <p>A <code class="verbatim">[/]</code> or <code class="verbatim">[%]</code> cookie in a heading shows how many of its children are done:</p> | ||
| 302 | <pre><code class="language-org highlight"><span class="text org"><span class="markup heading org"><span class="punctuation definition heading org">*</span> Move house [1/3] | ||
| 303 | </span><span class="markup heading org"><span class="punctuation definition heading org">**</span> <span class="keyword other todo org">DONE</span> Hire a van | ||
| 304 | </span><span class="markup heading org"><span class="punctuation definition heading org">**</span> <span class="keyword other todo org">TODO</span> Pack the kitchen | ||
| 305 | </span><span class="markup heading org"><span class="punctuation definition heading org">**</span> <span class="keyword other todo org">TODO</span> Forward the mail</span></span></code></pre> | ||
| 306 | <p>orgstar updates the cookie whenever a child's TODO keyword changes (<code class="verbatim">org-update-parent-todo-statistics</code>, with <code class="verbatim">org-hierarchical-todo-statistics</code> <code class="verbatim">t</code>). Only direct children with a TODO keyword count; children without one are ignored. <code class="verbatim">C-c C-c</code> on a cookie updates it by hand.</p> | ||
| 307 | <p>The <code class="verbatim">COOKIE_DATA</code> property changes what the parent's cookie counts:</p> | ||
| 308 | <ul> | ||
| 309 | <li><code class="verbatim">recursive</code> counts every descendant with a keyword, and a change updates the cookies of every ancestor up to the heading that sets the property. Without it, only the direct parent's cookie is updated.</li> | ||
| 310 | <li><code class="verbatim">checkbox</code> makes the cookie count checkboxes in the entry's lists instead of child tasks. Checkbox cookies are described in <a href="04-outlines.html">Outlines</a>.</li> | ||
| 311 | </ul> | ||
| 312 | <h2 id="related-settings">Related settings</h2> | ||
| 313 | <table> | ||
| 314 | <thead> | ||
| 315 | <tr><th>Setting</th><th>Where</th><th>Default</th></tr> | ||
| 316 | </thead> | ||
| 317 | <tbody> | ||
| 318 | <tr><td><code class="verbatim">org-todo-keywords</code></td><td>Settings ▸ Editing, <code class="verbatim">config.toml</code></td><td>See "The default keywords" above</td></tr> | ||
| 319 | <tr><td><code class="verbatim">org-log-done</code></td><td>Settings ▸ Editing, <code class="verbatim">config.toml</code></td><td><code class="verbatim">nil</code></td></tr> | ||
| 320 | <tr><td><code class="verbatim">org-log-into-drawer</code></td><td>Settings ▸ Editing, <code class="verbatim">config.toml</code></td><td><code class="verbatim">""</code> (no drawer)</td></tr> | ||
| 321 | <tr><td><code class="verbatim">org-enforce-todo-dependencies</code></td><td>Settings ▸ Editing (iOS: Settings ▸ TODO Dependencies), <code class="verbatim">config.toml</code></td><td><code class="verbatim">false</code></td></tr> | ||
| 322 | <tr><td><code class="verbatim">org-enforce-todo-checkbox-dependencies</code></td><td>Settings ▸ Editing (iOS: Settings ▸ TODO Dependencies), <code class="verbatim">config.toml</code></td><td><code class="verbatim">false</code></td></tr> | ||
| 323 | <tr><td><code class="verbatim">org-tags-column</code></td><td>Settings ▸ Editing, <code class="verbatim">config.toml</code></td><td><code class="verbatim">-77</code></td></tr> | ||
| 324 | <tr><td><code class="verbatim">org-use-speed-commands</code></td><td>Settings ▸ Editing, <code class="verbatim">config.toml</code></td><td><code class="verbatim">false</code></td></tr> | ||
| 325 | </tbody> | ||
| 326 | </table> | ||
| 327 | </main> | ||
| 328 | <footer class="site"> | ||
| 329 | © 2026 Christian Cleberg · <a href="https://krz.sh/apps/orgstar/">krz.sh/apps/orgstar</a> · <a href="/orgstar/third-party.html">third-party notices</a> | ||
| 330 | </footer> | ||
| 331 | </body> | ||
| 332 | </html>\ No newline at end of file | ||
guide/06-dates-and-clocking.html added +542
| @@ -0,0 +1,542 @@ | |||
| 1 | <!DOCTYPE html> | ||
| 2 | <html lang="en"> | ||
| 3 | <head> | ||
| 4 | <meta charset="utf-8"> | ||
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
| 6 | <title>Dates, scheduling and clocking · orgstar</title> | ||
| 7 | <meta name="description" content="Timestamps, the date prompt, SCHEDULED and DEADLINE, repeating tasks, effort, clocking, clock tables, habits and reminders in orgstar."> | ||
| 8 | <link rel="icon" href="../favicon.svg" type="image/svg+xml"> | ||
| 9 | <link rel="stylesheet" href="../theme.css"> | ||
| 10 | <link rel="stylesheet" href="../syntax.css"> | ||
| 11 | <link rel="stylesheet" href="../style.css"> | ||
| 12 | </head> | ||
| 13 | <body> | ||
| 14 | <header class="site"> | ||
| 15 | <a class="site-title" href="../index.html">orgstar</a> | ||
| 16 | <nav> | ||
| 17 | <a href="../install.html">Install</a> | ||
| 18 | <a href="../quickstart.html">Quick start</a> | ||
| 19 | <a href="index.html">Manual</a> | ||
| 20 | </nav> | ||
| 21 | </header> | ||
| 22 | <main> | ||
| 23 | <h1>Dates, scheduling and clocking</h1> | ||
| 24 | <p class="lede">Put dates on entries, plan work with scheduled dates and deadlines, and record the time you spend.</p> | ||
| 25 | <nav class="toc" aria-label="On this page"> | ||
| 26 | <h2>On this page</h2> | ||
| 27 | <ul> | ||
| 28 | <li><a href="#timestamps">Timestamps</a> | ||
| 29 | <ul> | ||
| 30 | <li><a href="#repeaters-and-warning-periods">Repeaters and warning periods</a></li> | ||
| 31 | <li><a href="#diary-sexps">Diary sexps</a></li> | ||
| 32 | </ul></li> | ||
| 33 | <li><a href="#inserting-timestamps">Inserting timestamps</a></li> | ||
| 34 | <li><a href="#the-date-prompt">The date prompt</a></li> | ||
| 35 | <li><a href="#changing-dates">Changing dates</a></li> | ||
| 36 | <li><a href="#scheduled-and-deadline">SCHEDULED and DEADLINE</a></li> | ||
| 37 | <li><a href="#repeating-tasks">Repeating tasks</a></li> | ||
| 38 | <li><a href="#effort">Effort</a></li> | ||
| 39 | <li><a href="#timers">Timers</a></li> | ||
| 40 | <li><a href="#clocking">Clocking</a> | ||
| 41 | <ul> | ||
| 42 | <li><a href="#clocking-in-and-out">Clocking in and out</a></li> | ||
| 43 | <li><a href="#the-clock-drawer">The clock drawer</a></li> | ||
| 44 | <li><a href="#the-running-clock">The running clock</a></li> | ||
| 45 | <li><a href="#recent-entries">Recent entries</a></li> | ||
| 46 | <li><a href="#open-clocks">Open clocks</a></li> | ||
| 47 | <li><a href="#idle-time">Idle time</a></li> | ||
| 48 | <li><a href="#editing-clock-lines">Editing clock lines</a></li> | ||
| 49 | </ul></li> | ||
| 50 | <li><a href="#clock-summaries">Clock summaries</a> | ||
| 51 | <ul> | ||
| 52 | <li><a href="#the-inspector">The inspector</a></li> | ||
| 53 | <li><a href="#the-clock-report-window">The clock report window</a></li> | ||
| 54 | </ul></li> | ||
| 55 | <li><a href="#clock-tables">Clock tables</a> | ||
| 56 | <ul> | ||
| 57 | <li><a href="#parameters">Parameters</a></li> | ||
| 58 | <li><a href="#other-files">Other files</a></li> | ||
| 59 | <li><a href="#steps">Steps</a></li> | ||
| 60 | </ul></li> | ||
| 61 | <li><a href="#habits">Habits</a></li> | ||
| 62 | <li><a href="#reminders">Reminders</a></li> | ||
| 63 | </ul> | ||
| 64 | </nav> | ||
| 65 | <h2 id="timestamps">Timestamps</h2> | ||
| 66 | <p>A timestamp is a date, optionally with a time, in angle brackets (active) or square brackets (inactive):</p> | ||
| 67 | <pre><code class="language-org highlight"><span class="text org"><span class="constant other timestamp org"><2026-10-07 Wed></span> | ||
| 68 | <span class="constant other timestamp org"><2026-10-07 Wed 14:30></span> | ||
| 69 | <span class="constant other timestamp org"><2026-10-07 Wed 10:00-11:30></span> | ||
| 70 | <span class="constant other timestamp org"><2026-10-07 Wed></span>--<span class="constant other timestamp org"><2026-10-09 Fri></span> | ||
| 71 | <span class="constant other timestamp org">[2026-10-07 Wed 09:12]</span></span></code></pre> | ||
| 72 | <ul> | ||
| 73 | <li>Active timestamps put the entry on the agenda for that day. Inactive ones are records only.</li> | ||
| 74 | <li><code class="verbatim">10:00-11:30</code> is a time range within one day. <code class="verbatim"><…>--<…></code> is a range of days; both ends must be of the same kind.</li> | ||
| 75 | <li>orgstar writes day names in English. When reading, it accepts a day name in any language, as Org does.</li> | ||
| 76 | </ul> | ||
| 77 | <h3 id="repeaters-and-warning-periods">Repeaters and warning periods</h3> | ||
| 78 | <p>After the date and time, a timestamp can carry a repeater and a warning or delay:</p> | ||
| 79 | <pre><code class="language-org highlight"><span class="text org"><span class="constant other timestamp org"><2026-10-07 Wed +1w></span> | ||
| 80 | <span class="constant other timestamp org"><2026-10-07 Wed 08:00 ++1d></span> | ||
| 81 | <span class="constant other timestamp org"><2026-10-07 Wed .+2w></span> | ||
| 82 | <span class="constant other timestamp org"><2026-10-31 Sat -3d></span> | ||
| 83 | <span class="constant other timestamp org"><2026-10-31 Sat +1m -5d></span> | ||
| 84 | <span class="constant other timestamp org"><2026-10-07 Wed .+2d/4d></span></span></code></pre> | ||
| 85 | <table> | ||
| 86 | <thead> | ||
| 87 | <tr><th>Element</th><th>Meaning</th></tr> | ||
| 88 | </thead> | ||
| 89 | <tbody> | ||
| 90 | <tr><td><code class="verbatim">+1w</code></td><td>Repeat every week, counted from the date in the timestamp</td></tr> | ||
| 91 | <tr><td><code class="verbatim">++1w</code></td><td>Repeat every week, moving the date past today when the task is done</td></tr> | ||
| 92 | <tr><td><code class="verbatim">.+1w</code></td><td>Repeat one week after the day the task is done</td></tr> | ||
| 93 | <tr><td><code class="verbatim">-3d</code></td><td>On a deadline, start warning 3 days before; on a scheduled date, hide it from the agenda until 3 days after</td></tr> | ||
| 94 | <tr><td><code class="verbatim">--3d</code></td><td>As <code class="verbatim">-3d</code>, for the first occurrence only; it is dropped when the task repeats</td></tr> | ||
| 95 | <tr><td><code class="verbatim">/4d</code></td><td>After a repeater, the longest interval a habit allows (see "Habits")</td></tr> | ||
| 96 | </tbody> | ||
| 97 | </table> | ||
| 98 | <p>Units are <code class="verbatim">h</code> (hours), <code class="verbatim">d</code>, <code class="verbatim">w</code>, <code class="verbatim">m</code> and <code class="verbatim">y</code>. What happens when a repeating task is done is described under "Repeating tasks".</p> | ||
| 99 | <h3 id="diary-sexps">Diary sexps</h3> | ||
| 100 | <p>The agenda also reads <code class="verbatim"><%%(…)></code> timestamps and <code class="verbatim">%%(…)</code> lines with Emacs diary expressions such as <code class="verbatim">diary-float</code>, <code class="verbatim">diary-anniversary</code>, <code class="verbatim">diary-block</code> and <code class="verbatim">diary-cyclic</code>, and their <code class="verbatim">org-</code> counterparts. See <a href="07-agenda.html">The agenda</a> for the functions that are supported. orgstar does not insert or edit these.</p> | ||
| 101 | <h2 id="inserting-timestamps">Inserting timestamps</h2> | ||
| 102 | <table> | ||
| 103 | <thead> | ||
| 104 | <tr><th>Command</th><th>Org command</th><th>Emacs, Doom</th><th>Mac</th><th>Doom leader</th></tr> | ||
| 105 | </thead> | ||
| 106 | <tbody> | ||
| 107 | <tr><td>Insert Timestamp</td><td><code class="verbatim">org-timestamp</code></td><td><code class="verbatim">C-c .</code></td><td>⌃⌘.</td><td><code class="verbatim">SPC m d t</code></td></tr> | ||
| 108 | <tr><td>Insert Inactive Timestamp</td><td><code class="verbatim">org-timestamp-inactive</code></td><td><code class="verbatim">C-c !</code></td><td>⌃⌥⌘.</td><td><code class="verbatim">SPC m d T</code></td></tr> | ||
| 109 | </tbody> | ||
| 110 | </table> | ||
| 111 | <p>Both ask for a date in the echo area (see "The date prompt"). With the caret on an existing timestamp, they replace it with the date you give, keep its repeater, and start from its date and time. In a range of days, the caret picks the end: with the caret between the two dashes of <code class="verbatim">--</code> or after them, the second timestamp is replaced and the prompt starts from its date; before that, the first. Run the command again right after inserting a timestamp to add a second one and make a range, <code class="verbatim"><…>--<…></code>; the second date starts from the timestamp at the caret.</p> | ||
| 112 | <p>Org's prefix arguments are not available: to include the current time, type it, or use a relative time such as <code class="verbatim">+0h</code> (see below).</p> | ||
| 113 | <h2 id="the-date-prompt">The date prompt</h2> | ||
| 114 | <p>Every command that asks for a date shows the same prompt (<code class="verbatim">org-read-date</code>): a text field, the date the text reads as, and a month calendar.</p> | ||
| 115 | <ul> | ||
| 116 | <li>Type a date in any of the forms below. The line above the field shows the result, such as <code class="verbatim"><2026-10-09 Fri 15:00></code>, as you type; for an inactive timestamp it is in square brackets, <code class="verbatim">[2026-10-09 Fri 15:00]</code>.</li> | ||
| 117 | <li>Click a day in the calendar to answer with that day. A time you typed is kept.</li> | ||
| 118 | <li><code class="verbatim">S-<left></code> and <code class="verbatim">S-<right></code> in the field move the answer one day; <code class="verbatim">S-<up></code> and <code class="verbatim">S-<down></code> move it one week.</li> | ||
| 119 | <li><code class="verbatim">RET</code> accepts. An empty answer takes the default: the date of the timestamp being changed, or today.</li> | ||
| 120 | <li><code class="verbatim">Esc</code> cancels.</li> | ||
| 121 | </ul> | ||
| 122 | <p>orgstar reads the answer as Org 9.8 does, with <code class="verbatim">org-read-date-prefer-future</code> <code class="verbatim">t</code>: a date given without a year, or without a month, is taken to be the next such date from today.</p> | ||
| 123 | <table> | ||
| 124 | <thead> | ||
| 125 | <tr><th>You type</th><th>Result</th></tr> | ||
| 126 | </thead> | ||
| 127 | <tbody> | ||
| 128 | <tr><td><code class="verbatim">.</code></td><td>Today</td></tr> | ||
| 129 | <tr><td><code class="verbatim">+0</code></td><td>Today</td></tr> | ||
| 130 | <tr><td><code class="verbatim">+1</code>, <code class="verbatim">+2d</code></td><td>Tomorrow, two days from today</td></tr> | ||
| 131 | <tr><td><code class="verbatim">-3d</code></td><td>Three days ago</td></tr> | ||
| 132 | <tr><td><code class="verbatim">+1w</code>, <code class="verbatim">+2m</code>, <code class="verbatim">-1y</code></td><td>One week, two months from today; one year ago</td></tr> | ||
| 133 | <tr><td><code class="verbatim">++3</code></td><td>Three days after the default date, not after today</td></tr> | ||
| 134 | <tr><td><code class="verbatim">+3h</code></td><td>Three hours after the default time; sets a time</td></tr> | ||
| 135 | <tr><td><code class="verbatim">fri</code>, <code class="verbatim">mon</code></td><td>The next Friday or Monday, the default date included</td></tr> | ||
| 136 | <tr><td><code class="verbatim">+fri</code></td><td>The next Friday after today</td></tr> | ||
| 137 | <tr><td><code class="verbatim">-fri</code></td><td>The last Friday before today</td></tr> | ||
| 138 | <tr><td><code class="verbatim">+2fri</code></td><td>The second Friday from today</td></tr> | ||
| 139 | <tr><td><code class="verbatim">today</code>, <code class="verbatim">tomorrow</code>, <code class="verbatim">yesterday</code></td><td>Those days. orgstar's additions; Org's prompt ignores them</td></tr> | ||
| 140 | <tr><td><code class="verbatim">next week</code>, <code class="verbatim">last week</code></td><td>Seven days from today, forward or back. orgstar's additions</td></tr> | ||
| 141 | <tr><td><code class="verbatim">2026-10-07</code>, <code class="verbatim">2026-10-7</code></td><td>That date</td></tr> | ||
| 142 | <tr><td><code class="verbatim">10-7</code></td><td>7 October, the next one</td></tr> | ||
| 143 | <tr><td><code class="verbatim">7.10.</code>, <code class="verbatim">7.10.2027</code></td><td>7 October (day first)</td></tr> | ||
| 144 | <tr><td><code class="verbatim">10/7</code>, <code class="verbatim">10/7/27</code></td><td>7 October (month first)</td></tr> | ||
| 145 | <tr><td><code class="verbatim">15</code></td><td>The 15th, this month or next</td></tr> | ||
| 146 | <tr><td><code class="verbatim">sep 15</code>, <code class="verbatim">15 sep</code></td><td>15 September, the next one</td></tr> | ||
| 147 | <tr><td><code class="verbatim">dec 25 2027</code></td><td>25 December 2027</td></tr> | ||
| 148 | <tr><td><code class="verbatim">w42</code>, <code class="verbatim">2027-w01</code>, <code class="verbatim">w3-5</code></td><td>Monday of ISO week 42; Monday of week 1 of 2027; Friday of week 3</td></tr> | ||
| 149 | <tr><td><code class="verbatim">10:00</code>, <code class="verbatim">9:30</code></td><td>The default date at that time</td></tr> | ||
| 150 | <tr><td><code class="verbatim">10am</code>, <code class="verbatim">3pm</code>, <code class="verbatim">12:30pm</code></td><td>12-hour times</td></tr> | ||
| 151 | <tr><td><code class="verbatim">10h</code>, <code class="verbatim">10h30</code>, <code class="verbatim">h45</code></td><td>10:00, 10:30, 00:45</td></tr> | ||
| 152 | <tr><td><code class="verbatim">10:00-11:30</code></td><td>A time range</td></tr> | ||
| 153 | <tr><td><code class="verbatim">10:00+1:30</code></td><td>10:00-11:30</td></tr> | ||
| 154 | <tr><td><code class="verbatim">fri 10:00</code>, <code class="verbatim">+2d 9:00</code></td><td>A date and a time together</td></tr> | ||
| 155 | </tbody> | ||
| 156 | </table> | ||
| 157 | <p>Forms without a sign, such as <code class="verbatim">fri</code>, <code class="verbatim">15</code> or <code class="verbatim">10:00</code>, fill in what is missing from the default date: the date of the timestamp being changed, or today. Forms with a single sign count from today; <code class="verbatim">++</code> counts from the default date. Two-digit years are read relative to the current year. Other words the prompt does not recognize are ignored and give the default date. <code class="verbatim">today</code>, <code class="verbatim">tomorrow</code>, <code class="verbatim">yesterday</code>, <code class="verbatim">next week</code> and <code class="verbatim">last week</code> are orgstar's additions, read before the rest of the answer; Org's prompt ignores them.</p> | ||
| 158 | <h2 id="changing-dates">Changing dates</h2> | ||
| 159 | <table> | ||
| 160 | <thead> | ||
| 161 | <tr><th>Command</th><th>Org command</th><th>Emacs, Doom</th><th>Mac</th></tr> | ||
| 162 | </thead> | ||
| 163 | <tbody> | ||
| 164 | <tr><td>Increase Timestamp Part</td><td><code class="verbatim">org-timestamp-up</code></td><td><code class="verbatim">S-<up></code></td><td>⌃⌘↑</td></tr> | ||
| 165 | <tr><td>Decrease Timestamp Part</td><td><code class="verbatim">org-timestamp-down</code></td><td><code class="verbatim">S-<down></code></td><td>⌃⌘↓</td></tr> | ||
| 166 | <tr><td>Timestamp One Day Later</td><td><code class="verbatim">org-timestamp-up-day</code></td><td><code class="verbatim">S-<right></code></td><td>⌃⌘→</td></tr> | ||
| 167 | <tr><td>Timestamp One Day Earlier</td><td><code class="verbatim">org-timestamp-down-day</code></td><td><code class="verbatim">S-<left></code></td><td>⌃⌘←</td></tr> | ||
| 168 | <tr><td>Evaluate Time Range</td><td><code class="verbatim">org-evaluate-time-range</code></td><td><code class="verbatim">C-c C-y</code></td><td></td></tr> | ||
| 169 | </tbody> | ||
| 170 | </table> | ||
| 171 | <p>These keys act on the timestamp when the caret is in one. Elsewhere the same keys do other things, such as changing the TODO keyword or priority on a heading line (<a href="05-todos-and-tags.html">TODOs and tags</a>). In the Doom preset they work in normal and insert state, and <code class="verbatim">C-S-h</code>, <code class="verbatim">C-S-j</code>, <code class="verbatim">C-S-k</code> and <code class="verbatim">C-S-l</code> do the same as <code class="verbatim">S-<left></code>, <code class="verbatim">S-<down></code>, <code class="verbatim">S-<up></code> and <code class="verbatim">S-<right></code>.</p> | ||
| 172 | <p><code class="verbatim">S-<up></code> and <code class="verbatim">S-<down></code> change the part of the timestamp under the caret:</p> | ||
| 173 | <ul> | ||
| 174 | <li>the year, month or day (on the day name, the day);</li> | ||
| 175 | <li>the hour, or the minute in steps of 5 (<code class="verbatim">org-time-stamp-rounding-minutes</code>), first rounding to a multiple of 5;</li> | ||
| 176 | <li>in a time range, the end time; changing the start time moves the end time with it;</li> | ||
| 177 | <li>the number or unit of a repeater or warning (the unit cycles <code class="verbatim">d</code>, <code class="verbatim">w</code>, <code class="verbatim">m</code>, <code class="verbatim">y</code>);</li> | ||
| 178 | <li>on the opening or closing bracket, the timestamp switches between active and inactive.</li> | ||
| 179 | </ul> | ||
| 180 | <p><code class="verbatim">S-<left></code> and <code class="verbatim">S-<right></code> move the whole timestamp by a day, wherever the caret is in it. The day name is rewritten after every change. In a range of days, each end changes on its own.</p> | ||
| 181 | <p><code class="verbatim">C-c C-c</code> on a timestamp rewrites its day name to match its date. <code class="verbatim">C-c C-y</code> shows the length of the range at the caret, or of the first range on the line, such as <code class="verbatim">2 days 3 hours</code>; on a clock line it recomputes the clock's duration.</p> | ||
| 182 | <h2 id="scheduled-and-deadline">SCHEDULED and DEADLINE</h2> | ||
| 183 | <p>A planning line goes directly under the heading:</p> | ||
| 184 | <pre><code class="language-org highlight"><span class="text org"><span class="markup heading org"><span class="punctuation definition heading org">*</span> <span class="keyword other todo org">TODO</span> Submit the tax return | ||
| 185 | </span>DEADLINE: <span class="constant other timestamp org"><2026-10-31 Sat -7d></span> SCHEDULED: <span class="constant other timestamp org"><2026-10-20 Tue></span></span></code></pre> | ||
| 186 | <ul> | ||
| 187 | <li><code class="verbatim">SCHEDULED</code> is the day you plan to start. The agenda shows the entry from that day until it is done.</li> | ||
| 188 | <li><code class="verbatim">DEADLINE</code> is the day it is due. The agenda warns about it 14 days ahead (<code class="verbatim">org-deadline-warning-days</code> in <code class="verbatim">config.toml</code>), or as the timestamp's own <code class="verbatim">-Nd</code> says.</li> | ||
| 189 | </ul> | ||
| 190 | <table> | ||
| 191 | <thead> | ||
| 192 | <tr><th>Command</th><th>Org command</th><th>Emacs, Doom</th><th>Mac</th><th>Doom leader</th></tr> | ||
| 193 | </thead> | ||
| 194 | <tbody> | ||
| 195 | <tr><td>Schedule</td><td><code class="verbatim">org-schedule</code></td><td><code class="verbatim">C-c C-s</code></td><td>⌃⌘S</td><td><code class="verbatim">SPC m d s</code></td></tr> | ||
| 196 | <tr><td>Set Deadline</td><td><code class="verbatim">org-deadline</code></td><td><code class="verbatim">C-c C-d</code></td><td>⌃⌘E</td><td><code class="verbatim">SPC m d d</code></td></tr> | ||
| 197 | <tr><td>Remove Schedule</td><td><code class="verbatim">org-schedule</code> with <code class="verbatim">C-u</code></td><td><code class="verbatim">C-u C-c C-s</code></td><td>⌃⌥⌘S</td><td><code class="verbatim">SPC u SPC m d s</code></td></tr> | ||
| 198 | <tr><td>Remove Deadline</td><td><code class="verbatim">org-deadline</code> with <code class="verbatim">C-u</code></td><td><code class="verbatim">C-u C-c C-d</code></td><td>⌃⌥⌘E</td><td><code class="verbatim">SPC u SPC m d d</code></td></tr> | ||
| 199 | </tbody> | ||
| 200 | </table> | ||
| 201 | <p>Schedule and Set Deadline ask for a date, starting from the entry's current one and its time. They replace an existing date, keep its repeater and warning, and remove a <code class="verbatim">CLOSED</code> stamp from the entry. Remove Schedule and Remove Deadline are bound to Org's <code class="verbatim">C-u</code> forms as separate sequences, and are in the Org menu and the command palette (<a href="03-keys.html">Keys</a>).</p> | ||
| 202 | <p>With <code class="verbatim">org-log-reschedule</code> or <code class="verbatim">org-log-redeadline</code> set to <code class="verbatim">time</code> or <code class="verbatim">note</code> in <code class="verbatim">config.toml</code>, or the matching <code class="verbatim">#+STARTUP</code> words, orgstar logs each change of an existing date and each removal:</p> | ||
| 203 | <pre><code class="language-org highlight"><span class="text org"><span class="markup heading org"><span class="punctuation definition heading org">*</span> <span class="keyword other todo org">TODO</span> Submit the tax return | ||
| 204 | </span>SCHEDULED: <span class="constant other timestamp org"><2026-10-22 Thu></span> | ||
| 205 | <span class="punctuation definition list org">- </span>Rescheduled from "<span class="constant other timestamp org">[2026-10-20 Tue]</span>" on <span class="constant other timestamp org">[2026-10-19 Mon 08:40]</span></span></code></pre> | ||
| 206 | <p>Where these notes go, and the <code class="verbatim">#+STARTUP</code> words, are covered in <a href="05-todos-and-tags.html">TODOs and tags</a>.</p> | ||
| 207 | <h2 id="repeating-tasks">Repeating tasks</h2> | ||
| 208 | <p>When an entry with a repeater in an active timestamp changes from an active TODO keyword to a done one (<code class="verbatim">org-auto-repeat-maybe</code>), orgstar does not leave it done:</p> | ||
| 209 | <ol> | ||
| 210 | <li>The keyword returns to the first keyword of its sequence. In a <code class="verbatim">#+TYP_TODO</code> sequence it returns to the keyword it had. A <code class="verbatim">REPEAT_TO_STATE</code> property, inherited from ancestors, names another keyword to use.</li> | ||
| 211 | <li><code class="verbatim">CLOSED</code> is removed.</li> | ||
| 212 | <li>With <code class="verbatim">org-log-repeat</code> on (the default, <code class="verbatim">time</code>), the <code class="verbatim">LAST_REPEAT</code> property is set to the current time and a state note is logged, such as <code class="verbatim">- State "DONE" from "TODO" [2026-10-07 Wed 18:02]</code>.</li> | ||
| 213 | <li>A <code class="verbatim">SCHEDULED</code> date without a repeater is removed.</li> | ||
| 214 | <li>Every active timestamp with a repeater in the entry moves forward:<ul> | ||
| 215 | <li><code class="verbatim">+N</code> moves it by N once, which may leave it in the past.</li> | ||
| 216 | <li><code class="verbatim">++N</code> moves it by N until it is after today (for hours, after now).</li> | ||
| 217 | <li><code class="verbatim">.+N</code> sets it to today and then moves it by N. With hours, <code class="verbatim">.+Nh</code>, the new time is N hours after the current time, to the minute, and a time range loses its end time.</li> | ||
| 218 | </ul> | ||
| 219 | </li> | ||
| 220 | <li><code class="verbatim">--</code> delays in those timestamps are removed.</li> | ||
| 221 | </ol> | ||
| 222 | <pre><code class="language-org highlight"><span class="text org"><span class="markup heading org"><span class="punctuation definition heading org">*</span> <span class="keyword other todo org">TODO</span> Water the plants | ||
| 223 | </span>SCHEDULED: <span class="constant other timestamp org"><2026-10-07 Wed .+3d></span></span></code></pre> | ||
| 224 | <p>Marking this done on 7 October gives:</p> | ||
| 225 | <pre><code class="language-org highlight"><span class="text org"><span class="markup heading org"><span class="punctuation definition heading org">*</span> <span class="keyword other todo org">TODO</span> Water the plants | ||
| 226 | </span>SCHEDULED: <span class="constant other timestamp org"><2026-10-10 Sat .+3d></span> | ||
| 227 | :PROPERTIES: | ||
| 228 | :LAST_REPEAT: <span class="constant other timestamp org">[2026-10-07 Wed 18:02]</span> | ||
| 229 | :END: | ||
| 230 | <span class="punctuation definition list org">- </span>State "DONE" from "TODO" <span class="constant other timestamp org">[2026-10-07 Wed 18:02]</span></span></code></pre> | ||
| 231 | <p>A repeater of <code class="verbatim">0</code> (<code class="verbatim">+0d</code>) does not repeat. An hourly repeater needs a time in the timestamp; without one, orgstar reports "Cannot repeat in N hour(s) because no hour has been set". Inactive timestamps never repeat.</p> | ||
| 232 | <p>To turn the repeat note off for a file, use <code class="verbatim">#+STARTUP: nologrepeat</code>; <code class="verbatim">lognoterepeat</code> asks for a note instead.</p> | ||
| 233 | <h2 id="effort">Effort</h2> | ||
| 234 | <p>Effort estimates live in the <code class="verbatim">Effort</code> property.</p> | ||
| 235 | <table> | ||
| 236 | <thead> | ||
| 237 | <tr><th>Command</th><th>Org command</th><th>Emacs, Doom</th><th>Mac</th><th>Doom leader</th><th>Speed key</th></tr> | ||
| 238 | </thead> | ||
| 239 | <tbody> | ||
| 240 | <tr><td>Set Effort</td><td><code class="verbatim">org-set-effort</code></td><td><code class="verbatim">C-c C-x e</code></td><td><code class="verbatim">⌃⇧⌘E</code></td><td><code class="verbatim">SPC m c E</code></td><td><code class="verbatim">e</code></td></tr> | ||
| 241 | </tbody> | ||
| 242 | </table> | ||
| 243 | <p>Set Effort asks for a value, such as <code class="verbatim">0:30</code> or <code class="verbatim">2:00</code>, starting with the current one. If the entry, an ancestor, or a <code class="verbatim">#+PROPERTY: Effort_ALL</code> line defines <code class="verbatim">Effort_ALL</code>, its values are offered as choices; you can also type another value.</p> | ||
| 244 | <pre><code class="language-org highlight"><span class="text org"><span class="keyword other keyword org">#+PROPERTY:</span><span class="string unquoted org"> Effort_ALL 0:15 0:30 1:00 2:00 4:00</span></span></code></pre> | ||
| 245 | <p>Effort appears in column view and in clock tables with <code class="verbatim">:properties ("Effort")</code>. The mode line does not show the effort beside the running clock; a notification is posted when the time clocked passes it (see <em>Clocking</em> below).</p> | ||
| 246 | <h2 id="timers">Timers</h2> | ||
| 247 | <p>orgstar has Org's relative timer, which counts up from when it starts, and its countdown timer (org-timer). One timer runs at a time, for every file; it shows in the mode line as <code class="verbatim"><0:01:23></code> (above the text on iOS) and stops when orgstar quits.</p> | ||
| 248 | <table> | ||
| 249 | <thead> | ||
| 250 | <tr><th>Command</th><th>Emacs</th><th>What it does</th></tr> | ||
| 251 | </thead> | ||
| 252 | <tbody> | ||
| 253 | <tr><td>Start Timer</td><td><code class="verbatim">C-c C-x 0</code></td><td>Starts the relative timer at 0:00:00.</td></tr> | ||
| 254 | <tr><td>Start Timer with Offset…</td><td><code class="verbatim">C-u C-c C-x 0</code></td><td>Asks for a value to start from, <code class="verbatim">h:mm:ss</code> or a shorter <code class="verbatim">m:ss</code> or seconds; empty takes the timer value at the caret, or 0:00:00.</td></tr> | ||
| 255 | <tr><td>Insert Timer Value</td><td><code class="verbatim">C-c C-x .</code></td><td>Inserts the timer's value, as =0:01:23 =; starts the timer first when none is running.</td></tr> | ||
| 256 | <tr><td>Insert Timer Item</td><td><code class="verbatim">C-c C-x -</code></td><td>Inserts a timer item, =- 0:01:23 :: =: a new item in a timer list, or a new list elsewhere.</td></tr> | ||
| 257 | <tr><td>Pause or Continue Timer</td><td><code class="verbatim">C-c C-x ,</code></td><td>Pauses the timer, or lets a paused one go on.</td></tr> | ||
| 258 | <tr><td>Stop Timer</td><td><code class="verbatim">C-c C-x _</code>, <code class="verbatim">C-u C-c C-x ,</code></td><td>Stops the timer.</td></tr> | ||
| 259 | <tr><td>Set Countdown Timer…</td><td><code class="verbatim">C-c C-x ;</code></td><td>Starts a countdown for the entry's <code class="verbatim">Effort</code>, or asks how long: minutes, or <code class="verbatim">h:mm:ss</code>.</td></tr> | ||
| 260 | <tr><td>Show Remaining Countdown Time</td><td>—</td><td>Says how long the countdown has left.</td></tr> | ||
| 261 | <tr><td>Shift Timer Values in Region…</td><td><code class="verbatim">C-u C-u C-c C-x 0</code></td><td>Adds a difference to every <code class="verbatim">h:mm:ss</code> in the selection; empty makes the first one 0:00:00.</td></tr> | ||
| 262 | </tbody> | ||
| 263 | </table> | ||
| 264 | <p>M-RET in a timer list inserts a timer item, so notes taken in a meeting can be stamped as they're written:</p> | ||
| 265 | <pre><code class="language-org highlight"><span class="text org"><span class="punctuation definition list org">- </span>0:00:05 :: Introductions | ||
| 266 | <span class="punctuation definition list org">- </span>0:04:40 :: Budget</span></code></pre> | ||
| 267 | <p>When a countdown ends, orgstar shows <code class="verbatim">Heading: time out</code>, and a notification when it isn't in front. Starting a relative timer during a countdown, or a countdown during a relative timer, is refused until the other is stopped. <code class="verbatim">org-timer-format</code> (<code class="verbatim">"%s "</code>) sets what Insert Timer Value writes, and <code class="verbatim">org-timer-default-timer</code> the countdown Set Countdown Timer… offers; see <a href="13-configuration.html">Configuration</a>.</p> | ||
| 268 | <h2 id="clocking">Clocking</h2> | ||
| 269 | <p>Clocking records the time you work on an entry as <code class="verbatim">CLOCK:</code> lines in its <code class="verbatim">LOGBOOK</code> drawer.</p> | ||
| 270 | <table> | ||
| 271 | <thead> | ||
| 272 | <tr><th>Command</th><th>Org command</th><th>Emacs, Doom</th><th>Mac</th><th>Doom leader</th><th>Speed key</th></tr> | ||
| 273 | </thead> | ||
| 274 | <tbody> | ||
| 275 | <tr><td>Clock In</td><td><code class="verbatim">org-clock-in</code></td><td><code class="verbatim">C-c C-x C-i</code></td><td><code class="verbatim">⌃⌘I</code></td><td><code class="verbatim">SPC m c i</code></td><td><code class="verbatim">I</code></td></tr> | ||
| 276 | <tr><td>Clock In to Recent Entry…</td><td><code class="verbatim">org-clock-in</code> with <code class="verbatim">C-u</code></td><td></td><td><code class="verbatim">⌃⌥⌘I</code></td><td></td><td></td></tr> | ||
| 277 | <tr><td>Clock In to Last Entry</td><td><code class="verbatim">org-clock-in-last</code></td><td><code class="verbatim">C-c C-x C-x</code></td><td></td><td><code class="verbatim">SPC m c I</code></td><td></td></tr> | ||
| 278 | <tr><td>Clock Out</td><td><code class="verbatim">org-clock-out</code></td><td><code class="verbatim">C-c C-x C-o</code></td><td><code class="verbatim">⌃⇧⌘I</code></td><td><code class="verbatim">SPC m c o</code></td><td><code class="verbatim">O</code></td></tr> | ||
| 279 | <tr><td>Cancel Clock</td><td><code class="verbatim">org-clock-cancel</code></td><td><code class="verbatim">C-c C-x C-q</code></td><td><code class="verbatim">⌃⌘K</code></td><td><code class="verbatim">SPC m c c</code></td><td></td></tr> | ||
| 280 | <tr><td>Go to Clocked Entry</td><td><code class="verbatim">org-clock-goto</code></td><td><code class="verbatim">C-c C-x C-j</code></td><td><code class="verbatim">⌃⌘J</code></td><td><code class="verbatim">SPC m c g</code></td><td></td></tr> | ||
| 281 | <tr><td>Go to Recent Clocked Entry…</td><td><code class="verbatim">org-clock-goto</code> with <code class="verbatim">C-u</code></td><td></td><td><code class="verbatim">⌃⌥⌘J</code></td><td><code class="verbatim">SPC m c G</code></td><td></td></tr> | ||
| 282 | <tr><td>Mark as Default Clock Task</td><td><code class="verbatim">org-clock-mark-default-task</code></td><td></td><td></td><td><code class="verbatim">SPC m c d</code></td><td></td></tr> | ||
| 283 | <tr><td>Resolve Open Clocks…</td><td><code class="verbatim">org-resolve-clocks</code></td><td><code class="verbatim">C-c C-x C-z</code></td><td></td><td><code class="verbatim">SPC m c r</code></td><td></td></tr> | ||
| 284 | </tbody> | ||
| 285 | </table> | ||
| 286 | <p>The Emacs keys are Org's own, and work in the Doom preset too, as every <code class="verbatim">C-c</code> key does. Commands without a key in your preset are in the command palette and in Org ▸ Clock, which lists every clock command with its keys, followed by the recent entries. In the agenda, <code class="verbatim">I</code>, <code class="verbatim">O</code> and <code class="verbatim">X</code> clock in, out and cancel for the entry at the line (<a href="07-agenda.html">The agenda</a>). Capture templates can clock in too (<a href="08-capture.html">Capture</a>).</p> | ||
| 287 | <p>orgstar has no <code class="verbatim">C-u</code> forms of these commands. Clock In to Recent Entry… and Go to Recent Clocked Entry… stand for <code class="verbatim">C-u C-c C-x C-i</code> and <code class="verbatim">C-u C-c C-x C-j</code>.</p> | ||
| 288 | <h3 id="clocking-in-and-out">Clocking in and out</h3> | ||
| 289 | <p>Clock In starts a clock on the heading at the caret and inserts a line at the top of its <code class="verbatim">LOGBOOK</code> drawer, creating the drawer after the planning line and property drawer if needed (see "The clock drawer" below for other drawers):</p> | ||
| 290 | <pre><code class="language-org highlight"><span class="text org"><span class="markup heading org"><span class="punctuation definition heading org">*</span> <span class="keyword other todo org">TODO</span> Write the report | ||
| 291 | </span>:LOGBOOK: | ||
| 292 | CLOCK: <span class="constant other timestamp org">[2026-10-07 Wed 09:00]</span> | ||
| 293 | CLOCK: <span class="constant other timestamp org">[2026-10-06 Tue 14:00]</span>--<span class="constant other timestamp org">[2026-10-06 Tue 15:30]</span> => 1:30 | ||
| 294 | :END:</span></code></pre> | ||
| 295 | <ul> | ||
| 296 | <li>Only one clock runs at a time. Clocking in while another clock runs clocks that one out first, and remembers it as the interrupted task (<code class="verbatim">i</code> in the selection below).</li> | ||
| 297 | <li>Clocking in on the entry whose clock is running changes nothing and says <code class="verbatim">Clock continues in "Write the report"</code>.</li> | ||
| 298 | <li><code class="verbatim">CLOCK:</code> lines outside a drawer move into the new drawer the first time you clock in on that entry.</li> | ||
| 299 | <li>With <code class="verbatim">org-clock-in-switch-to-state</code> set to a keyword in <code class="verbatim">config.toml</code>, Clock In gives the entry that keyword first (unless it has it), logging and checking dependencies as <code class="verbatim">C-c C-t</code> does. A file without the keyword can't be clocked in, as in Org: "State `NEXT' not valid in this file".</li> | ||
| 300 | <li>Clock Out completes the line with the end time and the duration in hours and minutes. Clocks of zero minutes are kept, unless <code class="verbatim">org-clock-out-remove-zero-time-clocks</code> is <code class="verbatim">true</code>; then the line goes and the message ends with "LINE REMOVED".</li> | ||
| 301 | <li>With <code class="verbatim">org-clock-rounding-minutes</code> set to N, the clock starts at the multiple of N minutes nearest now that isn't later, and stops at the nearest multiple; with 5, clocking in at 14:47 starts at 14:45.</li> | ||
| 302 | <li>Marking the clocked entry done clocks out (<code class="verbatim">org-clock-out-when-done</code>, on by default as in Org; set it to <code class="verbatim">"nil"</code> to keep the clock running, or to keywords that clock out). orgstar watches the entry's heading line, so typing a done keyword yourself clocks out too.</li> | ||
| 303 | <li>When the entry has an <code class="verbatim">Effort</code>, a notification says "Task `…' should be finished by now. (1:00)" once the time clocked on it and its subtree passes it, counting earlier clocks as <code class="verbatim">org-clock-mode-line-total</code> <code class="verbatim">auto</code> does (since <code class="verbatim">LAST_REPEAT</code> for a repeating task) or as its <code class="verbatim">CLOCK_MODELINE_TOTAL</code> says.</li> | ||
| 304 | <li>Cancel Clock removes the running clock's line, and the drawer if it is left empty.</li> | ||
| 305 | <li>Go to Clocked Entry opens the file and moves the caret to the running clock's line. With no clock running, it goes to the most recently clocked entry and says "No running clock, this is the most recently clocked task".</li> | ||
| 306 | </ul> | ||
| 307 | <p>With no clock running, Clock In first asks about open clocks; see Open clocks below. So do the agenda's <code class="verbatim">I</code> and a capture template's <code class="verbatim">clock-in</code>.</p> | ||
| 308 | <p>orgstar remembers the running clock and the clock history across restarts, in <code class="verbatim">clock.json</code> in <code class="verbatim">~/Library/Application Support/Orgstar</code> (in the Mac App Store version, the same folder inside its container). If the open <code class="verbatim">CLOCK:</code> line is deleted from the file, Clock Out reports "Clock start time is gone" and forgets the clock.</p> | ||
| 309 | <p>orgstar follows the open <code class="verbatim">CLOCK:</code> lines in the files, so a clock started or stopped in Emacs, or on another device, is the one it shows:</p> | ||
| 310 | <ul> | ||
| 311 | <li>At launch, and as your folders load, it looks for open clock lines in the agenda files; when a file changes on disk, in that file.</li> | ||
| 312 | <li>With no clock running, the most recently started open clock it hasn't seen before becomes the running clock, and the status line says so. Older open clocks stay dangling; Clock In asks about them, as described in Open clocks below.</li> | ||
| 313 | <li>When the running clock's line is closed (Emacs clocked out) or removed, the clock stops here too, with the message "The clock in … was stopped elsewhere".</li> | ||
| 314 | </ul> | ||
| 315 | <p>Clocking out in orgstar closes the line as Org does, so Emacs sees a finished clock when it reverts the file. orgstar does not read Emacs's <code class="verbatim">org-clock-persist</code> file, so Emacs learns of a clock started here only from the line, when it next resolves clocks.</p> | ||
| 316 | <p>These parts of Org's clocking are not implemented:</p> | ||
| 317 | <ul> | ||
| 318 | <li><code class="verbatim">org-clock-in-switch-to-state</code> and <code class="verbatim">org-clock-out-switch-to-state</code> as functions, and <code class="verbatim">org-clock-sound</code>: the notification uses the system's sound.</li> | ||
| 319 | </ul> | ||
| 320 | <h3 id="the-clock-drawer">The clock drawer</h3> | ||
| 321 | <p>Where clock lines go follows <code class="verbatim">org-clock-into-drawer</code> in <code class="verbatim">config.toml</code>, or an entry's <code class="verbatim">CLOCK_INTO_DRAWER</code> property, which its subtree inherits:</p> | ||
| 322 | <table> | ||
| 323 | <thead> | ||
| 324 | <tr><th>Value</th><th>Clock lines go</th></tr> | ||
| 325 | </thead> | ||
| 326 | <tbody> | ||
| 327 | <tr><td><code class="verbatim">t</code> (default)</td><td>into the drawer <code class="verbatim">org-log-into-drawer</code> (or a <code class="verbatim">LOG_INTO_DRAWER</code> property) names, else <code class="verbatim">LOGBOOK</code></td></tr> | ||
| 328 | <tr><td><code class="verbatim">nil</code></td><td>under the heading, newest first, without a drawer</td></tr> | ||
| 329 | <tr><td>a number <em>n</em></td><td>under the heading until there would be <em>n</em> of them; then all of them move into the log drawer</td></tr> | ||
| 330 | <tr><td>a drawer name</td><td>into that drawer</td></tr> | ||
| 331 | </tbody> | ||
| 332 | </table> | ||
| 333 | <p>An existing drawer of that name always takes the new line.</p> | ||
| 334 | <h3 id="the-running-clock">The running clock</h3> | ||
| 335 | <p>While a clock runs, orgstar shows it in three places, refreshed every 30 seconds:</p> | ||
| 336 | <ul> | ||
| 337 | <li>the mode line under the editor: <code class="verbatim">⏱ 0:42 Write the report</code>;</li> | ||
| 338 | <li>the window's toolbar;</li> | ||
| 339 | <li>the macOS menu bar, with the elapsed time.</li> | ||
| 340 | </ul> | ||
| 341 | <p>The time shown is the time since you clocked in, not the entry's total. Each of them opens a menu with Clock Out, Cancel Clock and Go to Clocked Entry. The toolbar's menu also has Clock In to Recent Entry…, Go to Recent Clocked Entry… and the recent entries. The menu bar item also has Clock In to Recent Entry…, Clock Report and a Recent Entries section. Choosing a recent entry clocks in to it.</p> | ||
| 342 | <p>With Settings ▸ General ▸ Keep orgstar in the menu bar (<code class="verbatim">menu-bar-item</code>), the menu bar item stays when no clock runs, as a star, and its menu starts with Capture…, Agenda and today's agenda entries that aren't done, overdue ones first; choosing an entry shows it in the main window. It is there while orgstar is running.</p> | ||
| 343 | <h3 id="recent-entries">Recent entries</h3> | ||
| 344 | <p>orgstar keeps a clock history, as <code class="verbatim">org-clock-history</code>. Every clock-in, including one from the agenda or a capture template, puts the entry first in the history and removes its other entries there. The history holds <code class="verbatim">org-clock-history-length</code> entries (5 by default); the oldest go first.</p> | ||
| 345 | <p>Entries are found again after edits by their <code class="verbatim">ID</code> property, else by the heading's position among the file's headings together with its title, else by the title alone. An entry that can't be found is dropped from the history the next time an entry is added, and left out of the selection.</p> | ||
| 346 | <p>Clock In to Recent Entry… and Go to Recent Clocked Entry… ask for an entry in the echo area, as <code class="verbatim">org-clock-select-task</code> does. Each line shows its key, the entry's category padded to 12 characters, and the heading with its TODO keyword and priority, under these sections:</p> | ||
| 347 | <table> | ||
| 348 | <thead> | ||
| 349 | <tr><th>Key</th><th>Section</th></tr> | ||
| 350 | </thead> | ||
| 351 | <tbody> | ||
| 352 | <tr><td><code class="verbatim">d</code></td><td>Default Task: the entry marked with Mark as Default Clock Task</td></tr> | ||
| 353 | <tr><td><code class="verbatim">i</code></td><td>The task interrupted by starting the last one</td></tr> | ||
| 354 | <tr><td><code class="verbatim">c</code></td><td>Current Clocking Task</td></tr> | ||
| 355 | <tr><td><code class="verbatim">1</code> … <code class="verbatim">9</code>, <code class="verbatim">A</code>, <code class="verbatim">B</code>, …</td><td>Recent Tasks, most recent first</td></tr> | ||
| 356 | </tbody> | ||
| 357 | </table> | ||
| 358 | <p>Type a key to choose. <code class="verbatim">q</code>, <code class="verbatim">x</code> or <code class="verbatim">Esc</code> leave the question. With an empty history the commands say "No recent clock"; a key that isn't listed says "Invalid task choice X".</p> | ||
| 359 | <p>Clock In to Last Entry clocks in to the first entry of the history, the same as <code class="verbatim">1</code>. With no clock running it says "Clocking back: Write the report (in work.org)"; with an empty history, "No last clock".</p> | ||
| 360 | <p>Mark as Default Clock Task makes the heading at the caret the <code class="verbatim">d</code> entry and says "Default clock task: Write the report"; Org sets it without a message. As in Org, the default task lasts until you quit orgstar.</p> | ||
| 361 | <h3 id="open-clocks">Open clocks</h3> | ||
| 362 | <p>An open clock is a <code class="verbatim">CLOCK:</code> line with a start and no end. Org calls one that isn't the running clock dangling, for example after orgstar or Emacs quit while it ran, or a line synced from another machine.</p> | ||
| 363 | <p>When you clock in with no clock running, orgstar first looks for open clocks in the org files of your folders and in the open buffers (<code class="verbatim">org-clock-auto-clock-resolution</code> set to <code class="verbatim">when-no-clock-is-running</code>), and asks about each one:</p> | ||
| 364 | <pre>Dangling clock started 95 mins ago [jkKtTgGSscCiq]?</pre> | ||
| 365 | <p>Clocking in from the agenda (<code class="verbatim">I</code>) or from a capture template with <code class="verbatim">clock-in</code> asks too, as <code class="verbatim">org-clock-in</code> does in Org. A capture template resolves open clocks as of when the capture began, which is when its clock starts. On the Mac, the questions for an agenda or capture clock-in are asked in the main window's echo area.</p> | ||
| 366 | <p>Resolve Open Clocks… asks the same about every open clock, the running one included, and says "No open clocks" when there are none.</p> | ||
| 367 | <p>Unlike Org, orgstar doesn't show the clock's line while it asks; <code class="verbatim">j</code> opens it afterwards, except while clocking in.</p> | ||
| 368 | <p>The answer is a key, as in <code class="verbatim">org-clock-resolve</code>. The idle time is the time since the clock started, for an open clock, or since you stopped using the Mac, for an idle one (see Idle time below).</p> | ||
| 369 | <table> | ||
| 370 | <thead> | ||
| 371 | <tr><th>Key</th><th>What happens to the <code class="verbatim">CLOCK:</code> line</th></tr> | ||
| 372 | </thead> | ||
| 373 | <tbody> | ||
| 374 | <tr><td><code class="verbatim">j</code></td><td>Nothing; the line opens in the editor to adjust by hand (after the clock-in, when you were clocking in).</td></tr> | ||
| 375 | <tr><td><code class="verbatim">J</code></td><td>Ends the line now, then opens it in the editor.</td></tr> | ||
| 376 | <tr><td><code class="verbatim">k</code></td><td>Asks how many minutes of the idle time to keep, all of them by default. With all, the clock keeps running. With fewer, the line ends that many minutes after the idle time began, and a new clock starts now.</td></tr> | ||
| 377 | <tr><td><code class="verbatim">K</code></td><td>Asks the same, then ends the line after the minutes kept and leaves you clocked out.</td></tr> | ||
| 378 | <tr><td><code class="verbatim">t</code></td><td>Like <code class="verbatim">k</code>, but asks for the date and time you got distracted; the line ends then.</td></tr> | ||
| 379 | <tr><td><code class="verbatim">T</code></td><td>Like <code class="verbatim">t</code>, then leaves you clocked out.</td></tr> | ||
| 380 | <tr><td><code class="verbatim">g</code></td><td>Asks how many minutes ago you got back, all of the idle time by default. The line ends when the idle time began, and a new clock starts that many minutes ago.</td></tr> | ||
| 381 | <tr><td><code class="verbatim">G</code></td><td>Like <code class="verbatim">g</code>, but leaves you clocked out: the line ends when the idle time began.</td></tr> | ||
| 382 | <tr><td><code class="verbatim">s</code></td><td>Subtracts the idle time: the line ends when the idle time began, and a new clock starts now.</td></tr> | ||
| 383 | <tr><td><code class="verbatim">S</code></td><td>Subtracts the idle time and leaves you clocked out.</td></tr> | ||
| 384 | <tr><td><code class="verbatim">C</code></td><td>Removes the line, as though you never clocked in.</td></tr> | ||
| 385 | <tr><td><code class="verbatim">i</code>, <code class="verbatim">q</code>, <code class="verbatim">Esc</code></td><td>Leaves the line as it is, keeping all the idle time.</td></tr> | ||
| 386 | </tbody> | ||
| 387 | </table> | ||
| 388 | <ul> | ||
| 389 | <li><code class="verbatim">k</code>, <code class="verbatim">K</code>, <code class="verbatim">g</code> and <code class="verbatim">G</code> ask for minutes with the default in the question, as <code class="verbatim">Keep how many minutes (default 95):</code>; Return with an empty field takes the default.</li> | ||
| 390 | <li><code class="verbatim">t</code> and <code class="verbatim">T</code> ask <code class="verbatim">Date+time:</code> with Org's date syntax, as <code class="verbatim">14:00</code> or <code class="verbatim">-1h</code>.</li> | ||
| 391 | <li>If the clock ran less than 45 seconds before the idle time began, <code class="verbatim">s</code> removes the line and starts a new clock now, and <code class="verbatim">S</code> removes it. For an open clock all its time is idle time, so <code class="verbatim">s</code> and <code class="verbatim">S</code> remove its line.</li> | ||
| 392 | <li>Any other key asks again.</li> | ||
| 393 | </ul> | ||
| 394 | <p>While clocking in, an answer never restarts the clock it resolves: where a key would start a new clock or keep one running, the line ends instead, and the clock you asked for starts. Resolving an open clock that isn't running with <code class="verbatim">k</code> and all the minutes, outside a clock-in, makes it the running clock.</p> | ||
| 395 | <p>When <code class="verbatim">K</code>, <code class="verbatim">T</code> or <code class="verbatim">S</code> ends a clock outside a clock-in, the next clock-in, from the agenda or a capture template too, asks:</p> | ||
| 396 | <pre>You stopped another clock 12 mins ago; start this one from then? (y or n)</pre> | ||
| 397 | <p><code class="verbatim">y</code> starts the new clock when the old one ended.</p> | ||
| 398 | <h3 id="idle-time">Idle time</h3> | ||
| 399 | <p>On the Mac, set <code class="verbatim">org-clock-idle-time</code> to a number of minutes, or turn on Settings ▸ Agenda ▸ "Ask what to do with idle time while clocked in", to be asked about time away from the Mac. The default, <code class="verbatim">0</code>, never asks, as <code class="verbatim">nil</code> does in Emacs.</p> | ||
| 400 | <p>While a clock runs, orgstar checks every minute how long the Mac has had no keyboard or mouse input, in any app. Past the limit, it requests your attention, which bounces its Dock icon while another app is active, and asks in the echo area:</p> | ||
| 401 | <pre>Clocked in & idle for 17.3 mins [jkKtTgGSscCiq]?</pre> | ||
| 402 | <p>The keys are those in the table above, with the idle time starting when input stopped.</p> | ||
| 403 | <p>iOS doesn't tell apps how long the device has been idle. Instead, when you return to the app while a clock runs, time spent in other apps or with the device locked counts as idle: past <code class="verbatim">org-clock-idle-time</code>, orgstar asks the same question, with the idle time starting when you left the app, or when the clock started if that was later.</p> | ||
| 404 | <h3 id="editing-clock-lines">Editing clock lines</h3> | ||
| 405 | <p>You can edit clock lines by hand. <code class="verbatim">S-<up></code>, <code class="verbatim">S-<down></code>, <code class="verbatim">S-<left></code> and <code class="verbatim">S-<right></code> change their timestamps as anywhere else, and then write the duration after <code>=></code> again, as <code class="verbatim">H:MM</code>. After typing changes yourself, press <code class="verbatim">C-c C-c</code> (or <code class="verbatim">C-c C-y</code>) on the line: orgstar fixes both day names and writes the duration again (<code class="verbatim">org-clock-update-time-maybe</code>).</p> | ||
| 406 | <p><code class="verbatim">C-c .</code> on a clock line's range replaces one of its timestamps, as in any range of days (see "Inserting timestamps").</p> | ||
| 407 | <p>A line of the form <code>CLOCK: => 1:15</code>, with only a duration, counts towards clock tables.</p> | ||
| 408 | <h2 id="clock-summaries">Clock summaries</h2> | ||
| 409 | <h3 id="the-inspector">The inspector</h3> | ||
| 410 | <p>View ▸ Show or Hide Columns and Clock opens the inspector beside the editor. Its Clock tab lists the clocked time per heading in the open file for Today, This Week (weeks start on Monday) or All, with a total. Clicking a heading moves to it. Only finished clocks count.</p> | ||
| 411 | <h3 id="the-clock-report-window">The clock report window</h3> | ||
| 412 | <p>Clock Report (<code class="verbatim">SPC m c R</code> and <code class="verbatim">SPC z t</code> in Doom, the command palette, or the clock menus) opens a window that totals time across files. Choose files on the left; files with clock lines are selected when the window opens. Turn on From to limit the report to a range of dates. The report is an Org table of time per date and heading, with a total after each ISO week:</p> | ||
| 413 | <pre><code class="language-org highlight"><span class="text org"><span class="keyword other keyword org">#+title:</span><span class="string unquoted org"> Time Report</span> | ||
| 414 | |||
| 415 | <span class="markup other table org">| Date | Code | Hours |</span> | ||
| 416 | <span class="markup other table org">|--------------+-----------------------------------------------+-------|</span> | ||
| 417 | <span class="markup other table org">| 2026-10-05 | Write the report | 2:15 |</span> | ||
| 418 | <span class="markup other table org">| 2026-10-06 | Write the report | 1:30 |</span> | ||
| 419 | <span class="markup other table org">|--------------+-----------------------------------------------+-------|</span> | ||
| 420 | <span class="markup other table org">| 2026-W41 | WEEK TOTAL | 3:45 |</span></span></code></pre> | ||
| 421 | <p>Copy puts it on the clipboard; Save writes it to a file.</p> | ||
| 422 | <h2 id="clock-tables">Clock tables</h2> | ||
| 423 | <p>A clock table is a dynamic block that orgstar fills with a summary of clocked time (<code class="verbatim">org-clocktable-write-default</code>).</p> | ||
| 424 | <table> | ||
| 425 | <thead> | ||
| 426 | <tr><th>Command</th><th>Org command</th><th>Emacs, Doom</th></tr> | ||
| 427 | </thead> | ||
| 428 | <tbody> | ||
| 429 | <tr><td>Insert or Update Clock Table</td><td><code class="verbatim">org-clock-report</code></td><td><code class="verbatim">C-c C-x C-r</code></td></tr> | ||
| 430 | <tr><td>Update Dynamic Block</td><td><code class="verbatim">org-update-dblock</code></td><td><code class="verbatim">C-c C-x C-u</code></td></tr> | ||
| 431 | </tbody> | ||
| 432 | </table> | ||
| 433 | <p><code class="verbatim">C-c C-c</code> on the <code class="verbatim">#+BEGIN:</code> line also updates the block; in the Mac preset, <code class="verbatim">⌃⌘X</code> does.</p> | ||
| 434 | <p>Insert or Update Clock Table updates the clock table at the caret. Elsewhere it inserts a new one, with <code class="verbatim">:scope subtree</code> inside an entry or <code class="verbatim">:scope file</code> before the first heading, and fills it:</p> | ||
| 435 | <pre><code class="language-org highlight"><span class="text org"><span class="keyword other keyword org">#+BEGIN:</span><span class="string unquoted org"> clocktable :scope file :maxlevel 2 :block thisweek</span> | ||
| 436 | <span class="keyword other keyword org">#+CAPTION:</span><span class="string unquoted org"> Clock summary at [2026-10-07 Wed 17:00], for week 2026-W41.</span> | ||
| 437 | <span class="markup other table org">| Headline | Time | |</span> | ||
| 438 | <span class="markup other table org">|------------------+--------+------|</span> | ||
| 439 | <span class="markup other table org">| *Total time* | *5:15* | |</span> | ||
| 440 | <span class="markup other table org">|------------------+--------+------|</span> | ||
| 441 | <span class="markup other table org">| Project Alpha | 5:15 | |</span> | ||
| 442 | <span class="markup other table org">| \_ Design | | 3:00 |</span> | ||
| 443 | <span class="markup other table org">| \_ Write code | | 2:15 |</span> | ||
| 444 | <span class="keyword other keyword org">#+END:</span></span></code></pre> | ||
| 445 | <p>Times are written as <code class="verbatim">H:MM</code>, with a day count such as <code class="verbatim">2d</code> before them for a day or more. A heading's time includes its subtree's. Only finished clock lines and <code>CLOCK: => H:MM</code> lines count; a running clock does not. A <code class="verbatim">COMMENT</code> prefix is left out of headlines.</p> | ||
| 446 | <h3 id="parameters">Parameters</h3> | ||
| 447 | <table> | ||
| 448 | <thead> | ||
| 449 | <tr><th>Parameter</th><th>Values</th><th>Default</th></tr> | ||
| 450 | </thead> | ||
| 451 | <tbody> | ||
| 452 | <tr><td><code class="verbatim">:scope</code></td><td><code class="verbatim">file</code> (or <code class="verbatim">nil</code>), <code class="verbatim">subtree</code>, <code class="verbatim">tree</code>, <code class="verbatim">treeN</code>, <code class="verbatim">agenda</code>, <code class="verbatim">agenda-with-archives</code>, <code class="verbatim">file-with-archives</code>, or a list of files such as <code class="verbatim">("work.org" "~/notes/")</code></td><td><code class="verbatim">file</code></td></tr> | ||
| 453 | <tr><td><code class="verbatim">:maxlevel</code></td><td>Deepest heading level listed</td><td><code class="verbatim">2</code></td></tr> | ||
| 454 | <tr><td><code class="verbatim">:block</code></td><td>A time block (see below)</td><td>none</td></tr> | ||
| 455 | <tr><td><code class="verbatim">:tstart</code>, <code class="verbatim">:tend</code></td><td>Start and end, such as <code class="verbatim">"<2026-09-01>"</code>, <code class="verbatim">"<today>"</code>, <code class="verbatim">"<-1w>"</code></td><td>none</td></tr> | ||
| 456 | <tr><td><code class="verbatim">:wstart</code></td><td>First day of the week for <code class="verbatim">:block</code> weeks, <code class="verbatim">1</code> is Monday</td><td><code class="verbatim">1</code></td></tr> | ||
| 457 | <tr><td><code class="verbatim">:mstart</code></td><td>First day of the month for <code class="verbatim">:block</code> months</td><td><code class="verbatim">1</code></td></tr> | ||
| 458 | <tr><td><code class="verbatim">:link</code></td><td><code class="verbatim">t</code>: headlines link to their headings</td><td><code class="verbatim">nil</code></td></tr> | ||
| 459 | <tr><td><code class="verbatim">:narrow</code></td><td><code class="verbatim">N</code> adds a <code class="verbatim"><N></code> width cookie; <code class="verbatim">N!</code> cuts headlines to N characters</td><td><code class="verbatim">40!</code></td></tr> | ||
| 460 | <tr><td><code class="verbatim">:indent</code></td><td><code class="verbatim">t</code>: indent sublevels with <code class="verbatim">\_</code></td><td><code class="verbatim">t</code></td></tr> | ||
| 461 | <tr><td><code class="verbatim">:compact</code></td><td><code class="verbatim">t</code>: one time column, indented, cut to 40 characters</td><td><code class="verbatim">nil</code></td></tr> | ||
| 462 | <tr><td><code class="verbatim">:emphasize</code></td><td><code class="verbatim">t</code>: level 1 bold, level 2 italic</td><td><code class="verbatim">nil</code></td></tr> | ||
| 463 | <tr><td><code class="verbatim">:lang</code></td><td>The language of the caption and column titles: <code class="verbatim">en</code>, <code class="verbatim">de</code>, <code class="verbatim">es</code>, <code class="verbatim">fr</code>, <code class="verbatim">nl</code>, <code class="verbatim">nn</code>, <code class="verbatim">pl</code>, <code class="verbatim">pt-BR</code> or <code class="verbatim">sk</code> (<code class="verbatim">org-clock-clocktable-language-setup</code>); others are English</td><td><code class="verbatim">org-export-default-language</code></td></tr> | ||
| 464 | <tr><td><code class="verbatim">:level</code></td><td><code class="verbatim">t</code>: a column with the level</td><td><code class="verbatim">nil</code></td></tr> | ||
| 465 | <tr><td><code class="verbatim">:tags</code></td><td><code class="verbatim">t</code>: a column with the tags, inherited ones first</td><td><code class="verbatim">nil</code></td></tr> | ||
| 466 | <tr><td><code class="verbatim">:properties</code></td><td>A list of property names, such as <code class="verbatim">("Effort")</code>, one column each</td><td>none</td></tr> | ||
| 467 | <tr><td><code class="verbatim">:tcolumns</code></td><td>Number of time columns</td><td>up to <code class="verbatim">:maxlevel</code></td></tr> | ||
| 468 | <tr><td><code class="verbatim">:formula</code></td><td><code class="verbatim">%</code> adds a percentage column; a string becomes the table's <code class="verbatim">#+TBLFM</code></td><td>none</td></tr> | ||
| 469 | <tr><td><code class="verbatim">:match</code></td><td>A tag and property match, as for the agenda; only matching headings' own time counts</td><td>none</td></tr> | ||
| 470 | <tr><td><code class="verbatim">:step</code></td><td><code class="verbatim">day</code>, <code class="verbatim">week</code>, <code class="verbatim">semimonth</code>, <code class="verbatim">month</code>, <code class="verbatim">quarter</code> or <code class="verbatim">year</code>: a table per step of <code class="verbatim">:block</code> or <code class="verbatim">:tstart</code> to <code class="verbatim">:tend</code></td><td>none</td></tr> | ||
| 471 | <tr><td><code class="verbatim">:stepskip0</code></td><td><code class="verbatim">t</code>: leave out steps without time</td><td><code class="verbatim">nil</code></td></tr> | ||
| 472 | <tr><td><code class="verbatim">:fileskip0</code></td><td><code class="verbatim">t</code>: leave out files without time</td><td><code class="verbatim">nil</code></td></tr> | ||
| 473 | <tr><td><code class="verbatim">:hidefiles</code></td><td><code class="verbatim">t</code>: no File column over several files</td><td><code class="verbatim">nil</code></td></tr> | ||
| 474 | <tr><td><code class="verbatim">:filetitle</code></td><td><code class="verbatim">t</code>: name files by their <code class="verbatim">#+TITLE</code></td><td><code class="verbatim">nil</code></td></tr> | ||
| 475 | <tr><td><code class="verbatim">:header</code></td><td>Text written in place of the <code class="verbatim">#+CAPTION</code> line</td><td>none</td></tr> | ||
| 476 | </tbody> | ||
| 477 | </table> | ||
| 478 | <p><code class="verbatim">:scope tree</code> covers the top-level tree around the block; <code class="verbatim">tree2</code> the tree from its level-2 ancestor, and so on. <code class="verbatim">:block</code> takes precedence over <code class="verbatim">:tstart</code> and <code class="verbatim">:tend</code>. Clocks that cross the start or end of the range count only the part inside it.</p> | ||
| 479 | <p><code class="verbatim">:block</code> values:</p> | ||
| 480 | <table> | ||
| 481 | <thead> | ||
| 482 | <tr><th>Value</th><th>Range</th></tr> | ||
| 483 | </thead> | ||
| 484 | <tbody> | ||
| 485 | <tr><td><code class="verbatim">today</code>, <code class="verbatim">yesterday</code>, <code class="verbatim">today-N</code></td><td>One day</td></tr> | ||
| 486 | <tr><td><code class="verbatim">thisweek</code>, <code class="verbatim">lastweek</code>, <code class="verbatim">thisweek-N</code></td><td>One week, from <code class="verbatim">:wstart</code></td></tr> | ||
| 487 | <tr><td><code class="verbatim">thismonth</code>, <code class="verbatim">lastmonth</code>, <code class="verbatim">thismonth-N</code></td><td>One month, from <code class="verbatim">:mstart</code></td></tr> | ||
| 488 | <tr><td><code class="verbatim">thisyear</code>, <code class="verbatim">lastyear</code>, <code class="verbatim">thisyear-N</code></td><td>One year</td></tr> | ||
| 489 | <tr><td><code class="verbatim">2026</code>, <code class="verbatim">2026-10</code>, <code class="verbatim">2026-W41</code>, <code class="verbatim">2026-10-07</code></td><td>That year, month, ISO week or day</td></tr> | ||
| 490 | </tbody> | ||
| 491 | </table> | ||
| 492 | <p><code class="verbatim">week</code>, <code class="verbatim">month</code> and <code class="verbatim">year</code> are the same as <code class="verbatim">thisweek</code>, <code class="verbatim">thismonth</code> and <code class="verbatim">thisyear</code>, and a <code class="verbatim">+N</code> suffix moves forward.</p> | ||
| 493 | <p>A <code class="verbatim">#+TBLFM</code> line already under the table is kept when the table is updated, unless <code class="verbatim">:formula</code> gives one.</p> | ||
| 494 | <h3 id="other-files">Other files</h3> | ||
| 495 | <p><code class="verbatim">:scope agenda</code> sums the agenda files (see <a href="07-agenda.html">The agenda</a>), and <code class="verbatim">agenda-with-archives</code> adds each one's archive files: the one its <code class="verbatim">#+ARCHIVE:</code> or <code class="verbatim">org-archive-location</code> names, and those its <code class="verbatim">ARCHIVE</code> properties name, where they exist. <code class="verbatim">file-with-archives</code> is this file with its archives, summed as one file. A list names files, relative to this file's folder; a folder in the list gives its <code class="verbatim">.org</code> files, which Org doesn't do. Over several files the table gets a File column and a row with each file's total before its headings:</p> | ||
| 496 | <pre><code class="language-org highlight"><span class="text org"><span class="markup other table org">| File | Headline | Time | |</span> | ||
| 497 | <span class="markup other table org">|----------+------------------+--------+------|</span> | ||
| 498 | <span class="markup other table org">| | ALL *Total time* | *3:30* | |</span> | ||
| 499 | <span class="markup other table org">|----------+------------------+--------+------|</span> | ||
| 500 | <span class="markup other table org">| work.org | *File time* | *1:30* | |</span> | ||
| 501 | <span class="markup other table org">| | Project Alpha | 1:30 | |</span> | ||
| 502 | <span class="markup other table org">| | \_ Design | | 0:30 |</span></span></code></pre> | ||
| 503 | <p>Other files are read from disk, so unsaved edits in another open file don't count; this file's buffer does. With <code class="verbatim">:link t</code>, headlines link to <code class="verbatim">file:PATH::*Heading</code>.</p> | ||
| 504 | <h3 id="steps">Steps</h3> | ||
| 505 | <p><code class="verbatim">:step</code> writes a table for each day, week (from <code class="verbatim">:wstart</code>), half month, month (from <code class="verbatim">:mstart</code>), quarter or year of the range, each after a line such as <code class="verbatim">Daily report: [2026-10-05 Mon]</code> or <code class="verbatim">Weekly report starting on: [2026-10-05 Mon]</code>, without captions. It needs <code class="verbatim">:block</code>, or both <code class="verbatim">:tstart</code> and <code class="verbatim">:tend</code>.</p> | ||
| 506 | <p><code class="verbatim">:match</code> takes a match such as <code class="verbatim">"work"</code>, <code class="verbatim">"-home"</code> or <code>"TODO=\"DONE\""</code>. Headings that don't match add none of their own time, but the headings above a matching one are still listed with its time.</p> | ||
| 507 | <p>Not supported: <code class="verbatim">:formatter</code>, which is ignored along with other unknown parameters, and scopes given as functions. Labels are in English only.</p> | ||
| 508 | <h2 id="habits">Habits</h2> | ||
| 509 | <p>A habit is a repeating task whose history the agenda shows as a consistency graph (<code class="verbatim">org-habit</code>). Define one with the <code class="verbatim">STYLE</code> property and a <code class="verbatim">SCHEDULED</code> date with a repeater:</p> | ||
| 510 | <pre><code class="language-org highlight"><span class="text org"><span class="markup heading org"><span class="punctuation definition heading org">*</span> <span class="keyword other todo org">TODO</span> Go for a run | ||
| 511 | </span>SCHEDULED: <span class="constant other timestamp org"><2026-10-07 Wed .+2d/4d></span> | ||
| 512 | :PROPERTIES: | ||
| 513 | :STYLE: habit | ||
| 514 | :END: | ||
| 515 | :LOGBOOK: | ||
| 516 | <span class="punctuation definition list org">- </span>State "DONE" from "TODO" <span class="constant other timestamp org">[2026-10-05 Mon 07:30]</span> | ||
| 517 | <span class="punctuation definition list org">- </span>State "DONE" from "TODO" <span class="constant other timestamp org">[2026-10-03 Sat 07:10]</span> | ||
| 518 | :END:</span></code></pre> | ||
| 519 | <ul> | ||
| 520 | <li>The repeater sets the interval you aim for. Use <code class="verbatim">.+</code> for most habits, so the next date counts from when you last did it.</li> | ||
| 521 | <li>The optional <code class="verbatim">/4d</code> sets the longest acceptable interval. It must be longer than the repeater.</li> | ||
| 522 | <li>The repeater's unit must be <code class="verbatim">d</code>, <code class="verbatim">w</code>, <code class="verbatim">m</code> or <code class="verbatim">y</code>. A month counts as 30.4 days and a year as 365.25.</li> | ||
| 523 | <li>The history comes from the entry's state notes for done keywords and its <code class="verbatim">CLOSING NOTE</code> lines, up to 28 of them. Those are written when the task repeats, as long as <code class="verbatim">org-log-repeat</code> is on (the default), or when <code class="verbatim">org-log-done</code> is <code class="verbatim">note</code>.</li> | ||
| 524 | </ul> | ||
| 525 | <p>How habits appear in the agenda, with the graph covering 21 days back and 7 ahead, is described in <a href="07-agenda.html">The agenda</a>.</p> | ||
| 526 | <h2 id="reminders">Reminders</h2> | ||
| 527 | <p>orgstar can post a macOS notification before entries that have a time of day, as Emacs's <code class="verbatim">appt</code> does with <code class="verbatim">org-agenda-to-appt</code>.</p> | ||
| 528 | <ul> | ||
| 529 | <li>It covers the agenda's files and the next 7 days: scheduled items, deadlines, plain active timestamps and date ranges with a time, that are not done.</li> | ||
| 530 | <li>Each reminder comes the lead time before the entry's time: 12 minutes by default (<code class="verbatim">appt-message-warning-time</code>). An <code class="verbatim">APPT_WARNTIME</code> property on the entry, in minutes, overrides it.</li> | ||
| 531 | <li>If the warning time has already passed when orgstar sets a reminder but the entry has not started, the notification comes at once.</li> | ||
| 532 | <li>At most 64 reminders are pending at a time, the earliest first.</li> | ||
| 533 | <li>The notification shows the entry's text, its time, and its category. Clicking it opens the entry. Notifications also show while orgstar is the active app.</li> | ||
| 534 | </ul> | ||
| 535 | <p>orgstar updates the reminders a couple of seconds after you stop editing, when files change, and every hour. The agenda window shows how far ahead reminders are set. Reminders already set still arrive after you quit orgstar; changes to your files are taken into account the next time it runs.</p> | ||
| 536 | <p>Turn reminders on or off, and set the lead time from 0 to 120 minutes, in Settings ▸ Agenda; in <code class="verbatim">config.toml</code> the keys are <code class="verbatim">reminders</code> under <code class="verbatim">[orgstar]</code> (default <code class="verbatim">true</code>) and <code class="verbatim">appt-message-warning-time</code>. The first time, macOS asks whether orgstar may post notifications; if you decline, the agenda says so, and you can change it in System Settings ▸ Notifications. The iOS app's reminders are described in <a href="14-ios.html">iOS</a>.</p> | ||
| 537 | </main> | ||
| 538 | <footer class="site"> | ||
| 539 | © 2026 Christian Cleberg · <a href="https://krz.sh/apps/orgstar/">krz.sh/apps/orgstar</a> · <a href="/orgstar/third-party.html">third-party notices</a> | ||
| 540 | </footer> | ||
| 541 | </body> | ||
| 542 | </html>\ No newline at end of file | ||
guide/07-agenda.html added +725
| @@ -0,0 +1,725 @@ | |||
| 1 | <!DOCTYPE html> | ||
| 2 | <html lang="en"> | ||
| 3 | <head> | ||
| 4 | <meta charset="utf-8"> | ||
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
| 6 | <title>The agenda · orgstar</title> | ||
| 7 | <meta name="description" content="The agenda window, its rows, calendar events, the TODO list, tag and property matches, saved views, filters, reminders and the board."> | ||
| 8 | <link rel="icon" href="../favicon.svg" type="image/svg+xml"> | ||
| 9 | <link rel="stylesheet" href="../theme.css"> | ||
| 10 | <link rel="stylesheet" href="../syntax.css"> | ||
| 11 | <link rel="stylesheet" href="../style.css"> | ||
| 12 | </head> | ||
| 13 | <body> | ||
| 14 | <header class="site"> | ||
| 15 | <a class="site-title" href="../index.html">orgstar</a> | ||
| 16 | <nav> | ||
| 17 | <a href="../install.html">Install</a> | ||
| 18 | <a href="../quickstart.html">Quick start</a> | ||
| 19 | <a href="index.html">Manual</a> | ||
| 20 | </nav> | ||
| 21 | </header> | ||
| 22 | <main> | ||
| 23 | <h1>The agenda</h1> | ||
| 24 | <p class="lede">The agenda collects dated entries and TODO items from your agenda files into one list you can act on.</p> | ||
| 25 | <nav class="toc" aria-label="On this page"> | ||
| 26 | <h2>On this page</h2> | ||
| 27 | <ul> | ||
| 28 | <li><a href="#opening-the-agenda">Opening the agenda</a></li> | ||
| 29 | <li><a href="#agenda-files">Agenda files</a> | ||
| 30 | <ul> | ||
| 31 | <li><a href="#hiding-folders">Hiding folders</a></li> | ||
| 32 | </ul></li> | ||
| 33 | <li><a href="#the-day-week-and-month-view">The day, week and month view</a> | ||
| 34 | <ul> | ||
| 35 | <li><a href="#day-week-and-month">Day, week and month</a></li> | ||
| 36 | <li><a href="#moving-through-days">Moving through days</a></li> | ||
| 37 | <li><a href="#what-appears-on-each-day">What appears on each day</a></li> | ||
| 38 | <li><a href="#today-overdue-entries-and-empty-days">Today, overdue entries and empty days</a></li> | ||
| 39 | <li><a href="#sorting">Sorting</a></li> | ||
| 40 | <li><a href="#log-mode">Log mode</a></li> | ||
| 41 | </ul></li> | ||
| 42 | <li><a href="#rows">Rows</a></li> | ||
| 43 | <li><a href="#calendar-events">Calendar events</a> | ||
| 44 | <ul> | ||
| 45 | <li><a href="#editing-events-and-adding-entries">Editing events and adding entries</a></li> | ||
| 46 | </ul></li> | ||
| 47 | <li><a href="#reminders-from-the-reminders-app">Reminders from the Reminders app</a></li> | ||
| 48 | <li><a href="#done-keywords-the-agenda-doesn-t-know">Done keywords the agenda doesn't know</a></li> | ||
| 49 | <li><a href="#diary-sexps">Diary sexps</a></li> | ||
| 50 | <li><a href="#habits">Habits</a></li> | ||
| 51 | <li><a href="#the-todo-list">The TODO list</a></li> | ||
| 52 | <li><a href="#tag-and-property-matches">Tag and property matches</a> | ||
| 53 | <ul> | ||
| 54 | <li><a href="#tags">Tags</a></li> | ||
| 55 | <li><a href="#properties">Properties</a></li> | ||
| 56 | <li><a href="#keywords">keywords</a></li> | ||
| 57 | </ul></li> | ||
| 58 | <li><a href="#stuck-projects">Stuck projects</a></li> | ||
| 59 | <li><a href="#text-search">Text search</a></li> | ||
| 60 | <li><a href="#views">Views</a> | ||
| 61 | <ul> | ||
| 62 | <li><a href="#skipping-entries">Skipping entries</a></li> | ||
| 63 | <li><a href="#block-agendas">Block agendas</a></li> | ||
| 64 | </ul></li> | ||
| 65 | <li><a href="#filters">Filters</a></li> | ||
| 66 | <li><a href="#prefix-format-and-colors">Prefix format and colors</a></li> | ||
| 67 | <li><a href="#acting-on-entries">Acting on entries</a> | ||
| 68 | <ul> | ||
| 69 | <li><a href="#bulk-actions">Bulk actions</a></li> | ||
| 70 | </ul></li> | ||
| 71 | <li><a href="#reminders">Reminders</a></li> | ||
| 72 | <li><a href="#the-board">The board</a> | ||
| 73 | <ul> | ||
| 74 | <li><a href="#table">Table</a></li> | ||
| 75 | <li><a href="#kanban">Kanban</a></li> | ||
| 76 | <li><a href="#on-ios">On iOS</a></li> | ||
| 77 | </ul></li> | ||
| 78 | <li><a href="#desktop-widgets">Desktop widgets</a></li> | ||
| 79 | <li><a href="#the-agenda-on-ios">The agenda on iOS</a></li> | ||
| 80 | </ul> | ||
| 81 | </nav> | ||
| 82 | <h2 id="opening-the-agenda">Opening the agenda</h2> | ||
| 83 | <p>On the Mac the agenda is its own window. Open it with Window ▸ Agenda, or with the key for your preset:</p> | ||
| 84 | <table> | ||
| 85 | <thead> | ||
| 86 | <tr><th>Preset</th><th>Key</th></tr> | ||
| 87 | </thead> | ||
| 88 | <tbody> | ||
| 89 | <tr><td>Mac</td><td><code class="verbatim">⇧⌘A</code></td></tr> | ||
| 90 | <tr><td>Emacs</td><td><code class="verbatim">C-c a</code> or <code class="verbatim">⇧⌘A</code></td></tr> | ||
| 91 | <tr><td>Doom</td><td><code class="verbatim">SPC o a</code> (normal state), <code class="verbatim">C-c a</code> or <code class="verbatim">⇧⌘A</code></td></tr> | ||
| 92 | </tbody> | ||
| 93 | </table> | ||
| 94 | <p>With <code class="verbatim">org-use-speed-commands</code> on, <code class="verbatim">v</code> at the start of a heading line opens it too (see <a href="03-keys.html">Keys</a>).</p> | ||
| 95 | <p>The key opens the window directly. There is no <code class="verbatim">org-agenda</code> dispatcher; you choose what the window shows from the view menu at the left of its toolbar (see <a href="#views">Views</a>).</p> | ||
| 96 | <p>Opening a timestamp with <code class="verbatim">org-open-at-point</code> (<code class="verbatim">C-c C-o</code> in the Emacs preset) opens the agenda on that timestamp's day, or on every day of a date range.</p> | ||
| 97 | <p>On iOS the agenda is the first tab. See <a href="#the-agenda-on-ios">The agenda on iOS</a>.</p> | ||
| 98 | <h2 id="agenda-files">Agenda files</h2> | ||
| 99 | <p>By default the agenda reads every <code class="verbatim">.org</code> file at the top level of each folder you have added (see <a href="01-files-and-folders.html">Files and folders</a>). Files whose names start with a dot are left out, as <code class="verbatim">org-agenda-file-regexp</code> leaves them out.</p> | ||
| 100 | <p>To include files in subfolders as well, turn on Settings ▸ Agenda ▸ Include files in subfolders, or set this in <code class="verbatim">config.toml</code>:</p> | ||
| 101 | <pre><code class="language-toml highlight"><span class="source toml"><span class="punctuation definition table toml">[</span><span class="entity name section toml">orgstar</span><span class="punctuation definition table toml">]</span> | ||
| 102 | <span class="variable other key toml">agenda-include-subfolders</span> <span class="keyword operator assignment toml">=</span> <span class="constant language toml">true</span></span></code></pre> | ||
| 103 | <p>To leave out archive files, the files your agenda files archive to by their <code class="verbatim">#+ARCHIVE:</code> keyword, an <code class="verbatim">:ARCHIVE:</code> property or <code class="verbatim">org-archive-location</code>, turn on Settings ▸ Agenda ▸ Exclude archived tasks on iOS, or set this in <code class="verbatim">config.toml</code>:</p> | ||
| 104 | <pre><code class="language-toml highlight"><span class="source toml"><span class="punctuation definition table toml">[</span><span class="entity name section toml">orgstar</span><span class="punctuation definition table toml">]</span> | ||
| 105 | <span class="variable other key toml">agenda-exclude-archives</span> <span class="keyword operator assignment toml">=</span> <span class="constant language toml">true</span></span></code></pre> | ||
| 106 | <p>To read a list of files instead, as <code class="verbatim">org-agenda-files</code> does, set <code class="verbatim">org-agenda-files</code> in <code class="verbatim">config.toml</code>, entries separated by <code class="verbatim">\n</code>:</p> | ||
| 107 | <pre><code class="language-toml highlight"><span class="source toml"><span class="variable other key toml">org-agenda-files</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>~/notes/<span class="constant character escape toml">\n</span>~/work/plan.org<span class="constant character escape toml">\n</span>~/.agenda_files<span class="punctuation definition string end toml">"</span></span></span></code></pre> | ||
| 108 | <p>Each entry is one of:</p> | ||
| 109 | <ul> | ||
| 110 | <li>a folder: its <code class="verbatim">.org</code> files whose names don't start with a dot, in name order, without subfolders;</li> | ||
| 111 | <li>an <code class="verbatim">.org</code> file;</li> | ||
| 112 | <li>another file: a list of entries, one per line, as Emacs reads the file named when <code class="verbatim">org-agenda-files</code> is a string. Files named in it are agenda files whatever their extension.</li> | ||
| 113 | </ul> | ||
| 114 | <p>Relative paths count from the first folder in the sidebar, standing in for <code class="verbatim">org-directory</code>. Entries that don't exist are left out. The agenda follows the order of the list. With a list, Include files in subfolders has no effect. The agenda refreshes on its own only for changes inside your folders; on iOS, files outside them can't be read.</p> | ||
| 115 | <p>When a file is open in the editor, the agenda reads the buffer, so unsaved edits show. Other files are read from disk and cached until their modification date or size changes. A file that uses <code class="verbatim">#+SETUPFILE</code> is read again on every refresh, because its setup file may have changed.</p> | ||
| 116 | <p>Within a file, the agenda skips:</p> | ||
| 117 | <ul> | ||
| 118 | <li>trees tagged <code class="verbatim">ARCHIVE</code>, and every entry in a file whose <code class="verbatim">#+FILETAGS</code> include <code class="verbatim">ARCHIVE</code>;</li> | ||
| 119 | <li>commented trees (a heading whose title starts with <code class="verbatim">COMMENT</code>);</li> | ||
| 120 | <li>everything below a skipped heading.</li> | ||
| 121 | </ul> | ||
| 122 | <p>An entry's category is the nearest <code class="verbatim">CATEGORY</code> property on it or an ancestor, else the file's <code class="verbatim">#+CATEGORY</code>, else the file name without <code class="verbatim">.org</code>.</p> | ||
| 123 | <p>If no agenda file exists, the window says so.</p> | ||
| 124 | <h3 id="hiding-folders">Hiding folders</h3> | ||
| 125 | <p>With more than one folder, the Folders menu in the agenda's toolbar shows or hides each folder's files; All Folders shows them all again. While some are hidden, the shown folders' names appear under the title. The choice is kept on each device, and it applies to the agenda, the widgets, the Apple Watch and the iOS icon's badge. Reminders still fire for hidden folders.</p> | ||
| 126 | <p>To hide folders with a Focus, add orgstar's Hide Folders filter to the Focus in System Settings ▸ Focus (Settings ▸ Focus on iOS) and choose the folders. While the Focus is on, those folders are hidden as well as the ones you hid from the menu, where they show dimmed, and their reminders are muted. When the Focus ends they show again.</p> | ||
| 127 | <h2 id="the-day-week-and-month-view">The day, week and month view</h2> | ||
| 128 | <p>The default view is <code class="verbatim">org-agenda-list</code>: a run of days, each under a header with its date, such as <code class="verbatim">Monday 5 October</code> (with the year when it isn't the current year). Today, tomorrow and yesterday are named before the date: <code class="verbatim">Today · Thursday 8 October</code>. Today's header is in the <code class="verbatim">agenda-today</code> color and days before today are grey. Each header stays at the top of the window while you scroll through its day.</p> | ||
| 129 | <table> | ||
| 130 | <thead> | ||
| 131 | <tr><th>Setting</th><th>Default</th><th><code class="verbatim">config.toml</code></th><th>Range in Settings</th></tr> | ||
| 132 | </thead> | ||
| 133 | <tbody> | ||
| 134 | <tr><td>Days shown</td><td>10</td><td><code class="verbatim">org-agenda-span = 10</code></td><td>1 to 366</td></tr> | ||
| 135 | <tr><td>First day, relative to today</td><td>today</td><td><code class="verbatim">org-agenda-start-day = "+0d"</code></td><td>0 to 14 days before</td></tr> | ||
| 136 | </tbody> | ||
| 137 | </table> | ||
| 138 | <p>Both mirror the Emacs variables of the same name. The span's default is Doom's (plain Emacs shows a week); the agenda starts today, as in plain Emacs. Doom starts it 3 days back, with <code class="verbatim">"-3d"</code>. <code class="verbatim">org-agenda-start-day</code> takes only day offsets such as <code class="verbatim">"-3d"</code> or <code class="verbatim">"+0d"</code>.</p> | ||
| 139 | <h3 id="day-week-and-month">Day, week and month</h3> | ||
| 140 | <p>The Day, Week and Month control in the toolbar, or <code class="verbatim">v d</code>, <code class="verbatim">v w</code> and <code class="verbatim">v m</code>, shows one day, one week or one calendar month, as <code class="verbatim">org-agenda-day-view</code>, <code class="verbatim">org-agenda-week-view</code> and <code class="verbatim">org-agenda-month-view</code> do. <code class="verbatim">d</code> and <code class="verbatim">w</code> also show a day and a week. The view is the one around the selected line's day, else around today when today is shown, else around the first day shown. Weeks start on <code class="verbatim">org-agenda-start-on-weekday</code> in <code class="verbatim">config.toml</code>: Monday (<code class="verbatim">"1"</code>) by default, <code class="verbatim">"0"</code> for Sunday, or <code class="verbatim">"nil"</code> to start on the day the view starts from. As in Org, a configured span of 7 or 14 days starts on that weekday too.</p> | ||
| 141 | <p>To return to the configured span, choose Agenda from the view menu.</p> | ||
| 142 | <p>The window's title names the days shown: <code class="verbatim">Thursday 8 October 2026</code> for a day, <code class="verbatim">Week of 5 Oct 2026</code>, <code class="verbatim">October 2026</code>, or the first and last day for the configured span, <code class="verbatim">5 Oct – 14 Oct 2026</code>.</p> | ||
| 143 | <h3 id="moving-through-days">Moving through days</h3> | ||
| 144 | <table> | ||
| 145 | <thead> | ||
| 146 | <tr><th>Key</th><th>Toolbar</th><th>Does</th><th>Org command</th></tr> | ||
| 147 | </thead> | ||
| 148 | <tbody> | ||
| 149 | <tr><td><code class="verbatim">f</code></td><td>Later (›)</td><td>Moves forward by the days shown; in the month view, to the next month</td><td><code class="verbatim">org-agenda-later</code></td></tr> | ||
| 150 | <tr><td><code class="verbatim">b</code></td><td>Earlier (‹)</td><td>Moves back by the days shown; in the month view, to the month before</td><td><code class="verbatim">org-agenda-earlier</code></td></tr> | ||
| 151 | <tr><td><code class="verbatim">.</code></td><td>Today</td><td>Returns to the days around today, keeping a day, week or month view</td><td><code class="verbatim">org-agenda-goto-today</code></td></tr> | ||
| 152 | <tr><td><code class="verbatim">j</code></td><td>Go to Date (calendar)</td><td>Picks a date in a calendar and shows the days from it, or its day, week or month</td><td><code class="verbatim">org-agenda-goto-date</code></td></tr> | ||
| 153 | <tr><td><code class="verbatim">g</code>, <code class="verbatim">r</code></td><td></td><td>Refreshes, and reloads <code class="verbatim">views.toml</code></td><td><code class="verbatim">org-agenda-redo</code></td></tr> | ||
| 154 | </tbody> | ||
| 155 | </table> | ||
| 156 | <p>The agenda also refreshes on its own when files change and when you edit an open buffer. The now line (see below) moves each minute, and at midnight the agenda refreshes so that Today, the overdue entries and the statuses move to the new day.</p> | ||
| 157 | <h3 id="what-appears-on-each-day">What appears on each day</h3> | ||
| 158 | <p>The entries follow <code class="verbatim">org-agenda-get-day-entries</code> with Org's default entry types. The left column of each row shows the time, or for an untimed entry a short status:</p> | ||
| 159 | <table> | ||
| 160 | <thead> | ||
| 161 | <tr><th>Entry</th><th>Where it appears</th><th>Left column</th></tr> | ||
| 162 | </thead> | ||
| 163 | <tbody> | ||
| 164 | <tr><td><code class="verbatim">DEADLINE</code> on that day</td><td>On its day</td><td><code class="verbatim">Due today</code> on today, <code class="verbatim">Due</code> on other days</td></tr> | ||
| 165 | <tr><td><code class="verbatim">DEADLINE</code> in the future</td><td>On today, from the warning period before it</td><td><code class="verbatim">Due in 3d</code></td></tr> | ||
| 166 | <tr><td><code class="verbatim">DEADLINE</code> in the past, not done</td><td>On today, in the Overdue group</td><td><code class="verbatim">2d late</code></td></tr> | ||
| 167 | <tr><td><code class="verbatim">SCHEDULED</code> on that day</td><td>On its day</td><td><code class="verbatim">Scheduled</code></td></tr> | ||
| 168 | <tr><td><code class="verbatim">SCHEDULED</code> in the past, not done</td><td>On today, in the Overdue group</td><td><code class="verbatim">3d ago</code></td></tr> | ||
| 169 | <tr><td>Active timestamp <code class="verbatim"><2026-10-05 Mon></code></td><td>On its day; also in property drawers</td><td><code class="verbatim">All day</code></td></tr> | ||
| 170 | <tr><td>Repeating timestamp <code class="verbatim"><… +1w></code></td><td>On each occurrence within the span</td><td><code class="verbatim">All day</code></td></tr> | ||
| 171 | <tr><td>Date range <code class="verbatim"><…>--<…></code></td><td>On every day of the range</td><td><code class="verbatim">Day 2/5</code> (day 2 of 5)</td></tr> | ||
| 172 | <tr><td>Diary sexp <code class="verbatim">%%(…)</code> line or <code class="verbatim"><%%(…)></code></td><td>On each day the sexp applies; see <a href="#diary-sexps">Diary sexps</a></td><td><code class="verbatim">All day</code></td></tr> | ||
| 173 | <tr><td>Habit (<code class="verbatim">STYLE: habit</code>)</td><td>On today only, while not done, unless habits only today is off; see <a href="#habits">Habits</a>; in the Overdue group when scheduled on an earlier day</td><td><code class="verbatim">Habit</code>, or <code class="verbatim">2d ago</code> when overdue, with a consistency graph</td></tr> | ||
| 174 | </tbody> | ||
| 175 | </table> | ||
| 176 | <p>An entry with a time of day shows the time instead of the status: <code class="verbatim">08:00</code>, or <code class="verbatim">13:50–14:30</code> with an end time.</p> | ||
| 177 | <p>Details:</p> | ||
| 178 | <ul> | ||
| 179 | <li>Deadline warnings start <code class="verbatim">org-deadline-warning-days</code> days ahead, 14 by default, set in <code class="verbatim">config.toml</code>. A <code class="verbatim">-Nd</code> cookie in the timestamp (<code class="verbatim"><2026-10-20 Tue -3d></code>) changes the warning for that deadline; <code class="verbatim">w</code>, <code class="verbatim">m</code> and <code class="verbatim">y</code> units work too.</li> | ||
| 180 | <li>A <code class="verbatim">-Nd</code> cookie on a <code class="verbatim">SCHEDULED</code> timestamp delays it: the entry first shows N days after the scheduled date.</li> | ||
| 181 | <li>Repeaters on <code class="verbatim">SCHEDULED</code> and <code class="verbatim">DEADLINE</code> timestamps (<code class="verbatim">+1w</code>, <code class="verbatim">++1w</code>, <code class="verbatim">.+1d</code>) make the entry show on the next occurrence on future days, as in Org.</li> | ||
| 182 | <li>A done entry shows only on the day of its deadline or scheduled date, not as overdue. With <code class="verbatim">org-agenda-skip-scheduled-if-done</code> or <code class="verbatim">org-agenda-skip-deadline-if-done</code> set to <code class="verbatim">true</code> in <code class="verbatim">config.toml</code>, a done entry's scheduled date or deadline doesn't show on that day either. Both are <code class="verbatim">false</code> by default, as in Org.</li> | ||
| 183 | <li>Inactive timestamps (<code class="verbatim">[…]</code>) never appear, except in log mode.</li> | ||
| 184 | <li>Ranges in comment lines and inside source blocks are ignored, as in Org.</li> | ||
| 185 | </ul> | ||
| 186 | <p>A time can come from the timestamp (<code class="verbatim"><2026-10-05 Mon 14:00-15:30></code>) or from the heading text (<code class="verbatim">Call Ada 9:30am</code>), as <code class="verbatim">org-agenda-search-headline-for-time</code> allows. Times past 24:00, such as <code class="verbatim">25:30</code>, show as the time on the next day, <code class="verbatim">01:30</code>.</p> | ||
| 187 | <h3 id="today-overdue-entries-and-empty-days">Today, overdue entries and empty days</h3> | ||
| 188 | <p>Days without entries are left out. Today always shows, with <code class="verbatim">Nothing scheduled</code> when it has no entries. To show every day of the span, as Org does by default, turn on Settings ▸ Agenda ▸ Show days without entries (on iOS, Settings ▸ Agenda), or set this in <code class="verbatim">config.toml</code>:</p> | ||
| 189 | <pre><code class="language-toml highlight"><span class="source toml"><span class="variable other key toml">org-agenda-show-all-dates</span> <span class="keyword operator assignment toml">=</span> <span class="constant language toml">true</span></span></code></pre> | ||
| 190 | <p>Today's past deadlines and entries and habits scheduled on earlier days go in a group headed <code class="verbatim">Overdue</code> with their count, above today's other entries; on iOS it is a section of its own above today. Their left column shows how late they are, not the time of day they had. The oldest date comes first; entries with the same date keep Org's order. Click or tap the header to collapse or expand the group; it stays as you left it.</p> | ||
| 191 | <p>Days with a time grid show dotted lines at the grid's times among the timed entries, as <code class="verbatim">org-agenda-time-grid</code> does: by default at 8:00, 10:00 and every two hours to 20:00, on today and in one-day views, when the day has a timed entry. An entry at a grid line's time comes before the line. On today, a line marked with the current time sits among them: before the first entry that starts later, or after the last one when all have started. The grid's days and times are set in <code class="verbatim">[org-agenda-time-grid]</code> in <code class="verbatim">config.toml</code>, <code class="verbatim">org-agenda-use-time-grid</code> turns the grid off, and <code class="verbatim">org-agenda-show-current-time-in-grid</code> the now line (see <a href="13-configuration.html">Configuration</a>). With the grid off there is no now line, as in Org.</p> | ||
| 192 | <h3 id="sorting">Sorting</h3> | ||
| 193 | <p>Lines are sorted by <code class="verbatim">org-agenda-sorting-strategy</code>, set per kind of view in the <code class="verbatim">[org-agenda-sorting-strategy]</code> table of <code class="verbatim">config.toml</code> (see <a href="13-configuration.html">Configuration</a>) or for one view in <code class="verbatim">views.toml</code>. The defaults are <code class="verbatim">time-up habit-down urgency-down category-keep</code> for days, <code class="verbatim">urgency-down category-keep</code> for the TODO list and matches, and <code class="verbatim">category-keep</code> for text search. With those, timed entries come first, earliest first, timed habits among them; then untimed entries, habits last, by urgency, which combines priority with how overdue an entry is; ties keep file order. Calendar events go among them as described in <a href="#calendar-events">Calendar events</a>.</p> | ||
| 194 | <p>Each key compares two lines, and the next key is tried when they tie:</p> | ||
| 195 | <table> | ||
| 196 | <thead> | ||
| 197 | <tr><th>Key</th><th>Sorts by</th></tr> | ||
| 198 | </thead> | ||
| 199 | <tbody> | ||
| 200 | <tr><td><code class="verbatim">time-up</code>, <code class="verbatim">time-down</code></td><td>Time of day; lines without one go last (<code class="verbatim">org-agenda-sort-notime-is-late</code>)</td></tr> | ||
| 201 | <tr><td><code class="verbatim">timestamp-up</code>, <code class="verbatim">timestamp-down</code></td><td>The date of the line's timestamp, of any kind</td></tr> | ||
| 202 | <tr><td><code class="verbatim">scheduled-up</code>, <code class="verbatim">deadline-up</code>, <code class="verbatim">ts-up</code>, <code class="verbatim">tsia-up</code> and their <code class="verbatim">-down</code> forms</td><td>The date of a <code class="verbatim">SCHEDULED</code>, <code class="verbatim">DEADLINE</code>, active or inactive timestamp only</td></tr> | ||
| 203 | <tr><td><code class="verbatim">priority-up</code>, <code class="verbatim">priority-down</code></td><td>Priority</td></tr> | ||
| 204 | <tr><td><code class="verbatim">urgency-up</code>, <code class="verbatim">urgency-down</code></td><td>Urgency: priority adjusted for how close or overdue the date is</td></tr> | ||
| 205 | <tr><td><code class="verbatim">effort-up</code>, <code class="verbatim">effort-down</code></td><td><code class="verbatim">Effort</code>; entries without one count as longest (<code class="verbatim">org-agenda-sort-noeffort-is-high</code>)</td></tr> | ||
| 206 | <tr><td><code class="verbatim">category-up</code>, <code class="verbatim">category-down</code></td><td>Category name</td></tr> | ||
| 207 | <tr><td><code class="verbatim">category-keep</code></td><td>Stops comparing lines of different categories, so they keep their order</td></tr> | ||
| 208 | <tr><td><code class="verbatim">tag-up</code>, <code class="verbatim">tag-down</code></td><td>The last tag</td></tr> | ||
| 209 | <tr><td><code class="verbatim">todo-state-up</code>, <code class="verbatim">todo-state-down</code></td><td>Done keywords first, then keywords in the order your sequences list them</td></tr> | ||
| 210 | <tr><td><code class="verbatim">habit-up</code>, <code class="verbatim">habit-down</code></td><td>Habits first or last</td></tr> | ||
| 211 | <tr><td><code class="verbatim">alpha-up</code>, <code class="verbatim">alpha-down</code></td><td>The title, ignoring case and the TODO keyword</td></tr> | ||
| 212 | </tbody> | ||
| 213 | </table> | ||
| 214 | <p>In the TODO list and matches, the date keys use the first one in the strategy: with <code class="verbatim">scheduled-up</code> every line sorts by its <code class="verbatim">SCHEDULED</code> date, as in Org. Org's <code class="verbatim">user-defined-up</code> and <code class="verbatim">user-defined-down</code> are not supported.</p> | ||
| 215 | <h3 id="log-mode">Log mode</h3> | ||
| 216 | <p>Press <code class="verbatim">l</code> to turn log mode (<code class="verbatim">org-agenda-log-mode</code>) on or off; on iOS, use Log Mode in the span menu. Each day then also shows:</p> | ||
| 217 | <ul> | ||
| 218 | <li><code class="verbatim">Closed</code> entries whose <code class="verbatim">CLOSED:</code> timestamp is on that day;</li> | ||
| 219 | <li><code class="verbatim">Clocked</code> entries for each <code class="verbatim">CLOCK:</code> line that starts on that day, with the clock's start and end times in the left column and the time clocked, such as <code class="verbatim">1:30</code>, after the title;</li> | ||
| 220 | <li>with <code class="verbatim">state</code> in <code class="verbatim">org-agenda-log-mode-items</code>, <code class="verbatim">State:</code> entries for each state change logged that day (a <code class="verbatim">- State "DONE" from "TODO" [2026-10-05 Mon 16:20]</code> line), with the new state in parentheses and the note's first line after the title.</li> | ||
| 221 | </ul> | ||
| 222 | <p>A note under a clock line (a list item directly below it) is added to the title after a <code class="verbatim">-</code>. <code class="verbatim">org-agenda-log-mode-items</code> in <code class="verbatim">config.toml</code> picks the kinds, separated by spaces; the default is Org's, <code class="verbatim">"closed clock"</code>.</p> | ||
| 223 | <h2 id="rows">Rows</h2> | ||
| 224 | <p>Each row shows, from left to right:</p> | ||
| 225 | <ul> | ||
| 226 | <li>The time or status described above, with an icon below it on the Mac and before it on iOS: a calendar for scheduled entries, a flag for deadlines, arrows in a circle for habits, a clock or a calendar for timestamps, and a dot or a calendar for calendar events. An overdue entry shows a warning sign instead, and on the Mac a done entry shows a check mark.</li> | ||
| 227 | <li>The category, with a colored dot, above the title. For a calendar event this is the calendar's name.</li> | ||
| 228 | <li>The title: the heading without its TODO keyword, priority cookie, statistics cookies, timestamps and tags, with links shown as their descriptions. A done entry's title is struck through.</li> | ||
| 229 | <li>The value of the first statistics cookie (<code class="verbatim">1/3</code>, <code class="verbatim">50%</code>) and the tags, inherited tags first, as small capsules. iOS shows at most three tags.</li> | ||
| 230 | <li>The habit's consistency graph, for habits.</li> | ||
| 231 | <li>The TODO keyword as a colored badge, and the priority as a colored letter in a circle.</li> | ||
| 232 | </ul> | ||
| 233 | <p>The status sets the color of the left column:</p> | ||
| 234 | <table> | ||
| 235 | <thead> | ||
| 236 | <tr><th>Status</th><th>When</th><th>Theme key</th></tr> | ||
| 237 | </thead> | ||
| 238 | <tbody> | ||
| 239 | <tr><td>Overdue</td><td>Not done, with a deadline or scheduled date before today</td><td><code class="verbatim">agenda-overdue</code></td></tr> | ||
| 240 | <tr><td>Due soon</td><td>Not done, a deadline listed on today: due today or within its warning</td><td><code class="verbatim">agenda-due-soon</code></td></tr> | ||
| 241 | <tr><td>Done</td><td>A done keyword</td><td><code class="verbatim">done</code></td></tr> | ||
| 242 | <tr><td>Normal</td><td>Everything else</td><td><code class="verbatim">agenda-time</code></td></tr> | ||
| 243 | </tbody> | ||
| 244 | </table> | ||
| 245 | <p>Ages and distances are written compactly: days up to 13 (<code class="verbatim">3d</code>), then whole weeks up to 59 days (<code class="verbatim">2w</code>), then months of 30 days up to a year (<code class="verbatim">4mo</code>), then years with any remaining months (<code class="verbatim">1y</code>, <code class="verbatim">1y 4mo</code>). They round down.</p> | ||
| 246 | <p>The keyword's color comes from <code class="verbatim">[theme.todo]</code>, else from its class: <code class="verbatim">todo-next</code> for keywords of work under way such as <code class="verbatim">NEXT</code> and <code class="verbatim">STRT</code>, <code class="verbatim">todo-waiting</code> for <code class="verbatim">WAIT</code>, <code class="verbatim">HOLD</code> and similar, <code class="verbatim">todo-cancelled</code> for done keywords such as <code class="verbatim">KILL</code> and <code class="verbatim">CANCELLED</code>, and otherwise <code class="verbatim">todo</code> or <code class="verbatim">done</code>. Priorities <code class="verbatim">A</code>, <code class="verbatim">B</code> and <code class="verbatim">C</code> use <code class="verbatim">priority-a</code>, <code class="verbatim">priority-b</code> and <code class="verbatim">priority-c</code>; others use <code class="verbatim">priority</code>. A category's dot takes its color from <code class="verbatim">[theme.category]</code>, else a hue worked out from the category's name, the same on every device. See <a href="13-configuration.html">Configuration</a> for the keyword lists and the theme keys.</p> | ||
| 247 | <p>With <code class="verbatim">org-enforce-todo-dependencies</code> or <code class="verbatim">org-enforce-todo-checkbox-dependencies</code> on, an entry that can't be marked done yet is dimmed in every view (<code class="verbatim">org-agenda-dim-blocked-tasks</code> <code class="verbatim">t</code>). Settings ▸ Agenda ▸ Blocked entries (on iOS, Settings ▸ Agenda) can hide such entries instead (<code class="verbatim">invisible</code>), though one held back only by its own checkboxes stays dimmed, or show them as usual (<code class="verbatim">nil</code>). Marking a blocked entry done from the agenda is refused with the same message as in the editor; see <a href="05-todos-and-tags.html">TODOs and tags</a>.</p> | ||
| 248 | <h2 id="calendar-events">Calendar events</h2> | ||
| 249 | <p>The agenda can show events from the system Calendar app (EventKit) among your entries. orgstar changes your calendars only when you edit an event or add an entry, as below. It is off by default. To turn it on:</p> | ||
| 250 | <ul> | ||
| 251 | <li>On the Mac, turn on Settings ▸ Agenda ▸ Show events from Calendar, and check the calendars to show.</li> | ||
| 252 | <li>On iOS, turn on Settings ▸ Calendar ▸ Show Calendar Events, and tap the calendars to show.</li> | ||
| 253 | <li>Or set the keys in <code class="verbatim">config.toml</code>:</li> | ||
| 254 | </ul> | ||
| 255 | <pre><code class="language-toml highlight"><span class="source toml"><span class="punctuation definition table toml">[</span><span class="entity name section toml">orgstar</span><span class="punctuation definition table toml">]</span> | ||
| 256 | <span class="variable other key toml">calendar-events</span> <span class="keyword operator assignment toml">=</span> <span class="constant language toml">true</span> | ||
| 257 | <span class="variable other key toml">calendar-event-calendars</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>Work, Family<span class="punctuation definition string end toml">"</span></span></span></code></pre> | ||
| 258 | <p><code class="verbatim">calendar-event-calendars</code> names calendars by title or identifier, separated by commas; <code class="verbatim">""</code> (the default) shows every calendar, including calendars added later. While every calendar is checked in Settings, the key stays empty.</p> | ||
| 259 | <p>The first time events are turned on, orgstar asks for access to your calendars. The system asks for full access, because Calendar has no read-only level of access. If you declined, allow it in System Settings ▸ Privacy & Security ▸ Calendars on the Mac, or in the Settings app on iOS.</p> | ||
| 260 | <p>Events appear only in the day, week and month view:</p> | ||
| 261 | <ul> | ||
| 262 | <li>All-day events come first on their day, as calendars show them.</li> | ||
| 263 | <li>Timed events go among the timed entries by start time, after entries with the same start and before untimed entries and habits.</li> | ||
| 264 | <li>An event over several days shows its start time on its first day, <code class="verbatim">Until 02:00</code> on its last day, and <code class="verbatim">All day</code> on the days between.</li> | ||
| 265 | <li>The dot and the icon take the calendar's color, or <code class="verbatim">agenda-event</code> when the calendar has none.</li> | ||
| 266 | <li>Filters don't hide events.</li> | ||
| 267 | </ul> | ||
| 268 | <p>On the Mac, double-click an event, or select it and press <code class="verbatim">RET</code>, to open it in Calendar; its context menu has Show in Calendar. Entry commands such as <code class="verbatim">t</code> don't apply to events.</p> | ||
| 269 | <h3 id="editing-events-and-adding-entries">Editing events and adding entries</h3> | ||
| 270 | <dl> | ||
| 271 | <dt>Edit Event…</dt> | ||
| 272 | <dd>in an event's context menu on the Mac, or by tapping the event on iOS (touch and hold for Edit Event… and Show in Calendar). The sheet changes the title, All day, the start and end, the location and the calendar. For a repeating event, the change applies to that occurrence only.</dd> | ||
| 273 | <dt>Add to Calendar…</dt> | ||
| 274 | <dd>in an entry's context menu on the Mac and iOS. The sheet starts with the entry's title and its time on the day it shows: an entry at <code class="verbatim">10:00-11:30</code> becomes an event from 10:00 to 11:30, one at <code class="verbatim">10:00</code> an hour-long event, and one without a time an all-day event. The calendar starts as Calendar's default calendar for new events; only calendars that can be changed are offered. The entry itself doesn't change.</dd> | ||
| 275 | </dl> | ||
| 276 | <p>Both use the access granted for showing events. Read-only calendars, such as subscriptions and holidays, can't be chosen.</p> | ||
| 277 | <h2 id="reminders-from-the-reminders-app">Reminders from the Reminders app</h2> | ||
| 278 | <p>The agenda can also show reminders from the Reminders app (EventKit), read-only. It is off by default. To turn it on:</p> | ||
| 279 | <ul> | ||
| 280 | <li>On the Mac, turn on Settings ▸ Agenda ▸ Show reminders from Reminders, and check the lists to show.</li> | ||
| 281 | <li>On iOS, turn on Settings ▸ Reminders ▸ Show Reminders, and tap the lists to show.</li> | ||
| 282 | <li>Or set the keys in <code class="verbatim">config.toml</code>:</li> | ||
| 283 | </ul> | ||
| 284 | <pre><code class="language-toml highlight"><span class="source toml"><span class="punctuation definition table toml">[</span><span class="entity name section toml">orgstar</span><span class="punctuation definition table toml">]</span> | ||
| 285 | <span class="variable other key toml">agenda-reminders</span> <span class="keyword operator assignment toml">=</span> <span class="constant language toml">true</span> | ||
| 286 | <span class="variable other key toml">agenda-reminder-lists</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>Errands, Work<span class="punctuation definition string end toml">"</span></span></span></code></pre> | ||
| 287 | <p><code class="verbatim">agenda-reminder-lists</code> names lists by title or identifier, separated by commas; <code class="verbatim">""</code> (the default) shows every list. The first time reminders are turned on, orgstar asks for full access to your reminders; if you declined, allow it in System Settings ▸ Privacy & Security ▸ Reminders on the Mac, or in the Settings app on iOS.</p> | ||
| 288 | <p>Only incomplete reminders with a due date show, in the day, week and month view:</p> | ||
| 289 | <ul> | ||
| 290 | <li>A reminder with a due time shows at that time among the timed entries, as a timed event does. One with only a due date shows <code class="verbatim">Reminder</code> with the all-day events.</li> | ||
| 291 | <li>A reminder due before today shows in today's Overdue group as <code class="verbatim">2d late</code>, among the overdue entries by date.</li> | ||
| 292 | <li>The row's category is the list's name, and the dot takes the list's color.</li> | ||
| 293 | </ul> | ||
| 294 | <p>Completing or editing a reminder is done in Reminders. On the Mac, double-click a reminder, or press <code class="verbatim">RET</code>, to open it in Reminders; its context menu has Show in Reminders. On iOS, tap it.</p> | ||
| 295 | <h2 id="done-keywords-the-agenda-doesn-t-know">Done keywords the agenda doesn't know</h2> | ||
| 296 | <p>A keyword that isn't in <code class="verbatim">org-todo-keywords</code> or the file's <code class="verbatim">#+TODO</code> lines is not a keyword to orgstar, as to Org: it is part of the title. A heading such as <code class="verbatim">SKIPPED Call the bank</code> with a <code class="verbatim">SCHEDULED</code> date last week is therefore an open entry, and shows as overdue. To make such a word a done state, add it after the <code>|</code>:</p> | ||
| 297 | <pre><code class="language-toml highlight"><span class="source toml"><span class="variable other key toml">org-todo-keywords</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>TODO | DONE SKIPPED<span class="punctuation definition string end toml">"</span></span></span></code></pre> | ||
| 298 | <p>Done entries leave the Overdue group. With <code class="verbatim">org-agenda-skip-scheduled-if-done</code> and <code class="verbatim">org-agenda-skip-deadline-if-done</code> on, they leave their own day too.</p> | ||
| 299 | <h2 id="diary-sexps">Diary sexps</h2> | ||
| 300 | <p>The agenda evaluates diary sexps as <code class="verbatim">org-diary-sexp-entry</code> does. They can appear as a line starting with <code class="verbatim">%%(</code> under a heading, as an active timestamp <code class="verbatim"><%%(…)></code>, or as a <code class="verbatim">SCHEDULED</code> or <code class="verbatim">DEADLINE</code> value.</p> | ||
| 301 | <pre><code class="language-org highlight"><span class="text org"><span class="markup heading org"><span class="punctuation definition heading org">*</span> Birthdays | ||
| 302 | </span>%%(diary-anniversary 10 7 1990) Ada is %d years old | ||
| 303 | %%(org-anniversary 1985 3 14) Bob turns %d | ||
| 304 | |||
| 305 | <span class="markup heading org"><span class="punctuation definition heading org">*</span> Teaching | ||
| 306 | </span><span class="markup heading org"><span class="punctuation definition heading org">**</span> Algebra lecture | ||
| 307 | </span><%%(org-class 2026 9 7 2026 12 18 1 41)></span></code></pre> | ||
| 308 | <p>Lines before the first heading are ignored. A sexp that uses a function orgstar doesn't have, or signals an error, doesn't apply on any day, as Emacs reports a bad sexp and moves on.</p> | ||
| 309 | <table> | ||
| 310 | <thead> | ||
| 311 | <tr><th>Function</th><th>Applies</th><th>Date order</th></tr> | ||
| 312 | </thead> | ||
| 313 | <tbody> | ||
| 314 | <tr><td><code class="verbatim">diary-date</code> <em>month day year</em></td><td>On matching dates; <code class="verbatim">t</code> or a list matches any or several</td><td>month day year</td></tr> | ||
| 315 | <tr><td><code class="verbatim">diary-block</code> <em>m1 d1 y1 m2 d2 y2</em></td><td>Every day from the first date to the second</td><td>month day year</td></tr> | ||
| 316 | <tr><td><code class="verbatim">diary-float</code> <em>month dayname n</em> [/day/]</td><td>The nth <em>dayname</em> (0 is Sunday) of the month; negative n counts from the end</td><td>month</td></tr> | ||
| 317 | <tr><td><code class="verbatim">diary-anniversary</code> <em>month day</em> [/year/]</td><td>Each year on the date; <code class="verbatim">%d</code> is the count, <code class="verbatim">%s</code> its ordinal suffix</td><td>month day year</td></tr> | ||
| 318 | <tr><td><code class="verbatim">diary-cyclic</code> <em>n month day year</em></td><td>Every n days from the date</td><td>month day year</td></tr> | ||
| 319 | <tr><td><code class="verbatim">diary-remind</code> <em>sexp days</em></td><td>On the days before another sexp applies: <code class="verbatim">Reminder: Only 3 days until …</code></td><td>n/a</td></tr> | ||
| 320 | <tr><td><code class="verbatim">org-anniversary</code> <em>year month day</em></td><td>As <code class="verbatim">diary-anniversary</code></td><td>year month day</td></tr> | ||
| 321 | <tr><td><code class="verbatim">org-cyclic</code> <em>n year month day</em></td><td>As <code class="verbatim">diary-cyclic</code></td><td>year month day</td></tr> | ||
| 322 | <tr><td><code class="verbatim">org-block</code> <em>y1 m1 d1 y2 m2 d2</em></td><td>As <code class="verbatim">diary-block</code></td><td>year month day</td></tr> | ||
| 323 | <tr><td><code class="verbatim">org-date</code> <em>year month day</em></td><td>As <code class="verbatim">diary-date</code></td><td>year month day</td></tr> | ||
| 324 | <tr><td><code class="verbatim">org-class</code> <em>y1 m1 d1 y2 m2 d2 dayname</em> [/skip-weeks…/]</td><td>On <em>dayname</em> between the dates, except the ISO weeks listed, and holidays: all with <code class="verbatim">'holidays</code>, or those named</td><td>year month day</td></tr> | ||
| 325 | <tr><td><code class="verbatim">org-calendar-holiday</code></td><td>On holidays, showing their names</td><td>n/a</td></tr> | ||
| 326 | </tbody> | ||
| 327 | </table> | ||
| 328 | <p>The <code class="verbatim">diary-</code> functions read dates in <code class="verbatim">calendar-date-style</code> <code class="verbatim">american</code> (month, day, year); the <code class="verbatim">org-</code> functions use ISO order.</p> | ||
| 329 | <p>The holidays are those of Emacs's default <code class="verbatim">calendar-holidays</code> that follow fixed rules: <code class="verbatim">holiday-general-holidays</code> (New Year's Day, Martin Luther King Day, Groundhog Day, Valentine's Day, President's Day, St. Patrick's Day, April Fools' Day, Mother's Day, Memorial Day, Flag Day, Father's Day, Independence Day, Labor Day, Columbus Day, Halloween, Veteran's Day, Thanksgiving) and <code class="verbatim">holiday-christian-holidays</code> (Ash Wednesday, Good Friday, Easter Sunday, Christmas). The Hebrew, Islamic, Bahá'í, Chinese and solar holidays, and holidays you add to <code class="verbatim">calendar-holidays</code> in Emacs, are not included.</p> | ||
| 330 | <p>For your own expressions, the variables <code class="verbatim">date</code> (as <code class="verbatim">(month day year)</code>) and <code class="verbatim">entry</code> are bound, and these calendar functions are available: <code class="verbatim">calendar-extract-month</code>, <code class="verbatim">calendar-extract-day</code>, <code class="verbatim">calendar-extract-year</code>, <code class="verbatim">calendar-absolute-from-gregorian</code>, <code class="verbatim">calendar-gregorian-from-absolute</code>, <code class="verbatim">calendar-day-of-week</code>, <code class="verbatim">calendar-leap-year-p</code>, <code class="verbatim">calendar-last-day-of-month</code>, <code class="verbatim">calendar-date-equal</code>, <code class="verbatim">calendar-day-number</code>, <code class="verbatim">calendar-nth-named-absday</code>, <code class="verbatim">calendar-nth-named-day</code>, <code class="verbatim">calendar-iso-from-absolute</code>, <code class="verbatim">calendar-check-holidays</code>, <code class="verbatim">diary-ordinal-suffix</code> and <code class="verbatim">diary-make-date</code>. The evaluator also has the common special forms (<code class="verbatim">if</code>, <code class="verbatim">when</code>, <code class="verbatim">cond</code>, <code class="verbatim">and</code>, <code class="verbatim">or</code>, <code class="verbatim">let</code>, <code class="verbatim">progn</code> and others) and arithmetic. It is a small subset of Emacs Lisp, not Emacs.</p> | ||
| 331 | <p>A sexp line that returns a string shows that string; one that returns a list of strings shows one line per string; otherwise the line's text after the sexp shows.</p> | ||
| 332 | <h2 id="habits">Habits</h2> | ||
| 333 | <p>An entry with the property <code class="verbatim">STYLE: habit</code> and a <code class="verbatim">SCHEDULED</code> timestamp with a repeater is a habit, as in <code class="verbatim">org-habit</code>:</p> | ||
| 334 | <pre><code class="language-org highlight"><span class="text org"><span class="markup heading org"><span class="punctuation definition heading org">*</span> <span class="keyword other todo org">TODO</span> Run | ||
| 335 | </span>SCHEDULED: <span class="constant other timestamp org"><2026-10-05 Mon .+2d/4d></span> | ||
| 336 | :PROPERTIES: | ||
| 337 | :STYLE: habit | ||
| 338 | :END: | ||
| 339 | <span class="punctuation definition list org">- </span>State "DONE" from "TODO" <span class="constant other timestamp org">[2026-10-03 Sat 07:10]</span> | ||
| 340 | <span class="punctuation definition list org">- </span>State "DONE" from "TODO" <span class="constant other timestamp org">[2026-10-01 Thu 07:05]</span></span></code></pre> | ||
| 341 | <p>To make every entry of a file a habit, put <code class="verbatim">#+PROPERTY: STYLE habit</code> at the top of the file and set <code class="verbatim">org-use-property-inheritance = "STYLE"</code> in <code class="verbatim">config.toml</code>. As in Org, the <code class="verbatim">#+PROPERTY</code> line counts only when STYLE inherits; set the same variable in Emacs, <code class="verbatim">(setq org-use-property-inheritance '("STYLE"))</code>, for Emacs to agree.</p> | ||
| 342 | <p>The repeater can be <code class="verbatim">+</code>, <code class="verbatim">++</code> or <code class="verbatim">.+</code>, with an optional <code class="verbatim">/Nd</code> maximum interval. Days the habit was done are read from <code class="verbatim">- State "DONE" … [date]</code> lines (for any done keyword) and <code class="verbatim">CLOSING NOTE [date]</code> lines in the entry.</p> | ||
| 343 | <p>A habit appears only on today's agenda and not once it is done for the day. To show habits on the later days they are scheduled for too, turn off Settings ▸ Agenda ▸ Habits only today, or set <code class="verbatim">org-habit-show-habits-only-for-today = false</code> in <code class="verbatim">config.toml</code>. Its row carries the consistency graph: one cell per day for the 21 days before today and the 7 after (<code class="verbatim">org-habit-preceding-days</code> and <code class="verbatim">org-habit-following-days</code>). On the Mac the graph is at the right of the row, with <code class="verbatim">*</code> on days the habit was done and <code class="verbatim">!</code> on today; on iOS it is a strip under the title, with a dot on days it was done and today outlined. Cell colors follow org-habit's faces:</p> | ||
| 344 | <table> | ||
| 345 | <thead> | ||
| 346 | <tr><th>Color</th><th>Meaning</th><th>Theme key</th></tr> | ||
| 347 | </thead> | ||
| 348 | <tbody> | ||
| 349 | <tr><td>Blue</td><td>Not yet due</td><td><code class="verbatim">habit-clear</code></td></tr> | ||
| 350 | <tr><td>Green</td><td>Due, within the allowed interval</td><td><code class="verbatim">habit-ready</code></td></tr> | ||
| 351 | <tr><td>Yellow</td><td>Last day of the interval</td><td><code class="verbatim">habit-alert</code></td></tr> | ||
| 352 | <tr><td>Red</td><td>Overdue</td><td><code class="verbatim">habit-overdue</code></td></tr> | ||
| 353 | </tbody> | ||
| 354 | </table> | ||
| 355 | <p>Future days use lighter shades. On the Mac, hover a cell to see its date. Habits sort after other entries.</p> | ||
| 356 | <h2 id="the-todo-list">The TODO list</h2> | ||
| 357 | <p>The built-in view TODO List is <code class="verbatim">org-todo-list</code>: every heading with a TODO keyword that is not a done keyword, sorted by urgency (priority first). By default every open TODO appears, as in Org. <code class="verbatim">org-agenda-todo-ignore-scheduled</code>, <code class="verbatim">org-agenda-todo-ignore-deadlines</code>, <code class="verbatim">org-agenda-todo-ignore-timestamp</code> and <code class="verbatim">org-agenda-todo-ignore-with-date</code> in <code class="verbatim">config.toml</code> leave out entries for their timestamps, so that the TODO list shows only what isn't already on the calendar; see <a href="13-configuration.html">Configuration</a>. As in Org, the searches look through the entry's text in order, so with both set, a <code class="verbatim">SCHEDULED</code> that doesn't leave the entry out hides a <code class="verbatim">DEADLINE</code> before it on the same line. With <code class="verbatim">org-agenda-tags-todo-honor-ignore-options</code>, TODO-only matches leave the same entries out.</p> | ||
| 358 | <p>A saved view can list specific keywords instead, done ones included, with <code class="verbatim">keywords = "WAIT|HOLD"</code> (see <a href="#views">Views</a>). This mirrors <code class="verbatim">C-u M-x org-todo-list</code> with a keyword argument.</p> | ||
| 359 | <p>The TODO list and the match views use the same rows as the day view (see <a href="#rows">Rows</a>), without the left column.</p> | ||
| 360 | <h2 id="tag-and-property-matches">Tag and property matches</h2> | ||
| 361 | <p>Choose Match… from the view menu to list entries matching a match string, as <code class="verbatim">org-tags-view</code> (<code class="verbatim">m</code>) does, or TODO Match… to list only entries with an open TODO keyword (<code class="verbatim">M</code>). Type the match in the toolbar field and press Return.</p> | ||
| 362 | <p>The syntax is <code class="verbatim">org-make-tags-matcher</code>'s:</p> | ||
| 363 | <pre><code class="language-text">+work-boss|LEVEL>2+TODO="WAIT"/!NEXT</code></pre> | ||
| 364 | <h3 id="tags">Tags</h3> | ||
| 365 | <table> | ||
| 366 | <thead> | ||
| 367 | <tr><th>Form</th><th>Matches</th></tr> | ||
| 368 | </thead> | ||
| 369 | <tbody> | ||
| 370 | <tr><td><code class="verbatim">work</code>, <code class="verbatim">+work</code></td><td>Entries with the tag</td></tr> | ||
| 371 | <tr><td><code class="verbatim">-boss</code></td><td>Entries without the tag</td></tr> | ||
| 372 | <tr><td><code class="verbatim">+work-boss</code></td><td>Both conditions (and)</td></tr> | ||
| 373 | <tr><td><code class="verbatim">a&b</code></td><td><code class="verbatim">&</code> between terms is the same as <code class="verbatim">+</code></td></tr> | ||
| 374 | <tr><td><code class="verbatim">{^proj}</code></td><td>Any tag matching the regular expression</td></tr> | ||
| 375 | </tbody> | ||
| 376 | </table> | ||
| 377 | <p><code class="verbatim">work|home</code> matches either side: the vertical bar separates alternatives, and within an alternative, terms are joined by <code class="verbatim">+</code>, <code class="verbatim">-</code> or <code class="verbatim">&</code>. Tags include inherited tags and <code class="verbatim">#+FILETAGS</code>. Tag names compare exactly; regular expressions in braces are Emacs regexps, matched without case.</p> | ||
| 378 | <h3 id="properties">Properties</h3> | ||
| 379 | <p>A term can compare a property: <code class="verbatim">NAME op value</code>.</p> | ||
| 380 | <table> | ||
| 381 | <thead> | ||
| 382 | <tr><th>Operator</th><th>Meaning</th></tr> | ||
| 383 | </thead> | ||
| 384 | <tbody> | ||
| 385 | <tr><td><code class="verbatim">=</code>, <code class="verbatim">==</code></td><td>Equal</td></tr> | ||
| 386 | <tr><td><code class="verbatim"><></code>, <code class="verbatim">!=</code>, <code class="verbatim">/=</code></td><td>Not equal</td></tr> | ||
| 387 | <tr><td><code class="verbatim"><</code>, <code class="verbatim"><=</code></td><td>Less, less or equal</td></tr> | ||
| 388 | <tr><td><code class="verbatim">></code>, <code class="verbatim">>=</code></td><td>Greater, greater or equal</td></tr> | ||
| 389 | </tbody> | ||
| 390 | </table> | ||
| 391 | <p>The value decides how the comparison works:</p> | ||
| 392 | <table> | ||
| 393 | <thead> | ||
| 394 | <tr><th>Value</th><th>Compared as</th></tr> | ||
| 395 | </thead> | ||
| 396 | <tbody> | ||
| 397 | <tr><td><code class="verbatim">3</code>, <code class="verbatim">-1.5</code></td><td>Numbers; a missing or non-numeric property is 0</td></tr> | ||
| 398 | <tr><td><code class="verbatim">"WAIT"</code></td><td>Strings</td></tr> | ||
| 399 | <tr><td><code class="verbatim">{regexp}</code></td><td>Regular expression match; with <code class="verbatim"><></code>, <code class="verbatim">!=</code> or <code class="verbatim">/=</code> it must not match</td></tr> | ||
| 400 | <tr><td><code class="verbatim">"<2026-10-01>"</code></td><td>Dates. Also <code class="verbatim">"<now>"</code>, <code class="verbatim">"<today>"</code>, <code class="verbatim">"<tomorrow>"</code>, <code class="verbatim">"<yesterday>"</code>, and offsets such as <code class="verbatim">"<-1w>"</code> or <code class="verbatim">"<+3d>"</code> (units <code class="verbatim">h</code> <code class="verbatim">d</code> <code class="verbatim">w</code> <code class="verbatim">m</code> <code class="verbatim">y</code>). Brackets may be <code class="verbatim">[…]</code>.</td></tr> | ||
| 401 | </tbody> | ||
| 402 | </table> | ||
| 403 | <p>Follow the operator with <code class="verbatim">*</code> (<code class="verbatim">Effort>*1</code>) to require that the property exists; without it, a missing property compares as an empty string or 0.</p> | ||
| 404 | <p>Names are case-insensitive. Prefix a character in a name with <code class="verbatim">\</code> to use it literally (<code class="verbatim">MY\-PROP</code>"x"=). Besides the entry's own property drawer, these special properties work:</p> | ||
| 405 | <table> | ||
| 406 | <thead> | ||
| 407 | <tr><th>Name</th><th>Value</th></tr> | ||
| 408 | </thead> | ||
| 409 | <tbody> | ||
| 410 | <tr><td><code class="verbatim">LEVEL</code></td><td>The heading's level</td></tr> | ||
| 411 | <tr><td><code class="verbatim">TODO</code></td><td>The TODO keyword</td></tr> | ||
| 412 | <tr><td><code class="verbatim">ITEM</code></td><td>The heading title</td></tr> | ||
| 413 | <tr><td><code class="verbatim">PRIORITY</code></td><td>The priority letter, or the default priority</td></tr> | ||
| 414 | <tr><td><code class="verbatim">CATEGORY</code></td><td>The entry's category</td></tr> | ||
| 415 | <tr><td><code class="verbatim">FILE</code></td><td>The file's path</td></tr> | ||
| 416 | <tr><td><code class="verbatim">TAGS</code></td><td>The heading's own tags, as <code class="verbatim">:a:b:</code></td></tr> | ||
| 417 | <tr><td><code class="verbatim">ALLTAGS</code></td><td>All tags including inherited ones</td></tr> | ||
| 418 | <tr><td><code class="verbatim">SCHEDULED</code>, <code class="verbatim">DEADLINE</code>, <code class="verbatim">CLOSED</code></td><td>The planning timestamp</td></tr> | ||
| 419 | <tr><td><code class="verbatim">TIMESTAMP</code>, <code class="verbatim">TIMESTAMP_IA</code></td><td>The entry's first active or inactive timestamp</td></tr> | ||
| 420 | </tbody> | ||
| 421 | </table> | ||
| 422 | <p>Properties inherit in matches as <code class="verbatim">org-use-property-inheritance</code> says: by default they don't, so <code class="verbatim">TEAM</code>"ops"= matches only the entry with the property; with <code class="verbatim">org-use-property-inheritance = "TEAM"</code> it matches the entries under it too, and <code class="verbatim">#+PROPERTY</code> lines count. With a date value, <code class="verbatim"><></code> and its synonyms match dates that are equal, as orgstar's comparison mirrors <code class="verbatim">org-time<></code> in Org 9.8.7; use <code class="verbatim"><</code> and <code class="verbatim">></code> for date ranges.</p> | ||
| 423 | <h3 id="keywords"><span class="todo TODO">TODO</span> keywords</h3> | ||
| 424 | <p>After the last <code class="verbatim">/</code> (one not followed by a quote), the match restricts TODO keywords:</p> | ||
| 425 | <table> | ||
| 426 | <thead> | ||
| 427 | <tr><th>Form</th><th>Matches</th></tr> | ||
| 428 | </thead> | ||
| 429 | <tbody> | ||
| 430 | <tr><td><code class="verbatim">/NEXT</code></td><td>Entries whose keyword is <code class="verbatim">NEXT</code></td></tr> | ||
| 431 | <tr><td><code class="verbatim">/-WAIT</code></td><td>Any keyword but <code class="verbatim">WAIT</code>, and entries with none</td></tr> | ||
| 432 | <tr><td><code class="verbatim">/{^W}</code></td><td>Keywords matching the regexp</td></tr> | ||
| 433 | <tr><td><code class="verbatim">/!</code></td><td>Only entries with an open (not done) TODO keyword</td></tr> | ||
| 434 | <tr><td><code class="verbatim">/!-WAIT-HOLD</code></td><td>Open TODO entries except those two</td></tr> | ||
| 435 | </tbody> | ||
| 436 | </table> | ||
| 437 | <p><code class="verbatim">/TODO|NEXT</code> matches either keyword, and <code class="verbatim">/!NEXT|WAIT</code> either one while open. <code class="verbatim">/!</code> has the same effect as choosing TODO Match….</p> | ||
| 438 | <h2 id="stuck-projects">Stuck projects</h2> | ||
| 439 | <p>The built-in view Stuck Projects is <code class="verbatim">org-agenda-list-stuck-projects</code> (<code class="verbatim">#</code>): the projects that have no next action. <code class="verbatim">[org-stuck-projects]</code> in <code class="verbatim">config.toml</code> says what a project is and what makes one active, as <code class="verbatim">org-stuck-projects</code> does:</p> | ||
| 440 | <table> | ||
| 441 | <thead> | ||
| 442 | <tr><th>Key</th><th>Default</th><th>Meaning</th></tr> | ||
| 443 | </thead> | ||
| 444 | <tbody> | ||
| 445 | <tr><td><code class="verbatim">match</code></td><td><code class="verbatim">"+LEVEL=2/-DONE"</code></td><td>A match as in <a href="#tag-and-property-matches">Tag and property matches</a>: the entries that are projects</td></tr> | ||
| 446 | <tr><td><code class="verbatim">todo</code></td><td><code class="verbatim">"TODO NEXT NEXTACTION"</code></td><td>A heading with one of these keywords makes its project active; <code class="verbatim">*</code> for any open keyword</td></tr> | ||
| 447 | <tr><td><code class="verbatim">tags</code></td><td><code class="verbatim">""</code></td><td>A heading with one of these tags set on it (not inherited) makes its project active; <code class="verbatim">*</code> for any tag</td></tr> | ||
| 448 | <tr><td><code class="verbatim">regexp</code></td><td><code class="verbatim">""</code></td><td>Text matching this Emacs regular expression makes its project active</td></tr> | ||
| 449 | </tbody> | ||
| 450 | </table> | ||
| 451 | <p>The project's own heading counts: a project whose heading has a <code class="verbatim">todo</code> keyword is not stuck. Keywords, tags and the regexp are case-sensitive. A project that isn't stuck can still contain stuck subprojects, which are listed. When <code class="verbatim">todo</code>, <code class="verbatim">tags</code> and <code class="verbatim">regexp</code> are all empty, every project is listed; Org signals an error instead. Lines sort as tag matches do.</p> | ||
| 452 | <h2 id="text-search">Text search</h2> | ||
| 453 | <p>Choose Search… from the view menu to list entries containing some text, as <code class="verbatim">org-search-view</code> (<code class="verbatim">s</code>) does, or TODO Search… to list only entries with an open TODO keyword (<code class="verbatim">S</code>, or <code class="verbatim">C-u s</code>). Type the search string in the toolbar field and press Return. An entry is its heading and the text up to the next heading; text before the first heading of a file is not searched. Entries show in file order, with the rows of the TODO list.</p> | ||
| 454 | <p>By default the string is a phrase: <code class="verbatim">pay rent</code> finds those words in that order, case-insensitively, and each space matches any run of spaces, tabs and line breaks, so a phrase can span lines. A string that starts with <code class="verbatim">+</code>, <code class="verbatim">-</code> or <code class="verbatim">{</code> is a list of snippets separated by spaces instead, all of which must hold:</p> | ||
| 455 | <table> | ||
| 456 | <thead> | ||
| 457 | <tr><th>Snippet</th><th>Entries that</th></tr> | ||
| 458 | </thead> | ||
| 459 | <tbody> | ||
| 460 | <tr><td><code class="verbatim">+word</code>, <code class="verbatim">word</code></td><td>contain the text</td></tr> | ||
| 461 | <tr><td><code class="verbatim">-word</code></td><td>don't contain it</td></tr> | ||
| 462 | <tr><td><code class="verbatim">{regexp}</code></td><td>match the Emacs regular expression, without case</td></tr> | ||
| 463 | <tr><td><code class="verbatim">-{regexp}</code></td><td>don't match it</td></tr> | ||
| 464 | <tr><td><code class="verbatim">"two words"</code></td><td>contain the words with one space between them</td></tr> | ||
| 465 | </tbody> | ||
| 466 | </table> | ||
| 467 | <p>Phrases and snippets match parts of words: <code class="verbatim">+rent</code> finds <code class="verbatim">parent</code>. These may come first in the string, in this order:</p> | ||
| 468 | <table> | ||
| 469 | <thead> | ||
| 470 | <tr><th>Prefix</th><th>Effect</th></tr> | ||
| 471 | </thead> | ||
| 472 | <tbody> | ||
| 473 | <tr><td><code class="verbatim">*</code></td><td>Search headlines only, not the text below them</td></tr> | ||
| 474 | <tr><td><code class="verbatim">:</code></td><td>Snippets match whole words (regexps are unchanged)</td></tr> | ||
| 475 | </tbody> | ||
| 476 | </table> | ||
| 477 | <p><code class="verbatim">*!:+rent -paid</code> lists open TODO headlines with the word <code class="verbatim">rent</code> and without <code class="verbatim">paid</code>.</p> | ||
| 478 | <p>Two settings in <code class="verbatim">config.toml</code> change the defaults: <code class="verbatim">org-agenda-search-view-always-boolean</code> reads every string as snippets, and <code class="verbatim">org-agenda-search-view-force-full-words</code> makes snippets match whole words (see <a href="13-configuration.html">Configuration</a>).</p> | ||
| 479 | <p>The search covers the agenda files only, not <code class="verbatim">org-agenda-text-search-extra-files</code> or archive files. Entries in archived or commented trees are left out, as in the other views. To search every file in the folders, use Search Notes (<code class="verbatim">⇧⌘F</code>).</p> | ||
| 480 | <h2 id="views">Views</h2> | ||
| 481 | <p>The view menu lists the built-in views, Agenda, TODO List and Stuck Projects, then the views in <code class="verbatim">views.toml</code>, then Match…, TODO Match…, Search… and TODO Search…, then Save as View…. Saved views mirror <code class="verbatim">org-agenda-custom-commands</code>, with fewer options.</p> | ||
| 482 | <p>Save as View… is there while a match or search you typed is showing. It asks for a name and adds the view to the end of <code class="verbatim">views.toml</code>, as a <code class="verbatim">match</code>, <code class="verbatim">todo-match</code>, <code class="verbatim">search</code> or <code class="verbatim">todo-search</code> view, making the file if it isn't there; the rest of the file is left as it is. A name another view has, the built-in ones included, is refused. To change or remove a view, edit <code class="verbatim">views.toml</code>.</p> | ||
| 483 | <p><strong>In the sidebar.</strong> On the Mac, the calendar button at the right of the bar under the main window's sidebar shows an agenda in place of the files, beside the editor; the same button, then a folder, brings the files back, and Show Agenda or Files in Sidebar (<code class="verbatim">app.sidebar-agenda</code>) switches between them.</p> | ||
| 484 | <ul> | ||
| 485 | <li>The menu at the left of the bar, where the files have their <code class="verbatim">+</code> and <code class="verbatim">−</code>, lists the built-in views and those in <code class="verbatim">views.toml</code>, and Open Agenda Window. The view chosen is remembered.</li> | ||
| 486 | <li>Days with entries are listed with their entries, today's overdue ones first; a list view or a block shows under its title. Each line has the time or status, the TODO keyword, the title and the category.</li> | ||
| 487 | <li>A click on an entry shows it in the editor.</li> | ||
| 488 | <li>It uses the Agenda window's span, start, folders and agenda files. Calendar events and Reminders show once the Agenda window has been given access to them.</li> | ||
| 489 | <li>It has no filters, bulk actions or keys of its own, and no Save as View…; those are in the Agenda window.</li> | ||
| 490 | </ul> | ||
| 491 | <p><code class="verbatim">views.toml</code> lives in the configuration folder beside <code class="verbatim">config.toml</code> (<code class="verbatim">~/.config/orgstar/</code> by default; see <a href="13-configuration.html">Configuration</a>). Each view is a <code class="verbatim">[[view]]</code> table:</p> | ||
| 492 | <pre><code class="language-toml highlight"><span class="source toml"><span class="punctuation definition table array toml">[[</span><span class="entity name section toml">view</span><span class="punctuation definition table array toml">]]</span> | ||
| 493 | <span class="variable other key toml">name</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>Fortnight<span class="punctuation definition string end toml">"</span></span> | ||
| 494 | <span class="variable other key toml">type</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>agenda<span class="punctuation definition string end toml">"</span></span> | ||
| 495 | <span class="variable other key toml">span</span> <span class="keyword operator assignment toml">=</span> <span class="constant numeric toml">14</span> | ||
| 496 | <span class="variable other key toml">start</span> <span class="keyword operator assignment toml">=</span> <span class="constant numeric toml">0</span> | ||
| 497 | |||
| 498 | <span class="punctuation definition table array toml">[[</span><span class="entity name section toml">view</span><span class="punctuation definition table array toml">]]</span> | ||
| 499 | <span class="variable other key toml">name</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>Waiting<span class="punctuation definition string end toml">"</span></span> | ||
| 500 | <span class="variable other key toml">type</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>todo<span class="punctuation definition string end toml">"</span></span> | ||
| 501 | <span class="variable other key toml">keywords</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>WAIT|HOLD<span class="punctuation definition string end toml">"</span></span> | ||
| 502 | |||
| 503 | <span class="punctuation definition table array toml">[[</span><span class="entity name section toml">view</span><span class="punctuation definition table array toml">]]</span> | ||
| 504 | <span class="variable other key toml">name</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>Work<span class="punctuation definition string end toml">"</span></span> | ||
| 505 | <span class="variable other key toml">type</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>match<span class="punctuation definition string end toml">"</span></span> | ||
| 506 | <span class="variable other key toml">match</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>+work-boss<span class="punctuation definition string end toml">"</span></span> | ||
| 507 | |||
| 508 | <span class="punctuation definition table array toml">[[</span><span class="entity name section toml">view</span><span class="punctuation definition table array toml">]]</span> | ||
| 509 | <span class="variable other key toml">name</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>Next at work<span class="punctuation definition string end toml">"</span></span> | ||
| 510 | <span class="variable other key toml">type</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>todo-match<span class="punctuation definition string end toml">"</span></span> | ||
| 511 | <span class="variable other key toml">match</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>+work/NEXT<span class="punctuation definition string end toml">"</span></span> | ||
| 512 | |||
| 513 | <span class="punctuation definition table array toml">[[</span><span class="entity name section toml">view</span><span class="punctuation definition table array toml">]]</span> | ||
| 514 | <span class="variable other key toml">name</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>Invoices<span class="punctuation definition string end toml">"</span></span> | ||
| 515 | <span class="variable other key toml">type</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>search<span class="punctuation definition string end toml">"</span></span> | ||
| 516 | <span class="variable other key toml">match</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>+invoice -paid<span class="punctuation definition string end toml">"</span></span></span></code></pre> | ||
| 517 | <table> | ||
| 518 | <thead> | ||
| 519 | <tr><th>Key</th><th>Applies to</th><th>Meaning</th></tr> | ||
| 520 | </thead> | ||
| 521 | <tbody> | ||
| 522 | <tr><td><code class="verbatim">name</code></td><td>all, required</td><td>The name in the view menu</td></tr> | ||
| 523 | <tr><td><code class="verbatim">type</code></td><td>all</td><td><code class="verbatim">agenda</code> (the default), <code class="verbatim">todo</code>, <code class="verbatim">match</code>, <code class="verbatim">todo-match</code>, <code class="verbatim">search</code>, <code class="verbatim">todo-search</code> or <code class="verbatim">stuck</code></td></tr> | ||
| 524 | <tr><td><code class="verbatim">span</code></td><td><code class="verbatim">agenda</code></td><td>Days shown; the setting when omitted</td></tr> | ||
| 525 | <tr><td><code class="verbatim">start</code></td><td><code class="verbatim">agenda</code></td><td>First day as an integer number of days from today (<code class="verbatim">-3</code>, <code class="verbatim">0</code>); the setting when omitted</td></tr> | ||
| 526 | <tr><td><code class="verbatim">keywords</code></td><td><code class="verbatim">todo</code></td><td>Keywords separated by the vertical bar; all open TODOs when omitted</td></tr> | ||
| 527 | <tr><td><code class="verbatim">match</code></td><td><code class="verbatim">match</code>, <code class="verbatim">todo-match</code>, <code class="verbatim">search</code>, <code class="verbatim">todo-search</code>, required</td><td>A match string as in <a href="#tag-and-property-matches">Tag and property matches</a>, or for <code class="verbatim">search</code> a search string as in <a href="#text-search">Text search</a>; the <code class="verbatim">todo-</code> types keep only open TODO entries</td></tr> | ||
| 528 | <tr><td><code class="verbatim">keywords</code>, <code class="verbatim">tags</code>, <code class="verbatim">regexp</code></td><td><code class="verbatim">stuck</code></td><td>The <code class="verbatim">todo</code>, <code class="verbatim">tags</code> (separated by spaces) and <code class="verbatim">regexp</code> of <code class="verbatim">[org-stuck-projects]</code>; with <code class="verbatim">match</code> they replace the setting's values for this view, and the ones left out keep them</td></tr> | ||
| 529 | <tr><td><code class="verbatim">sorting-strategy</code></td><td>all</td><td>The view's <code class="verbatim">org-agenda-sorting-strategy</code>, keys separated by spaces, in place of the one in <code class="verbatim">config.toml</code> for its kind</td></tr> | ||
| 530 | <tr><td><code class="verbatim">prefix-format</code></td><td>all</td><td>The view's <code class="verbatim">org-agenda-prefix-format</code>, in place of the one in <code class="verbatim">config.toml</code> for its kind</td></tr> | ||
| 531 | <tr><td><code class="verbatim">header</code></td><td>all</td><td>The title over a list or block, as <code class="verbatim">org-agenda-overriding-header</code></td></tr> | ||
| 532 | <tr><td><code class="verbatim">skip-entry-if</code>, <code class="verbatim">skip-subtree-if</code></td><td>all</td><td>Entries to leave out, as <code class="verbatim">org-agenda-skip-function</code> set to <code class="verbatim">org-agenda-skip-entry-if</code> or <code class="verbatim">org-agenda-skip-subtree-if</code>; see below</td></tr> | ||
| 533 | </tbody> | ||
| 534 | </table> | ||
| 535 | <p>Note that <code class="verbatim">start</code> is a plain integer here, while <code class="verbatim">org-agenda-start-day</code> in <code class="verbatim">config.toml</code> is a string such as <code class="verbatim">"-3d"</code>.</p> | ||
| 536 | <h3 id="skipping-entries">Skipping entries</h3> | ||
| 537 | <p><code class="verbatim">skip-entry-if</code> takes the arguments of <code class="verbatim">org-agenda-skip-entry-if</code> as Lisp writes them, the quotes optional:</p> | ||
| 538 | <pre><code class="language-toml highlight"><span class="source toml"><span class="punctuation definition table array toml">[[</span><span class="entity name section toml">view</span><span class="punctuation definition table array toml">]]</span> | ||
| 539 | <span class="variable other key toml">name</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>Unplanned<span class="punctuation definition string end toml">"</span></span> | ||
| 540 | <span class="variable other key toml">type</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>todo<span class="punctuation definition string end toml">"</span></span> | ||
| 541 | <span class="variable other key toml">skip-entry-if</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>'scheduled 'deadline<span class="punctuation definition string end toml">"</span></span></span></code></pre> | ||
| 542 | <p>An entry is left out when any condition holds: <code class="verbatim">scheduled</code>, <code class="verbatim">notscheduled</code>, <code class="verbatim">deadline</code> and <code class="verbatim">notdeadline</code> look at the planning line; <code class="verbatim">timestamp</code> and <code class="verbatim">nottimestamp</code> at active timestamps in the entry; <code class="verbatim">regexp "RE"</code> and <code class="verbatim">notregexp "RE"</code> at its text, with an Emacs regular expression; <code class="verbatim">todo</code> and <code class="verbatim">nottodo</code> at its keyword, given as a list (<code class="verbatim">'("WAIT" "HOLD")</code>, <code class="verbatim">"*"</code> for any) or a class (<code class="verbatim">todo</code>, <code class="verbatim">done</code> or <code class="verbatim">any</code>). <code class="verbatim">skip-subtree-if</code> takes the same conditions, looks at the whole subtree, and leaves out the subtree when one holds. As in Org, the day and TODO views match the regexps case-sensitively, and tag matches and search ignore case. Org's <code class="verbatim">todo-unblocked</code> and <code class="verbatim">nottodo-unblocked</code>, and skip functions of your own, are not supported.</p> | ||
| 543 | <h3 id="block-agendas">Block agendas</h3> | ||
| 544 | <p>A view with <code class="verbatim">[[view.block]]</code> tables after it shows several views one after the other, as an <code class="verbatim">org-agenda-custom-commands</code> entry with a list of blocks does. Each block takes the keys of a view except <code class="verbatim">name</code>; the view's <code class="verbatim">sorting-strategy</code>, <code class="verbatim">prefix-format</code> and skip settings, and for <code class="verbatim">agenda</code> blocks its <code class="verbatim">span</code> and <code class="verbatim">start</code>, apply to blocks that don't set their own:</p> | ||
| 545 | <pre><code class="language-toml highlight"><span class="source toml"><span class="punctuation definition table array toml">[[</span><span class="entity name section toml">view</span><span class="punctuation definition table array toml">]]</span> | ||
| 546 | <span class="variable other key toml">name</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>Daily<span class="punctuation definition string end toml">"</span></span> | ||
| 547 | <span class="variable other key toml">span</span> <span class="keyword operator assignment toml">=</span> <span class="constant numeric toml">1</span> | ||
| 548 | |||
| 549 | <span class="punctuation definition table array toml">[[</span><span class="entity name section toml">view.block</span><span class="punctuation definition table array toml">]]</span> | ||
| 550 | <span class="variable other key toml">type</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>agenda<span class="punctuation definition string end toml">"</span></span> | ||
| 551 | <span class="variable other key toml">header</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>Today<span class="punctuation definition string end toml">"</span></span> | ||
| 552 | |||
| 553 | <span class="punctuation definition table array toml">[[</span><span class="entity name section toml">view.block</span><span class="punctuation definition table array toml">]]</span> | ||
| 554 | <span class="variable other key toml">type</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>todo<span class="punctuation definition string end toml">"</span></span> | ||
| 555 | <span class="variable other key toml">keywords</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>NEXT<span class="punctuation definition string end toml">"</span></span> | ||
| 556 | <span class="variable other key toml">skip-entry-if</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>'scheduled 'deadline<span class="punctuation definition string end toml">"</span></span> | ||
| 557 | |||
| 558 | <span class="punctuation definition table array toml">[[</span><span class="entity name section toml">view.block</span><span class="punctuation definition table array toml">]]</span> | ||
| 559 | <span class="variable other key toml">type</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>stuck<span class="punctuation definition string end toml">"</span></span></span></code></pre> | ||
| 560 | <p>Each block has its title over it: its <code class="verbatim">header</code>, or one for its kind such as <code class="verbatim">Day agenda</code> or <code class="verbatim">TODO items: NEXT</code>. Agenda blocks start from their own <code class="verbatim">start</code> (or the setting), so the arrows that move through days don't apply to them.</p> | ||
| 561 | <p>The views load when the window opens and again on <code class="verbatim">g</code> or <code class="verbatim">r</code>. A problem in the file, such as a missing <code class="verbatim">name</code> or an unknown <code class="verbatim">type</code>, shows in the status line at the bottom of the window, and the remaining views still load.</p> | ||
| 562 | <h2 id="filters">Filters</h2> | ||
| 563 | <p>Filters hide lines without changing the view, as <code class="verbatim">org-agenda-filter</code> does. Calendar events always stay. The active filter shows in the status line at the bottom of the window as <code class="verbatim">Filter: …</code>.</p> | ||
| 564 | <p>The Filter button in the toolbar asks for a combined filter, as <code class="verbatim">/</code> does; its menu has each of the filters below and Remove Filters.</p> | ||
| 565 | <table> | ||
| 566 | <thead> | ||
| 567 | <tr><th>Key</th><th>Does</th><th>Org command</th></tr> | ||
| 568 | </thead> | ||
| 569 | <tbody> | ||
| 570 | <tr><td><code class="verbatim">\</code></td><td>Asks for a tag filter</td><td><code class="verbatim">org-agenda-filter-by-tag</code></td></tr> | ||
| 571 | <tr><td><code class="verbatim"><</code></td><td>Keeps only the selected line's category; again removes it</td><td><code class="verbatim">org-agenda-filter-by-category</code></td></tr> | ||
| 572 | <tr><td><code class="verbatim">=</code></td><td>Asks for a regexp filter</td><td><code class="verbatim">org-agenda-filter-by-regexp</code></td></tr> | ||
| 573 | </tbody> | ||
| 574 | </table> | ||
| 575 | <p>The vertical bar key, <code class="verbatim">|</code>, removes every filter (<code class="verbatim">org-agenda-filter-remove-all</code>).</p> | ||
| 576 | <p>The combined filter <code class="verbatim">/</code> reads terms such as:</p> | ||
| 577 | <pre><code class="language-text">+work-phone<2:00/report/</code></pre> | ||
| 578 | <ul> | ||
| 579 | <li><code class="verbatim">+word</code> keeps and <code class="verbatim">-word</code> drops lines. A word without a sign keeps.</li> | ||
| 580 | <li>A word is a tag if a line in the view has that tag, else a category if a line has that category; otherwise it is ignored and the status line says so. Quote a category that contains <code class="verbatim">-</code>: <code class="verbatim">"my-cat"</code>.</li> | ||
| 581 | <li><code class="verbatim"><0:30</code>, <code class="verbatim">>1:00</code> and <code class="verbatim">=1:00</code> compare the entry's <code class="verbatim">Effort</code> property. Entries without an effort count as longer than any effort, as with <code class="verbatim">org-agenda-sort-noeffort-is-high</code> t. Durations can be <code class="verbatim">H:MM</code>, minutes, or units such as <code class="verbatim">1h 30min</code> or <code class="verbatim">2d</code>.</li> | ||
| 582 | <li><code class="verbatim">/regexp/</code> keeps lines whose text matches; <code class="verbatim">-/regexp/</code> drops them. Matching ignores case.</li> | ||
| 583 | <li>Starting the input with <code class="verbatim">+</code> followed by another sign (<code class="verbatim">++urgent</code>) adds to the current filter instead of replacing it.</li> | ||
| 584 | </ul> | ||
| 585 | <p>With two or more <code class="verbatim">+</code> categories, a line may have any of them. Tag terms all have to hold.</p> | ||
| 586 | <p>The <code class="verbatim">/</code> prompt starts with the whole current filter written in this form, every term with its sign: categories, then tags, efforts and regexps, with categories that contain <code class="verbatim">-</code> in quotes. Pressing <code class="verbatim">Return</code> on it unchanged keeps the same filter.</p> | ||
| 587 | <p>The <code class="verbatim">\</code> prompt reads every word as a tag, whether or not a line has it; there, <code class="verbatim">{regexp}</code> matches any tag that matches the regexp. The <code class="verbatim">=</code> prompt takes one regexp, with a leading <code class="verbatim">-</code> to drop matches. The <code class="verbatim">_</code> prompt takes one comparison such as <code class="verbatim"><0:30</code>.</p> | ||
| 588 | <h2 id="prefix-format-and-colors">Prefix format and colors</h2> | ||
| 589 | <p>orgstar reads <code class="verbatim">org-agenda-prefix-format</code> from the <code class="verbatim">[org-agenda-prefix-format]</code> table in <code class="verbatim">config.toml</code> (see <a href="13-configuration.html">Configuration</a>) or a view's <code class="verbatim">prefix-format</code>. Rows already show the category, the time and the scheduled or deadline leader in their own places, so <code class="verbatim">%c</code>, <code class="verbatim">%t</code>, <code class="verbatim">%s</code> and <code class="verbatim">%i</code> add nothing there. What the format adds besides them shows after the category: <code class="verbatim">%e</code> the effort, <code class="verbatim">%b</code> the outline path (<code class="verbatim">Project->Phase-></code>), <code class="verbatim">%T</code> the last tag, and any literal text. <code class="verbatim">%l</code> (the level as spaces) and <code class="verbatim">%(…)</code> Lisp forms show nothing. Widths, <code class="verbatim">?</code> and punctuation work as in Org.</p> | ||
| 590 | <p>Times written in heading text depend on <code class="verbatim">%t</code>: when the <code class="verbatim">agenda</code> format contains it, as the default <code class="verbatim">" %i %-12:c%?-12t% s"</code> does, a time such as <code class="verbatim">9:30am</code> in <code class="verbatim">Call Ada 9:30am</code> moves out of the title into the left column, as <code class="verbatim">org-agenda-remove-times-when-in-prefix</code> does. Without <code class="verbatim">%t</code>, the title keeps it.</p> | ||
| 591 | <p>The agenda's colors come from these theme keys (see <a href="13-configuration.html">Configuration</a>):</p> | ||
| 592 | <table> | ||
| 593 | <thead> | ||
| 594 | <tr><th>Key</th><th>Colors</th></tr> | ||
| 595 | </thead> | ||
| 596 | <tbody> | ||
| 597 | <tr><td><code class="verbatim">agenda-background</code></td><td>the Mac window's background, and the iOS widgets' background</td></tr> | ||
| 598 | <tr><td><code class="verbatim">agenda-date</code></td><td>headers of days after today (Mac)</td></tr> | ||
| 599 | <tr><td><code class="verbatim">agenda-today</code></td><td>today's header, the now line, and on iOS the widgets' date</td></tr> | ||
| 600 | <tr><td><code class="verbatim">agenda-time</code></td><td>the left column of rows with the normal status</td></tr> | ||
| 601 | <tr><td><code class="verbatim">agenda-overdue</code></td><td>the left column of overdue rows, and the Overdue group's header</td></tr> | ||
| 602 | <tr><td><code class="verbatim">agenda-due-soon</code></td><td>the left column of deadlines due today or coming up</td></tr> | ||
| 603 | <tr><td><code class="verbatim">agenda-event</code></td><td>calendar events whose calendar has no color</td></tr> | ||
| 604 | <tr><td><code class="verbatim">agenda-category</code></td><td>category names (Mac)</td></tr> | ||
| 605 | <tr><td><code class="verbatim">todo</code>, <code class="verbatim">todo-next</code>, <code class="verbatim">todo-waiting</code>, <code class="verbatim">done</code>, <code class="verbatim">todo-cancelled</code></td><td>TODO keyword badges, by class</td></tr> | ||
| 606 | <tr><td><code class="verbatim">priority-a</code>, <code class="verbatim">priority-b</code>, <code class="verbatim">priority-c</code>, <code class="verbatim">priority</code></td><td>priority letters</td></tr> | ||
| 607 | <tr><td><code class="verbatim">tags</code></td><td>tag capsules (Mac)</td></tr> | ||
| 608 | </tbody> | ||
| 609 | </table> | ||
| 610 | <p><code class="verbatim">[theme.todo]</code> colors keywords by name and <code class="verbatim">[theme.category]</code> colors categories by name.</p> | ||
| 611 | <h2 id="acting-on-entries">Acting on entries</h2> | ||
| 612 | <p>Select a line with the mouse, or move the selection with <code class="verbatim">n</code> and <code class="verbatim">p</code>, <code class="verbatim">C-n</code> and <code class="verbatim">C-p</code>, or <code class="verbatim">↓</code> and <code class="verbatim">↑</code>. These keys work in the agenda window in every keymap preset; they are fixed and are not read from <code class="verbatim">keymap.toml</code>.</p> | ||
| 613 | <table> | ||
| 614 | <thead> | ||
| 615 | <tr><th>Key</th><th>Does</th><th>Org command</th></tr> | ||
| 616 | </thead> | ||
| 617 | <tbody> | ||
| 618 | <tr><td><code class="verbatim">n</code>, <code class="verbatim">p</code></td><td>Moves to the next or previous line</td><td><code class="verbatim">org-agenda-next-line=/</code>-previous-line=</td></tr> | ||
| 619 | <tr><td><code class="verbatim">RET</code>, <code class="verbatim">TAB</code> or double click</td><td>Shows the entry in the main window; opens a calendar event in Calendar</td><td><code class="verbatim">org-agenda-switch-to</code>, <code class="verbatim">org-agenda-goto</code></td></tr> | ||
| 620 | <tr><td><code class="verbatim">SPC</code></td><td>Shows the entry in the main window, keeping the agenda in front</td><td><code class="verbatim">org-agenda-show-and-scroll-up</code></td></tr> | ||
| 621 | <tr><td><code class="verbatim">t</code> or <code class="verbatim">C-c C-t</code></td><td>Changes the TODO state, as in the editor</td><td><code class="verbatim">org-agenda-todo</code></td></tr> | ||
| 622 | <tr><td><code class="verbatim">+</code>, <code class="verbatim">-</code></td><td>Raises or lowers the priority</td><td><code class="verbatim">org-agenda-priority-up=/</code>-down=</td></tr> | ||
| 623 | <tr><td><code class="verbatim">,</code></td><td>Sets the priority</td><td><code class="verbatim">org-agenda-priority</code></td></tr> | ||
| 624 | <tr><td><code class="verbatim">:</code> or <code class="verbatim">C-c C-q</code></td><td>Sets tags</td><td><code class="verbatim">org-agenda-set-tags</code></td></tr> | ||
| 625 | <tr><td><code class="verbatim">C-c C-s</code></td><td>Schedules</td><td><code class="verbatim">org-agenda-schedule</code></td></tr> | ||
| 626 | <tr><td><code class="verbatim">C-c C-d</code></td><td>Sets a deadline</td><td><code class="verbatim">org-agenda-deadline</code></td></tr> | ||
| 627 | <tr><td><code class="verbatim">S-<right></code>, <code class="verbatim">S-<left></code> (<code class="verbatim">⇧→</code>, <code class="verbatim">⇧←</code>)</td><td>Moves the date the line is listed for by a day</td><td><code class="verbatim">org-agenda-date-later=/</code>-earlier=</td></tr> | ||
| 628 | <tr><td><code class="verbatim">I</code></td><td>Clocks in</td><td><code class="verbatim">org-agenda-clock-in</code></td></tr> | ||
| 629 | <tr><td><code class="verbatim">O</code></td><td>Clocks out</td><td><code class="verbatim">org-agenda-clock-out</code></td></tr> | ||
| 630 | <tr><td><code class="verbatim">X</code></td><td>Cancels the clock</td><td><code class="verbatim">org-agenda-clock-cancel</code></td></tr> | ||
| 631 | <tr><td><code class="verbatim">C-c C-w</code></td><td>Refiles</td><td><code class="verbatim">org-agenda-refile</code></td></tr> | ||
| 632 | <tr><td><code class="verbatim">$</code>, <code class="verbatim">C-c $</code>, <code class="verbatim">C-c C-x C-s</code></td><td>Archives</td><td><code class="verbatim">org-agenda-archive</code></td></tr> | ||
| 633 | <tr><td><code class="verbatim">k</code></td><td>Captures an entry scheduled on the selected line's day</td><td><code class="verbatim">org-agenda-capture</code></td></tr> | ||
| 634 | <tr><td><code class="verbatim">s</code></td><td>Saves every file</td><td><code class="verbatim">org-save-all-org-buffers</code></td></tr> | ||
| 635 | </tbody> | ||
| 636 | </table> | ||
| 637 | <p>Without a selected line, <code class="verbatim">k</code> captures onto today when today is shown, else onto the first day shown. The + at the right of each day's header captures onto that day; see <a href="08-capture.html">Capture</a>.</p> | ||
| 638 | <p>Right-click a line for Open, Cycle TODO State, Set Priority…, Set Tags…, Schedule…, Set Deadline…, Add to Calendar…, Clock In, Mark or Unmark, and Archive. A calendar event's menu has Show in Calendar and Edit Event…; a reminder's has Show in Reminders.</p> | ||
| 639 | <p><code class="verbatim">t</code> follows <code class="verbatim">org-todo</code>: with fast-selection keys in your TODO keywords it asks for the state, otherwise it cycles (see <a href="05-todos-and-tags.html">TODOs and tags</a>). Questions an action needs, such as a date for <code class="verbatim">C-c C-s</code> or a note on a state change, appear in the agenda window. Dates take the same input as in the editor (see <a href="06-dates-and-clocking.html">Dates, scheduling and clocking</a>). <code class="verbatim">S-<right></code> and <code class="verbatim">S-<left></code> work only on deadline, scheduled and timestamp lines; they change the timestamp the line comes from.</p> | ||
| 640 | <p><code class="verbatim">C-c C-w</code> brings the main window forward and asks for the target there, where the target list is searchable.</p> | ||
| 641 | <p><code class="verbatim">I</code> clocks in as Clock In does, so with no clock running it first asks about open clocks, in the main window's echo area. See <a href="06-dates-and-clocking.html">Dates, scheduling and clocking</a>.</p> | ||
| 642 | <p>Each action finds the entry again by its heading line before it changes anything, so an action on a line whose entry has since moved or changed reports that rather than editing the wrong text. Edits go through the open buffer when the file is open, and through the file otherwise.</p> | ||
| 643 | <h3 id="bulk-actions">Bulk actions</h3> | ||
| 644 | <table> | ||
| 645 | <thead> | ||
| 646 | <tr><th>Key</th><th>Does</th><th>Org command</th></tr> | ||
| 647 | </thead> | ||
| 648 | <tbody> | ||
| 649 | <tr><td><code class="verbatim">m</code></td><td>Marks the selected entry (shown with a bar at its left)</td><td><code class="verbatim">org-agenda-bulk-mark</code></td></tr> | ||
| 650 | <tr><td><code class="verbatim">u</code></td><td>Unmarks it</td><td><code class="verbatim">org-agenda-bulk-unmark</code></td></tr> | ||
| 651 | <tr><td><code class="verbatim">U</code></td><td>Unmarks everything</td><td><code class="verbatim">org-agenda-bulk-unmark-all</code></td></tr> | ||
| 652 | <tr><td><code class="verbatim">B</code></td><td>Asks for an action on every marked entry</td><td><code class="verbatim">org-agenda-bulk-action</code></td></tr> | ||
| 653 | </tbody> | ||
| 654 | </table> | ||
| 655 | <p><code class="verbatim">B</code> offers <code class="verbatim">$</code> archive, <code class="verbatim">r</code> refile, <code class="verbatim">t</code> set a TODO state (typed; empty for none), <code class="verbatim">+</code> add a tag, <code class="verbatim">-</code> remove a tag, <code class="verbatim">s</code> schedule and <code class="verbatim">d</code> set a deadline. Type the letter and press OK. Entries that changed since they were marked are skipped and counted in the status line. An action that needs a further answer per entry, such as a state-change note, is not run in bulk; the status line tells you to run it on the entry.</p> | ||
| 656 | <p>On iOS, tap Select in the bar at the bottom, or Select in an entry's menu, then tap entries to mark them. The bar then shows how many are selected, Actions and Done. Actions offers the same actions: TODO State…, Add Tag…, Remove Tag…, Schedule…, Deadline…, Refile… and Archive…, which asks first. After an action, or Done, the selection ends.</p> | ||
| 657 | <h2 id="reminders">Reminders</h2> | ||
| 658 | <p>orgstar can post a notification before each timed entry, as <code class="verbatim">org-agenda-to-appt</code> hands entries to <code class="verbatim">appt</code>. Reminders cover the next 7 days and include deadline, scheduled, plain timestamp and range lines that have a time of day and are not done. Overdue items and upcoming-deadline warnings don't get reminders.</p> | ||
| 659 | <table> | ||
| 660 | <thead> | ||
| 661 | <tr><th>Setting</th><th>Default</th><th><code class="verbatim">config.toml</code></th></tr> | ||
| 662 | </thead> | ||
| 663 | <tbody> | ||
| 664 | <tr><td>Notify before timed entries</td><td>on</td><td><code class="verbatim">reminders = true</code> under <code class="verbatim">[orgstar]</code></td></tr> | ||
| 665 | <tr><td>Minutes of warning</td><td>12</td><td><code class="verbatim">appt-message-warning-time = 12</code></td></tr> | ||
| 666 | </tbody> | ||
| 667 | </table> | ||
| 668 | <p>Both are in Settings ▸ Agenda. An entry's <code class="verbatim">APPT_WARNTIME</code> property, in minutes, overrides the warning time for that entry. If the warning time has already passed but the entry hasn't started, the reminder fires at once.</p> | ||
| 669 | <p>The notification's title is the heading; its body is the time, Org's leader text (<code class="verbatim">Scheduled:</code>, <code class="verbatim">Deadline:</code>) if any, and the category, such as <code class="verbatim">14:00 · Scheduled: · work</code>. Clicking it shows the entry in the main window.</p> | ||
| 670 | <p>On the Mac, reminders are updated two seconds after edits stop, when files change, and every hour. At most 64 are set, the earliest first. The agenda's status line says how far ahead they are set, or that notifications are off for orgstar in System Settings. Turning reminders off removes the pending ones.</p> | ||
| 671 | <h2 id="the-board">The board</h2> | ||
| 672 | <p>The board shows the entries of your agenda files as a table or as kanban columns. It has no Org equivalent; the table is close to Org's column view across files. Open it with Window ▸ Board (<code class="verbatim">⇧⌘B</code>). It reads the same files as the agenda, including the subfolder setting.</p> | ||
| 673 | <p>The toolbar has:</p> | ||
| 674 | <ul> | ||
| 675 | <li>a Table / Kanban switch;</li> | ||
| 676 | <li>a match field, with the syntax of <a href="#tag-and-property-matches">Tag and property matches</a>. When empty, the board shows every entry with a TODO keyword;</li> | ||
| 677 | <li>in table mode, a field of property names to show as extra columns, separated by commas (default <code class="verbatim">EFFORT</code>).</li> | ||
| 678 | </ul> | ||
| 679 | <p>These three choices are remembered by the app; they are not in <code class="verbatim">config.toml</code>.</p> | ||
| 680 | <h3 id="table">Table</h3> | ||
| 681 | <p>Columns: TODO, priority, title, tags, scheduled, deadline, your property columns, and the file. Click a column header to sort (the property columns don't sort). The TODO column sorts by the keyword's order in your sequences. The context menu on a row offers Set TODO (a keyword or None), Set Property… (asked in the main window as <code class="verbatim">NAME value</code>) and Open. Double-click a row to open the entry.</p> | ||
| 682 | <h3 id="kanban">Kanban</h3> | ||
| 683 | <p>Each TODO keyword your files use gets a column, in sequence order, done keywords included. A card shows the priority and title, the category and tags, and the deadline (in red) or the scheduled date. Drag a card to another column to set that keyword; this is the same edit as changing the state in the editor, so logging and state-change notes apply (a note is asked for in the main window). Double-click a card to open its entry. With VoiceOver, each card has a Move to … action for each other column.</p> | ||
| 684 | <p>With a match that includes entries without a TODO keyword, those entries appear in the table but not on the kanban board, which has no column for them.</p> | ||
| 685 | <h3 id="on-ios">On iOS</h3> | ||
| 686 | <p>Choose Board from the Views menu in the Agenda tab. The board opens over the agenda with a List / Kanban switch at the top, a match field under it (press Search to apply it), and Done to close it. The list shows the entries sorted by keyword, then title; tap one to open it. In Kanban, columns scroll sideways; touch and hold a card, then drag it to another column to set that keyword. A card's or row's menu has Move To (a keyword, or None), Set Property… (<code class="verbatim">NAME value</code>) and Open. The Kanban or List choice and the match are remembered, separately from the Mac's.</p> | ||
| 687 | <h2 id="desktop-widgets">Desktop widgets</h2> | ||
| 688 | <p>On the Mac, orgstar's widgets go on the desktop and in Notification Center: right-click the desktop, choose Edit Widgets…, and pick orgstar in the gallery. They appear there once orgstar has run.</p> | ||
| 689 | <table> | ||
| 690 | <thead> | ||
| 691 | <tr><th>Widget</th><th>Sizes</th><th>Shows</th></tr> | ||
| 692 | </thead> | ||
| 693 | <tbody> | ||
| 694 | <tr><td>Today</td><td>Small, medium and large</td><td>The date, the open count, and what's left of today, as on iOS.</td></tr> | ||
| 695 | <tr><td>Up Next</td><td>Small</td><td>The next entry's time or status and title, or the agenda when nothing is left today.</td></tr> | ||
| 696 | <tr><td>Habits</td><td>Small, medium and large</td><td>Each habit's consistency graph, as on iOS.</td></tr> | ||
| 697 | </tbody> | ||
| 698 | </table> | ||
| 699 | <p>Click a row in Today, the Up Next widget or a habit to show that entry in orgstar; click elsewhere to open the agenda. The widgets read the next seven days of the agenda and the habits, which the app writes to <code class="verbatim">~/Library/Application Support/Orgstar/Widgets</code> (in the Mac App Store version, <code class="verbatim">~/Library/Group Containers/group.sh.krz.orgstar/Widgets</code>) when files, edits or settings change and every hour while it runs; see <a href="14-ios.html">iOS</a> for what they show and leave out.</p> | ||
| 700 | <h2 id="the-agenda-on-ios">The agenda on iOS</h2> | ||
| 701 | <p>The Agenda tab shows the same views from the same files, using the settings in the synced <code class="verbatim">config.toml</code> and the views in <code class="verbatim">views.toml</code> (see <a href="14-ios.html">iOS</a>). Differences from the Mac:</p> | ||
| 702 | <ul> | ||
| 703 | <li>The Views menu, at the top left, lists the built-in views, your saved views, Tags and Properties…, which asks for a match string, and Search…, which asks for a search string; while one of those is showing, Save as View… keeps it as a view in <code class="verbatim">views.toml</code>, as on the Mac. There is no TODO-only match or search from the menu; use <code class="verbatim">/!</code> in the match, <code class="verbatim">!</code> at the start of the search string, or a <code class="verbatim">todo-match</code> or <code class="verbatim">todo-search</code> view.</li> | ||
| 704 | <li>A bar floats at the bottom of the screen with Earlier, Filter, Today, Go to Date, the span and Later. The span menu switches between Day, Week, Month and the configured span (<code class="verbatim">10 Days</code> by default); Day, Week and Month are around today when today is shown, else around the first day shown. Weeks start on <code class="verbatim">org-agenda-start-on-weekday</code>, as on the Mac. In the TODO list and match views the bar has Filter and Agenda, which returns to the day view. Messages show above the bar; tap one to dismiss it.</li> | ||
| 705 | <li>The title names the days shown: <code class="verbatim">Thu 8 Oct</code>, <code class="verbatim">Week of 5 Oct</code>, <code class="verbatim">October 2026</code>, or <code class="verbatim">5 Oct – 14 Oct</code>.</li> | ||
| 706 | <li>A block view lists its blocks one after the other, each under its title; an agenda block's days follow its title.</li> | ||
| 707 | <li>Day headers read <code class="verbatim">Today · Thu 8 Oct</code>, <code class="verbatim">Tomorrow · Fri 9 Oct</code> or <code class="verbatim">Mon 12 Oct</code>, with a + that captures onto that day. Days before today are grey.</li> | ||
| 708 | <li>Pull down to refresh.</li> | ||
| 709 | <li>The Filter button opens a sheet: type a filter as for <code class="verbatim">/</code>, or tap a tag or category to cycle between Keep, Leave out and no filter.</li> | ||
| 710 | <li>Tap an entry to open it. Tap a calendar event to open Calendar on the event's day; iOS can't open Calendar at one event.</li> | ||
| 711 | <li>Swipe left on an open TODO entry for Done, which sets the first done keyword of its sequence, and Next State, which moves to the next keyword; and on any entry with a heading, for Delete, which asks first, as Delete… in the menu does. The sequence is the one the file defines: the default keywords from <code class="verbatim">config.toml</code>, the file's own <code class="verbatim">#+TODO</code> lines, and those of its setup files, with unsaved edits in an open buffer included.</li> | ||
| 712 | <li>Swipe right on a scheduled entry, a deadline, a habit or a TODO entry, when it isn't done, for Tomorrow, Next Week and Pick Date. Tomorrow is the day after today and Next Week is next Monday. On a deadline row these move the deadline; on other rows they set the scheduled date. A timed row keeps its times.</li> | ||
| 713 | <li>Touch and hold an entry for TODO State…, Reschedule (Tomorrow, Next Week, Pick Date…), Schedule…, Deadline…, Tags…, Priority…, Clock In, Add to Calendar…, Refile…, Archive… and Delete…, which removes the heading and everything under it.</li> | ||
| 714 | <li>Marking an entry done and rescheduling one give haptic feedback.</li> | ||
| 715 | <li>Log Mode, in the span menu, turns log mode on and off. The widgets never show log mode's entries.</li> | ||
| 716 | <li>There are no keyboard commands; bulk actions use Select instead of marks (see <a href="#bulk-actions">Bulk actions</a>).</li> | ||
| 717 | <li>Reminders are set while the app is open. iOS allows at most 64 pending notifications and the app can't add more while it isn't running, so the agenda's footer says how far ahead they go and asks you to open orgstar to set later ones.</li> | ||
| 718 | </ul> | ||
| 719 | <p>The Today and Up Next widgets show the agenda on the Home Screen and the Lock Screen; see <a href="14-ios.html">iPhone and iPad</a>.</p> | ||
| 720 | </main> | ||
| 721 | <footer class="site"> | ||
| 722 | © 2026 Christian Cleberg · <a href="https://krz.sh/apps/orgstar/">krz.sh/apps/orgstar</a> · <a href="/orgstar/third-party.html">third-party notices</a> | ||
| 723 | </footer> | ||
| 724 | </body> | ||
| 725 | </html>\ No newline at end of file | ||
guide/08-capture.html added +379
| @@ -0,0 +1,379 @@ | |||
| 1 | <!DOCTYPE html> | ||
| 2 | <html lang="en"> | ||
| 3 | <head> | ||
| 4 | <meta charset="utf-8"> | ||
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
| 6 | <title>Capture · orgstar</title> | ||
| 7 | <meta name="description" content="Capture templates, the capture window, date trees, org-protocol, Shortcuts and the iOS share sheet."> | ||
| 8 | <link rel="icon" href="../favicon.svg" type="image/svg+xml"> | ||
| 9 | <link rel="stylesheet" href="../theme.css"> | ||
| 10 | <link rel="stylesheet" href="../syntax.css"> | ||
| 11 | <link rel="stylesheet" href="../style.css"> | ||
| 12 | </head> | ||
| 13 | <body> | ||
| 14 | <header class="site"> | ||
| 15 | <a class="site-title" href="../index.html">orgstar</a> | ||
| 16 | <nav> | ||
| 17 | <a href="../install.html">Install</a> | ||
| 18 | <a href="../quickstart.html">Quick start</a> | ||
| 19 | <a href="index.html">Manual</a> | ||
| 20 | </nav> | ||
| 21 | </header> | ||
| 22 | <main> | ||
| 23 | <h1>Capture</h1> | ||
| 24 | <p class="lede">Capture files a note, task or link into the right place in your org files without leaving what you are doing.</p> | ||
| 25 | <nav class="toc" aria-label="On this page"> | ||
| 26 | <h2>On this page</h2> | ||
| 27 | <ul> | ||
| 28 | <li><a href="#starting-a-capture">Starting a capture</a></li> | ||
| 29 | <li><a href="#the-capture-window">The capture window</a></li> | ||
| 30 | <li><a href="#capturing-onto-an-agenda-day">Capturing onto an agenda day</a></li> | ||
| 31 | <li><a href="#capture-templates">Capture templates</a> | ||
| 32 | <ul> | ||
| 33 | <li><a href="#template-groups">Template groups</a></li> | ||
| 34 | <li><a href="#keys">Keys</a></li> | ||
| 35 | <li><a href="#targets">Targets</a></li> | ||
| 36 | <li><a href="#template-types">Template types</a></li> | ||
| 37 | <li><a href="#clocking-while-capturing">Clocking while capturing</a></li> | ||
| 38 | </ul></li> | ||
| 39 | <li><a href="#template-escapes">Template escapes</a> | ||
| 40 | <ul> | ||
| 41 | <li><a href="#inserted-values">Inserted values</a></li> | ||
| 42 | <li><a href="#prompts">Prompts</a></li> | ||
| 43 | <li><a href="#escaping-and-unsupported-escapes">Escaping and unsupported escapes</a></li> | ||
| 44 | </ul></li> | ||
| 45 | <li><a href="#date-trees">Date trees</a></li> | ||
| 46 | <li><a href="#org-protocol">org-protocol</a> | ||
| 47 | <ul> | ||
| 48 | <li><a href="#capture">capture</a></li> | ||
| 49 | <li><a href="#store-link">store-link</a></li> | ||
| 50 | <li><a href="#bookmarklets">Bookmarklets</a></li> | ||
| 51 | </ul></li> | ||
| 52 | <li><a href="#shortcuts">Shortcuts</a></li> | ||
| 53 | <li><a href="#capture-on-ios">Capture on iOS</a> | ||
| 54 | <ul> | ||
| 55 | <li><a href="#the-share-sheet">The share sheet</a></li> | ||
| 56 | </ul></li> | ||
| 57 | <li><a href="#importing-templates-from-emacs">Importing templates from Emacs</a></li> | ||
| 58 | </ul> | ||
| 59 | </nav> | ||
| 60 | <h2 id="starting-a-capture">Starting a capture</h2> | ||
| 61 | <p>Capture mirrors <code class="verbatim">org-capture</code>. Start it from anywhere in the app:</p> | ||
| 62 | <table> | ||
| 63 | <thead> | ||
| 64 | <tr><th>Preset</th><th>Key</th></tr> | ||
| 65 | </thead> | ||
| 66 | <tbody> | ||
| 67 | <tr><td>Mac</td><td><code class="verbatim">⇧⌘N</code> (File ▸ Capture…)</td></tr> | ||
| 68 | <tr><td>Emacs</td><td><code class="verbatim">C-c c</code> or <code class="verbatim">⇧⌘N</code></td></tr> | ||
| 69 | <tr><td>Doom</td><td><code class="verbatim">SPC X</code> (normal state), <code class="verbatim">C-c c</code> or <code class="verbatim">⇧⌘N</code></td></tr> | ||
| 70 | </tbody> | ||
| 71 | </table> | ||
| 72 | <p><code class="verbatim">⌃⌥Space</code> opens the capture window from any app, with orgstar in the background. Turn it off in Settings ▸ Capture, or in <code class="verbatim">config.toml</code>:</p> | ||
| 73 | <pre><code class="language-toml highlight"><span class="source toml"><span class="punctuation definition table toml">[</span><span class="entity name section toml">orgstar</span><span class="punctuation definition table toml">]</span> | ||
| 74 | <span class="variable other key toml">global-capture-hotkey</span> <span class="keyword operator assignment toml">=</span> <span class="constant language toml">false</span></span></code></pre> | ||
| 75 | <p>The shortcut is registered as a system hot key and needs no accessibility permission.</p> | ||
| 76 | <p>Captures can also arrive from a browser through org-protocol, from Shortcuts, and on iOS from the share sheet; see the sections below.</p> | ||
| 77 | <h2 id="the-capture-window">The capture window</h2> | ||
| 78 | <p>A capture goes through up to three steps.</p> | ||
| 79 | <ol> | ||
| 80 | <li><strong>Choose a template.</strong> The window lists your templates and groups with their keys and targets. Type a template's key, or click it. For a key of several characters, such as <code class="verbatim">wb</code>, each character you type narrows the list, and the header shows the keys so far (<code class="verbatim">Capture: w</code>). With a group for <code class="verbatim">w</code> (see <a href="#template-groups">Template groups</a>), typing <code class="verbatim">w</code> or clicking the group lists what is in it. <code class="verbatim">Delete</code> removes the last key typed. The template is chosen as soon as the keys match one.</li> | ||
| 81 | <li><strong>Answer its questions.</strong> If the template has prompts (<code class="verbatim">%^{…}</code>, <code class="verbatim">%^g</code>, <code class="verbatim">%^t</code> and the others below), they appear as a form, after <code class="verbatim">Date for tree entry</code> for a template with <code class="verbatim">time-prompt</code>. Leave a field empty for its default. Press Return (Continue) to go on.</li> | ||
| 82 | <li><strong>Edit and file.</strong> The filled template appears in an editor, headed with the template's name and target, with the cursor where <code class="verbatim">%?</code> was. Press <code class="verbatim">⌘Return</code> (File It) to file it, or click Refile… to file it and then move it, as <code class="verbatim">C-c C-w</code> (<code class="verbatim">org-capture-refile</code>) does. Refile… asks for the target in the main window's echo area, offering the same targets as Refile in the editor (see <a href="04-outlines.org::*Refiling">Refiling</a>); it appears for <code class="verbatim">entry</code> templates only, as in Org.</li> | ||
| 83 | </ol> | ||
| 84 | <p>Press Esc (Cancel) at any step to close the window without filing anything, as <code class="verbatim">org-capture-kill</code> does.</p> | ||
| 85 | <p>Filing, the equivalent of <code class="verbatim">org-capture-finalize</code>, places the text in its target and saves it through the open buffer if the file is open, or into the file otherwise. A target file that doesn't exist is created, with its folders. The status line in the main window then says where the entry went.</p> | ||
| 86 | <p>If filing fails, for example because a heading on an <code class="verbatim">olp</code> path is missing, the window stays open with your text and shows the error in red below it, so you can try again after fixing the file or cancel.</p> | ||
| 87 | <p>Limits compared with Emacs:</p> | ||
| 88 | <ul> | ||
| 89 | <li>The editor is a plain text editor. Org editing commands and keys such as <code class="verbatim">C-c C-c</code> and <code class="verbatim">C-c C-k</code> don't work in it; use <code class="verbatim">⌘Return</code> and Esc.</li> | ||
| 90 | <li>The target is not shown while you edit (the capture buffer in Emacs is narrowed to the new entry in the target file).</li> | ||
| 91 | </ul> | ||
| 92 | <h2 id="capturing-onto-an-agenda-day">Capturing onto an agenda day</h2> | ||
| 93 | <p>The + at the right of a day's header in the agenda, or <code class="verbatim">k</code> in the Mac agenda (<code class="verbatim">org-agenda-capture</code>), starts a capture for that day; see <a href="07-agenda.html">The agenda</a>. Choose a template as usual. The day then stands in for today, as <code class="verbatim">org-overriding-default-time</code> makes it do in Org:</p> | ||
| 94 | <ul> | ||
| 95 | <li><code class="verbatim">%t</code>, <code class="verbatim">%T</code>, <code class="verbatim">%u</code> and <code class="verbatim">%U</code> give that day. The escapes with a time use the current time of day.</li> | ||
| 96 | <li>An empty answer to a date prompt (<code class="verbatim">%^t</code> and the others) is that day.</li> | ||
| 97 | <li>With <code class="verbatim">datetree = true</code>, the entry goes under that day in the date tree, and <code class="verbatim">time-prompt</code> doesn't ask.</li> | ||
| 98 | </ul> | ||
| 99 | <p>When the filled template is a heading without an active timestamp, orgstar adds <code class="verbatim">SCHEDULED:</code> with that day on the line after the heading, or at the end of the planning line when the template has one:</p> | ||
| 100 | <pre><code class="language-org highlight"><span class="text org"><span class="markup heading org"><span class="punctuation definition heading org">*</span> <span class="keyword other todo org">TODO</span> Call the bank | ||
| 101 | </span>SCHEDULED: <span class="constant other timestamp org"><2026-10-09 Fri></span></span></code></pre> | ||
| 102 | <p>The line is part of the text you edit, so you can change or remove it before filing. A template with an active timestamp of its own, such as <code class="verbatim">%t</code> or <code class="verbatim">%^t</code>, gets no <code class="verbatim">SCHEDULED</code> line. On the Mac, the window's header names the day, as <code class="verbatim">Capture, scheduled Fri 9 Oct</code>.</p> | ||
| 103 | <h2 id="capture-templates">Capture templates</h2> | ||
| 104 | <p>Templates live in <code class="verbatim">capture.toml</code> in the configuration folder (<code class="verbatim">~/.config/orgstar/capture.toml</code> by default; see <a href="13-configuration.html">Configuration</a>). Settings ▸ Capture shows its path. Each template is a <code class="verbatim">[[template]]</code> table:</p> | ||
| 105 | <pre><code class="language-toml highlight"><span class="source toml"><span class="punctuation definition table array toml">[[</span><span class="entity name section toml">template</span><span class="punctuation definition table array toml">]]</span> | ||
| 106 | <span class="variable other key toml">key</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>t<span class="punctuation definition string end toml">"</span></span> | ||
| 107 | <span class="variable other key toml">name</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>Personal todo<span class="punctuation definition string end toml">"</span></span> | ||
| 108 | <span class="variable other key toml">type</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>entry<span class="punctuation definition string end toml">"</span></span> | ||
| 109 | <span class="variable other key toml">file</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>todo.org<span class="punctuation definition string end toml">"</span></span> | ||
| 110 | <span class="variable other key toml">headline</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>Inbox<span class="punctuation definition string end toml">"</span></span> | ||
| 111 | <span class="variable other key toml">template</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>* TODO %?<span class="constant character escape toml">\n</span>%i<span class="constant character escape toml">\n</span>%a<span class="punctuation definition string end toml">"</span></span> | ||
| 112 | <span class="variable other key toml">prepend</span> <span class="keyword operator assignment toml">=</span> <span class="constant language toml">false</span></span></code></pre> | ||
| 113 | <p>The file is read each time the capture window opens. If it doesn't exist, or none of its templates is valid, these two built-in templates are used:</p> | ||
| 114 | <table> | ||
| 115 | <thead> | ||
| 116 | <tr><th>Key</th><th>Name</th><th>Target</th><th>Template</th></tr> | ||
| 117 | </thead> | ||
| 118 | <tbody> | ||
| 119 | <tr><td><code class="verbatim">t</code></td><td>Personal todo</td><td><code class="verbatim">todo.org</code>, heading <code class="verbatim">Inbox</code></td><td><code class="verbatim">* TODO %?\n%i\n%a</code></td></tr> | ||
| 120 | <tr><td><code class="verbatim">n</code></td><td>Personal notes</td><td><code class="verbatim">notes.org</code>, heading <code class="verbatim">Inbox</code></td><td><code class="verbatim">* %u %?\n%i\n%a</code></td></tr> | ||
| 121 | </tbody> | ||
| 122 | </table> | ||
| 123 | <p>A problem in the file, such as a table without a key, shows in red at the bottom of the window; the other templates still load.</p> | ||
| 124 | <p>Keys of several characters are typed one character at a time, as in Emacs.</p> | ||
| 125 | <h3 id="template-groups">Template groups</h3> | ||
| 126 | <p>A <code class="verbatim">[[template]]</code> with only <code class="verbatim">key</code> and <code class="verbatim">name</code> is a group, as an entry with only a key and a description is in <code class="verbatim">org-capture-templates</code>:</p> | ||
| 127 | <pre><code class="language-toml highlight"><span class="source toml"><span class="punctuation definition table array toml">[[</span><span class="entity name section toml">template</span><span class="punctuation definition table array toml">]]</span> | ||
| 128 | <span class="variable other key toml">key</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>w<span class="punctuation definition string end toml">"</span></span> | ||
| 129 | <span class="variable other key toml">name</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>Work<span class="punctuation definition string end toml">"</span></span> | ||
| 130 | |||
| 131 | <span class="punctuation definition table array toml">[[</span><span class="entity name section toml">template</span><span class="punctuation definition table array toml">]]</span> | ||
| 132 | <span class="variable other key toml">key</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>wm<span class="punctuation definition string end toml">"</span></span> | ||
| 133 | <span class="variable other key toml">name</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>Meeting<span class="punctuation definition string end toml">"</span></span> | ||
| 134 | <span class="variable other key toml">file</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>work.org<span class="punctuation definition string end toml">"</span></span> | ||
| 135 | <span class="variable other key toml">olp</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>Meetings<span class="punctuation definition string end toml">"</span></span> | ||
| 136 | <span class="variable other key toml">template</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>* %?<span class="punctuation definition string end toml">"</span></span></span></code></pre> | ||
| 137 | <p>The first list then shows <code class="verbatim">[w] Work…</code> in place of the templates under it; choosing it lists the templates whose keys are one character longer and start with <code class="verbatim">w</code>, and the groups below it. A template longer than the next key with no group for its prefix is listed anyway, so that it can still be chosen. On iOS, the Template picker names each template after its groups, as <code class="verbatim">Work › Meeting</code>.</p> | ||
| 138 | <h3 id="keys">Keys</h3> | ||
| 139 | <table> | ||
| 140 | <thead> | ||
| 141 | <tr><th>Key</th><th>Value</th><th>Meaning</th><th>Org property</th></tr> | ||
| 142 | </thead> | ||
| 143 | <tbody> | ||
| 144 | <tr><td><code class="verbatim">key</code></td><td>string, required</td><td>What you press to choose the template</td><td>key</td></tr> | ||
| 145 | <tr><td><code class="verbatim">name</code></td><td>string</td><td>The name in the list; the key when omitted</td><td>description</td></tr> | ||
| 146 | <tr><td><code class="verbatim">type</code></td><td>string</td><td><code class="verbatim">entry</code> (the default), <code class="verbatim">item</code>, <code class="verbatim">checkitem</code>, <code class="verbatim">plain</code> or <code class="verbatim">table-line</code></td><td>type</td></tr> | ||
| 147 | <tr><td><code class="verbatim">template</code></td><td>string, required</td><td>The text to fill; see <a href="#template-escapes">Template escapes</a></td><td>template</td></tr> | ||
| 148 | <tr><td><code class="verbatim">file</code></td><td>string</td><td>The target file; required except with <code class="verbatim">id</code>, <code class="verbatim">clock</code> or <code class="verbatim">denote</code></td><td>target</td></tr> | ||
| 149 | <tr><td><code class="verbatim">headline</code></td><td>string</td><td>A heading in <code class="verbatim">file</code></td><td><code class="verbatim">file+headline</code></td></tr> | ||
| 150 | <tr><td><code class="verbatim">olp</code></td><td>string</td><td>An outline path in <code class="verbatim">file</code>, titles separated by <code class="verbatim">/</code></td><td><code class="verbatim">file+olp</code></td></tr> | ||
| 151 | <tr><td><code class="verbatim">datetree</code></td><td>boolean</td><td>Today's entry in a date tree in <code class="verbatim">file</code>, under <code class="verbatim">olp</code> if given</td><td><code class="verbatim">file+olp+datetree</code></td></tr> | ||
| 152 | <tr><td><code class="verbatim">tree-type</code></td><td>string</td><td><code class="verbatim">day</code> (the default), <code class="verbatim">week</code>, <code class="verbatim">month</code>, or groups such as <code class="verbatim">"year quarter"</code>, for <code class="verbatim">datetree</code></td><td><code class="verbatim">:tree-type</code></td></tr> | ||
| 153 | <tr><td><code class="verbatim">time-prompt</code></td><td>boolean</td><td>With <code class="verbatim">datetree</code>, ask which day the entry is for</td><td><code class="verbatim">:time-prompt</code></td></tr> | ||
| 154 | <tr><td><code class="verbatim">regexp</code></td><td>string</td><td>After the first match of an Emacs regexp in <code class="verbatim">file</code></td><td><code class="verbatim">file+regexp</code></td></tr> | ||
| 155 | <tr><td><code class="verbatim">id</code></td><td>string</td><td>The heading with this <code class="verbatim">ID</code> property, in any file</td><td><code class="verbatim">id</code></td></tr> | ||
| 156 | <tr><td><code class="verbatim">clock</code></td><td>boolean</td><td>The entry the clock is running in</td><td><code class="verbatim">clock</code></td></tr> | ||
| 157 | <tr><td><code class="verbatim">denote</code></td><td>boolean</td><td>A new Denote note, asked for first; see <a href="09-links.org::*Capture">Denote capture</a></td><td><code class="verbatim">denote-org-capture</code></td></tr> | ||
| 158 | <tr><td><code class="verbatim">prepend</code></td><td>boolean</td><td>Put the text first rather than last</td><td><code class="verbatim">:prepend</code></td></tr> | ||
| 159 | <tr><td><code class="verbatim">immediate-finish</code></td><td>boolean</td><td>File without showing the editor</td><td><code class="verbatim">:immediate-finish</code></td></tr> | ||
| 160 | <tr><td><code class="verbatim">empty-lines</code></td><td>integer</td><td>Blank lines before and after the captured text</td><td><code class="verbatim">:empty-lines</code></td></tr> | ||
| 161 | <tr><td><code class="verbatim">empty-lines-before</code></td><td>integer</td><td>Blank lines before; overrides <code class="verbatim">empty-lines</code></td><td><code class="verbatim">:empty-lines-before</code></td></tr> | ||
| 162 | <tr><td><code class="verbatim">empty-lines-after</code></td><td>integer</td><td>Blank lines after; overrides <code class="verbatim">empty-lines</code></td><td><code class="verbatim">:empty-lines-after</code></td></tr> | ||
| 163 | <tr><td><code class="verbatim">jump-to-captured</code></td><td>boolean</td><td>Show the new entry in the editor after filing</td><td><code class="verbatim">:jump-to-captured</code></td></tr> | ||
| 164 | <tr><td><code class="verbatim">clock-in</code></td><td>boolean</td><td>Clock in to the captured entry</td><td><code class="verbatim">:clock-in</code></td></tr> | ||
| 165 | <tr><td><code class="verbatim">clock-keep</code></td><td>boolean</td><td>With <code class="verbatim">clock-in</code>, keep the clock running after filing</td><td><code class="verbatim">:clock-keep</code></td></tr> | ||
| 166 | <tr><td><code class="verbatim">clock-resume</code></td><td>boolean</td><td>With <code class="verbatim">clock-in</code>, restart the clock that was running before</td><td><code class="verbatim">:clock-resume</code></td></tr> | ||
| 167 | <tr><td><code class="verbatim">table-line-pos</code></td><td>string</td><td>Where a <code class="verbatim">table-line</code> goes, such as <code class="verbatim">"II-3"</code></td><td><code class="verbatim">:table-line-pos</code></td></tr> | ||
| 168 | </tbody> | ||
| 169 | </table> | ||
| 170 | <p><code class="verbatim">capture.toml</code> uses a subset of TOML: basic strings in double quotes, literal strings in single quotes, booleans and integers. Multi-line strings (<code class="verbatim">"""…"""</code>) are not supported, so write a newline in a template as <code class="verbatim">\n</code> inside a double-quoted string. A double-quoted string accepts only the escapes <code class="verbatim">\"</code>, <code class="verbatim">\\</code>, <code class="verbatim">\n</code>, <code class="verbatim">\t</code>, <code class="verbatim">\uXXXX</code> and <code class="verbatim">\UXXXXXXXX</code>; any other backslash is an error. A template backslash, as in <code class="verbatim">%\1</code> or <code class="verbatim">\%</code>, is therefore written <code class="verbatim">%\\1</code> or <code class="verbatim">\\%</code> in double quotes, or as it is in a single-quoted string, which has no escapes and no <code class="verbatim">\n</code>.</p> | ||
| 171 | <pre><code class="language-toml highlight"><span class="source toml"><span class="punctuation definition table array toml">[[</span><span class="entity name section toml">template</span><span class="punctuation definition table array toml">]]</span> | ||
| 172 | <span class="variable other key toml">key</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>m<span class="punctuation definition string end toml">"</span></span> | ||
| 173 | <span class="variable other key toml">name</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>Meeting<span class="punctuation definition string end toml">"</span></span> | ||
| 174 | <span class="variable other key toml">file</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>work.org<span class="punctuation definition string end toml">"</span></span> | ||
| 175 | <span class="variable other key toml">olp</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>Meetings<span class="punctuation definition string end toml">"</span></span> | ||
| 176 | <span class="variable other key toml">template</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>* %^{Topic} :meeting:<span class="constant character escape toml">\n</span>%U<span class="constant character escape toml">\n</span>- Attendees: %^{Attendees}<span class="constant character escape toml">\n</span>- Topic again: %<span class="constant character escape toml">\\</span>1<span class="constant character escape toml">\n</span>%?<span class="punctuation definition string end toml">"</span></span></span></code></pre> | ||
| 177 | <h3 id="targets">Targets</h3> | ||
| 178 | <p>The target keys are checked in this order: <code class="verbatim">id</code>, <code class="verbatim">clock</code>, <code class="verbatim">datetree</code>, <code class="verbatim">regexp</code>, <code class="verbatim">headline</code>, <code class="verbatim">olp</code>; with none of them the target is <code class="verbatim">file</code> itself.</p> | ||
| 179 | <table> | ||
| 180 | <thead> | ||
| 181 | <tr><th>Target</th><th>Where the text goes</th></tr> | ||
| 182 | </thead> | ||
| 183 | <tbody> | ||
| 184 | <tr><td><code class="verbatim">file</code> alone</td><td>The file's top level: an <code class="verbatim">entry</code> becomes a top-level heading at the end (or start, with <code class="verbatim">prepend</code>)</td></tr> | ||
| 185 | <tr><td><code class="verbatim">headline = "Inbox"</code></td><td>Under the first heading with that exact title, at any level. If there is none, <code class="verbatim">* Inbox</code> is added at the end of the file</td></tr> | ||
| 186 | <tr><td><code class="verbatim">olp = "Projects/Work"</code></td><td>Under <code class="verbatim">Work</code>, a child of <code class="verbatim">Projects</code>. Every heading on the path must exist; otherwise filing fails with <code class="verbatim">Heading not found on outline path</code></td></tr> | ||
| 187 | <tr><td><code class="verbatim">datetree = true</code></td><td>Under today's heading in a date tree; see <a href="#date-trees">Date trees</a></td></tr> | ||
| 188 | <tr><td><code class="verbatim">regexp = "…"</code></td><td>At the end of the first match (its start, with <code class="verbatim">prepend</code>), searched ignoring case. When the match is on a heading line, as under <code class="verbatim">headline</code>; otherwise an <code class="verbatim">entry</code> goes to the file's top level, <code class="verbatim">plain</code> text goes at the match, and an <code class="verbatim">item</code> or <code class="verbatim">table-line</code> uses the first list or table from the match's line to the next heading. Fails with <code class="verbatim">No match for target regexp in file</code></td></tr> | ||
| 189 | <tr><td><code class="verbatim">id = "…"</code></td><td>Under the heading with that <code class="verbatim">ID</code>, found through the workspace index. Fails with <code class="verbatim">Cannot find target ID</code> if no heading has it</td></tr> | ||
| 190 | <tr><td><code class="verbatim">clock = true</code></td><td>Under the heading the running clock is in. Fails with <code class="verbatim">No running clock</code> when no clock runs</td></tr> | ||
| 191 | </tbody> | ||
| 192 | </table> | ||
| 193 | <p><code class="verbatim">file</code> may be absolute (<code class="verbatim">/Users/me/org/todo.org</code>), start with <code class="verbatim">~/</code>, or be relative. A relative path is relative to the first folder in the sidebar (your home folder if you have none). Heading titles match the title text without its TODO keyword, priority or tags. Because <code class="verbatim">olp</code> uses <code class="verbatim">/</code> as its separator, a heading whose title contains <code class="verbatim">/</code> can't be on an outline path; use <code class="verbatim">headline</code> or <code class="verbatim">id</code> for it.</p> | ||
| 194 | <p>Emacs's <code class="verbatim">file+function</code> and <code class="verbatim">function</code> targets, and templates read from a file (<code class="verbatim">(file "…")</code>), are not supported.</p> | ||
| 195 | <h3 id="template-types">Template types</h3> | ||
| 196 | <table> | ||
| 197 | <thead> | ||
| 198 | <tr><th>Type</th><th>What is inserted</th></tr> | ||
| 199 | </thead> | ||
| 200 | <tbody> | ||
| 201 | <tr><td><code class="verbatim">entry</code></td><td>An Org entry. If the text has no heading, <code class="verbatim">* = is added. Its level is adjusted to be one below the target heading, or 1 at the top level. Placed as the last child (first with =prepend</code>). Text whose first heading isn't its highest is refused: <code class="verbatim">Template is not a valid Org entry or tree</code></td></tr> | ||
| 202 | <tr><td><code class="verbatim">item</code></td><td>A list item. A =- = bullet is added if the text has none. Goes after the last item of the first list in the target entry (or the file), with that list's indentation; if there is no list, at the end of the entry's text</td></tr> | ||
| 203 | <tr><td><code class="verbatim">checkitem</code></td><td>As <code class="verbatim">item</code>, with a <code class="verbatim">[ ]</code> checkbox added if there is none</td></tr> | ||
| 204 | <tr><td><code class="verbatim">plain</code></td><td>The text as it is, at the end of the entry's body (with <code class="verbatim">prepend</code>, right after the heading line)</td></tr> | ||
| 205 | <tr><td><code class="verbatim">table-line</code></td><td>A table row, in the first table in the target entry (or the file); a new table is made if there is none</td></tr> | ||
| 206 | </tbody> | ||
| 207 | </table> | ||
| 208 | <p>For <code class="verbatim">table-line</code>, a text that doesn't start with a vertical bar gets one. The row goes at the end of the table. With <code class="verbatim">prepend</code> it goes before the first data row after the first rule. With <code class="verbatim">table-line-pos</code>, <code class="verbatim">II-3</code> means three lines above the second horizontal rule and <code class="verbatim">I+1</code> the first line below the first rule; an impossible position fails with <code class="verbatim">Invalid table line specification</code>. After the row is placed, the table is aligned and its formulas recomputed; a table whose formulas need Emacs makes the capture fail with a message that says so (see <a href="10-tables.html">Tables</a>).</p> | ||
| 209 | <p>Placement follows <code class="verbatim">org-capture-place-entry</code> and its siblings, including how blank lines are kept: without <code class="verbatim">empty-lines</code> options, a new heading gets a blank line before it when its neighbors have one (<code class="verbatim">org-blank-before-new-entry</code> <code class="verbatim">(heading . auto)</code>). Within an existing list, at most one blank line goes between items.</p> | ||
| 210 | <h3 id="clocking-while-capturing">Clocking while capturing</h3> | ||
| 211 | <p>With <code class="verbatim">clock-in = true</code>, the captured entry gets a clock entry from when the template was filled to when you filed it, as Emacs clocks in while the capture buffer is open and out on finalize. With <code class="verbatim">clock-keep = true</code> as well, the clock keeps running in the new entry. With <code class="verbatim">clock-resume = true</code>, the clock that was running before the capture starts again after filing. With no clock running, clocking in to the entry first asks about open clocks, as Clock In does, as of when the capture began; on the Mac the questions are in the main window's echo area. See <a href="06-dates-and-clocking.html">Dates, scheduling and clocking</a>.</p> | ||
| 212 | <h2 id="template-escapes">Template escapes</h2> | ||
| 213 | <p>These follow <code class="verbatim">org-capture-fill-template</code>. Escapes that need no answer are filled first; prompts are then asked in order.</p> | ||
| 214 | <h3 id="inserted-values">Inserted values</h3> | ||
| 215 | <table> | ||
| 216 | <thead> | ||
| 217 | <tr><th>Escape</th><th>Inserts</th></tr> | ||
| 218 | </thead> | ||
| 219 | <tbody> | ||
| 220 | <tr><td><code class="verbatim">%?</code></td><td>Nothing; the cursor goes here</td></tr> | ||
| 221 | <tr><td><code class="verbatim">%i</code></td><td>The initial text: the selection in the editor, or the body from org-protocol, Shortcuts or the share sheet. Later lines get the indentation of the line <code class="verbatim">%i</code> is on</td></tr> | ||
| 222 | <tr><td><code class="verbatim">%a</code></td><td>A link to where capture started, <code class="verbatim">[[target][description]]</code></td></tr> | ||
| 223 | <tr><td><code class="verbatim">%A</code></td><td>The same link, asking for its description</td></tr> | ||
| 224 | <tr><td><code class="verbatim">%l</code></td><td>The link as <code class="verbatim">[[target]]</code>, without description</td></tr> | ||
| 225 | <tr><td><code class="verbatim">%L</code></td><td>The link target alone</td></tr> | ||
| 226 | <tr><td><code class="verbatim">%c</code>, <code class="verbatim">%x</code></td><td>The clipboard's text</td></tr> | ||
| 227 | <tr><td><code class="verbatim">%f</code></td><td>The name of the file capture started from</td></tr> | ||
| 228 | <tr><td><code class="verbatim">%F</code></td><td>The full path of that file</td></tr> | ||
| 229 | <tr><td><code class="verbatim">%n</code></td><td>Your full name from macOS</td></tr> | ||
| 230 | <tr><td><code class="verbatim">%k</code></td><td>The title of the entry the clock is running in</td></tr> | ||
| 231 | <tr><td><code class="verbatim">%K</code></td><td>A link to that entry</td></tr> | ||
| 232 | <tr><td><code class="verbatim">%t</code></td><td>Today's date as an active timestamp, <code class="verbatim"><2026-10-07 Wed></code></td></tr> | ||
| 233 | <tr><td><code class="verbatim">%T</code></td><td>Active timestamp with the current time</td></tr> | ||
| 234 | <tr><td><code class="verbatim">%u</code></td><td>Inactive timestamp, <code class="verbatim">[2026-10-07 Wed]</code></td></tr> | ||
| 235 | <tr><td><code class="verbatim">%U</code></td><td>Inactive timestamp with the current time</td></tr> | ||
| 236 | <tr><td><code class="verbatim">%<…></code></td><td>The current time formatted with a <code class="verbatim">format-time-string</code> pattern, such as <code class="verbatim">%<%Y-%m-%d %H:%M></code></td></tr> | ||
| 237 | <tr><td><code class="verbatim">%:name</code></td><td>A link property; see below</td></tr> | ||
| 238 | <tr><td><code class="verbatim">%[file]</code></td><td>The contents of the file; see below</td></tr> | ||
| 239 | <tr><td><code class="verbatim">%(sexp)</code></td><td>The value of an Emacs Lisp form; see below</td></tr> | ||
| 240 | </tbody> | ||
| 241 | </table> | ||
| 242 | <p>From the Mac capture window, <code class="verbatim">%a</code> links to the heading at the cursor in the open file, as <code class="verbatim">[[file:~/org/work.org::*Heading][Heading]]</code>, or to the file itself before the first heading. It is empty with no file open.</p> | ||
| 243 | <p><code class="verbatim">%<…></code> understands <code class="verbatim">%Y</code>, <code class="verbatim">%m</code>, <code class="verbatim">%d</code>, <code class="verbatim">%e</code>, <code class="verbatim">%H</code>, <code class="verbatim">%M</code>, <code class="verbatim">%S</code>, <code class="verbatim">%a</code>, <code class="verbatim">%A</code>, <code class="verbatim">%b</code>, <code class="verbatim">%B</code>, <code class="verbatim">%F</code>, <code class="verbatim">%R</code> and <code class="verbatim">%%</code>, with English day and month names. Other <code class="verbatim">format-time-string</code> codes are left in the text as they are.</p> | ||
| 244 | <p><code class="verbatim">%[file]</code> is replaced by the file's contents before anything else, as in Org, so escapes and prompts in the file work, and so does a <code class="verbatim">%[…]</code> in it. A relative path is relative to the configuration folder (the one with <code class="verbatim">capture.toml</code>), and <code class="verbatim">~</code> is your home folder. The file name runs to the last <code class="verbatim">]</code> on the line. A file that can't be read leaves <code class="verbatim">%![could not insert …]</code> in the text.</p> | ||
| 245 | <p><code class="verbatim">%(sexp)</code> evaluates the form after the other escapes are expanded, as Org does, and inserts its value: a string as it is, nothing for <code class="verbatim">nil</code>; any other value is an error. Escapes inside the form, such as <code class="verbatim">%i</code> or <code class="verbatim">%:link</code> in a string, are expanded with backslashes and quotes escaped. orgstar evaluates the form with its own Lisp, not Emacs: <code class="verbatim">concat</code>, <code class="verbatim">format</code>, <code class="verbatim">upcase</code>, <code class="verbatim">substring</code>, <code class="verbatim">mapconcat</code>, <code class="verbatim">if</code>, <code class="verbatim">let</code> and the other functions listed under Lisp formulas in <a href="10-tables.html">Tables</a>, with <code class="verbatim">current-time</code> and <code class="verbatim">format-time-string</code> at the capture's time, plus <code class="verbatim">user-full-name</code> and <code class="verbatim">read-string</code>. <code class="verbatim">read-string</code> is asked as a question before the template's <code class="verbatim">%^</code> prompts. A form that calls anything else stops the capture with a message naming the function.</p> | ||
| 246 | <p><code class="verbatim">%:name</code> inserts a property of the link being captured. From org-protocol these are <code class="verbatim">%:link</code>, <code class="verbatim">%:description</code> (the page title), <code class="verbatim">%:type</code> (the link's scheme, such as <code class="verbatim">https</code>), <code class="verbatim">%:annotation</code> (the same as <code class="verbatim">%a</code>) and <code class="verbatim">%:initial</code> (the same as <code class="verbatim">%i</code>). Without org-protocol, <code class="verbatim">%:annotation</code> and <code class="verbatim">%:initial</code> still work and other names insert nothing.</p> | ||
| 247 | <h3 id="prompts">Prompts</h3> | ||
| 248 | <table> | ||
| 249 | <thead> | ||
| 250 | <tr><th>Escape</th><th>Asks for</th></tr> | ||
| 251 | </thead> | ||
| 252 | <tbody> | ||
| 253 | <tr><td><code class="verbatim">%^{Prompt}</code></td><td>A line of text</td></tr> | ||
| 254 | <tr><td><code class="verbatim">%^g</code></td><td>Tags, offering the tags used in the target file</td></tr> | ||
| 255 | <tr><td><code class="verbatim">%^G</code></td><td>Tags, offering every tag in your folders</td></tr> | ||
| 256 | <tr><td><code class="verbatim">%^t</code>, <code class="verbatim">%^T</code></td><td>A date, inserted as an active timestamp; <code class="verbatim">%^T</code> always includes a time</td></tr> | ||
| 257 | <tr><td><code class="verbatim">%^u</code>, <code class="verbatim">%^U</code></td><td>The same as an inactive timestamp</td></tr> | ||
| 258 | <tr><td><code class="verbatim">%^C</code></td><td>Text, offering the initial text and the clipboard</td></tr> | ||
| 259 | <tr><td><code class="verbatim">%^L</code></td><td>As <code class="verbatim">%^C</code>, inserted as a link</td></tr> | ||
| 260 | <tr><td><code class="verbatim">%^{NAME}p</code></td><td>A value for the property <code class="verbatim">NAME</code>, set in the entry's property drawer</td></tr> | ||
| 261 | </tbody> | ||
| 262 | </table> | ||
| 263 | <p><code class="verbatim">%^{Prompt|default|a|b}</code> asks for text with a default and suggested choices, separated by vertical bars.</p> | ||
| 264 | <p>A name in braces before any of the keyed forms becomes its prompt: <code class="verbatim">%^{Start}T</code>, <code class="verbatim">%^{Context}g</code>. Leave a text answer empty for the default. Tags are typed separated by colons (<code class="verbatim">work:urgent</code>); on a heading line they are aligned to <code class="verbatim">org-tags-column</code>. A date takes the same input as the editor's date prompt, such as <code class="verbatim">+2d</code>, <code class="verbatim">fri</code> or <code class="verbatim">fri 14:00</code> (see <a href="06-dates-and-clocking.html">Dates, scheduling and clocking</a>); an empty answer is today, or now for <code class="verbatim">%^T</code> and <code class="verbatim">%^U</code>. A time in the answer makes <code class="verbatim">%^t</code> include it.</p> | ||
| 265 | <p>After the prompts are answered, <code class="verbatim">%\1</code>, <code class="verbatim">%\2</code> and so on insert the answer to the first, second, … text prompt (<code class="verbatim">%^{…}</code> only), and <code class="verbatim">%\*1</code>, <code class="verbatim">%\*2</code> the answer to the first, second, … prompt of any kind.</p> | ||
| 266 | <h3 id="escaping-and-unsupported-escapes">Escaping and unsupported escapes</h3> | ||
| 267 | <p>Put a backslash before <code class="verbatim">%</code> to keep it literally: <code class="verbatim">\%t</code> inserts <code class="verbatim">%t</code> (in a double-quoted TOML string, write <code class="verbatim">\\%t</code>). Two backslashes insert one backslash followed by the escape's value.</p> | ||
| 268 | <p>Any other <code class="verbatim">%</code> sequence is left as it is.</p> | ||
| 269 | <h2 id="date-trees">Date trees</h2> | ||
| 270 | <p>With <code class="verbatim">datetree = true</code>, the entry goes under today's date in a tree of headings, as <code class="verbatim">org-datetree-find-create-entry</code> builds it. Missing levels are created in date order among their siblings.</p> | ||
| 271 | <table> | ||
| 272 | <thead> | ||
| 273 | <tr><th><code class="verbatim">tree-type</code></th><th>Levels</th></tr> | ||
| 274 | </thead> | ||
| 275 | <tbody> | ||
| 276 | <tr><td><code class="verbatim">day</code></td><td><code class="verbatim">* 2026</code>, <code class="verbatim">** 2026-10 October</code>, <code class="verbatim">*** 2026-10-07 Wednesday</code></td></tr> | ||
| 277 | <tr><td><code class="verbatim">week</code></td><td><code class="verbatim">* 2026</code>, <code class="verbatim">** 2026-W41</code>, <code class="verbatim">*** 2026-10-07 Wednesday</code> (ISO week and its year)</td></tr> | ||
| 278 | <tr><td><code class="verbatim">month</code></td><td><code class="verbatim">* 2026</code>, <code class="verbatim">** 2026-10 October</code></td></tr> | ||
| 279 | </tbody> | ||
| 280 | </table> | ||
| 281 | <p><code class="verbatim">tree-type</code> may instead list the levels, any of <code class="verbatim">year</code>, <code class="verbatim">quarter</code>, <code class="verbatim">month</code>, <code class="verbatim">week</code> and <code class="verbatim">day</code> separated by spaces, as a list does in Org: <code class="verbatim">"year quarter month"</code> gives <code class="verbatim">* 2026</code>, <code class="verbatim">** 2026-Q4</code>, <code class="verbatim">*** 2026-10 October</code>. The levels always come in that order. With <code class="verbatim">week</code>, the year is the ISO week's year and the month is the month of the week's Thursday; with <code class="verbatim">week</code> and <code class="verbatim">quarter</code> but no <code class="verbatim">month</code>, quarters are 13-week periods. The day heading always uses the calendar date.</p> | ||
| 282 | <pre><code class="language-toml highlight"><span class="source toml"><span class="punctuation definition table array toml">[[</span><span class="entity name section toml">template</span><span class="punctuation definition table array toml">]]</span> | ||
| 283 | <span class="variable other key toml">key</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>j<span class="punctuation definition string end toml">"</span></span> | ||
| 284 | <span class="variable other key toml">name</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>Journal<span class="punctuation definition string end toml">"</span></span> | ||
| 285 | <span class="variable other key toml">file</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>journal.org<span class="punctuation definition string end toml">"</span></span> | ||
| 286 | <span class="variable other key toml">datetree</span> <span class="keyword operator assignment toml">=</span> <span class="constant language toml">true</span> | ||
| 287 | <span class="variable other key toml">template</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>* %<%H:%M> %?<span class="constant character escape toml">\n</span>%i<span class="punctuation definition string end toml">"</span></span></span></code></pre> | ||
| 288 | <p>With <code class="verbatim">olp</code>, the tree goes under that outline path, one level down, instead of at the top of the file. The date is the day you file the capture, or, with <code class="verbatim">time-prompt = true</code>, the day you give for <code class="verbatim">Date for tree entry</code>, read as <code class="verbatim">org-read-date</code> reads it (<code class="verbatim">+2d</code>, <code class="verbatim">fri</code>). That date is also the template's date: without a time, a day other than today is midnight, so <code class="verbatim">%U</code> gives <code class="verbatim">00:00</code>; with a time, such as <code class="verbatim">fri 14:00</code>, it is that time. Org only asks for date trees, and so does orgstar.</p> | ||
| 289 | <h2 id="org-protocol">org-protocol</h2> | ||
| 290 | <p>orgstar registers the <code class="verbatim">org-protocol:</code> URL scheme and handles the two handlers browser bookmarklets use, as <code class="verbatim">org-protocol.el</code> does in Org 9.8.7. Both the <code class="verbatim">?key=value</code> form and the older <code class="verbatim">:/a/b/c</code> form work.</p> | ||
| 291 | <h3 id="capture">capture</h3> | ||
| 292 | <pre><code class="language-text">org-protocol://capture?template=w&url=https%3A%2F%2Fexample.com&title=Example&body=Selected%20text</code></pre> | ||
| 293 | <p>This opens the capture window with:</p> | ||
| 294 | <ul> | ||
| 295 | <li><code class="verbatim">template</code> chosen. Without <code class="verbatim">template</code>, the template list shows. A key with no template reports <code class="verbatim">No capture template "w"</code>.</li> | ||
| 296 | <li><code class="verbatim">%a</code> and <code class="verbatim">%:annotation</code> set to <code class="verbatim">[[url][title]]</code> (the URL as its own description when the title is blank; the title alone when there is no URL).</li> | ||
| 297 | <li><code class="verbatim">%i</code> and <code class="verbatim">%:initial</code> set to <code class="verbatim">body</code>.</li> | ||
| 298 | <li><code class="verbatim">%:link</code> set to the URL, <code class="verbatim">%:description</code> to the title, and <code class="verbatim">%:type</code> to the URL's scheme.</li> | ||
| 299 | </ul> | ||
| 300 | <p>In the query form, <code class="verbatim">+</code> stands for a space, as in Org; encode a literal <code class="verbatim">+</code> as <code class="verbatim">%2B</code>.</p> | ||
| 301 | <h3 id="store-link">store-link</h3> | ||
| 302 | <pre><code class="language-text">org-protocol://store-link?url=https%3A%2F%2Fexample.com&title=Example</code></pre> | ||
| 303 | <p>This stores the link, so <code class="verbatim">C-c C-l</code> in the editor offers it (see <a href="09-links.html">Links</a>), and puts the URL on the clipboard.</p> | ||
| 304 | <p>Other handlers, such as <code class="verbatim">open-source</code>, report that orgstar handles only capture and store-link.</p> | ||
| 305 | <h3 id="bookmarklets">Bookmarklets</h3> | ||
| 306 | <p>Bookmarklets written for Emacs's org-protocol work unchanged. Add a bookmark with one of these as its address:</p> | ||
| 307 | <pre><code class="language-js highlight"><span class="source js"><span class="entity name label js">javascript</span><span class="punctuation separator js">:</span><span class="variable other object js">location</span><span class="punctuation accessor js">.</span><span class="meta property object js">href</span><span class="keyword operator assignment js">=</span><span class="string quoted single js"><span class="punctuation definition string begin js">'</span>org-protocol://capture?template=w&url=<span class="punctuation definition string end js">'</span></span><span class="keyword operator arithmetic js">+</span><span class="meta function-call js"><span class="support function js">encodeURIComponent</span><span class="meta group js"><span class="punctuation section group js">(</span><span class="variable other object js">location</span><span class="punctuation accessor js">.</span><span class="meta property object js">href</span></span><span class="meta group js"><span class="punctuation section group js">)</span></span></span><span class="keyword operator arithmetic js">+</span><span class="string quoted single js"><span class="punctuation definition string begin js">'</span>&title=<span class="punctuation definition string end js">'</span></span><span class="keyword operator arithmetic js">+</span><span class="meta function-call js"><span class="support function js">encodeURIComponent</span><span class="meta group js"><span class="punctuation section group js">(</span><span class="support type object dom js">document</span><span class="punctuation accessor js">.</span><span class="meta property object js">title</span></span><span class="meta group js"><span class="punctuation section group js">)</span></span></span><span class="keyword operator arithmetic js">+</span><span class="string quoted single js"><span class="punctuation definition string begin js">'</span>&body=<span class="punctuation definition string end js">'</span></span><span class="keyword operator arithmetic js">+</span><span class="meta function-call js"><span class="support function js">encodeURIComponent</span><span class="meta group js"><span class="punctuation section group js">(</span><span class="support type object dom js">window</span><span class="punctuation accessor js">.</span><span class="meta function-call method js"><span class="variable function js">getSelection</span><span class="meta group js"><span class="punctuation section group js">(</span></span><span class="meta group js"><span class="punctuation section group js">)</span></span></span></span><span class="meta group js"><span class="punctuation section group js">)</span></span></span></span></code></pre> | ||
| 308 | <pre><code class="language-js highlight"><span class="source js"><span class="entity name label js">javascript</span><span class="punctuation separator js">:</span><span class="variable other object js">location</span><span class="punctuation accessor js">.</span><span class="meta property object js">href</span><span class="keyword operator assignment js">=</span><span class="string quoted single js"><span class="punctuation definition string begin js">'</span>org-protocol://store-link?url=<span class="punctuation definition string end js">'</span></span><span class="keyword operator arithmetic js">+</span><span class="meta function-call js"><span class="support function js">encodeURIComponent</span><span class="meta group js"><span class="punctuation section group js">(</span><span class="variable other object js">location</span><span class="punctuation accessor js">.</span><span class="meta property object js">href</span></span><span class="meta group js"><span class="punctuation section group js">)</span></span></span><span class="keyword operator arithmetic js">+</span><span class="string quoted single js"><span class="punctuation definition string begin js">'</span>&title=<span class="punctuation definition string end js">'</span></span><span class="keyword operator arithmetic js">+</span><span class="meta function-call js"><span class="support function js">encodeURIComponent</span><span class="meta group js"><span class="punctuation section group js">(</span><span class="support type object dom js">document</span><span class="punctuation accessor js">.</span><span class="meta property object js">title</span></span><span class="meta group js"><span class="punctuation section group js">)</span></span></span></span></code></pre> | ||
| 309 | <p>A matching web capture template:</p> | ||
| 310 | <pre><code class="language-toml highlight"><span class="source toml"><span class="punctuation definition table array toml">[[</span><span class="entity name section toml">template</span><span class="punctuation definition table array toml">]]</span> | ||
| 311 | <span class="variable other key toml">key</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>w<span class="punctuation definition string end toml">"</span></span> | ||
| 312 | <span class="variable other key toml">name</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>Web page<span class="punctuation definition string end toml">"</span></span> | ||
| 313 | <span class="variable other key toml">file</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>inbox.org<span class="punctuation definition string end toml">"</span></span> | ||
| 314 | <span class="variable other key toml">headline</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>Web<span class="punctuation definition string end toml">"</span></span> | ||
| 315 | <span class="variable other key toml">template</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>* %:description<span class="constant character escape toml">\n</span>:PROPERTIES:<span class="constant character escape toml">\n</span>:URL: %:link<span class="constant character escape toml">\n</span>:END:<span class="constant character escape toml">\n</span>%U<span class="constant character escape toml">\n</span>%i<span class="constant character escape toml">\n</span>%?<span class="punctuation definition string end toml">"</span></span></span></code></pre> | ||
| 316 | <h2 id="shortcuts">Shortcuts</h2> | ||
| 317 | <p>The Shortcuts action Capture to orgstar files text with a template, without the capture window. It has two parameters:</p> | ||
| 318 | <table> | ||
| 319 | <thead> | ||
| 320 | <tr><th>Parameter</th><th>Meaning</th></tr> | ||
| 321 | </thead> | ||
| 322 | <tbody> | ||
| 323 | <tr><td>Text</td><td>The text, inserted as <code class="verbatim">%i</code></td></tr> | ||
| 324 | <tr><td>Template Key</td><td>A template's <code class="verbatim">key</code> in <code class="verbatim">capture.toml</code>; the first template when empty</td></tr> | ||
| 325 | </tbody> | ||
| 326 | </table> | ||
| 327 | <p>Every prompt in the template takes its default (an empty answer: today for dates, no tags), and <code class="verbatim">%?</code> is ignored. <code class="verbatim">%a</code> is empty. On the Mac, <code class="verbatim">%c</code> is the clipboard and <code class="verbatim">%n</code> your name; on iOS both are empty, because reading the pasteboard would ask for permission on every run. The action returns a message, <code class="verbatim">Captured to …</code> with the target on the Mac and <code class="verbatim">Captured with …</code> with the template name on iOS, or fails with the same messages as the capture window. You can also say "Capture to orgstar" to Siri.</p> | ||
| 328 | <p>On the Mac, the action opens orgstar if it isn't running and waits up to five seconds for it to be ready.</p> | ||
| 329 | <h2 id="capture-on-ios">Capture on iOS</h2> | ||
| 330 | <p>The Capture button (a square with a pencil) at the top of the Agenda and Folders tabs opens the capture sheet. The + on a day's header in the Agenda tab opens it for that day, as described in <a href="#capturing-onto-an-agenda-day">Capturing onto an agenda day</a>; date prompts then show that day as their default. The templates come from the <code class="verbatim">capture.toml</code> in your synced configuration folder (see <a href="14-ios.html">iOS</a>).</p> | ||
| 331 | <p>The sheet works as on the Mac, in a form:</p> | ||
| 332 | <ul> | ||
| 333 | <li>The Template picker chooses the template; it starts on the first one.</li> | ||
| 334 | <li>Prompts appear as fields. Date prompts have a date picker; choices and tags appear as buttons, and tapping a tag adds it.</li> | ||
| 335 | <li>Continue fills the template and shows the text to edit; File files it; Cancel discards it.</li> | ||
| 336 | <li>Refile… in the bottom bar, for <code class="verbatim">entry</code> templates, files the text and then shows the refile targets. If you cancel or refiling fails, the entry opens where it was filed.</li> | ||
| 337 | </ul> | ||
| 338 | <p>Differences from the Mac: there is no selection, clipboard, current file, user name or clock link to insert, so <code class="verbatim">%i</code> and <code class="verbatim">%a</code> are empty unless the capture came from a link or the share sheet, and <code class="verbatim">%c</code>, <code class="verbatim">%x</code>, <code class="verbatim">%f</code>, <code class="verbatim">%F</code>, <code class="verbatim">%n</code>, <code class="verbatim">%k</code> and <code class="verbatim">%K</code> are empty. An org-protocol link naming a template key that doesn't exist opens the sheet on the first template and shows <code class="verbatim">No capture template "x"</code> with the key.</p> | ||
| 339 | <h3 id="the-share-sheet">The share sheet</h3> | ||
| 340 | <p>In another app, share a web page or text and choose orgstar. The share form has:</p> | ||
| 341 | <ul> | ||
| 342 | <li>a Template picker, with the templates the app read the last time it ran;</li> | ||
| 343 | <li>for a link, its title (editable) and address;</li> | ||
| 344 | <li>a Text field, filled with shared text.</li> | ||
| 345 | </ul> | ||
| 346 | <p>Capture saves the item in the app group's capture inbox. The next time you open orgstar, it opens the capture sheet with the item as an org-protocol capture: the link becomes <code class="verbatim">%a</code> and <code class="verbatim">%:link</code>, the title <code class="verbatim">%:description</code>, and the text <code class="verbatim">%i</code>. Several waiting items open one after another, oldest first. If the extension says orgstar's shared folder isn't available, the app group is missing from the build and nothing can be saved.</p> | ||
| 347 | <p>The share form lists no templates until orgstar has run once with your configuration folder; the capture sheet then starts on the first template.</p> | ||
| 348 | <h2 id="importing-templates-from-emacs">Importing templates from Emacs</h2> | ||
| 349 | <p>Import from Emacs (see <a href="13-configuration.html">Configuration</a> and <a href="15-alongside-emacs.html">Alongside Emacs</a>) reads <code class="verbatim">org-capture-templates</code> and appends a <code class="verbatim">[[template]]</code> table to <code class="verbatim">capture.toml</code> for each template whose key isn't there already.</p> | ||
| 350 | <table> | ||
| 351 | <thead> | ||
| 352 | <tr><th>Emacs</th><th>Imported as</th></tr> | ||
| 353 | </thead> | ||
| 354 | <tbody> | ||
| 355 | <tr><td>types <code class="verbatim">entry</code>, <code class="verbatim">item</code>, <code class="verbatim">checkitem</code>, <code class="verbatim">plain</code>, <code class="verbatim">table-line</code></td><td><code class="verbatim">type</code></td></tr> | ||
| 356 | <tr><td><code class="verbatim">(file "f")</code></td><td><code class="verbatim">file</code></td></tr> | ||
| 357 | <tr><td><code class="verbatim">(file+headline "f" "H")</code></td><td><code class="verbatim">file</code>, <code class="verbatim">headline</code></td></tr> | ||
| 358 | <tr><td><code class="verbatim">(file+olp "f" "A" "B")</code></td><td><code class="verbatim">file</code>, <code class="verbatim">olp = "A/B"</code></td></tr> | ||
| 359 | <tr><td><code class="verbatim">(file+olp+datetree "f" …)</code></td><td><code class="verbatim">file</code>, <code class="verbatim">datetree</code>, <code class="verbatim">olp</code> if a path is given</td></tr> | ||
| 360 | <tr><td><code class="verbatim">(file+datetree "f")</code></td><td><code class="verbatim">file</code>, <code class="verbatim">datetree</code></td></tr> | ||
| 361 | <tr><td><code class="verbatim">(file+weektree "f")</code></td><td><code class="verbatim">file</code>, <code class="verbatim">datetree</code>, <code class="verbatim">tree-type = "week"</code></td></tr> | ||
| 362 | <tr><td><code class="verbatim">(file+regexp "f" "re")</code></td><td><code class="verbatim">file</code>, <code class="verbatim">regexp</code></td></tr> | ||
| 363 | <tr><td><code class="verbatim">(id "…")</code></td><td><code class="verbatim">id</code></td></tr> | ||
| 364 | <tr><td><code class="verbatim">(clock)</code></td><td><code class="verbatim">clock</code></td></tr> | ||
| 365 | <tr><td><code class="verbatim">:prepend</code>, <code class="verbatim">:immediate-finish</code>, <code class="verbatim">:jump-to-captured</code>, <code class="verbatim">:clock-in</code>, <code class="verbatim">:clock-keep</code>, <code class="verbatim">:clock-resume</code></td><td>the boolean of the same name</td></tr> | ||
| 366 | <tr><td><code class="verbatim">:empty-lines</code>, <code class="verbatim">:empty-lines-before</code>, <code class="verbatim">:empty-lines-after</code>, <code class="verbatim">:table-line-pos</code></td><td>the key of the same name</td></tr> | ||
| 367 | <tr><td><code class="verbatim">:tree-type</code>, a symbol or a list such as <code class="verbatim">(year quarter)</code></td><td><code class="verbatim">tree-type</code></td></tr> | ||
| 368 | <tr><td><code class="verbatim">:time-prompt</code></td><td><code class="verbatim">time-prompt = true</code></td></tr> | ||
| 369 | <tr><td><code class="verbatim">("w" "Work")</code>, a key and a description</td><td>a group: <code class="verbatim">key</code> and <code class="verbatim">name</code></td></tr> | ||
| 370 | </tbody> | ||
| 371 | </table> | ||
| 372 | <p>A file name given as a variable or a simple form is evaluated where the importer can. The import report lists what it left out: other targets, templates that aren't strings, unknown <code class="verbatim">:tree-type</code> values, and other properties such as <code class="verbatim">:kill-buffer</code> or <code class="verbatim">:unnarrowed</code>.</p> | ||
| 373 | <p>Emacs resolves relative target files against <code class="verbatim">org-directory</code>; orgstar resolves them against the first folder in the sidebar. If <code class="verbatim">org-directory</code> isn't your first folder, edit the imported <code class="verbatim">file</code> values or make them absolute.</p> | ||
| 374 | </main> | ||
| 375 | <footer class="site"> | ||
| 376 | © 2026 Christian Cleberg · <a href="https://krz.sh/apps/orgstar/">krz.sh/apps/orgstar</a> · <a href="/orgstar/third-party.html">third-party notices</a> | ||
| 377 | </footer> | ||
| 378 | </body> | ||
| 379 | </html>\ No newline at end of file | ||
guide/09-links.html added +447
| @@ -0,0 +1,447 @@ | |||
| 1 | <!DOCTYPE html> | ||
| 2 | <html lang="en"> | ||
| 3 | <head> | ||
| 4 | <meta charset="utf-8"> | ||
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
| 6 | <title>Links · orgstar</title> | ||
| 7 | <meta name="description" content="Link syntax, the link types orgstar follows, storing and inserting links, IDs, backlinks and inline images."> | ||
| 8 | <link rel="icon" href="../favicon.svg" type="image/svg+xml"> | ||
| 9 | <link rel="stylesheet" href="../theme.css"> | ||
| 10 | <link rel="stylesheet" href="../syntax.css"> | ||
| 11 | <link rel="stylesheet" href="../style.css"> | ||
| 12 | </head> | ||
| 13 | <body> | ||
| 14 | <header class="site"> | ||
| 15 | <a class="site-title" href="../index.html">orgstar</a> | ||
| 16 | <nav> | ||
| 17 | <a href="../install.html">Install</a> | ||
| 18 | <a href="../quickstart.html">Quick start</a> | ||
| 19 | <a href="index.html">Manual</a> | ||
| 20 | </nav> | ||
| 21 | </header> | ||
| 22 | <main> | ||
| 23 | <h1>Links</h1> | ||
| 24 | <p class="lede">Write links as Org does, follow them with a key or a click, and see which headings link to the one you are reading.</p> | ||
| 25 | <nav class="toc" aria-label="On this page"> | ||
| 26 | <h2>On this page</h2> | ||
| 27 | <ul> | ||
| 28 | <li><a href="#link-syntax">Link syntax</a></li> | ||
| 29 | <li><a href="#how-links-display">How links display</a></li> | ||
| 30 | <li><a href="#following-links">Following links</a> | ||
| 31 | <ul> | ||
| 32 | <li><a href="#what-each-link-type-does">What each link type does</a></li> | ||
| 33 | <li><a href="#file-links">File links</a></li> | ||
| 34 | <li><a href="#attachment-links">Attachment links</a></li> | ||
| 35 | <li><a href="#id-links">id links</a></li> | ||
| 36 | <li><a href="#denote-links">denote links</a></li> | ||
| 37 | <li><a href="#emacs-lisp-links">Emacs Lisp links</a></li> | ||
| 38 | <li><a href="#timestamps">Timestamps</a></li> | ||
| 39 | </ul></li> | ||
| 40 | <li><a href="#inserting-and-editing-links">Inserting and editing links</a> | ||
| 41 | <ul> | ||
| 42 | <li><a href="#file-paths-in-inserted-links">File paths in inserted links</a></li> | ||
| 43 | <li><a href="#completion-while-typing">Completion while typing</a></li> | ||
| 44 | </ul></li> | ||
| 45 | <li><a href="#storing-links">Storing links</a></li> | ||
| 46 | <li><a href="#ids">IDs</a></li> | ||
| 47 | <li><a href="#targets-and-radio-targets">Targets and radio targets</a></li> | ||
| 48 | <li><a href="#link-abbreviations">Link abbreviations</a></li> | ||
| 49 | <li><a href="#the-backlinks-pane">The backlinks pane</a></li> | ||
| 50 | <li><a href="#nodes-and-daily-notes">Nodes and daily notes</a> | ||
| 51 | <ul> | ||
| 52 | <li><a href="#denote">Denote</a> | ||
| 53 | <ul> | ||
| 54 | <li><a href="#renaming">Renaming</a></li> | ||
| 55 | <li><a href="#query-links">Query links</a></li> | ||
| 56 | <li><a href="#silos">Silos</a></li> | ||
| 57 | <li><a href="#capture">Capture</a></li> | ||
| 58 | <li><a href="#dynamic-blocks">Dynamic blocks</a></li> | ||
| 59 | <li><a href="#sequences">Sequences</a></li> | ||
| 60 | <li><a href="#importing-and-limits">Importing and limits</a></li> | ||
| 61 | </ul></li> | ||
| 62 | </ul></li> | ||
| 63 | <li><a href="#inline-images">Inline images</a> | ||
| 64 | <ul> | ||
| 65 | <li><a href="#pasting-and-dropping-images">Pasting and dropping images</a></li> | ||
| 66 | <li><a href="#remote-images">Remote images</a></li> | ||
| 67 | <li><a href="#sizing">Sizing</a></li> | ||
| 68 | <li><a href="#showing-images-when-a-file-opens">Showing images when a file opens</a></li> | ||
| 69 | </ul></li> | ||
| 70 | <li><a href="#org-protocol-store-link">org-protocol store-link</a></li> | ||
| 71 | <li><a href="#on-ios">On iOS</a></li> | ||
| 72 | <li><a href="#code-references">Code references</a></li> | ||
| 73 | </ul> | ||
| 74 | </nav> | ||
| 75 | <h2 id="link-syntax">Link syntax</h2> | ||
| 76 | <p>orgstar reads links the way <code class="verbatim">org-element-link-parser</code> does. There are three forms.</p> | ||
| 77 | <table> | ||
| 78 | <thead> | ||
| 79 | <tr><th>Form</th><th>Example</th><th>Notes</th></tr> | ||
| 80 | </thead> | ||
| 81 | <tbody> | ||
| 82 | <tr><td>Bracket link</td><td><code class="verbatim">[[https://orgmode.org][Org website]]</code></td><td>Any link type. The description after <code class="verbatim">][</code> is optional.</td></tr> | ||
| 83 | <tr><td>Angle link</td><td><code class="verbatim"><https://orgmode.org></code></td><td>For <code class="verbatim">http</code>, <code class="verbatim">https</code>, <code class="verbatim">mailto</code>, <code class="verbatim">file</code>, <code class="verbatim">id</code>, <code class="verbatim">doi</code>, <code class="verbatim">ftp</code>, <code class="verbatim">news</code>, <code class="verbatim">shell</code>, <code class="verbatim">elisp</code>, <code class="verbatim">info</code>, <code class="verbatim">help</code> and <code class="verbatim">attachment</code>.</td></tr> | ||
| 84 | <tr><td>Plain link</td><td><code class="verbatim">https://orgmode.org</code></td><td>Only <code class="verbatim">https://</code>, <code class="verbatim">http://</code>, <code class="verbatim">mailto:</code> and <code class="verbatim">file:</code> are recognized in running text.</td></tr> | ||
| 85 | </tbody> | ||
| 86 | </table> | ||
| 87 | <p>Inside a bracket link, a target that starts with <code class="verbatim">/</code>, <code class="verbatim">~</code>, <code class="verbatim">./</code> or <code class="verbatim">../</code> is a file link. A target in parentheses, <code class="verbatim">(name)</code>, is a coderef. One that starts with <code class="verbatim">#</code> is a custom ID. Anything without a known <code class="verbatim">type:</code> prefix is a search for text in the current file (a "fuzzy" link). A link may run over a line break; the break and surrounding blanks read as one space.</p> | ||
| 88 | <p>Backslashes before brackets are escaped as in <code class="verbatim">org-link-escape</code>: when orgstar writes a link it doubles backslashes that come before a bracket or the end, and it reads them back the same way.</p> | ||
| 89 | <h2 id="how-links-display">How links display</h2> | ||
| 90 | <p>With View ▸ Show Markup off (the default, <code class="verbatim">⇧⌘M</code> toggles it), a link with a description shows only its description, and its brackets and target are hidden. This is <code class="verbatim">org-link-descriptive</code>. The full text appears on the line that holds the caret, so you can edit it. With Show Markup on, every link shows as written. The setting is <code class="verbatim">show-markup</code> under <code class="verbatim">[orgstar]</code> in the config file (see <a href="13-configuration.html">Configuration</a>).</p> | ||
| 91 | <p>Links without a description show their target, with the brackets hidden in the same way. Radio targets (<code class="verbatim"><<<words>>></code>) turn every other occurrence of those words in the file into a link, matched case-insensitively, as in Org.</p> | ||
| 92 | <h2 id="following-links">Following links</h2> | ||
| 93 | <p><code class="verbatim">org-open-at-point</code> follows the link at the caret, or opens the agenda for a timestamp.</p> | ||
| 94 | <table> | ||
| 95 | <thead> | ||
| 96 | <tr><th>Preset</th><th>Key</th></tr> | ||
| 97 | </thead> | ||
| 98 | <tbody> | ||
| 99 | <tr><td>Emacs</td><td><code class="verbatim">C-c C-o</code></td></tr> | ||
| 100 | <tr><td>Mac</td><td><code class="verbatim">⌃⌘O</code></td></tr> | ||
| 101 | <tr><td>Doom</td><td><code class="verbatim">C-c C-o</code> in any state; <code class="verbatim">RET</code> in normal state follows a link before doing anything else</td></tr> | ||
| 102 | <tr><td>All</td><td><code class="verbatim">⌘</code>-click on the link; <code class="verbatim">o</code> at the start of a heading line when speed commands are on</td></tr> | ||
| 103 | </tbody> | ||
| 104 | </table> | ||
| 105 | <p>A message in the echo area explains a link that can't be followed.</p> | ||
| 106 | <h3 id="what-each-link-type-does">What each link type does</h3> | ||
| 107 | <table> | ||
| 108 | <thead> | ||
| 109 | <tr><th>Link</th><th>Example</th><th>Result</th></tr> | ||
| 110 | </thead> | ||
| 111 | <tbody> | ||
| 112 | <tr><td><code class="verbatim">http</code>, <code class="verbatim">https</code>, <code class="verbatim">ftp</code>, <code class="verbatim">news</code>, <code class="verbatim">mailto</code></td><td><code class="verbatim">[[mailto:me@example.com]]</code></td><td>Opened by macOS in your default browser or mail app.</td></tr> | ||
| 113 | <tr><td><code class="verbatim">doi</code></td><td><code class="verbatim">[[doi:10.1000/182]]</code></td><td>Opens <code class="verbatim">https://doi.org/</code> followed by the DOI.</td></tr> | ||
| 114 | <tr><td><code class="verbatim">file</code> (also <code class="verbatim">file+sys:</code>, <code class="verbatim">file+emacs:</code>)</td><td><code class="verbatim">[[file:notes.org::*Ideas]]</code></td><td>See <em>File links</em> below.</td></tr> | ||
| 115 | <tr><td><code class="verbatim">id</code></td><td><code class="verbatim">[[id:6a3c…]]</code></td><td>Opens the file with the heading whose <code class="verbatim">ID</code> property matches, and moves to the heading.</td></tr> | ||
| 116 | <tr><td>Custom ID</td><td><code class="verbatim">[[#setup]]</code></td><td>Moves to the heading in this file whose <code class="verbatim">CUSTOM_ID</code> property is <code class="verbatim">setup</code>.</td></tr> | ||
| 117 | <tr><td>Heading</td><td><code class="verbatim">[[*Weekly review]]</code></td><td>Moves to the heading in this file with that title.</td></tr> | ||
| 118 | <tr><td>Text</td><td><code class="verbatim">[[budget table]]</code></td><td>Searches this file: a <code class="verbatim"><<budget table>></code> target, then <code class="verbatim">#+NAME: budget table</code>, then a heading.</td></tr> | ||
| 119 | <tr><td>Coderef</td><td><code class="verbatim">[[(ref)]]</code></td><td>Moves to the label <code class="verbatim">(ref:ref)</code> in a src or example block; see <em>Code references</em> below.</td></tr> | ||
| 120 | <tr><td>Regexp</td><td><code class="verbatim">[[/TODO.*soon/]]</code></td><td>Shows a sparse tree of the regular expression's matches, as <code class="verbatim">org-occur</code>; iOS moves to the first match.</td></tr> | ||
| 121 | <tr><td><code class="verbatim">shell</code></td><td><code class="verbatim">[[shell:ls]]</code></td><td>Not run. orgstar never executes these links.</td></tr> | ||
| 122 | <tr><td><code class="verbatim">elisp</code></td><td><code class="verbatim">[[elisp:(+ 1 2)]]</code></td><td>Runs the form once you agree; see <em>Emacs Lisp links</em> below.</td></tr> | ||
| 123 | <tr><td><code class="verbatim">attachment</code></td><td><code class="verbatim">[[attachment:scan.pdf]]</code></td><td>Opens the file in the entry's attachment folder; see <em>Attachment links</em> below.</td></tr> | ||
| 124 | <tr><td>Radio link</td><td>Text matching a <code class="verbatim"><<<radio target>>></code></td><td>Moves to the radio target.</td></tr> | ||
| 125 | <tr><td><code class="verbatim">info</code>, <code class="verbatim">help</code>, others</td><td></td><td>Not followed. The echo area says orgstar can't open the type.</td></tr> | ||
| 126 | </tbody> | ||
| 127 | </table> | ||
| 128 | <p>The text search follows <code class="verbatim">org-link-search</code>. A dedicated <code class="verbatim"><<target>></code> matches its words case-insensitively, with any run of blanks between them. A heading matches when its title, with statistics cookies such as <code class="verbatim">[2/5]</code> and a leading <code class="verbatim">COMMENT</code> removed, has the same words as the link, ignoring case. A search that starts with <code class="verbatim">*</code> looks at headings only. A regular-expression search (<code class="verbatim">/re/</code>) shows a sparse tree of its matches on the Mac, as <code class="verbatim">org-occur</code> does, and moves to the first match on iOS.</p> | ||
| 129 | <p>Following a radio link moves to its <code class="verbatim"><<<radio target>>></code>, matching the words without regard to case, as <code class="verbatim">org-link--search-radio-target</code> does. When the target is gone, the echo area shows <code class="verbatim">No match for radio target:</code> and the text.</p> | ||
| 130 | <h3 id="file-links">File links</h3> | ||
| 131 | <p>A relative path is resolved against the folder of the file that holds the link, as Org does; <code class="verbatim">~</code> is your home folder; an absolute path is used as written. Links between files in different sidebar folders work the same way, for example <code class="verbatim">[[file:../work/projects.org]]</code> or <code class="verbatim">[[file:~/Documents/org/inbox.org]]</code>.</p> | ||
| 132 | <p>What happens depends on the file:</p> | ||
| 133 | <ul> | ||
| 134 | <li>An <code class="verbatim">.org</code> or <code class="verbatim">.org_archive</code> file opens as a buffer in orgstar.</li> | ||
| 135 | <li>Another text file opens in orgstar as a plain buffer.</li> | ||
| 136 | <li>Anything else (images, PDFs, archives, media) is handed to macOS, which opens it in the default app for that type.</li> | ||
| 137 | </ul> | ||
| 138 | <p>If the file doesn't exist, the echo area shows <code class="verbatim">No file</code> and the path.</p> | ||
| 139 | <p>After <code class="verbatim">::</code>, a file link can carry a search option:</p> | ||
| 140 | <table> | ||
| 141 | <thead> | ||
| 142 | <tr><th>Option</th><th>Example</th><th>Moves to</th></tr> | ||
| 143 | </thead> | ||
| 144 | <tbody> | ||
| 145 | <tr><td>A number</td><td><code class="verbatim">[[file:log.txt::120]]</code></td><td>Line 120.</td></tr> | ||
| 146 | <tr><td><code class="verbatim">*Title</code></td><td><code class="verbatim">[[file:notes.org::*Ideas]]</code></td><td>The heading with that title.</td></tr> | ||
| 147 | <tr><td><code class="verbatim">#custom-id</code></td><td><code class="verbatim">[[file:notes.org::#setup]]</code></td><td>The heading with that <code class="verbatim">CUSTOM_ID</code>.</td></tr> | ||
| 148 | <tr><td>Other text</td><td><code class="verbatim">[[file:notes.org::budget]]</code></td><td>A target, a <code class="verbatim">#+NAME</code> or a heading, as above.</td></tr> | ||
| 149 | </tbody> | ||
| 150 | </table> | ||
| 151 | <h3 id="attachment-links">Attachment links</h3> | ||
| 152 | <p>An <code class="verbatim">attachment:</code> link names a file in the attachment folder of the entry that holds the link (see <a href="04-outlines.html">Outlines</a> for the attachment commands). Relative folders are resolved against the folder of the file that holds the link:</p> | ||
| 153 | <ol> | ||
| 154 | <li>When the entry has a <code class="verbatim">DIR</code> property, or the older <code class="verbatim">ATTACH_DIR</code>, that folder.</li> | ||
| 155 | <li>Otherwise, for an entry with an <code class="verbatim">ID</code>, the first of these folders that exists: <code class="verbatim">org-attach-id-dir</code> (<code class="verbatim">data/</code>) followed by the ID's first two characters, <code class="verbatim">/</code> and the rest of the ID; followed by its first six characters, <code class="verbatim">/</code> and the rest; <code class="verbatim">__/</code>, the ID's first character, <code class="verbatim">/</code> and the whole ID. When <code class="verbatim">org-attach-id-dir</code> is something else, the same folders under <code class="verbatim">data/</code> are found too.</li> | ||
| 156 | </ol> | ||
| 157 | <p><code class="verbatim">org-attach-use-inheritance</code> decides whether <code class="verbatim">DIR</code> and <code class="verbatim">ID</code> may come from an ancestor.</p> | ||
| 158 | <p>When the folder does not exist, the path is relative to the file's own folder. The file then opens as a <code class="verbatim">file:</code> link would, and a search option after <code class="verbatim">::</code> works the same way.</p> | ||
| 159 | <h3 id="id-links">id links</h3> | ||
| 160 | <p><code class="verbatim">id:</code> links are resolved through the index, so the target heading must be in a file under one of your sidebar folders. An <code class="verbatim">ID</code> in the property drawer before a file's first heading names the file, as org-roam's file nodes do, and the link opens the file. A link to an ID that isn't indexed shows <code class="verbatim">No heading has the ID</code> followed by the ID.</p> | ||
| 161 | <h3 id="denote-links">denote links</h3> | ||
| 162 | <p><code class="verbatim">denote:</code> links name a Denote note by its identifier, as in <code class="verbatim">[[denote:20261119T120000][A note]]</code>. The note is the indexed file whose name has the identifier, at its start or after <code class="verbatim">@@</code>; an Org file comes before others with the same identifier, such as a PDF. A search after <code class="verbatim">::</code>, such as <code class="verbatim">::#custom-id</code> or <code class="verbatim">::*Heading</code>, works as in a <code class="verbatim">file:</code> link. Backlinks list <code class="verbatim">denote:</code> links to a file, and to a heading when the link searches for it.</p> | ||
| 163 | <h3 id="emacs-lisp-links">Emacs Lisp links</h3> | ||
| 164 | <p>Following an <code class="verbatim">elisp:</code> link whose path starts with <code class="verbatim">(</code> asks <code class="verbatim">Execute (form) as Elisp? (yes, no, always)</code>, as <code class="verbatim">org-link-elisp-confirm-function</code> does. <code class="verbatim">always</code> trusts the link's form in this file, so the question isn't asked again until it changes. The echo area then shows <code class="verbatim">(form) => value</code>, or the error's message.</p> | ||
| 165 | <ul> | ||
| 166 | <li>On the Mac with Emacs installed, the form runs in <code class="verbatim">emacs -Q --batch</code> in a copy of the file, with point at the caret, so Org functions see the file's text. Changes the form makes to the buffer or to files in Emacs's session are not kept.</li> | ||
| 167 | <li>On iOS, in the Mac App Store version, and on the Mac without Emacs, the form runs in orgstar's Emacs Lisp interpreter, with the functions listed under Lisp formulas in <a href="10-tables.html">Tables</a>. A form that uses anything else, or a variable it doesn't bind itself, such as <code class="verbatim">fill-column</code>, shows <code class="verbatim">This link uses Emacs Lisp that runs only in Emacs.</code></li> | ||
| 168 | </ul> | ||
| 169 | <p>A path that names a command, such as <code class="verbatim">elisp:org-agenda</code>, isn't run. The reader view on iOS doesn't run <code class="verbatim">elisp:</code> links; open the file in the editor.</p> | ||
| 170 | <h3 id="timestamps">Timestamps</h3> | ||
| 171 | <p><code class="verbatim">C-c C-o</code> (Mac <code class="verbatim">⌃⌘O</code>) or <code class="verbatim">⌘</code>-click on a timestamp opens the agenda on that day, as <code class="verbatim">org-follow-timestamp-link</code> does. On a date range such as <code class="verbatim"><2026-10-05 Mon>--<2026-10-09 Fri></code>, the agenda shows the whole span. See <a href="07-agenda.html">Agenda</a>.</p> | ||
| 172 | <h2 id="inserting-and-editing-links">Inserting and editing links</h2> | ||
| 173 | <p><code class="verbatim">org-insert-link</code> asks for a link and a description in the echo area.</p> | ||
| 174 | <table> | ||
| 175 | <thead> | ||
| 176 | <tr><th>Preset</th><th>Key</th></tr> | ||
| 177 | </thead> | ||
| 178 | <tbody> | ||
| 179 | <tr><td>Emacs</td><td><code class="verbatim">C-c C-l</code></td></tr> | ||
| 180 | <tr><td>Mac</td><td><code class="verbatim">⌘K</code></td></tr> | ||
| 181 | <tr><td>Doom</td><td><code class="verbatim">SPC m l l</code>, or <code class="verbatim">C-c C-l</code></td></tr> | ||
| 182 | </tbody> | ||
| 183 | </table> | ||
| 184 | <p>The first prompt reads <code class="verbatim">Insert link:</code>, or <code class="verbatim">Insert link (default …):</code> when you have stored links. It completes from:</p> | ||
| 185 | <ul> | ||
| 186 | <li>your stored links, most recent first, and their descriptions;</li> | ||
| 187 | <li>the link abbreviations defined in the file (see <em>Link abbreviations</em>);</li> | ||
| 188 | <li>the link types <code class="verbatim">attachment</code>, <code class="verbatim">id</code>, <code class="verbatim">eww</code>, <code class="verbatim">rmail</code>, <code class="verbatim">mhe</code>, <code class="verbatim">irc</code>, <code class="verbatim">info</code>, <code class="verbatim">gnus</code>, <code class="verbatim">docview</code>, <code class="verbatim">bibtex</code>, <code class="verbatim">bbdb</code>, <code class="verbatim">w3m</code>, <code class="verbatim">doi</code>, <code class="verbatim">file+sys</code>, <code class="verbatim">file+emacs</code>, <code class="verbatim">shell</code>, <code class="verbatim">news</code>, <code class="verbatim">mailto</code>, <code class="verbatim">https</code>, <code class="verbatim">http</code>, <code class="verbatim">ftp</code>, <code class="verbatim">shortdoc</code>, <code class="verbatim">help</code>, <code class="verbatim">file</code> and <code class="verbatim">elisp</code>, each followed by <code class="verbatim">:</code>.</li> | ||
| 189 | </ul> | ||
| 190 | <p>Pressing Return on an empty answer inserts the most recent stored link. Choosing a description inserts the link it belongs to. If you choose a bare type such as <code class="verbatim">https:</code>, a second prompt, <code class="verbatim">Link (no completion support):</code>, asks for the rest.</p> | ||
| 191 | <p>The next prompt, <code class="verbatim">Description:</code>, offers the stored link's description, or the selected text if you selected some before running the command. An empty description inserts a link without one. With text selected, the link replaces the selection.</p> | ||
| 192 | <p>When the caret is on an existing link, the same command edits it: the <code class="verbatim">Link:</code> prompt starts with the current target and <code class="verbatim">Description:</code> with the current description.</p> | ||
| 193 | <p>A stored link that you insert is removed from the stored list, as with <code class="verbatim">org-link-keep-stored-after-insertion</code> set to nil.</p> | ||
| 194 | <h3 id="file-paths-in-inserted-links">File paths in inserted links</h3> | ||
| 195 | <p>When the inserted link is a <code class="verbatim">file:</code> link, orgstar rewrites it as <code class="verbatim">org-link-make-string-for-buffer</code> does:</p> | ||
| 196 | <ul> | ||
| 197 | <li>A link to a heading or target in the file you are editing loses its <code class="verbatim">file:</code> part and keeps only the search, for example <code class="verbatim">[[*Ideas]]</code>.</li> | ||
| 198 | <li>A path under the current file's folder becomes relative to it.</li> | ||
| 199 | <li>Any other path is written with <code class="verbatim">~</code> for your home folder.</li> | ||
| 200 | </ul> | ||
| 201 | <h3 id="completion-while-typing">Completion while typing</h3> | ||
| 202 | <p>You can also type a link by hand. With the caret right after <code class="verbatim">[[</code>, completion at point offers <code class="verbatim">attachment:</code>, <code class="verbatim">doi:</code>, <code class="verbatim">file:</code>, <code class="verbatim">http:</code>, <code class="verbatim">https:</code>, <code class="verbatim">id:</code> and <code class="verbatim">mailto:</code>, plus the file's link abbreviations. After <code class="verbatim">[[*</code>, it offers the headings of the current file. Completion at point is <code class="verbatim">C-M-i</code> in the Emacs preset and <code class="verbatim">C-SPC</code> in Doom's insert state; see <a href="02-the-editor.html">The editor</a>.</p> | ||
| 203 | <h2 id="storing-links">Storing links</h2> | ||
| 204 | <p><code class="verbatim">org-store-link</code> remembers a link to where the caret is, for a later Insert Link.</p> | ||
| 205 | <table> | ||
| 206 | <thead> | ||
| 207 | <tr><th>Preset</th><th>Key</th></tr> | ||
| 208 | </thead> | ||
| 209 | <tbody> | ||
| 210 | <tr><td>Emacs</td><td><code class="verbatim">C-c l</code></td></tr> | ||
| 211 | <tr><td>Mac</td><td><code class="verbatim">⌃⌘L</code></td></tr> | ||
| 212 | <tr><td>Doom</td><td><code class="verbatim">SPC m l s</code> or <code class="verbatim">SPC n l</code></td></tr> | ||
| 213 | </tbody> | ||
| 214 | </table> | ||
| 215 | <p>The stored link is a <code class="verbatim">file:</code> link to the current file, written with <code class="verbatim">~</code> for your home folder, followed by a search option chosen as Org does with <code class="verbatim">org-link-context-for-files</code> on:</p> | ||
| 216 | <ol> | ||
| 217 | <li>If the caret touches a <code class="verbatim"><<target>></code> on its line, the link points at the target.</li> | ||
| 218 | <li>Otherwise, if text is selected, the link searches for that text.</li> | ||
| 219 | <li>Otherwise, if the caret is in an element with a <code class="verbatim">#+NAME</code>, the link uses the name.</li> | ||
| 220 | <li>Otherwise, inside a heading's entry, the link uses <code class="verbatim">#custom-id</code> if the heading has a <code class="verbatim">CUSTOM_ID</code> property, and <code class="verbatim">*Title</code> if not. The title becomes the description.</li> | ||
| 221 | <li>Before the first heading, the link searches for the text of the current line.</li> | ||
| 222 | </ol> | ||
| 223 | <p>The echo area shows <code class="verbatim">Stored:</code> and the description or link. Storing the same link again moves it to the front of the list. Stored links last until you quit orgstar; they aren't saved between sessions, as in Emacs.</p> | ||
| 224 | <h2 id="ids">IDs</h2> | ||
| 225 | <p>Org identifies headings across files with an <code class="verbatim">ID</code> property. Two commands manage it.</p> | ||
| 226 | <table> | ||
| 227 | <thead> | ||
| 228 | <tr><th>Command</th><th>Org function</th><th>Keys</th></tr> | ||
| 229 | </thead> | ||
| 230 | <tbody> | ||
| 231 | <tr><td>Org ▸ Create ID</td><td><code class="verbatim">org-id-get-create</code></td><td>No default key</td></tr> | ||
| 232 | <tr><td>Org ▸ Store ID Link</td><td><code class="verbatim">org-id-get-create</code> + <code class="verbatim">org-id-store-link</code></td><td>Doom <code class="verbatim">SPC m l i</code>; no key in Emacs or Mac</td></tr> | ||
| 233 | </tbody> | ||
| 234 | </table> | ||
| 235 | <p>Create ID gives the heading at the caret an <code class="verbatim">ID</code> property if it doesn't have one. The ID is a new UUID in lower case, for example <code class="verbatim">6a3c2f9e-…</code>, as <code class="verbatim">org-id-uuid</code> makes them. Before the first heading, the property goes into the file-level property drawer.</p> | ||
| 236 | <p>Store ID Link does the same, then stores an <code class="verbatim">id:</code> link to the heading with its title as the description. Before the first heading, the description is the <code class="verbatim">#+TITLE</code>, or the file name. If the caret is on a target or named element inside the entry, the link carries that search, as <code class="verbatim">id:…::search</code>, which mirrors <code class="verbatim">org-id-link-use-context</code>.</p> | ||
| 237 | <p><code class="verbatim">CUSTOM_ID</code> is a property you set yourself, with the property commands in <a href="04-outlines.html">Outlines</a>. Link to it with <code class="verbatim">[[#name]]</code> in the same file or <code class="verbatim">[[file:other.org::#name]]</code> from another. Store Link uses it when the heading has one.</p> | ||
| 238 | <h2 id="targets-and-radio-targets">Targets and radio targets</h2> | ||
| 239 | <p><code class="verbatim"><<target>></code> marks a place in the text that a link with the same words reaches: <code class="verbatim">[[target]]</code>. Store Link with the caret on a target stores a link to it.</p> | ||
| 240 | <p><code class="verbatim"><<<radio target>>></code> makes every other occurrence of its words in the file a link, matched case-insensitively and between non-word characters. Radio links are highlighted as links and exported as links to the target (see <a href="12-export.html">Export</a>). Following one moves to the radio target.</p> | ||
| 241 | <h2 id="link-abbreviations">Link abbreviations</h2> | ||
| 242 | <p>A <code class="verbatim">#+LINK:</code> line defines an abbreviation, as <code class="verbatim">org-link-abbrev-alist-local</code> does:</p> | ||
| 243 | <pre><code class="language-org highlight"><span class="text org"><span class="keyword other keyword org">#+LINK:</span><span class="string unquoted org"> gh https://github.com/%s</span> | ||
| 244 | <span class="keyword other keyword org">#+LINK:</span><span class="string unquoted org"> search https://duckduckgo.com/?q=%h</span> | ||
| 245 | <span class="keyword other keyword org">#+LINK:</span><span class="string unquoted org"> wiki https://en.wikipedia.org/wiki/</span> | ||
| 246 | |||
| 247 | <span class="punctuation definition link org">[[</span><span class="markup underline link org">gh:orgmode/org-mode</span><span class="punctuation definition link org">]</span><span class="punctuation definition link org">]</span> → https:/<span class="markup italic org">/github.com/</span>orgmode/org-mode | ||
| 248 | <span class="punctuation definition link org">[[</span><span class="markup underline link org">search:org tables</span><span class="punctuation definition link org">]</span><span class="punctuation definition link org">]</span> → https:/<span class="markup italic org">/duckduckgo.com/</span>?q=org%20tables | ||
| 249 | <span class="punctuation definition link org">[[</span><span class="markup underline link org">wiki:Org-mode</span><span class="punctuation definition link org">]</span><span class="punctuation definition link org">]</span> → https:/<span class="markup italic org">/en.wikipedia.org/</span>wiki/Org-mode</span></code></pre> | ||
| 250 | <p>In the template, <code class="verbatim">%s</code> is replaced by the text after the colon, <code class="verbatim">%h</code> by the same text percent-encoded, and a template with neither has the text appended. Function templates (<code class="verbatim">%(…)</code>) are not supported. Abbreviations from a <code class="verbatim">#+SETUPFILE</code> count too. When a key is defined twice, the first definition wins.</p> | ||
| 251 | <h2 id="the-backlinks-pane">The backlinks pane</h2> | ||
| 252 | <p>View ▸ Show or Hide Backlinks shows a pane under the outline pane of an org file. It has two sections:</p> | ||
| 253 | <ul> | ||
| 254 | <li><strong>Links to</strong> the heading at the caret, named after that heading.</li> | ||
| 255 | <li><strong>Links to this file</strong>.</li> | ||
| 256 | </ul> | ||
| 257 | <p>Each row shows the linking heading, the line the link is on with links shown as they read and this one in bold, and the file name; a link in the text before a file's first heading is listed under the file's name. Click a row to open it. The pane is shown by default, orgstar remembers whether it is shown, and it updates as you move the caret and edit.</p> | ||
| 258 | <p>The pane looks at every org file in your sidebar folders, including unsaved changes in open buffers. A link counts when following it would lead to the heading or the file:</p> | ||
| 259 | <ul> | ||
| 260 | <li><code class="verbatim">id:</code> links to the heading's <code class="verbatim">ID</code>, or to the file's own <code class="verbatim">ID</code> for the file section;</li> | ||
| 261 | <li><code class="verbatim">file:</code> links and plain paths (<code class="verbatim">./</code>, <code class="verbatim">../</code>, <code class="verbatim">/</code>, <code class="verbatim">~/</code>) to the file, with no search option for the file section, or with <code class="verbatim">::*Title</code>, <code class="verbatim">::#custom-id</code> or <code class="verbatim">::Title</code> for a heading;</li> | ||
| 262 | <li>within the same file, <code class="verbatim">[[*Title]]</code>, <code class="verbatim">[[#custom-id]]</code> and <code class="verbatim">[[Title]]</code>.</li> | ||
| 263 | </ul> | ||
| 264 | <p>Links to targets, names and line numbers are not counted. A heading's links to itself are left out.</p> | ||
| 265 | <h2 id="nodes-and-daily-notes">Nodes and daily notes</h2> | ||
| 266 | <p>orgstar works with notes kept the org-roam way: headings and files with an <code class="verbatim">ID</code> are <em>nodes</em>, linked with <code class="verbatim">id:</code> links, and a daily note is a file a day. It reads them from the index, without org-roam's database.</p> | ||
| 267 | <table> | ||
| 268 | <thead> | ||
| 269 | <tr><th>Command</th><th>Emacs</th><th>Doom</th><th>What it does</th></tr> | ||
| 270 | </thead> | ||
| 271 | <tbody> | ||
| 272 | <tr><td>Find Node…</td><td><code class="verbatim">C-c n f</code></td><td><code class="verbatim">SPC n r f</code></td><td>Asks for a node by title and opens it (<code class="verbatim">org-roam-node-find</code>).</td></tr> | ||
| 273 | <tr><td>Insert Node Link…</td><td><code class="verbatim">C-c n i</code></td><td><code class="verbatim">SPC n r i</code></td><td>Asks for a node and inserts <code class="verbatim">[[id:…][Title]]</code>; with a selection, the selection is the description (<code class="verbatim">org-roam-node-insert</code>).</td></tr> | ||
| 274 | <tr><td>Show Node Graph</td><td><code class="verbatim">C-c n g</code></td><td><code class="verbatim">SPC n r g</code></td><td>Opens the graph of nodes and their links; see <em>The graph</em> below.</td></tr> | ||
| 275 | <tr><td>Go to Today's, Yesterday's, Tomorrow's Daily Note</td><td><code class="verbatim">C-c n d d</code>, <code class="verbatim">y</code>, <code class="verbatim">t</code></td><td><code class="verbatim">SPC n r d t</code>, <code class="verbatim">y</code>, <code class="verbatim">m</code></td><td>Opens the day's note, making it if missing (<code class="verbatim">org-roam-dailies-goto-today</code> and the others).</td></tr> | ||
| 276 | <tr><td>Go to Daily Note for Date…</td><td><code class="verbatim">C-c n d c</code></td><td><code class="verbatim">SPC n r d d</code></td><td>Asks for a date, then opens its note.</td></tr> | ||
| 277 | <tr><td>Capture to Today's Daily Note (and Yesterday's, Tomorrow's, for Date…)</td><td><code class="verbatim">C-c n j</code>, <code class="verbatim">C-c n d n</code>, <code class="verbatim">C-c n d v</code></td><td><code class="verbatim">SPC n r d n</code>, <code class="verbatim">T</code>, <code class="verbatim">Y</code>, <code class="verbatim">M</code>, <code class="verbatim">D</code></td><td>Files the entry template at the end of the day's note and opens it at <code class="verbatim">%?</code> (<code class="verbatim">org-roam-dailies-capture-today</code> and the others).</td></tr> | ||
| 278 | <tr><td>Next Daily Note, Previous Daily Note</td><td><code class="verbatim">C-c n d f</code>, <code class="verbatim">b</code></td><td><code class="verbatim">SPC n r d f</code>, <code class="verbatim">b</code></td><td>From a daily note, opens the next or previous one there is (<code class="verbatim">org-roam-dailies-goto-next-note</code>).</td></tr> | ||
| 279 | </tbody> | ||
| 280 | </table> | ||
| 281 | <p>The keys are the ones org-roam's manual suggests for Emacs and Doom's. Titles that repeat show their file's name. A file node's title is its <code class="verbatim">#+TITLE</code>, or its name.</p> | ||
| 282 | <p>A title that no node has makes a new node, as org-roam's default capture template does: a file named <code class="verbatim">%<%Y%m%d%H%M%S>-${slug}.org</code> in <code class="verbatim">org-roam-directory</code> (the first folder unless it is set), starting with an <code class="verbatim">ID</code> property drawer and <code class="verbatim">#+title:</code> and the title. Find Node… opens it; Insert Node Link… links to it. The slug is the title in lower case, accents dropped, with everything but letters and digits as one <code class="verbatim">_</code>, as <code class="verbatim">org-roam-node-slugify</code> makes it.</p> | ||
| 283 | <p><strong>The graph.</strong> Show Node Graph, or Window ▸ Graph on the Mac and More ▸ Node Graph on iOS, draws every node as a dot and every <code class="verbatim">id:</code> link between two nodes as a line. It is part of orgstar+.</p> | ||
| 284 | <ul> | ||
| 285 | <li>A link belongs to the innermost heading with an ID around it, else to its file's node; a link written where there is no node, or to an ID no node has, isn't drawn. Several links between the same two nodes are one line.</li> | ||
| 286 | <li>A dot is larger the more links its node has. The node the caret is in is orange. Titles are drawn where they have room, the most-linked nodes first; zooming in shows more.</li> | ||
| 287 | <li>Drag to move the picture, pinch or use the buttons to zoom, and click or tap a node to open it.</li> | ||
| 288 | <li>Only the Open Note's Links keeps the node the caret is in and the nodes linked with it.</li> | ||
| 289 | <li>Unsaved text counts, as it does for Find Node….</li> | ||
| 290 | </ul> | ||
| 291 | <p>Daily notes are in <code class="verbatim">org-roam-dailies-directory</code> (<code class="verbatim">daily/</code>) under <code class="verbatim">org-roam-directory</code>, which is the first sidebar folder unless set. A new note is named and started as org-roam's default daily template does it, with an <code class="verbatim">ID</code> like every new org-roam file:</p> | ||
| 292 | <pre><code class="language-org highlight"><span class="text org">,:PROPERTIES: | ||
| 293 | ,:ID: 5f0c1e2a-… | ||
| 294 | ,:END: | ||
| 295 | <span class="keyword other keyword org">#+title:</span><span class="string unquoted org"> 2026-10-11</span></span></code></pre> | ||
| 296 | <p><code class="verbatim">org-roam-dailies-file</code> (<code class="verbatim">"%<%Y-%m-%d>.org"</code>), <code class="verbatim">org-roam-dailies-head</code> (<code class="verbatim">"#+title: %<%Y-%m-%d>\n"</code>) and <code class="verbatim">org-roam-dailies-entry</code> (<code class="verbatim">"* %?"</code>) change the file name, what a new note starts with, and what capturing adds; <code class="verbatim">%<…></code> formats the note's date as <code class="verbatim">format-time-string</code> does. The entry is an org-capture template; its date escapes (<code class="verbatim">%t</code>, <code class="verbatim">%U</code> and the like) use the note's day. Import from Emacs reads them from the first of <code class="verbatim">org-roam-dailies-capture-templates</code>. See <a href="13-configuration.html">Configuration</a>.</p> | ||
| 297 | <h3 id="denote">Denote</h3> | ||
| 298 | <p>With <code class="verbatim">notes-package = "denote"</code> in <code class="verbatim">config.toml</code>, the same commands follow Denote:</p> | ||
| 299 | <ul> | ||
| 300 | <li>The graph draws the notes with a Denote identifier and their <code class="verbatim">denote:</code> links to each other.</li> | ||
| 301 | <li>Find Node… and Insert Node Link… list the Org files whose names have a Denote identifier, titled by their <code class="verbatim">#+title:</code>, and Insert Node Link… inserts <code class="verbatim">[[denote:…][Title]]</code>.</li> | ||
| 302 | <li><p>A title no note has makes a note in <code class="verbatim">denote-directory</code> (the first folder unless set), after the questions <code class="verbatim">denote-prompts</code> lists, in its order. The default is <code class="verbatim">"title keywords"</code>; the title is always the one typed.</p> | ||
| 303 | <ul> | ||
| 304 | <li><code class="verbatim">keywords</code>: separated by commas or spaces, offering the keywords in existing file names.</li> | ||
| 305 | <li><code class="verbatim">subdirectory</code>: a folder under <code class="verbatim">denote-directory</code> (<code class="verbatim">.</code> for itself) to put the note in.</li> | ||
| 306 | <li><code class="verbatim">date</code>: the note's date, read as <code class="verbatim">org-read-date</code> reads one; without a time, the time is now's.</li> | ||
| 307 | <li><code class="verbatim">template</code>: a key of <code class="verbatim">[denote-templates]</code>, whose text goes after the front matter.</li> | ||
| 308 | <li><code class="verbatim">signature</code>: put in the name after <code>==</code>, in lower case with <code>=</code> between words, and in a <code class="verbatim">#+signature:</code> line.</li> | ||
| 309 | </ul> | ||
| 310 | <p><code class="verbatim">file-type</code> and <code class="verbatim">identifier</code> are not asked: notes are Org, and the identifier is the date's, or the first second after it no file under <code class="verbatim">denote-directory</code> has. With the default prompts:</p> | ||
| 311 | <pre><code class="language-org highlight"><span class="text org"><span class="keyword other keyword org">#+title:</span><span class="string unquoted org"> Field Notes</span> | ||
| 312 | <span class="keyword other keyword org">#+date:</span><span class="string unquoted org"> [2026-11-19 Thu 12:00]</span> | ||
| 313 | <span class="keyword other keyword org">#+filetags:</span><span class="string unquoted org"> :ideas:work:</span> | ||
| 314 | <span class="keyword other keyword org">#+identifier:</span><span class="string unquoted org"> 20261119T120000</span></span></code></pre> | ||
| 315 | <p>named <code class="verbatim">20261119T120000--field-notes__ideas_work.org</code>: the title in lower case without punctuation, words joined by <code class="verbatim">-</code>; the keywords sorted, each one word, joined by <code class="verbatim">_</code>.</p> | ||
| 316 | </li> | ||
| 317 | <li>The daily-note commands work on denote-journal's entries: notes in <code class="verbatim">denote-journal-directory</code> (<code class="verbatim">journal</code>, under <code class="verbatim">denote-directory</code>) with the <code class="verbatim">denote-journal-keyword</code> (<code class="verbatim">journal</code>). With <code class="verbatim">denote-journal-interval</code> (<code class="verbatim">daily</code>), one entry lasts a day, a week (Monday to Sunday), a month or a year, and the entry for a date is the one whose identifier's date is in that stretch. denote-journal itself takes a date outside the current week, month or year as today; orgstar uses the date's own. A new entry is titled by <code class="verbatim">denote-journal-title-format</code> (<code class="verbatim">"%A %-e %B %Y %H:%M"</code>). Capturing adds <code class="verbatim">org-roam-dailies-entry</code> as for org-roam.</li> | ||
| 318 | <li>Store Link in a Denote note stores <code class="verbatim">[[denote:ID][Title]]</code>, or <code class="verbatim">denote:ID::#custom-id</code> in an entry with a <code class="verbatim">CUSTOM_ID</code>, as Denote does with <code class="verbatim">denote-org-store-link-to-heading</code> nil.</li> | ||
| 319 | </ul> | ||
| 320 | <p><code class="verbatim">denote-directory</code> can hold several folders, separated by <code class="verbatim">:</code>. New notes go in the first; the <code class="verbatim">subdirectory</code> question offers all of them and their folders, and identifiers are kept unique across them.</p> | ||
| 321 | <h4 id="renaming">Renaming</h4> | ||
| 322 | <ul> | ||
| 323 | <li>Rename Note… (<code class="verbatim">denote-rename-file</code>) asks the questions <code class="verbatim">denote-prompts</code> has among <code class="verbatim">title</code>, <code class="verbatim">keywords</code>, <code class="verbatim">signature</code> and <code class="verbatim">date</code>, each starting with the current value, then renames the file in its folder and rewrites its front matter. Empty answers remove a part. A file without an identifier gets one from its modification time; a file without front matter gets it added at the top.</li> | ||
| 324 | <li>Rename Note from Front Matter renames the open file from its <code class="verbatim">#+title:</code>, <code class="verbatim">#+filetags:</code> and <code class="verbatim">#+signature:</code>, keeping its identifier, as <code class="verbatim">denote-rename-file-using-front-matter</code> does. A missing line leaves that part out of the name, and the keywords keep their order.</li> | ||
| 325 | <li>Rename Notes in Folder from Front Matter… does that for every Denote note in a folder of <code class="verbatim">denote-directory</code>, as <code class="verbatim">denote-dired-rename-marked-files-using-front-matter</code> does with them all marked.</li> | ||
| 326 | </ul> | ||
| 327 | <p>Links keep working after a rename, as they use the identifier.</p> | ||
| 328 | <h4 id="query-links">Query links</h4> | ||
| 329 | <p><code class="verbatim">[[denote:query-contents:REGEXP]]</code> and <code class="verbatim">[[denote:query-filenames:REGEXP]]</code> offer the notes whose text, or name, the Emacs regexp matches, ignoring case, and open the one chosen. In the iOS reader they list the matches.</p> | ||
| 330 | <h4 id="silos">Silos</h4> | ||
| 331 | <p>New Note in Silo… and Find Note in Silo… (denote-silo) ask for a folder of <code class="verbatim">denote-silo-directories</code> (<code class="verbatim">denote-directory</code>'s folders unless set, separated by <code class="verbatim">:</code>) and work as if it were <code class="verbatim">denote-directory</code>. Find Note in Silo… lists the notes in the sidebar folders that are under it.</p> | ||
| 332 | <h4 id="capture">Capture</h4> | ||
| 333 | <p>A capture template with <code class="verbatim">denote = true</code> and no <code class="verbatim">file</code> puts its entry in a new note, as <code class="verbatim">denote-org-capture</code> does: it asks for the title and the <code class="verbatim">denote-prompts</code> questions before its own. See <a href="08-capture.html">Capture</a>.</p> | ||
| 334 | <pre><code class="language-toml highlight"><span class="source toml"><span class="punctuation definition table array toml">[[</span><span class="entity name section toml">template</span><span class="punctuation definition table array toml">]]</span> | ||
| 335 | <span class="variable other key toml">key</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>n<span class="punctuation definition string end toml">"</span></span> | ||
| 336 | <span class="variable other key toml">name</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>New note<span class="punctuation definition string end toml">"</span></span> | ||
| 337 | <span class="variable other key toml">denote</span> <span class="keyword operator assignment toml">=</span> <span class="constant language toml">true</span> | ||
| 338 | <span class="variable other key toml">type</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>plain<span class="punctuation definition string end toml">"</span></span> | ||
| 339 | <span class="variable other key toml">template</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>%i<span class="constant character escape toml">\n</span>%?<span class="punctuation definition string end toml">"</span></span></span></code></pre> | ||
| 340 | <h4 id="dynamic-blocks">Dynamic blocks</h4> | ||
| 341 | <p>denote-org's dynamic blocks update with <code class="verbatim">C-c C-c</code> on their <code class="verbatim">#+BEGIN:</code> line or Update Dynamic Block, over the files in <code class="verbatim">denote-directory</code>:</p> | ||
| 342 | <table> | ||
| 343 | <thead> | ||
| 344 | <tr><th>Block</th><th>What it lists</th></tr> | ||
| 345 | </thead> | ||
| 346 | <tbody> | ||
| 347 | <tr><td><code class="verbatim">denote-links</code></td><td>Links to the notes whose names (relative to <code class="verbatim">denote-directory</code>) match <code class="verbatim">:regexp</code></td></tr> | ||
| 348 | <tr><td><code class="verbatim">denote-missing-links</code></td><td>The same, without the notes this file links to already</td></tr> | ||
| 349 | <tr><td><code class="verbatim">denote-backlinks</code></td><td>Links to the notes that link to this one</td></tr> | ||
| 350 | <tr><td><code class="verbatim">denote-files</code></td><td>The text of the notes matching <code class="verbatim">:regexp</code></td></tr> | ||
| 351 | <tr><td><code class="verbatim">denote-files-as-headings</code></td><td>The same, each note's title a heading and its headings one level down</td></tr> | ||
| 352 | <tr><td><code class="verbatim">denote-sequence</code></td><td>A note's descendants, <code class="verbatim">:depth</code> levels deep, indented; with <code class="verbatim">:sequence ""</code> every note with a sequence</td></tr> | ||
| 353 | </tbody> | ||
| 354 | </table> | ||
| 355 | <p>Insert Denote Links Block, Insert Denote Missing Links Block, Insert Denote Backlinks Block, Insert Denote Files Block, Insert Denote Files as Headings Block and Insert Denote Sequence Block (<code class="verbatim">denote-org-dblock-insert-links</code> and the others) ask what denote-org asks (the regexp; for files, the sort component; for a sequence, the note and the depth, 2 by default), then insert the block with all its parameters and fill it.</p> | ||
| 356 | <p>They take denote-org's parameters: <code class="verbatim">:not-regexp</code>, <code class="verbatim">:sort-by-component</code> (<code class="verbatim">title</code>, <code class="verbatim">keywords</code>, <code class="verbatim">signature</code>, <code class="verbatim">identifier</code>, <code class="verbatim">last-modified</code>, <code class="verbatim">random</code>), <code class="verbatim">:reverse-sort</code>, <code class="verbatim">:id-only</code>, <code class="verbatim">:include-date</code>, <code class="verbatim">:block-name</code>, and for <code class="verbatim">denote-files</code> <code class="verbatim">:no-front-matter</code>, <code class="verbatim">:add-links</code> and <code class="verbatim">:file-separator</code>, for <code class="verbatim">denote-files-as-headings</code> <code class="verbatim">:add-links</code> and <code class="verbatim">:exclude-tags</code>. <code class="verbatim">:excluded-dirs-regexp</code>, <code class="verbatim">:this-heading-only</code> and <code class="verbatim">rx</code> forms aren't supported.</p> | ||
| 357 | <pre><code class="language-org highlight"><span class="text org"><span class="keyword other keyword org">#+BEGIN:</span><span class="string unquoted org"> denote-links :regexp "_emacs" :sort-by-component title</span> | ||
| 358 | <span class="keyword other keyword org">#+END:</span></span></code></pre> | ||
| 359 | <h4 id="sequences">Sequences</h4> | ||
| 360 | <p>denote-sequence numbers notes in a hierarchy through their signatures, in the scheme <code class="verbatim">denote-sequence-scheme</code> sets: <code class="verbatim">numeric</code> (<code>1</code>, <code>1=1</code>, <code>1=1=2</code>), <code class="verbatim">alphanumeric</code> (<code>1</code>, <code>1a</code>, <code>1a2</code>) or <code class="verbatim">alphanumeric-delimited</code> (<code>1</code>, <code>1=a</code>, <code>1=a2</code>). New sequences come out as denote-sequence 0.3 gives them.</p> | ||
| 361 | <table> | ||
| 362 | <thead> | ||
| 363 | <tr><th>Command</th><th>denote-sequence</th></tr> | ||
| 364 | </thead> | ||
| 365 | <tbody> | ||
| 366 | <tr><td>New Sequence Note…</td><td><code class="verbatim">denote-sequence-new-parent</code></td></tr> | ||
| 367 | <tr><td>New Child Sequence Note…, New Sibling Sequence Note…</td><td><code class="verbatim">denote-sequence-new-child</code>, <code class="verbatim">-new-sibling</code></td></tr> | ||
| 368 | <tr><td>New Child of This Note…, New Sibling of This Note…</td><td><code class="verbatim">denote-sequence-new-child-of-current</code>, <code class="verbatim">-new-sibling-of-current</code></td></tr> | ||
| 369 | <tr><td>Find Sequence Relatives…</td><td><code class="verbatim">denote-sequence-find</code>: all parents, the parent, siblings, children or all children</td></tr> | ||
| 370 | <tr><td>Next Sibling Note, Previous Sibling Note</td><td><code class="verbatim">denote-sequence-find-next-sibling</code>, <code class="verbatim">-previous-sibling</code></td></tr> | ||
| 371 | <tr><td>Reparent Note…, Reparent Note with Descendants…</td><td><code class="verbatim">denote-sequence-reparent</code>, <code class="verbatim">-reparent-recursive</code></td></tr> | ||
| 372 | <tr><td>Rename Note as Sequence Parent</td><td><code class="verbatim">denote-sequence-rename-as-parent</code></td></tr> | ||
| 373 | <tr><td>Convert Note Sequence Scheme</td><td><code class="verbatim">denote-sequence-convert</code> to <code class="verbatim">denote-sequence-scheme</code></td></tr> | ||
| 374 | <tr><td>Insert Sequence Link…</td><td><code class="verbatim">denote-sequence-link</code></td></tr> | ||
| 375 | <tr><td>Sequence Hierarchy…</td><td><code class="verbatim">denote-sequence-view-hierarchy</code>, as a list to open a note from</td></tr> | ||
| 376 | </tbody> | ||
| 377 | </table> | ||
| 378 | <p>A new sequence note asks for its title and the <code class="verbatim">denote-prompts</code> questions other than <code class="verbatim">signature</code>, which is the sequence.</p> | ||
| 379 | <h4 id="importing-and-limits">Importing and limits</h4> | ||
| 380 | <p>Import from Emacs reads <code class="verbatim">denote-directory</code> (a folder or a list), <code class="verbatim">denote-prompts</code>, <code class="verbatim">denote-templates</code>, <code class="verbatim">denote-silo-directories</code>, <code class="verbatim">denote-sequence-scheme</code>, <code class="verbatim">denote-journal-directory</code>, <code class="verbatim">denote-journal-keyword</code>, <code class="verbatim">denote-journal-interval</code> and <code class="verbatim">denote-journal-title-format</code>. Templates that are functions, and Denote notes in Markdown or plain text, are not supported.</p> | ||
| 381 | <h2 id="inline-images">Inline images</h2> | ||
| 382 | <p><code class="verbatim">org-toggle-inline-images</code> shows image links as images.</p> | ||
| 383 | <table> | ||
| 384 | <thead> | ||
| 385 | <tr><th>Preset</th><th>Key</th></tr> | ||
| 386 | </thead> | ||
| 387 | <tbody> | ||
| 388 | <tr><td>Emacs</td><td><code class="verbatim">C-c C-x C-v</code></td></tr> | ||
| 389 | <tr><td>Mac</td><td>Org ▸ Show or Hide Inline Images</td></tr> | ||
| 390 | <tr><td>Doom</td><td><code class="verbatim">C-c C-x C-v</code></td></tr> | ||
| 391 | </tbody> | ||
| 392 | </table> | ||
| 393 | <p>The echo area reports how many images are shown, or that inline display is off.</p> | ||
| 394 | <p>A line shows an image when it holds nothing but a bracket link, without a description, to a file ending in <code class="verbatim">.png</code>, <code class="verbatim">.jpg</code>, <code class="verbatim">.jpeg</code>, <code class="verbatim">.gif</code>, <code class="verbatim">.svg</code>, <code class="verbatim">.webp</code>, <code class="verbatim">.tif</code>, <code class="verbatim">.tiff</code>, <code class="verbatim">.bmp</code>, <code class="verbatim">.heic</code> or <code class="verbatim">.avif</code> (in any case):</p> | ||
| 395 | <pre><code class="language-org highlight"><span class="text org"><span class="punctuation definition link org">[[</span><span class="markup underline link org">file:images/diagram.png</span><span class="punctuation definition link org">]</span><span class="punctuation definition link org">]</span> | ||
| 396 | <span class="punctuation definition link org">[[</span><span class="markup underline link org">./photo.jpg</span><span class="punctuation definition link org">]</span><span class="punctuation definition link org">]</span></span></code></pre> | ||
| 397 | <p>Relative paths are resolved against the file's folder, and <code class="verbatim">attachment:</code> links against the entry's attachment folder. The link text is hidden while the image is shown, except on the line that holds the caret, where the image is drawn under the link.</p> | ||
| 398 | <h3 id="pasting-and-dropping-images">Pasting and dropping images</h3> | ||
| 399 | <p>Paste (⌘V, or Edit ▸ Paste on iOS) with an image on the clipboard and no text runs <code class="verbatim">yank-media</code>, as in Emacs 29 and later: the image is saved as <code class="verbatim">org-yank-image-save-method</code> says and a link to it is inserted at the caret; with the caret on a heading's line, under the heading, after its planning line and drawers. M-x <code class="verbatim">yank-media</code> does the same on the Mac.</p> | ||
| 400 | <table> | ||
| 401 | <thead> | ||
| 402 | <tr><th><code class="verbatim">org-yank-image-save-method</code></th><th>Where the image goes</th><th>Link</th></tr> | ||
| 403 | </thead> | ||
| 404 | <tbody> | ||
| 405 | <tr><td><code class="verbatim">attach</code> (the default)</td><td>The entry's attachment folder, as <code class="verbatim">org-attach-attach</code> puts it</td><td><code class="verbatim">[[attachment:NAME]]</code></td></tr> | ||
| 406 | <tr><td>a folder, such as <code class="verbatim">"images/"</code></td><td>That folder, relative to the file's folder unless absolute; made if missing</td><td><code class="verbatim">[[file:images/NAME]]</code></td></tr> | ||
| 407 | </tbody> | ||
| 408 | </table> | ||
| 409 | <p>The name is Org's: <code class="verbatim">clipboard-</code> and the time, as in <code class="verbatim">clipboard-20261011T232238.png</code>; a second image in the same second gets <code class="verbatim">-2</code>. PNG, JPEG and GIF are saved as they are, and other image types as PNG. Before the first heading, <code class="verbatim">attach</code> gives the file a file-level <code class="verbatim">ID</code>, as Emacs does.</p> | ||
| 410 | <p>Files dropped on the editor on the Mac, or pasted after copying them in Finder, are handled as <code class="verbatim">org-yank-dnd-method</code> says: <code class="verbatim">attach</code> copies them into the entry's attachment folder (an image goes to the <code class="verbatim">org-yank-image-save-method</code> folder when that is a folder), <code class="verbatim">file-link</code> links to them where they are, <code class="verbatim">open</code> opens them, and <code class="verbatim">ask</code>, the default, asks which. An image dragged in without a file, such as one from a browser, is pasted as above. On iOS, dropped files are always attached, since what a drop hands over is a copy. Attach Photo or Video… and Take Photo… also insert their links at the caret.</p> | ||
| 411 | <p>Two things differ from Emacs, so that a pasted image shows at once: the link has no description (Org writes <code class="verbatim">[[attachment:NAME][NAME]]</code>, which inline display skips), and it goes on a line of its own, breaking the line around the caret when it holds text.</p> | ||
| 412 | <h3 id="remote-images">Remote images</h3> | ||
| 413 | <p>Images at <code class="verbatim">http</code> and <code class="verbatim">https</code> links show as <code class="verbatim">org-display-remote-inline-images</code> in <code class="verbatim">config.toml</code> says:</p> | ||
| 414 | <table> | ||
| 415 | <thead> | ||
| 416 | <tr><th>Value</th><th>Remote images</th></tr> | ||
| 417 | </thead> | ||
| 418 | <tbody> | ||
| 419 | <tr><td><code class="verbatim">skip</code></td><td>Not shown; the default</td></tr> | ||
| 420 | <tr><td><code class="verbatim">download</code></td><td>Fetched the first time they're shown, and kept until orgstar quits</td></tr> | ||
| 421 | <tr><td><code class="verbatim">cache</code></td><td>Fetched once and kept on disk, in the app's cache folder, for later launches</td></tr> | ||
| 422 | </tbody> | ||
| 423 | </table> | ||
| 424 | <pre><code class="language-org highlight"><span class="text org"><span class="punctuation definition link org">[[</span><span class="markup underline link org">https://example.com/chart.png</span><span class="punctuation definition link org">]</span><span class="punctuation definition link org">]</span></span></code></pre> | ||
| 425 | <p>An image is fetched in the background; the link shows as text until it arrives. A link that can't be fetched stays text, and isn't tried again until orgstar starts again. This applies to the editor on the Mac and iOS and to the iOS reader. Emacs's <code class="verbatim">download</code> fetches the image each time it's displayed; orgstar keeps it for the session instead.</p> | ||
| 426 | <h3 id="sizing">Sizing</h3> | ||
| 427 | <p>An image is drawn at its own width, up to the width of the text area. To set a width, put <code class="verbatim">#+ATTR_ORG: :width</code> with a number of points among the keywords above the link:</p> | ||
| 428 | <pre><code class="language-org highlight"><span class="text org"><span class="keyword other keyword org">#+CAPTION:</span><span class="string unquoted org"> Network layout</span> | ||
| 429 | <span class="keyword other keyword org">#+ATTR_ORG:</span><span class="string unquoted org"> :width 300</span> | ||
| 430 | <span class="punctuation definition link org">[[</span><span class="markup underline link org">file:images/network.png</span><span class="punctuation definition link org">]</span><span class="punctuation definition link org">]</span></span></code></pre> | ||
| 431 | <p>The height follows the image's proportions. <code class="verbatim">#+ATTR_HTML</code> and other exporters' attributes don't affect the editor.</p> | ||
| 432 | <h3 id="showing-images-when-a-file-opens">Showing images when a file opens</h3> | ||
| 433 | <p>The config key <code class="verbatim">org-startup-with-inline-images</code> (default <code class="verbatim">false</code>) shows images in every file when it opens. In a file, <code class="verbatim">#+STARTUP: inlineimages</code> or <code class="verbatim">#+STARTUP: noinlineimages</code> overrides it.</p> | ||
| 434 | <h2 id="org-protocol-store-link">org-protocol store-link</h2> | ||
| 435 | <p>orgstar handles <code class="verbatim">org-protocol://store-link</code> URLs, in the new form <code>org-protocol://store-link?url=…&title=…</code> and the old form <code class="verbatim">org-protocol://store-link:/URL/TITLE</code>. The URL is added to your stored links with the title as its description, and is also copied to the clipboard. Insert it with Insert Link. Setting up a browser bookmarklet, and <code class="verbatim">org-protocol://capture</code>, are in <a href="08-capture.html">Capture</a>.</p> | ||
| 436 | <h2 id="on-ios">On iOS</h2> | ||
| 437 | <p>The iOS app follows links: tap a link in the reader. Org files open in the app, and web, mail and other files go to the system. The iOS editor shows inline images as the Mac does; the reader doesn't. In the editor, Store Link, Store ID Link and Insert Link… are in Commands, and on a hardware keyboard the Emacs keys run them; they work as described above, and stored links last until the app quits. <code class="verbatim">org-protocol://store-link</code> links opened on the device are stored and copied too. More ▸ Backlinks lists the same links as the Mac's backlinks pane, for the heading at the caret and the file. See <a href="14-ios.html">iOS</a>.</p> | ||
| 438 | <h2 id="code-references">Code references</h2> | ||
| 439 | <p>A label at the end of a line in a src or example block, <code class="verbatim">(ref:name)</code> by default, is a code reference, and <code class="verbatim">[[(name)]]</code> links to it. Following the link moves to the label. A block's <code class="verbatim">-l "<<%s>>"</code> switch changes the label's form for that block; <code class="verbatim">%s</code> is the name.</p> | ||
| 440 | <p>In export, the label is taken off the line. A block with <code class="verbatim">-n</code> numbers its lines from 1, or <code class="verbatim">-n 10</code> from 10; <code class="verbatim">+n</code> goes on from the numbers of the blocks before it. <code class="verbatim">-r</code> leaves the label out of the exported line, and then the link shows the line's number instead of the name; <code class="verbatim">-k</code> with <code class="verbatim">-n</code> keeps the label while the link still shows the number. A link's description may contain <code class="verbatim">%s</code> for the name or number: <code class="verbatim">[[(call)][line %s]]</code>. In HTML, the line with the label is the link's target, <code class="verbatim">coderef-name</code>.</p> | ||
| 441 | <p>A regexp link, or a <code class="verbatim">file:…::/regexp/</code> search, exports as its description, or its text when it has none.</p> | ||
| 442 | </main> | ||
| 443 | <footer class="site"> | ||
| 444 | © 2026 Christian Cleberg · <a href="https://krz.sh/apps/orgstar/">krz.sh/apps/orgstar</a> · <a href="/orgstar/third-party.html">third-party notices</a> | ||
| 445 | </footer> | ||
| 446 | </body> | ||
| 447 | </html>\ No newline at end of file | ||
guide/10-tables.html added +546
| @@ -0,0 +1,546 @@ | |||
| 1 | <!DOCTYPE html> | ||
| 2 | <html lang="en"> | ||
| 3 | <head> | ||
| 4 | <meta charset="utf-8"> | ||
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
| 6 | <title>Tables · orgstar</title> | ||
| 7 | <meta name="description" content="Creating and editing Org tables, column widths, import and export, and spreadsheet formulas."> | ||
| 8 | <link rel="icon" href="../favicon.svg" type="image/svg+xml"> | ||
| 9 | <link rel="stylesheet" href="../theme.css"> | ||
| 10 | <link rel="stylesheet" href="../syntax.css"> | ||
| 11 | <link rel="stylesheet" href="../style.css"> | ||
| 12 | </head> | ||
| 13 | <body> | ||
| 14 | <header class="site"> | ||
| 15 | <a class="site-title" href="../index.html">orgstar</a> | ||
| 16 | <nav> | ||
| 17 | <a href="../install.html">Install</a> | ||
| 18 | <a href="../quickstart.html">Quick start</a> | ||
| 19 | <a href="index.html">Manual</a> | ||
| 20 | </nav> | ||
| 21 | </header> | ||
| 22 | <main> | ||
| 23 | <h1>Tables</h1> | ||
| 24 | <p class="lede">Org tables are plain text that orgstar keeps aligned, edits by row and column, and recalculates with the same formulas Emacs uses.</p> | ||
| 25 | <nav class="toc" aria-label="On this page"> | ||
| 26 | <h2>On this page</h2> | ||
| 27 | <ul> | ||
| 28 | <li><a href="#tables-in-org">Tables in Org</a></li> | ||
| 29 | <li><a href="#creating-a-table">Creating a table</a></li> | ||
| 30 | <li><a href="#moving-around-and-alignment">Moving around and alignment</a></li> | ||
| 31 | <li><a href="#editing-rows-and-columns">Editing rows and columns</a> | ||
| 32 | <ul> | ||
| 33 | <li><a href="#sorting">Sorting</a></li> | ||
| 34 | <li><a href="#transposing">Transposing</a></li> | ||
| 35 | <li><a href="#the-field-editor">The field editor</a></li> | ||
| 36 | </ul></li> | ||
| 37 | <li><a href="#narrow-columns">Narrow columns</a></li> | ||
| 38 | <li><a href="#importing-and-exporting">Importing and exporting</a></li> | ||
| 39 | <li><a href="#formulas">Formulas</a> | ||
| 40 | <ul> | ||
| 41 | <li><a href="#kinds-of-formula">Kinds of formula</a></li> | ||
| 42 | <li><a href="#references">References</a></li> | ||
| 43 | <li><a href="#names-parameters-and-constants">Names, parameters and constants</a></li> | ||
| 44 | <li><a href="#remote-references">Remote references</a></li> | ||
| 45 | <li><a href="#calc-expressions">Calc expressions</a></li> | ||
| 46 | <li><a href="#mode-flags-and-formats">Mode flags and formats</a></li> | ||
| 47 | <li><a href="#durations">Durations</a></li> | ||
| 48 | <li><a href="#dates">Dates</a></li> | ||
| 49 | <li><a href="#lisp-formulas">Lisp formulas</a></li> | ||
| 50 | </ul></li> | ||
| 51 | <li><a href="#entering-formulas">Entering formulas</a></li> | ||
| 52 | <li><a href="#recalculating">Recalculating</a></li> | ||
| 53 | <li><a href="#when-emacs-is-needed">When Emacs is needed</a></li> | ||
| 54 | <li><a href="#table-el-tables">table.el tables</a></li> | ||
| 55 | <li><a href="#plotting">Plotting</a></li> | ||
| 56 | <li><a href="#on-ios">On iOS</a></li> | ||
| 57 | </ul> | ||
| 58 | </nav> | ||
| 59 | <h2 id="tables-in-org">Tables in Org</h2> | ||
| 60 | <p>A table is a run of lines that start with <code class="verbatim">|</code>. Fields are separated by <code class="verbatim">|</code>, and a line that starts with <code class="verbatim">|-</code> is a horizontal rule:</p> | ||
| 61 | <pre><code class="language-org highlight"><span class="text org"><span class="markup other table org">| Name | Qty | Price |</span> | ||
| 62 | <span class="markup other table org">|-------+-----+-------|</span> | ||
| 63 | <span class="markup other table org">| Apple | 3 | 0.50 |</span> | ||
| 64 | <span class="markup other table org">| Pear | 12 | 0.75 |</span></span></code></pre> | ||
| 65 | <p>orgstar follows <code class="verbatim">org-table.el</code> from Org 9.8.7, with <code class="verbatim">org-table-automatic-realign</code> on, <code class="verbatim">org-table-tab-jumps-over-hlines</code> on, and formulas adjusted without asking when rows and columns move (<code class="verbatim">org-table-fix-formulas-confirm</code> nil). Tables inside dynamic blocks count as tables; tables inside other blocks don't.</p> | ||
| 66 | <h2 id="creating-a-table">Creating a table</h2> | ||
| 67 | <p>Type <code class="verbatim">|</code>, a few field names separated by <code class="verbatim">|</code>, and press <code class="verbatim">TAB</code>: orgstar aligns the line as a table and moves to the next field, adding a row after the last one. Type <code class="verbatim">|-</code> on the line below a row and press <code class="verbatim">TAB</code> to turn it into a full-width rule.</p> | ||
| 68 | <p><code class="verbatim">org-table-create-or-convert-from-region</code> builds one for you: <code>C-c |</code> in the Emacs and Doom presets, <code class="verbatim">⌃⌘\</code> in the Mac preset.</p> | ||
| 69 | <p>With no selection it asks <code class="verbatim">Table size Columns x Rows [e.g. 5x2]:</code>. An empty answer makes a 5 × 2 table. When there is more than one row, a rule follows the first row.</p> | ||
| 70 | <p>With text selected, the command converts the selected lines to a table instead (<code class="verbatim">org-table-convert-region</code>). The separator is guessed:</p> | ||
| 71 | <ul> | ||
| 72 | <li>tabs, when every line has a tab;</li> | ||
| 73 | <li>otherwise commas, when every line has a comma, read as CSV: a field in double quotes can hold commas, and a line break in it becomes a space;</li> | ||
| 74 | <li>otherwise runs of spaces.</li> | ||
| 75 | </ul> | ||
| 76 | <h2 id="moving-around-and-alignment">Moving around and alignment</h2> | ||
| 77 | <table> | ||
| 78 | <thead> | ||
| 79 | <tr><th>Key</th><th>Org command</th><th>Action</th></tr> | ||
| 80 | </thead> | ||
| 81 | <tbody> | ||
| 82 | <tr><td><code class="verbatim">TAB</code></td><td><code class="verbatim">org-table-next-field</code></td><td>Aligns the table and moves to the next field, skipping rules. In the last field it adds a row.</td></tr> | ||
| 83 | <tr><td><code class="verbatim">S-TAB</code></td><td><code class="verbatim">org-table-previous-field</code></td><td>Aligns the table and moves to the previous field.</td></tr> | ||
| 84 | <tr><td><code class="verbatim">RET</code></td><td><code class="verbatim">org-table-next-row</code></td><td>Aligns the table and moves down a row in the same column. Before a rule or at the end of the table it inserts a row.</td></tr> | ||
| 85 | </tbody> | ||
| 86 | </table> | ||
| 87 | <p>These keys work the same in the Emacs and Mac presets. In Doom they apply in insert state; in normal state <code class="verbatim">RET</code> is Doom's "act at point" (see <em>Recalculating</em>).</p> | ||
| 88 | <p>Alignment (<code class="verbatim">org-table-align</code>) pads every field to its column's width and redraws rules to match. A column is right-aligned when at least half of its non-empty fields are numbers, and left-aligned otherwise. A field that holds only a cookie <code class="verbatim"><l></code>, <code class="verbatim"><c></code> or <code class="verbatim"><r></code> (optionally with a width, such as <code class="verbatim"><r10></code>) fixes the column's alignment. Widths count display columns, so wide characters and hidden link markup are measured as they appear.</p> | ||
| 89 | <p>Alignment happens when you press <code class="verbatim">TAB</code>, <code class="verbatim">S-TAB</code> or <code class="verbatim">RET</code> in a table and after every table command, not while you type. To align without moving, use Org ▸ Align Table:</p> | ||
| 90 | <table> | ||
| 91 | <thead> | ||
| 92 | <tr><th>Preset</th><th>Key</th></tr> | ||
| 93 | </thead> | ||
| 94 | <tbody> | ||
| 95 | <tr><td>Emacs</td><td><code class="verbatim">C-c C-c</code> in a table</td></tr> | ||
| 96 | <tr><td>Mac</td><td><code class="verbatim">⌃⌘X</code> in a table</td></tr> | ||
| 97 | <tr><td>Doom</td><td><code class="verbatim">C-c C-c</code>, or <code class="verbatim">SPC m b a</code></td></tr> | ||
| 98 | </tbody> | ||
| 99 | </table> | ||
| 100 | <p><code class="verbatim">C-c C-c</code> (Mac <code class="verbatim">⌃⌘X</code>) in a table is <code class="verbatim">org-ctrl-c-ctrl-c</code>, as in Emacs. It first evaluates a formula typed in the current field (see <em>Entering formulas</em>). Then, in a row marked <code class="verbatim">#</code> (see <em>Names, parameters and constants</em>), it recalculates that row, which also aligns the table; in any other row it aligns the table. With the caret at the table's very first character, it recalculates the whole table instead.</p> | ||
| 101 | <p>To align every table when a file opens, set <code class="verbatim">org-startup-align-all-tables</code> to <code class="verbatim">true</code> in the config file (default <code class="verbatim">false</code>), or put <code class="verbatim">#+STARTUP: align</code> in the file; <code class="verbatim">#+STARTUP: noalign</code> turns it off for that file. See <a href="13-configuration.html">Configuration</a>.</p> | ||
| 102 | <h2 id="editing-rows-and-columns">Editing rows and columns</h2> | ||
| 103 | <table> | ||
| 104 | <thead> | ||
| 105 | <tr><th>Action</th><th>Org command</th><th>Emacs</th><th>Mac</th><th>Doom</th></tr> | ||
| 106 | </thead> | ||
| 107 | <tbody> | ||
| 108 | <tr><td>Move row up</td><td><code class="verbatim">org-table-move-row-up</code></td><td><code class="verbatim">M-<up></code></td><td><code class="verbatim">⌃⌘↑</code></td><td><code class="verbatim">M-<up></code>, <code class="verbatim">M-k</code></td></tr> | ||
| 109 | <tr><td>Move row down</td><td><code class="verbatim">org-table-move-row-down</code></td><td><code class="verbatim">M-<down></code></td><td><code class="verbatim">⌃⌘↓</code></td><td><code class="verbatim">M-<down></code>, <code class="verbatim">M-j</code></td></tr> | ||
| 110 | <tr><td>Move column left</td><td><code class="verbatim">org-table-move-column-left</code></td><td><code class="verbatim">M-<left></code></td><td><code class="verbatim">⌃⌘←</code></td><td><code class="verbatim">M-<left></code>, <code class="verbatim">M-h</code></td></tr> | ||
| 111 | <tr><td>Move column right</td><td><code class="verbatim">org-table-move-column-right</code></td><td><code class="verbatim">M-<right></code></td><td><code class="verbatim">⌃⌘→</code></td><td><code class="verbatim">M-<right></code>, <code class="verbatim">M-l</code></td></tr> | ||
| 112 | <tr><td>Insert column</td><td><code class="verbatim">org-table-insert-column</code></td><td><code class="verbatim">M-S-<right></code></td><td><code class="verbatim">⌃⌥⌘→</code></td><td><code class="verbatim">M-S-<right></code>, <code class="verbatim">SPC m b i c</code></td></tr> | ||
| 113 | <tr><td>Delete column</td><td><code class="verbatim">org-table-delete-column</code></td><td><code class="verbatim">M-S-<left></code></td><td><code class="verbatim">⌃⌥⌘←</code></td><td><code class="verbatim">M-S-<left></code>, <code class="verbatim">SPC m b d c</code></td></tr> | ||
| 114 | <tr><td>Insert row above</td><td><code class="verbatim">org-table-insert-row</code></td><td><code class="verbatim">M-S-<down></code></td><td><code class="verbatim">⌃⌥⌘↓</code></td><td><code class="verbatim">M-S-<down></code>, <code class="verbatim">SPC m b i r</code></td></tr> | ||
| 115 | <tr><td>Delete row</td><td><code class="verbatim">org-table-kill-row</code></td><td><code class="verbatim">M-S-<up></code></td><td><code class="verbatim">⌃⌥⌘↑</code></td><td><code class="verbatim">M-S-<up></code>, <code class="verbatim">SPC m b d r</code></td></tr> | ||
| 116 | <tr><td>Insert rule below</td><td><code class="verbatim">org-table-insert-hline</code></td><td><code class="verbatim">C-c -</code></td><td><code class="verbatim">⌃⌘-</code></td><td><code class="verbatim">C-c -</code>, <code class="verbatim">SPC m b -</code>, <code class="verbatim">SPC m b i h</code></td></tr> | ||
| 117 | <tr><td>Sort rows</td><td><code class="verbatim">org-table-sort-lines</code></td><td><code class="verbatim">C-c ^</code></td><td><code class="verbatim">⌃⇧⌘S</code></td><td><code class="verbatim">C-c ^</code></td></tr> | ||
| 118 | <tr><td>Transpose</td><td><code class="verbatim">org-table-transpose-table-at-point</code></td><td>Org ▸ Transpose Table</td><td>Org ▸ Transpose Table</td><td>Org ▸ Transpose Table</td></tr> | ||
| 119 | <tr><td>Edit field in its own editor</td><td><code class="verbatim">org-table-edit-field</code></td><td><code class="verbatim">C-c `</code></td><td>Org ▸ Edit Table Field</td><td><code class="verbatim">C-c `</code></td></tr> | ||
| 120 | </tbody> | ||
| 121 | </table> | ||
| 122 | <p>The new column goes to the left of the caret's column, empty. Deleting a row deletes the line; it doesn't go to the clipboard. When rows and columns move, are inserted or are deleted, the <code class="verbatim">#+TBLFM</code> line is updated to match: references are renumbered, and formulas for a deleted row or column are removed.</p> | ||
| 123 | <p>The Mac preset uses the same keys for headings and list items; in a table they act on the table.</p> | ||
| 124 | <h3 id="sorting">Sorting</h3> | ||
| 125 | <p><code class="verbatim">C-c ^</code> in a table asks <code class="verbatim">Sort Table: [a]lphabetic, [n]umeric, [t]ime. A/N/T means reversed:</code> and sorts the rows between the rules around the caret by the caret's column. If the caret isn't in a field, it asks for the column first. Sorting is stable.</p> | ||
| 126 | <ul> | ||
| 127 | <li><strong>a</strong> compares text without case.</li> | ||
| 128 | <li><strong>n</strong> compares the number at the start of each field.</li> | ||
| 129 | <li><strong>t</strong> compares a timestamp in the field, else a duration such as <code class="verbatim">1:30</code> or <code class="verbatim">2h 15min</code>, else a clock time <code class="verbatim">H:MM</code>. Fields with none of these sort as 0.</li> | ||
| 130 | </ul> | ||
| 131 | <h3 id="transposing">Transposing</h3> | ||
| 132 | <p>Org ▸ Transpose Table swaps rows and columns. Rules are dropped.</p> | ||
| 133 | <h3 id="the-field-editor">The field editor</h3> | ||
| 134 | <p><code class="verbatim">C-c `</code> opens the field at the caret in an editor of its own, which is easier for long text. <code class="verbatim">C-c '</code> or <code class="verbatim">⌘Return</code> puts it back; <code class="verbatim">Escape</code> or <code class="verbatim">C-c C-k</code> leaves it unchanged. Line breaks become single spaces and lines that start with <code class="verbatim">#</code> are dropped, as <code class="verbatim">org-table-finish-edit-field</code> does.</p> | ||
| 135 | <h2 id="narrow-columns">Narrow columns</h2> | ||
| 136 | <p>A field that holds a width cookie <code class="verbatim"><N></code>, optionally with an alignment letter (<code class="verbatim"><l10></code>, <code class="verbatim"><c8></code>, <code class="verbatim"><r12></code>), marks the column for narrowing. Narrowed fields show their first <em>N</em> display columns followed by <code class="verbatim">…</code>. The text itself is unchanged.</p> | ||
| 137 | <table> | ||
| 138 | <thead> | ||
| 139 | <tr><th>Command</th><th>Org command</th><th>Keys</th></tr> | ||
| 140 | </thead> | ||
| 141 | <tbody> | ||
| 142 | <tr><td>Org ▸ Shrink or Expand Table Column</td><td><code class="verbatim">org-table-toggle-column-width</code></td><td>Emacs and Doom <code class="verbatim">C-c TAB</code></td></tr> | ||
| 143 | <tr><td>Org ▸ Shrink Table Columns with Widths</td><td><code class="verbatim">org-table-shrink</code></td><td>No default key</td></tr> | ||
| 144 | <tr><td>Org ▸ Expand Table Columns</td><td><code class="verbatim">org-table-expand</code></td><td>No default key</td></tr> | ||
| 145 | </tbody> | ||
| 146 | </table> | ||
| 147 | <p><code class="verbatim">C-c TAB</code> in a field toggles that column. Outside a column, for example on the leading <code class="verbatim">|</code>, it asks for <code class="verbatim">Column ranges (e.g. 2-4 6-):</code>, where <code class="verbatim">6-</code> means column 6 to the end. A column without a width cookie shrinks to a bare <code class="verbatim">…</code> when toggled. Typing in a narrowed field widens its column again, as editing Org's overlays does. <code class="verbatim">#+STARTUP: shrink</code> narrows every column with a width cookie when the file opens.</p> | ||
| 148 | <p>The iOS editor narrows columns the same way, with <code class="verbatim">#+STARTUP: shrink</code> and the three commands, which are in Commands when the caret is in a table. The iOS reader shows tables at full width.</p> | ||
| 149 | <h2 id="importing-and-exporting">Importing and exporting</h2> | ||
| 150 | <table> | ||
| 151 | <thead> | ||
| 152 | <tr><th>Command</th><th>Org command</th></tr> | ||
| 153 | </thead> | ||
| 154 | <tbody> | ||
| 155 | <tr><td>Import Table from File… (command palette)</td><td><code class="verbatim">org-table-import</code></td></tr> | ||
| 156 | <tr><td>Export Table to File… (command palette)</td><td><code class="verbatim">org-table-export</code></td></tr> | ||
| 157 | </tbody> | ||
| 158 | </table> | ||
| 159 | <p>Open the command palette with <code class="verbatim">⇧⌘P</code> (<code class="verbatim">M-x</code> in the Emacs preset, <code class="verbatim">SPC :</code> in Doom). On iOS, both are under More › Table in the editor, as Import Table from File…, Export Table as CSV… and Export Table as TSV…, and in Commands; the file comes from, and goes to, the Files app.</p> | ||
| 160 | <p>Import asks for a CSV, TSV or plain text file, inserts its contents at the caret on a line of its own, and converts them to a table with the separator guessed as for a region (see <em>Creating a table</em>).</p> | ||
| 161 | <p>Export writes the table at the caret. A file name ending in <code class="verbatim">.csv</code> gets CSV: fields separated by commas, with fields that contain a comma or a double quote quoted and inner quotes doubled. Any other name gets TSV. Rules are left out.</p> | ||
| 162 | <h2 id="formulas">Formulas</h2> | ||
| 163 | <p>orgstar evaluates Org's spreadsheet formulas, <code class="verbatim">org-table-recalculate</code> and <code class="verbatim">org-table-eval-formula</code>, natively: Calc expressions in a reimplementation of the part of Emacs Calc that tables use, and Lisp formulas in a small Emacs Lisp evaluator. What falls outside them is handed to Emacs on the Mac (see <em>When Emacs is needed</em>).</p> | ||
| 164 | <p>Formulas live in a <code class="verbatim">#+TBLFM:</code> line right after the table, separated by <code class="verbatim">::</code>:</p> | ||
| 165 | <pre><code class="language-org highlight"><span class="text org"><span class="markup other table org">| Item | Qty | Price | Total |</span> | ||
| 166 | <span class="markup other table org">|-------+-----+-------+-------|</span> | ||
| 167 | <span class="markup other table org">| Apple | 3 | 0.50 | 1.50 |</span> | ||
| 168 | <span class="markup other table org">| Pear | 12 | 0.75 | 9.00 |</span> | ||
| 169 | <span class="markup other table org">|-------+-----+-------+-------|</span> | ||
| 170 | <span class="markup other table org">| Sum | | | 10.50 |</span> | ||
| 171 | <span class="keyword other keyword org">#+TBLFM:</span><span class="string unquoted org"> $4=$2*$3;%.2f::@>$4=vsum(@I..@II);%.2f</span></span></code></pre> | ||
| 172 | <p>Blank lines between the table and <code class="verbatim">#+TBLFM:</code> are allowed. If there are several <code class="verbatim">#+TBLFM:</code> lines, recalculating the table uses the first; <code class="verbatim">C-c C-c</code> on another applies that line instead (<code class="verbatim">org-table-calc-current-TBLFM</code>).</p> | ||
| 173 | <h3 id="kinds-of-formula">Kinds of formula</h3> | ||
| 174 | <table> | ||
| 175 | <thead> | ||
| 176 | <tr><th>Left side</th><th>Kind</th><th>Applies to</th></tr> | ||
| 177 | </thead> | ||
| 178 | <tbody> | ||
| 179 | <tr><td><code class="verbatim">$3</code></td><td>Column formula</td><td>Every data row of column 3, except rows marked <code class="verbatim">!</code>, <code class="verbatim">^</code>, <code class="verbatim">_</code>, <code class="verbatim">$</code> or <code class="verbatim">/</code> in the first column.</td></tr> | ||
| 180 | <tr><td><code class="verbatim">$<</code>, <code class="verbatim">$></code></td><td>Column formula</td><td>The first or last column.</td></tr> | ||
| 181 | <tr><td><code class="verbatim">@2$3</code>, <code class="verbatim">@>$3</code></td><td>Field formula</td><td>One field. Field formulas override column formulas.</td></tr> | ||
| 182 | <tr><td><code class="verbatim">@2$2..@4$3</code></td><td>Range formula</td><td>Every field in the rectangle.</td></tr> | ||
| 183 | <tr><td><code class="verbatim">@4</code></td><td>Row formula</td><td>Every field of data row 4.</td></tr> | ||
| 184 | <tr><td><code class="verbatim">$name</code></td><td>Named field formula</td><td>The field named by a <code class="verbatim">^</code> or <code class="verbatim">_</code> row (see <em>Names, parameters and constants</em>).</td></tr> | ||
| 185 | </tbody> | ||
| 186 | </table> | ||
| 187 | <p>A left side relative to the current row, such as <code class="verbatim">@-1$2</code>, is an error (<code class="verbatim">Unknown field</code>), and so is one relative to a rule, such as <code class="verbatim">@I$2</code>, as in Org. Two formulas for the same field are an error.</p> | ||
| 188 | <h3 id="references">References</h3> | ||
| 189 | <p>Rows count data lines from 1; rules don't count. Columns count from 1.</p> | ||
| 190 | <table> | ||
| 191 | <thead> | ||
| 192 | <tr><th>Reference</th><th>Meaning</th></tr> | ||
| 193 | </thead> | ||
| 194 | <tbody> | ||
| 195 | <tr><td><code class="verbatim">$2</code></td><td>Column 2 in the current row.</td></tr> | ||
| 196 | <tr><td><code class="verbatim">$-1</code>, <code class="verbatim">$+1</code></td><td>The column before or after the current one.</td></tr> | ||
| 197 | <tr><td><code class="verbatim">$<</code>, <code class="verbatim">$></code>, <code class="verbatim">$>></code></td><td>The first column, the last, the one before last.</td></tr> | ||
| 198 | <tr><td><code class="verbatim">@3</code></td><td>Row 3 in the current column.</td></tr> | ||
| 199 | <tr><td><code class="verbatim">@-1</code>, <code class="verbatim">@+1</code></td><td>The row above or below.</td></tr> | ||
| 200 | <tr><td><code class="verbatim">@<</code>, <code class="verbatim">@></code></td><td>The first or last data row.</td></tr> | ||
| 201 | <tr><td><code class="verbatim">@I</code>, <code class="verbatim">@II</code>, <code class="verbatim">@III</code></td><td>The first, second, third rule; as a row, the line after it.</td></tr> | ||
| 202 | <tr><td><code class="verbatim">@-I</code></td><td>The rule above the current row.</td></tr> | ||
| 203 | <tr><td><code class="verbatim">@I+2</code></td><td>Two data rows after the first rule.</td></tr> | ||
| 204 | <tr><td><code class="verbatim">@2$3</code></td><td>Row 2, column 3.</td></tr> | ||
| 205 | <tr><td><code class="verbatim">$0</code></td><td>The current column.</td></tr> | ||
| 206 | <tr><td><code class="verbatim">@0</code></td><td>The current row: <code class="verbatim">@0$2</code> is <code class="verbatim">$2</code>.</td></tr> | ||
| 207 | <tr><td><code class="verbatim">@#</code>, <code class="verbatim">$#</code></td><td>The current row's or column's number, as a value.</td></tr> | ||
| 208 | <tr><td><code class="verbatim">@2$1..@4$3</code></td><td>A range: the fields of the rectangle, as a vector.</td></tr> | ||
| 209 | <tr><td><code class="verbatim">$1..$3</code></td><td>Columns 1 to 3 of the current row.</td></tr> | ||
| 210 | <tr><td><code class="verbatim">@I..@II</code></td><td>The current column from the first rule to the second.</td></tr> | ||
| 211 | </tbody> | ||
| 212 | </table> | ||
| 213 | <p>In a Calc formula a single field becomes a number in parentheses, and a range becomes a vector such as <code class="verbatim">[1,2,3]</code>. Without the <code class="verbatim">E</code> flag, empty fields count as 0 on their own and are left out of ranges.</p> | ||
| 214 | <p>A field's text goes into the formula as it is, so a field holding text such as <code class="verbatim">N/A</code> or <code class="verbatim">TBD</code> becomes Calc variables and the result is a formula: <code class="verbatim">$1+5</code> with <code class="verbatim">N/A</code> in <code class="verbatim">$1</code> gives <code class="verbatim">N / A + 5</code>. The <code class="verbatim">N</code> flag reads every field as a number instead, with text as 0. A field such as <code class="verbatim">21.11.2026</code> or <code class="verbatim">192.168.1.1</code>, with more than one decimal point, is <code class="verbatim">#ERROR</code>, as Calc can't read it as a number. A range whose only non-empty field holds text with a space, such as <code class="verbatim">5 kg</code>, needs Emacs: Calc reads a vector without commas as elements separated by spaces.</p> | ||
| 215 | <h3 id="names-parameters-and-constants">Names, parameters and constants</h3> | ||
| 216 | <p>The first column can mark special rows, as in Org's spreadsheet:</p> | ||
| 217 | <table> | ||
| 218 | <thead> | ||
| 219 | <tr><th>Mark</th><th>Row</th></tr> | ||
| 220 | </thead> | ||
| 221 | <tbody> | ||
| 222 | <tr><td><code class="verbatim">#</code></td><td>Marked for recalculation.</td></tr> | ||
| 223 | <tr><td><code class="verbatim">*</code></td><td>Marked for recalculation.</td></tr> | ||
| 224 | </tbody> | ||
| 225 | </table> | ||
| 226 | <p>When any row's first field is one of <code class="verbatim">!</code>, <code class="verbatim">^</code>, <code class="verbatim">_</code>, <code class="verbatim">$</code>, <code class="verbatim">#</code> or <code class="verbatim">*</code>, column formulas in a whole-table recalculation apply only to the rows marked <code class="verbatim">#</code> or <code class="verbatim">*</code>, as <code class="verbatim">org-table-calculate-mark-regexp</code> decides in Org. So a table with a <code class="verbatim">!</code> names row and no <code class="verbatim">#</code> rows gets no column formulas applied; mark the rows to calculate. Field formulas apply either way. Rows marked <code class="verbatim">!</code>, <code class="verbatim">^</code>, <code class="verbatim">_</code>, <code class="verbatim">$</code> or <code class="verbatim">/</code> are never changed by column formulas.</p> | ||
| 227 | <pre><code class="language-org highlight"><span class="text org"><span class="markup other table org">| ! | qty | price | total |</span> | ||
| 228 | <span class="markup other table org">|---+-----+-------+-------|</span> | ||
| 229 | <span class="markup other table org">| # | 2 | 3 | 6 |</span> | ||
| 230 | <span class="markup other table org">| # | 4 | 0.5 | 2 |</span> | ||
| 231 | <span class="keyword other keyword org">#+TBLFM:</span><span class="string unquoted org"> $4=$qty*$price</span></span></code></pre> | ||
| 232 | <p>A <code class="verbatim">$name</code> that isn't a column name, parameter or named field is looked up as <code class="verbatim">org-table-get-constant</code> does:</p> | ||
| 233 | <ul> | ||
| 234 | <li>in <code class="verbatim">#+CONSTANTS:</code> lines of the file or its setup file, written <code>name=value</code> and separated by spaces (<code>#+CONSTANTS: c=299792458 g=9.81</code>);</li> | ||
| 235 | <li><code class="verbatim">$PROP_xyz</code> reads the <code class="verbatim">xyz</code> property of the entry holding the table, with inheritance.</li> | ||
| 236 | </ul> | ||
| 237 | <p>A name that isn't found becomes <code class="verbatim">#UNDEFINED_NAME</code>. A parameter named <code class="verbatim">%</code> in a <code class="verbatim">$</code> row, for example <code>%=%.2f</code>, is put in front of the flags of every formula that has a <code class="verbatim">;</code>, so <code>$3=$2/3;</code> is formatted with <code class="verbatim">%.2f</code>.</p> | ||
| 238 | <h3 id="remote-references">Remote references</h3> | ||
| 239 | <p><code class="verbatim">remote(NAME, REF)</code> reads a field or range from another table:</p> | ||
| 240 | <pre><code class="language-org highlight"><span class="text org"><span class="keyword other keyword org">#+NAME:</span><span class="string unquoted org"> rates</span> | ||
| 241 | <span class="markup other table org">| item | rate |</span> | ||
| 242 | <span class="markup other table org">|------+------|</span> | ||
| 243 | <span class="markup other table org">| a | 2 |</span> | ||
| 244 | <span class="markup other table org">| b | 3 |</span> | ||
| 245 | |||
| 246 | <span class="markup other table org">| x | y | z |</span> | ||
| 247 | <span class="markup other table org">|---+---+---|</span> | ||
| 248 | <span class="markup other table org">| 4 | 8 | 5 |</span> | ||
| 249 | <span class="keyword other keyword org">#+TBLFM:</span><span class="string unquoted org"> $2=$1*remote(rates,@2$2)::$3=vsum(remote(rates,@2$2..@>$2))</span></span></code></pre> | ||
| 250 | <p><code class="verbatim">NAME</code> is found in this order:</p> | ||
| 251 | <ol> | ||
| 252 | <li>a table after <code class="verbatim">#+NAME: NAME</code> or <code class="verbatim">#+TBLNAME: NAME</code> in the same file;</li> | ||
| 253 | <li>the first table in the entry whose <code class="verbatim">ID</code> property is <code class="verbatim">NAME</code>, in the same file;</li> | ||
| 254 | <li>the first table in the entry with that <code class="verbatim">ID</code> in any indexed file in your sidebar folders, read from the file on disk.</li> | ||
| 255 | </ol> | ||
| 256 | <p><code class="verbatim">REF</code> may use spreadsheet-style references such as <code class="verbatim">B3</code> (column B, row 3), which become <code class="verbatim">@3$2</code>. A <code class="verbatim">REF</code> without a row, such as <code class="verbatim">$1..$2</code>, reads the row of the other table that has the current row's number. <code class="verbatim">NAME</code> can itself be a reference: in <code class="verbatim">remote($1,@1$1)</code>, the current row's first field holds the table's name.</p> | ||
| 257 | <h3 id="calc-expressions">Calc expressions</h3> | ||
| 258 | <p>Calc formulas use Calc's number rules: integers are exact, and decimal numbers are rounded to 12 significant digits after every operation. Results are shown with up to 8 significant digits unless a format flag says otherwise (<code class="verbatim">org-calc-default-modes</code>).</p> | ||
| 259 | <p>Operators, from lowest to highest precedence (the lowest, <code>||</code>, is logical or: the left side if it is nonzero, else the right side):</p> | ||
| 260 | <table> | ||
| 261 | <thead> | ||
| 262 | <tr><th>Operator</th><th>Meaning</th></tr> | ||
| 263 | </thead> | ||
| 264 | <tbody> | ||
| 265 | <tr><td><code class="verbatim">&&</code></td><td>Logical and: the left side if it is zero, else the right side.</td></tr> | ||
| 266 | <tr><td><code>==</code>, <code>!=</code>, <code class="verbatim"><</code>, <code class="verbatim">></code>, <code><=</code>, <code>>=</code></td><td>Comparisons, giving 1 or 0. They can't be chained.</td></tr> | ||
| 267 | <tr><td><code class="verbatim">+</code>, <code class="verbatim">-</code></td><td>Addition and subtraction.</td></tr> | ||
| 268 | <tr><td><code class="verbatim">/</code>, <code class="verbatim">%</code>, <code class="verbatim">\</code></td><td>Division, modulo (sign of the divisor), integer division rounding down.</td></tr> | ||
| 269 | <tr><td><code class="verbatim">*</code></td><td>Multiplication. Values side by side also multiply: <code class="verbatim">2 3</code>, <code class="verbatim">2 (x)</code>. It groups from the right: <code class="verbatim">a * b c</code> is <code class="verbatim">a * (b c)</code>.</td></tr> | ||
| 270 | <tr><td>unary <code class="verbatim">-</code></td><td>Negation.</td></tr> | ||
| 271 | <tr><td><code class="verbatim">!</code>, <code class="verbatim">!!</code> after a value</td><td>Factorial, double factorial.</td></tr> | ||
| 272 | <tr><td><code class="verbatim">!</code> before a value</td><td>Logical not: <code class="verbatim">!x^2</code> is <code class="verbatim">(!x)^2</code> and <code class="verbatim">!x + 1</code> is <code class="verbatim">(!x) + 1</code>.</td></tr> | ||
| 273 | <tr><td><code class="verbatim">%</code> after a value</td><td>Percent: <code class="verbatim">5%</code> is <code class="verbatim">0.05</code>. Followed by a value, <code class="verbatim">%</code> is modulo instead.</td></tr> | ||
| 274 | </tbody> | ||
| 275 | </table> | ||
| 276 | <p>Parentheses group, <code class="verbatim">[a, b, c]</code> writes a vector, <code class="verbatim"><2026-10-05 Mon></code> writes a date, and <code class="verbatim">nan</code> is "not a number". <code class="verbatim">1:3</code> writes the fraction one third and <code class="verbatim">1:2:3</code> one and two thirds; <code class="verbatim">16#FF</code> writes an integer in base 16 (any base from 2 to 36).</p> | ||
| 277 | <p>Functions:</p> | ||
| 278 | <table> | ||
| 279 | <thead> | ||
| 280 | <tr><th>Function</th><th>Result</th></tr> | ||
| 281 | </thead> | ||
| 282 | <tbody> | ||
| 283 | <tr><td><code class="verbatim">vsum</code>, <code class="verbatim">vprod</code></td><td>Sum or product of a vector.</td></tr> | ||
| 284 | <tr><td><code class="verbatim">vcount</code></td><td>Number of elements.</td></tr> | ||
| 285 | <tr><td><code class="verbatim">vmean</code>, <code class="verbatim">vmedian</code></td><td>Mean, median.</td></tr> | ||
| 286 | <tr><td><code class="verbatim">vgmean</code>, <code class="verbatim">vhmean</code></td><td>Geometric mean, harmonic mean.</td></tr> | ||
| 287 | <tr><td><code class="verbatim">vmax</code>, <code class="verbatim">vmin</code></td><td>Largest, smallest element.</td></tr> | ||
| 288 | <tr><td><code class="verbatim">vvar</code>, <code class="verbatim">vsdev</code></td><td>Sample variance, sample standard deviation.</td></tr> | ||
| 289 | <tr><td><code class="verbatim">vpvar</code>, <code class="verbatim">vpsdev</code></td><td>Population variance, population standard deviation.</td></tr> | ||
| 290 | <tr><td><code class="verbatim">vcov(x, y)</code>, <code class="verbatim">vpcov(x, y)</code>, <code class="verbatim">vcorr(x, y)</code></td><td>Sample and population covariance, correlation coefficient.</td></tr> | ||
| 291 | <tr><td><code class="verbatim">vflat</code></td><td>The arguments as one vector.</td></tr> | ||
| 292 | <tr><td><code class="verbatim">agmean(a, b)</code></td><td>Arithmetic-geometric mean.</td></tr> | ||
| 293 | <tr><td><code class="verbatim">max(a, b, …)</code>, <code class="verbatim">min(a, b, …)</code></td><td>Largest, smallest argument.</td></tr> | ||
| 294 | <tr><td><code class="verbatim">if(c, a, b)</code></td><td><code class="verbatim">a</code> if <code class="verbatim">c</code> is nonzero, else <code class="verbatim">b</code>.</td></tr> | ||
| 295 | <tr><td><code class="verbatim">abs</code></td><td>Absolute value.</td></tr> | ||
| 296 | <tr><td><code class="verbatim">floor</code>, <code class="verbatim">ceil</code>, <code class="verbatim">trunc</code></td><td>Round down, up, toward zero, to an integer.</td></tr> | ||
| 297 | <tr><td><code class="verbatim">round(x)</code>, <code class="verbatim">round(x, n)</code></td><td>Round to an integer, or to <em>n</em> decimal places.</td></tr> | ||
| 298 | <tr><td><code class="verbatim">rounde</code>, <code class="verbatim">roundu</code></td><td>As <code class="verbatim">round</code>, with halves going to even, or up.</td></tr> | ||
| 299 | <tr><td><code class="verbatim">frac(x)</code></td><td>The fraction nearest to <em>x</em>.</td></tr> | ||
| 300 | <tr><td><code class="verbatim">fdiv(a, b)</code></td><td><em>a</em> divided by <em>b</em> as a fraction.</td></tr> | ||
| 301 | <tr><td><code class="verbatim">float(x)</code>, <code class="verbatim">pfloat(x)</code></td><td><em>x</em> as a decimal number.</td></tr> | ||
| 302 | <tr><td><code class="verbatim">sign</code></td><td>-1, 0 or 1.</td></tr> | ||
| 303 | <tr><td><code class="verbatim">mod(a, b)</code>, <code class="verbatim">idiv(a, b)</code></td><td>As <code class="verbatim">%</code> and <code class="verbatim">\</code>.</td></tr> | ||
| 304 | <tr><td><code class="verbatim">gcd(a, b)</code>, <code class="verbatim">lcm(a, b)</code></td><td>Greatest common divisor, least common multiple.</td></tr> | ||
| 305 | <tr><td><code class="verbatim">fact</code>, <code class="verbatim">dfact</code></td><td>Factorial and double factorial of a non-negative integer.</td></tr> | ||
| 306 | <tr><td><code class="verbatim">choose(n, m)</code>, <code class="verbatim">perm(n, m)</code></td><td>Binomial coefficient and permutations, of integers.</td></tr> | ||
| 307 | <tr><td><code class="verbatim">sqrt</code>, <code class="verbatim">exp</code>, <code class="verbatim">ln</code>, <code class="verbatim">log10</code></td><td>Square root, exponential, natural and base-10 logarithm.</td></tr> | ||
| 308 | <tr><td><code class="verbatim">log(x, b)</code></td><td>Logarithm of <em>x</em> to base <em>b</em>.</td></tr> | ||
| 309 | <tr><td><code class="verbatim">pow(x, y)</code>, <code class="verbatim">nroot(x, n)</code>, <code class="verbatim">exp10(n)</code></td><td><em>x</em> to the power <em>y</em>, <em>n</em>-th root, 10 to an integer power.</td></tr> | ||
| 310 | <tr><td><code class="verbatim">hypot(a, b)</code></td><td>The square root of /a/² + /b/².</td></tr> | ||
| 311 | <tr><td><code class="verbatim">sin</code>, <code class="verbatim">cos</code>, <code class="verbatim">tan</code></td><td>Trigonometry, in degrees unless the <code class="verbatim">R</code> flag is set.</td></tr> | ||
| 312 | <tr><td><code class="verbatim">arcsin</code>, <code class="verbatim">arccos</code>, <code class="verbatim">arctan</code>, <code class="verbatim">arctan2(y, x)</code></td><td>Inverse trigonometry, in degrees unless <code class="verbatim">R</code>.</td></tr> | ||
| 313 | <tr><td><code class="verbatim">sinh</code>, <code class="verbatim">cosh</code>, <code class="verbatim">tanh</code></td><td>Hyperbolic functions.</td></tr> | ||
| 314 | <tr><td><code class="verbatim">arcsinh</code>, <code class="verbatim">arccosh</code>, <code class="verbatim">arctanh</code></td><td>Inverse hyperbolic functions.</td></tr> | ||
| 315 | <tr><td><code class="verbatim">deg</code>, <code class="verbatim">rad</code></td><td>Radians to degrees, degrees to radians.</td></tr> | ||
| 316 | <tr><td><code class="verbatim">eq</code>, <code class="verbatim">neq</code>, <code class="verbatim">lt</code>, <code class="verbatim">gt</code>, <code class="verbatim">leq</code>, <code class="verbatim">geq</code></td><td>As <code>==</code>, <code>!=</code>, <code class="verbatim"><</code>, <code class="verbatim">></code>, <code><=</code> and <code>>=</code>.</td></tr> | ||
| 317 | <tr><td><code class="verbatim">land</code>, <code class="verbatim">lor</code>, <code class="verbatim">lnot</code></td><td>As <code class="verbatim">&&</code>, ~</td><td></td><td>~ and <code class="verbatim">!</code>.</td></tr> | ||
| 318 | </tbody> | ||
| 319 | </table> | ||
| 320 | <p>The statistics functions take any number of vectors and numbers, as in <code class="verbatim">vmean($2..$4, $6)</code>.</p> | ||
| 321 | <p>Calc leaves what it can't reduce to a number as a formula, and so does orgstar for sums, differences, products, quotients and powers:</p> | ||
| 322 | <ul> | ||
| 323 | <li>A name is a variable: <code class="verbatim">2*x + x</code> is <code class="verbatim">3 x</code>. Calc's constants <code class="verbatim">pi</code>, <code class="verbatim">e</code>, <code class="verbatim">phi</code> and <code class="verbatim">gamma</code> stay names too: <code class="verbatim">$1^2*pi</code> gives <code class="verbatim">9 pi</code> for 3.</li> | ||
| 324 | <li>Division by zero stays unevaluated: <code class="verbatim">$1/$2</code> with 6 and an empty field gives <code class="verbatim">6/0</code>, and <code class="verbatim">x/0 + 1</code> gives <code class="verbatim">x / 0 + 1</code>.</li> | ||
| 325 | <li><code class="verbatim">inf</code>, <code class="verbatim">-inf</code> and <code class="verbatim">uinf</code> (infinity of unknown sign) follow Calc's rules: <code class="verbatim">inf - inf</code> is <code class="verbatim">nan</code>, <code class="verbatim">1/inf</code> is <code class="verbatim">0</code>, <code class="verbatim">2^inf</code> is <code class="verbatim">inf</code>.</li> | ||
| 326 | <li><code class="verbatim">vsum</code>, <code class="verbatim">vprod</code>, <code class="verbatim">vmean</code> and <code class="verbatim">vcount</code> take vectors holding such formulas.</li> | ||
| 327 | <li><code class="verbatim">sqrt</code>, <code class="verbatim">abs</code>, <code class="verbatim">exp</code>, <code class="verbatim">ln</code>, <code class="verbatim">min</code>, <code class="verbatim">max</code>, <code class="verbatim">vmax</code>, <code class="verbatim">vmin</code> and <code class="verbatim">%</code> simplify a formula as Calc does, or keep it: <code class="verbatim">abs(-x)</code> is <code class="verbatim">abs(x)</code>, <code class="verbatim">sqrt(4 x)</code> is <code class="verbatim">2 sqrt(x)</code>, <code class="verbatim">vmax($2..$4)</code> over 4, <code class="verbatim">absent</code> and 8 is <code class="verbatim">max(max(4, absent), 8)</code>, and <code class="verbatim">x % 3</code> stays.</li> | ||
| 328 | <li>Comparisons, <code class="verbatim">&&</code>, <code class="verbatim">||</code>, <code class="verbatim">!</code> and <code class="verbatim">if</code> on a formula give a formula unless Calc can decide them: <code class="verbatim">x =</code> x= is 1, <code class="verbatim">$2 > 10</code> with <code class="verbatim">TBD</code> in <code class="verbatim">$2</code> is <code class="verbatim">TBD > 10</code>, and <code class="verbatim">if($2 > 10, 1, 0)</code> is <code class="verbatim">TBD > 10 ? 1 : 0</code>.</li> | ||
| 329 | </ul> | ||
| 330 | <p>Other functions of a formula, <code class="verbatim">sqrt</code>, <code class="verbatim">exp</code> and <code class="verbatim">ln</code> of one under the <code class="verbatim">S</code> flag, and complex results such as <code class="verbatim">sqrt(-inf)</code> need Emacs.</p> | ||
| 331 | <h3 id="mode-flags-and-formats">Mode flags and formats</h3> | ||
| 332 | <p>After the formula, a <code class="verbatim">;</code> starts its flags, as in <code>$3=$1/$2;%.2f</code> or <code>$4=$1*2;f2</code>:</p> | ||
| 333 | <table> | ||
| 334 | <thead> | ||
| 335 | <tr><th>Flag</th><th>Meaning</th></tr> | ||
| 336 | </thead> | ||
| 337 | <tbody> | ||
| 338 | <tr><td><code class="verbatim">nN</code></td><td>Float format with <em>N</em> significant digits.</td></tr> | ||
| 339 | <tr><td><code class="verbatim">fN</code></td><td>Fixed format with <em>N</em> decimal places.</td></tr> | ||
| 340 | <tr><td><code class="verbatim">sN</code></td><td>Scientific format with <em>N</em> digits.</td></tr> | ||
| 341 | <tr><td><code class="verbatim">eN</code></td><td>Engineering format with <em>N</em> digits.</td></tr> | ||
| 342 | <tr><td><code class="verbatim">pN</code></td><td>Calc precision, 3 to 18 digits (12 by default). See below for limits.</td></tr> | ||
| 343 | <tr><td><code class="verbatim">D</code>, <code class="verbatim">R</code></td><td>Angles in degrees (the default) or radians.</td></tr> | ||
| 344 | <tr><td><code class="verbatim">F</code></td><td>Prefer fractions: <code class="verbatim">1/3</code> stays <code class="verbatim">1:3</code>.</td></tr> | ||
| 345 | <tr><td><code class="verbatim">N</code></td><td>Treat every field as a number; text counts as 0.</td></tr> | ||
| 346 | <tr><td><code class="verbatim">S</code></td><td>Symbolic: results that aren't exact stay as formulas, such as <code class="verbatim">sqrt(2)</code>.</td></tr> | ||
| 347 | <tr><td><code class="verbatim">E</code></td><td>Keep empty fields: in ranges they stay in, and count as <code class="verbatim">nan</code> in Calc.</td></tr> | ||
| 348 | <tr><td><code class="verbatim">L</code></td><td>Literal: in Lisp formulas, insert fields as they are written.</td></tr> | ||
| 349 | <tr><td><code class="verbatim">T</code></td><td>Durations: read <code class="verbatim">H:MM</code> and <code class="verbatim">H:MM:SS</code> fields as times, show the result as <code class="verbatim">HH:MM:SS</code>.</td></tr> | ||
| 350 | <tr><td><code class="verbatim">U</code></td><td>As <code class="verbatim">T</code>, showing <code class="verbatim">HH:MM</code>.</td></tr> | ||
| 351 | <tr><td><code class="verbatim">t</code></td><td>As <code class="verbatim">T</code>, showing decimal hours with two places, such as <code class="verbatim">1.50</code>.</td></tr> | ||
| 352 | </tbody> | ||
| 353 | </table> | ||
| 354 | <p>Above <code class="verbatim">p14</code>, functions worked out from decimal approximations (<code class="verbatim">exp</code>, <code class="verbatim">ln</code>, <code class="verbatim">log</code>, non-integer powers, <code class="verbatim">sinh</code> and <code class="verbatim">cosh</code>) may need Emacs, and so may <code class="verbatim">tanh</code> above <code class="verbatim">p12</code>. Above <code class="verbatim">p16</code> so may the statistics functions, powers of decimal numbers, <code class="verbatim">sqrt</code> of a non-square and the trigonometric functions.</p> | ||
| 355 | <p>With <code class="verbatim">S</code>, the functions that may give an inexact result (<code class="verbatim">sqrt</code>, <code class="verbatim">exp</code>, <code class="verbatim">ln</code>, <code class="verbatim">log</code>, <code class="verbatim">log10</code>, <code class="verbatim">pow</code>, <code class="verbatim">nroot</code>, <code class="verbatim">hypot</code>, the inverse trigonometric and hyperbolic functions, <code class="verbatim">fact</code>, <code class="verbatim">dfact</code>, the standard deviations, <code class="verbatim">vgmean</code>, <code class="verbatim">vhmean</code>, the covariances and <code class="verbatim">agmean</code>), powers other than integer powers, and <code class="verbatim">sin</code>, <code class="verbatim">cos</code> and <code class="verbatim">tan</code> in radians need Emacs.</p> | ||
| 356 | <p>The flag <code class="verbatim">u</code> needs Emacs. Any other text after the flags is a <code class="verbatim">format</code> string applied to the result, such as <code class="verbatim">%.2f</code> or <code class="verbatim">%d</code>; <code class="verbatim">format</code> supports <code class="verbatim">%s</code>, <code class="verbatim">%S</code>, <code class="verbatim">%d</code>, <code class="verbatim">%o</code>, <code class="verbatim">%x</code>, <code class="verbatim">%X</code>, <code class="verbatim">%c</code>, <code class="verbatim">%e</code>, <code class="verbatim">%f</code> and <code class="verbatim">%g</code>.</p> | ||
| 357 | <h3 id="durations">Durations</h3> | ||
| 358 | <p>With <code class="verbatim">T</code>, <code class="verbatim">U</code> or <code class="verbatim">t</code>, fields like <code class="verbatim">1:30</code> or <code class="verbatim">10:00:30</code> are read as hours, minutes and seconds:</p> | ||
| 359 | <pre><code class="language-org highlight"><span class="text org"><span class="markup other table org">| start | end | sum | diff | hours |</span> | ||
| 360 | <span class="markup other table org">|----------+---------+----------+-------+-------|</span> | ||
| 361 | <span class="markup other table org">| 1:30 | 0:45 | 02:15:00 | 00:45 | 3.00 |</span> | ||
| 362 | <span class="markup other table org">| 10:00:30 | 2:15:10 | 12:15:40 | 07:45 | 20.02 |</span> | ||
| 363 | <span class="keyword other keyword org">#+TBLFM:</span><span class="string unquoted org"> $3=$1+$2;T::$4=$1-$2;U::$5=$1*2;t</span></span></code></pre> | ||
| 364 | <h3 id="dates">Dates</h3> | ||
| 365 | <p>Timestamps in fields, active or inactive, take part in Calc arithmetic as dates. The difference of two dates is a number of days, with a fraction when the timestamps have times. A date plus a number is a date, written back as an inactive timestamp:</p> | ||
| 366 | <pre><code class="language-org highlight"><span class="text org"><span class="markup other table org">| start | end | days | later |</span> | ||
| 367 | <span class="markup other table org">|------------------+------------------+------+------------------|</span> | ||
| 368 | <span class="markup other table org">| <2026-10-05 Mon> | <2026-10-12 Mon> | 7 | [2026-10-12 Mon] |</span> | ||
| 369 | <span class="keyword other keyword org">#+TBLFM:</span><span class="string unquoted org"> $3=$2-$1::$4=$1+7</span></span></code></pre> | ||
| 370 | <p>A date is its day number underneath, counted from 1 January of year 1, so the sum of two dates is a number and <code class="verbatim">vmean</code> of two dates is the day number halfway between them. <code class="verbatim">vsum</code>, <code class="verbatim">vmax</code>, <code class="verbatim">vmin</code>, <code class="verbatim">max</code>, <code class="verbatim">min</code>, <code class="verbatim">abs</code> and the comparisons work on dates; <code class="verbatim">floor</code>, <code class="verbatim">ceil</code>, <code class="verbatim">trunc</code> and <code class="verbatim">round</code> keep a date and drop or round its time. A timestamp with a time, even <code class="verbatim">00:00</code>, keeps showing one. Calc leaves <code class="verbatim">abs</code> of day 0 (<code class="verbatim"><-1-12-31></code>) unevaluated, so that needs Emacs.</p> | ||
| 371 | <table> | ||
| 372 | <thead> | ||
| 373 | <tr><th>Function</th><th>Result</th></tr> | ||
| 374 | </thead> | ||
| 375 | <tbody> | ||
| 376 | <tr><td><code class="verbatim">year</code>, <code class="verbatim">month</code>, <code class="verbatim">day</code></td><td>Parts of the date.</td></tr> | ||
| 377 | <tr><td><code class="verbatim">hour</code>, <code class="verbatim">minute</code>, <code class="verbatim">second</code></td><td>Parts of the time, 0 for a date without one.</td></tr> | ||
| 378 | <tr><td><code class="verbatim">weekday</code></td><td>0 for Sunday to 6 for Saturday.</td></tr> | ||
| 379 | <tr><td><code class="verbatim">yearday</code></td><td>Day of the year, 1 for 1 January.</td></tr> | ||
| 380 | <tr><td><code class="verbatim">date(y, m, d)</code>, <code class="verbatim">date(y, m, d, h, mi, s)</code></td><td>The date, with a time when an hour is given. <code class="verbatim">date(m, d)</code> is this year.</td></tr> | ||
| 381 | <tr><td><code class="verbatim">date(d)</code></td><td>The day number of date <em>d</em>, or the date of day number <em>d</em>.</td></tr> | ||
| 382 | <tr><td><code class="verbatim">now()</code></td><td>The current date and time.</td></tr> | ||
| 383 | <tr><td><code class="verbatim">incmonth(d, n)</code>, <code class="verbatim">incyear(d, n)</code></td><td><em>n</em> months or years later (1 by default), on the last day if the month is shorter.</td></tr> | ||
| 384 | <tr><td><code class="verbatim">newmonth(d, n)</code>, <code class="verbatim">newyear(d, n)</code></td><td>Day <em>n</em> of the month or year (1 by default; 0 is the last day).</td></tr> | ||
| 385 | <tr><td><code class="verbatim">newweek(d, w)</code></td><td>The day on or before <em>d</em> that falls on weekday <em>w</em> (0, Sunday, by default).</td></tr> | ||
| 386 | <tr><td><code class="verbatim">badd(d, n)</code>, <code class="verbatim">bsub(d, n)</code></td><td><em>n</em> business days later or earlier, skipping Saturdays and Sundays.</td></tr> | ||
| 387 | <tr><td><code class="verbatim">bsub(d1, d2)</code></td><td>Business days from <em>d2</em> to <em>d1</em>.</td></tr> | ||
| 388 | <tr><td><code class="verbatim">julian(d)</code></td><td>The Julian day number of <em>d</em>, or the date of a Julian day number.</td></tr> | ||
| 389 | <tr><td><code class="verbatim">unixtime(d)</code></td><td>Seconds since 1970-01-01 00:00 UTC, or the date of a number of seconds.</td></tr> | ||
| 390 | </tbody> | ||
| 391 | </table> | ||
| 392 | <p>As in Calc, a timestamp year under 100 is read as 19xx or 20xx: 00 to 39 is 20xx, 40 to 99 is 19xx. <code class="verbatim">badd</code> and <code class="verbatim">bsub</code> work only for dates in the years 1 to 2737, the range of Calc's holiday table; outside it they need Emacs, which leaves them unevaluated.</p> | ||
| 393 | <p><code class="verbatim">julian</code> of a date with a time and <code class="verbatim">unixtime</code> use the local time zone. Emacs applies the current year's daylight saving rules to every date, which orgstar doesn't, so in a time zone with daylight saving time these need Emacs.</p> | ||
| 394 | <p>With <code class="verbatim">N</code>, <code class="verbatim">T</code>, <code class="verbatim">U</code> or <code class="verbatim">t</code> a timestamp field counts as 0. A result that is a date is <code class="verbatim">#ERROR</code> with <code class="verbatim">N</code>, and with <code class="verbatim">T</code>, <code class="verbatim">U</code> or <code class="verbatim">t</code> it stops the recalculation with the error Org gives.</p> | ||
| 395 | <h3 id="lisp-formulas">Lisp formulas</h3> | ||
| 396 | <p>A formula that starts with <code class="verbatim">'(</code> is Emacs Lisp. Each reference becomes a Lisp string, or a number with <code class="verbatim">N</code>, or the field's text inserted as is with <code class="verbatim">L</code>. A range becomes the values separated by spaces, so wrap it in a quoted list:</p> | ||
| 397 | <pre><code class="language-org highlight"><span class="text org"><span class="markup other table org">| name | greeting |</span> | ||
| 398 | <span class="markup other table org">|-------+----------|</span> | ||
| 399 | <span class="markup other table org">| Ada | Ada! |</span> | ||
| 400 | <span class="markup other table org">| Grace | Grace! |</span> | ||
| 401 | <span class="keyword other keyword org">#+TBLFM:</span><span class="string unquoted org"> $2='(concat $1 "!")</span> | ||
| 402 | |||
| 403 | <span class="markup other table org">| n |</span> | ||
| 404 | <span class="markup other table org">|---|</span> | ||
| 405 | <span class="markup other table org">| 1 |</span> | ||
| 406 | <span class="markup other table org">| 2 |</span> | ||
| 407 | <span class="markup other table org">|---|</span> | ||
| 408 | <span class="markup other table org">| 3 |</span> | ||
| 409 | <span class="keyword other keyword org">#+TBLFM:</span><span class="string unquoted org"> @>$1='(apply '+ '(@I..@II));N</span></span></code></pre> | ||
| 410 | <p>The evaluator supports:</p> | ||
| 411 | <ul> | ||
| 412 | <li>special forms: <code class="verbatim">quote</code>, <code class="verbatim">function</code>, <code class="verbatim">lambda</code>, <code class="verbatim">progn</code>, <code class="verbatim">prog1</code>, <code class="verbatim">if</code>, <code class="verbatim">when</code>, <code class="verbatim">unless</code>, <code class="verbatim">cond</code>, <code class="verbatim">and</code>, <code class="verbatim">or</code>, <code class="verbatim">let</code>, <code class="verbatim">let*</code>, <code class="verbatim">setq</code>, <code class="verbatim">push</code>, <code class="verbatim">pop</code>, <code class="verbatim">while</code>, <code class="verbatim">dolist</code>, <code class="verbatim">dotimes</code>, <code class="verbatim">with-output-to-string</code>, <code class="verbatim">ignore-errors</code>, <code class="verbatim">condition-case</code>, <code class="verbatim">save-match-data</code>, <code class="verbatim">defun</code>, <code class="verbatim">defvar</code>, <code class="verbatim">defconst</code>, <code class="verbatim">let-alist</code>, <code class="verbatim">cl-incf</code> and <code class="verbatim">cl-decf</code> on a variable, with dynamic binding, as Org evaluates formulas;</li> | ||
| 413 | <li><code class="verbatim">pcase</code> with literal, symbol, quoted, backquoted and <code class="verbatim">pred</code> patterns, where <code class="verbatim">pred</code> takes a function name or a lambda;</li> | ||
| 414 | <li><code class="verbatim">cl-loop</code> with <code class="verbatim">for VAR in LIST</code>, <code class="verbatim">for VAR from START to END</code>, and one kind of <code class="verbatim">collect</code> or <code class="verbatim">sum</code>, with <code class="verbatim">do</code>;</li> | ||
| 415 | <li>arithmetic: <code class="verbatim">+</code>, <code class="verbatim">-</code>, <code class="verbatim">*</code>, <code class="verbatim">/</code>, <code class="verbatim">%</code>, <code class="verbatim">mod</code>, <code class="verbatim">1+</code>, <code class="verbatim">1-</code>, <code class="verbatim">abs</code>, <code class="verbatim">max</code>, <code class="verbatim">min</code>, <code class="verbatim">float</code>, <code class="verbatim">floor</code>, <code class="verbatim">ceiling</code>, <code class="verbatim">round</code>, <code class="verbatim">truncate</code>, <code>=</code>, <code class="verbatim"><</code>, <code class="verbatim">></code>, <code><=</code>, <code>>=</code>, <code>/=</code>, <code class="verbatim">zerop</code>, <code class="verbatim">expt</code>, <code class="verbatim">sqrt</code>, <code class="verbatim">exp</code>, <code class="verbatim">log</code>, <code class="verbatim">sin</code>, <code class="verbatim">cos</code>, <code class="verbatim">tan</code>, <code class="verbatim">asin</code>, <code class="verbatim">acos</code>, <code class="verbatim">atan</code>, <code class="verbatim">isnan</code>, <code class="verbatim">random</code>, <code class="verbatim">logand</code>, <code class="verbatim">logior</code>, <code class="verbatim">logxor</code>, <code class="verbatim">ash</code>, and the variables <code class="verbatim">float-pi</code>, <code class="verbatim">pi</code> and <code class="verbatim">float-e</code>;</li> | ||
| 416 | <li>predicates: <code class="verbatim">not</code>, <code class="verbatim">null</code>, <code class="verbatim">eq</code>, <code class="verbatim">eql</code>, <code class="verbatim">equal</code>, <code class="verbatim">numberp</code>, <code class="verbatim">integerp</code>, <code class="verbatim">floatp</code>, <code class="verbatim">stringp</code>, <code class="verbatim">listp</code>, <code class="verbatim">consp</code>, <code class="verbatim">symbolp</code>;</li> | ||
| 417 | <li>lists: <code class="verbatim">car</code>, <code class="verbatim">cdr</code>, <code class="verbatim">cadr</code>, <code class="verbatim">cddr</code>, <code class="verbatim">cons</code>, <code class="verbatim">list</code>, <code class="verbatim">nth</code>, <code class="verbatim">nthcdr</code>, <code class="verbatim">elt</code>, <code class="verbatim">aref</code>, <code class="verbatim">append</code>, <code class="verbatim">length</code>, <code class="verbatim">reverse</code>, <code class="verbatim">number-sequence</code>, <code class="verbatim">memq</code>, <code class="verbatim">member</code>, <code class="verbatim">memql</code>, <code class="verbatim">assoc</code>, <code class="verbatim">assq</code>, <code class="verbatim">delq</code>, <code class="verbatim">delete</code>, <code class="verbatim">mapcar</code>, <code class="verbatim">mapc</code>, <code class="verbatim">mapconcat</code>, <code class="verbatim">funcall</code>, <code class="verbatim">apply</code>, <code class="verbatim">identity</code>, <code class="verbatim">ignore</code>, <code class="verbatim">last</code>, <code class="verbatim">butlast</code>, <code class="verbatim">delete-dups</code>, <code class="verbatim">nreverse</code>, <code class="verbatim">sort</code> (both calling conventions; these three need Emacs when they would change a list that another variable, list or argument may share), <code class="verbatim">seq-reduce</code>, <code class="verbatim">seq-filter</code>, <code class="verbatim">seq-remove</code>, <code class="verbatim">seq-map</code>, <code class="verbatim">seq-uniq</code>, <code class="verbatim">cl-reduce</code> (with <code class="verbatim">:initial-value</code>), <code class="verbatim">cl-remove-if</code>, <code class="verbatim">cl-remove-if-not</code>, <code class="verbatim">cl-find</code> and <code class="verbatim">cl-position</code> (with <code class="verbatim">:test</code>);</li> | ||
| 418 | <li>strings: <code class="verbatim">concat</code>, <code class="verbatim">format</code>, <code class="verbatim">format-message</code>, <code>string=</code>, <code class="verbatim">string-equal</code>, <code class="verbatim">string<</code>, <code class="verbatim">string-lessp</code>, <code class="verbatim">upcase</code>, <code class="verbatim">downcase</code>, <code class="verbatim">capitalize</code>, <code class="verbatim">substring</code>, <code class="verbatim">string-to-number</code>, <code class="verbatim">number-to-string</code>, <code class="verbatim">int-to-string</code>, <code class="verbatim">string-prefix-p</code>, <code class="verbatim">string-suffix-p</code>, <code class="verbatim">string-empty-p</code>, <code class="verbatim">string-trim</code>, <code class="verbatim">split-string</code>, <code class="verbatim">prin1-to-string</code>, <code class="verbatim">string-join</code>, <code class="verbatim">string-to-char</code>, <code class="verbatim">char-to-string</code>, <code class="verbatim">string-pad</code>, <code class="verbatim">string-width</code>, <code class="verbatim">string-search</code>, <code class="verbatim">string-replace</code>;</li> | ||
| 419 | <li>regular expressions: <code class="verbatim">string-match</code>, <code class="verbatim">string-match-p</code>, <code class="verbatim">match-beginning</code>, <code class="verbatim">match-end</code>, <code class="verbatim">match-string</code>, <code class="verbatim">replace-match</code> and <code class="verbatim">replace-regexp-in-string</code> on strings, and <code class="verbatim">regexp-quote</code>;</li> | ||
| 420 | <li>time: <code class="verbatim">current-time</code>, <code class="verbatim">format-time-string</code>, <code class="verbatim">float-time</code>, <code class="verbatim">time-add</code>, <code class="verbatim">time-subtract</code>, <code class="verbatim">time-to-days</code>, <code class="verbatim">date-to-time</code>, <code class="verbatim">days-between</code>, <code class="verbatim">org-time-string-to-time</code>, <code class="verbatim">org-time-string-to-absolute</code> and the <code class="verbatim">calendar-</code> functions that diary sexps use, in the local time zone and the proleptic Gregorian calendar;</li> | ||
| 421 | <li>output and errors: <code class="verbatim">princ</code>, <code class="verbatim">prin1</code>, <code class="verbatim">print</code>, <code class="verbatim">terpri</code>, <code class="verbatim">message</code>, <code class="verbatim">error</code>, <code class="verbatim">user-error</code>;</li> | ||
| 422 | <li>Org's lookup functions <code class="verbatim">org-lookup-first</code>, <code class="verbatim">org-lookup-last</code> and <code class="verbatim">org-lookup-all</code>.</li> | ||
| 423 | </ul> | ||
| 424 | <p>Regular expressions use Emacs's syntax and the syntax table of an Org buffer, and <code class="verbatim">case-fold-search</code> is on unless the formula binds it to <code class="verbatim">nil</code>. These need Emacs: numbered groups <code class="verbatim">\\(?N:</code>, categories <code class="verbatim">\\c</code>, syntax classes and character classes such as <code class="verbatim">\\w</code>, <code class="verbatim">\\b</code> or <code class="verbatim">[[:alpha:]]</code> against text with characters past ASCII, and case folding of a letter past ASCII, including <code class="verbatim">capitalize</code>. <code class="verbatim">condition-case</code> binds its variable to the error symbol and data, such as <code class="verbatim">(wrong-type-argument listp 1)</code>; reading that variable for an error whose data orgstar doesn't know, such as <code class="verbatim">args-out-of-range</code>, needs Emacs, as does a handler that names a specific condition when the error isn't one of <code class="verbatim">wrong-type-argument</code>, <code class="verbatim">args-out-of-range</code>, <code class="verbatim">arith-error</code>, <code class="verbatim">void-variable</code>, <code class="verbatim">invalid-function</code>, <code class="verbatim">wrong-number-of-arguments</code>, <code class="verbatim">error</code> and <code class="verbatim">user-error</code>. <code class="verbatim">format-time-string</code> takes <code class="verbatim">%Y</code>, <code class="verbatim">%y</code>, <code class="verbatim">%m</code>, <code class="verbatim">%d</code>, <code class="verbatim">%e</code>, <code class="verbatim">%H</code>, <code class="verbatim">%k</code>, <code class="verbatim">%I</code>, <code class="verbatim">%l</code>, <code class="verbatim">%M</code>, <code class="verbatim">%S</code>, <code class="verbatim">%p</code>, <code class="verbatim">%a</code>, <code class="verbatim">%A</code>, <code class="verbatim">%b</code>, <code class="verbatim">%h</code>, <code class="verbatim">%B</code>, <code class="verbatim">%u</code>, <code class="verbatim">%w</code>, <code class="verbatim">%j</code>, <code class="verbatim">%F</code>, <code class="verbatim">%D</code>, <code class="verbatim">%R</code>, <code class="verbatim">%T</code>, <code class="verbatim">%s</code>, <code class="verbatim">%z</code>, <code class="verbatim">%n</code>, <code class="verbatim">%t</code> and <code class="verbatim">%%</code>, without flags or widths; other codes need Emacs, as do float times in <code class="verbatim">time-add</code> and <code class="verbatim">time-subtract</code>. <code class="verbatim">date-to-time</code> and <code class="verbatim">days-between</code> read dates as <code class="verbatim">YYYY-MM-DD</code>, with an optional <code class="verbatim">HH:MM</code> or <code class="verbatim">HH:MM:SS</code>.</p> | ||
| 425 | <p>Any other function, or a macro not listed, needs Emacs. As in Emacs 31, <code class="verbatim">lambda</code> and <code class="verbatim">function</code> make function objects rather than lists, so a formula whose value is one, or that prints one or takes it apart as a list, needs Emacs; calling one, or passing it to a function that calls it, doesn't. An error inside a Lisp formula writes <code class="verbatim">#ERROR</code> in the field, as does a Calc error. So does a value that is a non-empty list, ignoring the format; with <code class="verbatim">T</code>, <code class="verbatim">U</code> or <code class="verbatim">t</code> such a value needs Emacs.</p> | ||
| 426 | <p><code class="verbatim">org-sbe</code> writes the value of a named src block, run with the variables given:</p> | ||
| 427 | <pre><code class="language-org highlight"><span class="text org"><span class="keyword other keyword org">#+NAME:</span><span class="string unquoted org"> square</span> | ||
| 428 | <span class="markup raw block org"><span class="keyword control block begin org">#+begin_src</span><span class="variable parameter org"> emacs-lisp :var n=2</span> | ||
| 429 | (* n n) | ||
| 430 | <span class="keyword control block end org">#+end_src</span> | ||
| 431 | </span> | ||
| 432 | <span class="markup other table org">| n | square |</span> | ||
| 433 | <span class="markup other table org">|---+--------|</span> | ||
| 434 | <span class="markup other table org">| 3 | 9 |</span> | ||
| 435 | <span class="keyword other keyword org">#+TBLFM:</span><span class="string unquoted org"> $2='(org-sbe square (n $1))</span></span></code></pre> | ||
| 436 | <p>As in Org, a field's text is read as a value, so <code class="verbatim">abc</code> names another block or table; write <code class="verbatim">$$1</code> instead of <code class="verbatim">$1</code> to pass the text as a string. A string before the variables holds header arguments, and the name may also be a named table or list in the file. As in Org, a name under a <code class="verbatim">COMMENT</code> heading is skipped, and the name's case must match. <code class="verbatim">org-sbe</code> needs Pro's source blocks feature.</p> | ||
| 437 | <p>Emacs Lisp blocks run in orgstar's interpreter, with dynamic binding unless the block has <code class="verbatim">:lexical yes</code> or <code class="verbatim">:lexical t</code>, and <code class="verbatim">js</code> blocks run in JavaScriptCore, everywhere and without asking, since neither can reach files or other programs. After five seconds orgstar stops waiting for a <code class="verbatim">js</code> block and the table needs Emacs; a block that never finishes keeps running in the background until orgstar quits, and isn't started again while it runs. Blocks in other languages, blocks with <code class="verbatim">:cache yes</code>, <code class="verbatim">:file</code> results or column and row names, other <code class="verbatim">:lexical</code> values, values that hold a function, Lisp values with symbols in a variable with several values, a name given to more than one element, in any case, when the first isn't a src block, references to an <code class="verbatim">ID</code> or <code class="verbatim">CUSTOM_ID</code>, and <code class="verbatim">js</code> values that are arrays need Emacs. When Emacs runs a table in a file that uses <code class="verbatim">org-sbe</code>, it runs the blocks without asking again, so orgstar asks <code class="verbatim">This table's formulas run Lisp and source blocks. Run them? (yes, no)</code> each time.</p> | ||
| 438 | <h2 id="entering-formulas">Entering formulas</h2> | ||
| 439 | <p>There are three ways to set a formula.</p> | ||
| 440 | <p><strong>In the field.</strong> Type <code>=expr</code> in a field and press <code class="verbatim">TAB</code> or <code class="verbatim">RET</code>: orgstar stores <code>$N=expr</code> as the column's formula and evaluates it, as <code class="verbatim">org-table-maybe-eval-formula</code> does. Type <code>:=expr</code> instead to store a field formula <code>@R$C=expr</code>.</p> | ||
| 441 | <p><strong>With a prompt.</strong> <code class="verbatim">org-table-eval-formula</code> asks for the formula (<code>Column formula $N=</code> or <code>Field formula @R$C=</code>) with the stored one filled in, stores it and evaluates it in the current field. Clearing the prompt and pressing <code class="verbatim">Return</code> removes the stored formula, as in Emacs, and the echo area shows <code class="verbatim">Formula removed</code>. You can also delete a formula in the formula editor below or from the <code class="verbatim">#+TBLFM:</code> line.</p> | ||
| 442 | <table> | ||
| 443 | <thead> | ||
| 444 | <tr><th>Command</th><th>Emacs</th><th>Mac</th><th>Doom</th></tr> | ||
| 445 | </thead> | ||
| 446 | <tbody> | ||
| 447 | <tr><td>Org ▸ Set Column Formula</td><td><code>C-c =</code></td><td>Org ▸ Set Column Formula</td><td><code>C-c =</code></td></tr> | ||
| 448 | <tr><td>Org ▸ Set Field Formula</td><td>none</td><td>Org ▸ Set Field Formula</td><td>none</td></tr> | ||
| 449 | </tbody> | ||
| 450 | </table> | ||
| 451 | <p>Org's <code>C-u C-c =</code> for field formulas has no equivalent key, because orgstar has no prefix argument; use the menu item or type <code>:=</code> in the field.</p> | ||
| 452 | <p><strong>In the formula editor.</strong> <code class="verbatim">C-c '</code> in a table or on its <code class="verbatim">#+TBLFM:</code> line (<code class="verbatim">org-table-edit-formulas</code>) opens the formulas in an editor of their own, one per line, grouped under <code class="verbatim"># Column Formulas</code>, <code class="verbatim"># Field and Range Formulas</code> and <code class="verbatim"># Named Field Formulas</code>. A formula can continue on indented lines. <code class="verbatim">C-c '</code> or <code class="verbatim">⌘Return</code> installs the formulas; <code class="verbatim">Escape</code> or <code class="verbatim">C-c C-k</code> leaves them unchanged. Installing doesn't recalculate. The echo area says so and points to Recalculate Table: <code class="verbatim">C-c C-c</code> on the <code class="verbatim">#+TBLFM:</code> line, or <code class="verbatim">⌃⌘X</code> there in the Mac preset.</p> | ||
| 453 | <p>The formulas are stored sorted the way <code class="verbatim">org-table-formula-less-p</code> sorts them.</p> | ||
| 454 | <h2 id="recalculating">Recalculating</h2> | ||
| 455 | <table> | ||
| 456 | <thead> | ||
| 457 | <tr><th>Command</th><th>Org command</th><th>Emacs</th><th>Mac</th><th>Doom</th></tr> | ||
| 458 | </thead> | ||
| 459 | <tbody> | ||
| 460 | <tr><td>Recalculate Table</td><td><code class="verbatim">org-table-recalculate</code> with <code class="verbatim">C-u</code></td><td><code class="verbatim">C-c C-c</code> on <code class="verbatim">#+TBLFM:</code></td><td><code class="verbatim">⌃⌘X</code> on <code class="verbatim">#+TBLFM:</code></td><td><code class="verbatim">SPC m b r</code>, <code class="verbatim">C-c C-c</code> on <code class="verbatim">#+TBLFM:</code></td></tr> | ||
| 461 | <tr><td>Recalculate Table Row</td><td><code class="verbatim">org-table-recalculate</code></td><td><code class="verbatim">C-c *</code></td><td><code class="verbatim">⌃⌘*</code> (<code class="verbatim">⌃⇧⌘8</code> on a US keyboard)</td><td><code class="verbatim">C-c *</code></td></tr> | ||
| 462 | <tr><td>Iterate Table Formulas</td><td><code class="verbatim">org-table-iterate</code></td><td><code class="verbatim">C-u C-u C-c *</code></td><td>—</td><td>—</td></tr> | ||
| 463 | </tbody> | ||
| 464 | </table> | ||
| 465 | <p>In Doom's normal state, <code class="verbatim">RET</code> in a table recalculates it when it has a <code class="verbatim">#+TBLFM:</code> line and aligns it otherwise; on a <code class="verbatim">#+TBLFM:</code> line it recalculates.</p> | ||
| 466 | <p>When the table has a rule below its first data row, recalculating the whole table leaves the rows above that rule, the header, alone. With marked rows, the marks decide instead (see <em>Names, parameters and constants</em>). Each command evaluates the column formulas row by row, then the field formulas, then aligns the table. Each formula is evaluated once. Iterate Table Formulas recalculates the whole table again and again until it stops changing, for formulas that depend on each other's results, at most ten times. The echo area says <code class="verbatim">Convergence after 3 iterations</code>, or <code class="verbatim">Table was already stable</code>; after ten passes that still change the table it says <code class="verbatim">No convergence after 10 iterations</code>, and the ten passes stay. <code class="verbatim">C-u C-c *</code> also recalculates the whole table in the Emacs preset.</p> | ||
| 467 | <p>A formula that fails, such as one whose reference leads outside the table, stops the command there. As in Emacs, the fields written before it stay, the table isn't aligned, the caret goes to the start of its field (on a <code class="verbatim">#+TBLFM</code> line it stays put), and the echo area shows the error. <code class="verbatim">TAB</code>, <code class="verbatim">S-TAB</code> and <code class="verbatim">RET</code> in a row marked <code class="verbatim">#</code> stop there too, without moving on.</p> | ||
| 468 | <p>A row marked <code class="verbatim">#</code> is recalculated when you press <code class="verbatim">TAB</code>, <code class="verbatim">S-TAB</code> or <code class="verbatim">RET</code> in it, before the caret moves (<code class="verbatim">org-table-maybe-recalculate-line</code>), and with <code class="verbatim">C-c C-c</code> (Mac <code class="verbatim">⌃⌘X</code>). Other rows are recalculated only by the commands above. Emacs skips a second automatic recalculation of the same row by the same command in a row; orgstar recalculates each time, which gives the same result unless a formula depends on its own value.</p> | ||
| 469 | <h2 id="when-emacs-is-needed">When Emacs is needed</h2> | ||
| 470 | <p>When a formula uses something the native evaluator doesn't have, the command reports what it was and the Mac recalculates the table in Emacs instead. This happens for:</p> | ||
| 471 | <ul> | ||
| 472 | <li>symbolic results beyond those under <em>Calc expressions</em>, such as a function of a field holding text;</li> | ||
| 473 | <li>Calc functions not listed above, intervals such as <code class="verbatim">[1..5]</code>, precisions beyond those given under <em>Mode flags and formats</em>, parts of the <code class="verbatim">S</code> flag, and the <code class="verbatim">u</code> flag;</li> | ||
| 474 | <li>complex results, vectors of anything but numbers, numbers too large for 64-bit integers, and decimal numbers past Calc's limit of 10^±4000000;</li> | ||
| 475 | <li>Lisp functions not listed above.</li> | ||
| 476 | </ul> | ||
| 477 | <p>The echo area shows <code class="verbatim">Recalculating in Emacs (reason)…</code>, then <code class="verbatim">Recalculated in Emacs</code>. orgstar runs <code class="verbatim">emacs -Q --batch</code> on a copy of the file, so your Emacs init file, packages and customizations are not loaded, then replaces the table with Emacs's result. It looks for Emacs at the path in the <code class="verbatim">ORGSTAR_EMACS</code> environment variable, then <code class="verbatim">/opt/homebrew/bin/emacs</code>, <code class="verbatim">/usr/local/bin/emacs</code>, <code class="verbatim">/Applications/Emacs.app/Contents/MacOS/Emacs</code>, <code class="verbatim">/run/current-system/sw/bin/emacs</code> and <code class="verbatim">/usr/bin/emacs</code>. If none is found, the echo area shows the reason, as <code class="verbatim">This table's formulas can't be calculated here: reason.</code>, and the table is unchanged. Emacs gets your <code class="verbatim">PATH</code> with <code class="verbatim">/opt/homebrew/bin</code>, <code class="verbatim">/usr/local/bin</code>, <code class="verbatim">/Library/TeX/texbin</code>, <code class="verbatim">/usr/bin</code> and <code class="verbatim">/bin</code> added, as code blocks and export do, so programs a formula starts are found when orgstar was opened from the Dock. The run stops after 60 seconds. If you edit the table while Emacs is working, its result is discarded.</p> | ||
| 478 | <p>Edit ▸ Cancel Running Task (<code class="verbatim">⌘.</code>) stops the recalculation; the echo area shows <code class="verbatim">Recalculation canceled</code> and the table is unchanged. Starting another recalculation or export in Emacs cancels the one that is running.</p> | ||
| 479 | <p>The <a href="../install.html">Mac App Store version</a> doesn't run Emacs, so it recalculates only the tables orgstar computes itself. In any other table it applies the formulas in Emacs's order up to the first one it can't compute and stops there, as Emacs does when a formula fails: the fields written before it stay, unaligned, and the rest are unchanged. The echo area shows <code class="verbatim">The table was recalculated up to (formula), which can't be calculated here: (reason).</code>, where <em>formula</em> is the left-hand side, such as <code class="verbatim">$4</code>. When nothing was written, it shows <code class="verbatim">This table's formulas can't be calculated here: (reason).</code> and the table is unchanged.</p> | ||
| 480 | <p>If the table's formulas contain Lisp, orgstar asks first: <code class="verbatim">This table's formulas run Lisp. Run them? (yes, no, always)</code>. <code class="verbatim">always</code> trusts this table's text in this file, so the question isn't asked again until the text changes.</p> | ||
| 481 | <p>Entering a formula that needs Emacs with <code>C-c =</code>, Set Field Formula or <code>=</code> in a field is not handed to Emacs. The formula is stored in the <code class="verbatim">#+TBLFM:</code> line and the field is left as it was; the echo area shows <code class="verbatim">The formula was stored; recalculating it needs Emacs</code> and the reason. <code class="verbatim">TAB</code> and <code class="verbatim">RET</code> still move to the next field. Recalculate the table to run the formula in Emacs. In the Mac App Store version the echo area shows <code class="verbatim">The formula was stored; it can't be calculated here:</code> and the reason, and recalculating doesn't run it.</p> | ||
| 482 | <p>For how orgstar and Emacs share files, see <a href="15-alongside-emacs.html">Using orgstar alongside Emacs</a>.</p> | ||
| 483 | <h2 id="table-el-tables">table.el tables</h2> | ||
| 484 | <p>Tables drawn with <code class="verbatim">+</code> corners and <code class="verbatim">-</code> and <code class="verbatim">|</code> borders, as the <code class="verbatim">table.el</code> package makes them, are recognized and kept as written:</p> | ||
| 485 | <pre><code class="language-org highlight"><span class="text org"><span class="markup strikethrough org">+-------+</span>-------+ | ||
| 486 | <span class="markup other table org">| Name | Value |</span> | ||
| 487 | <span class="markup strikethrough org">+-------+</span>-------+ | ||
| 488 | <span class="markup other table org">| a | 1 |</span> | ||
| 489 | <span class="markup strikethrough org">+-------+</span>-------+</span></code></pre> | ||
| 490 | <p>Edit the text in the cells as usual. <code class="verbatim">TAB</code> and <code class="verbatim">S-TAB</code> line the borders up, then move to the next or previous cell, wrapping around at the ends of the table, as table.el's <code class="verbatim">table-forward-cell</code> and <code class="verbatim">table-backward-cell</code> do; the caret goes to the cell's first character. <code class="verbatim">C-c C-c</code> (Mac <code class="verbatim">⌃⌘X</code>) lines the borders up without moving. Lining up makes each column as wide as its widest text, and never narrower than its rules: text typed into a cell uses up the spaces at its end first, as table.el does when you type.</p> | ||
| 491 | <p>Org edits table.el tables in table.el's own buffer, with <code class="verbatim">C-c '</code>, and says so for <code class="verbatim">TAB</code> and <code class="verbatim">C-c C-c</code>; orgstar does the editing in place instead. Tables with merged cells, which span rows or columns, can be moved through but not lined up ("Can't align a table.el table with merged cells"). Formulas, sorting and the other table commands don't apply.</p> | ||
| 492 | <p>HTML export renders them as tables, with cells that span rows and columns, and Markdown export writes them as a code block. See <a href="12-export.html">Export</a>.</p> | ||
| 493 | <h2 id="plotting">Plotting</h2> | ||
| 494 | <p>Plot Table (<code class="verbatim">org-plot/gnuplot</code>, <code class="verbatim">C-c " g</code> in the Emacs and Doom presets, and in the command palette; More › Table on iOS) draws the table at the caret, or the first table after it, as the <code class="verbatim">#+PLOT:</code> lines above it say:</p> | ||
| 495 | <pre><code class="language-org highlight"><span class="text org"><span class="keyword other keyword org">#+PLOT:</span><span class="string unquoted org"> title:"Sales" ind:1 deps:(2 3) type:2d with:linespoints file:"sales.png"</span> | ||
| 496 | <span class="markup other table org">| month | north | south |</span> | ||
| 497 | <span class="markup other table org">|-------+-------+-------|</span> | ||
| 498 | <span class="markup other table org">| 1 | 20 | 12 |</span> | ||
| 499 | <span class="markup other table org">| 2 | 25 | 18 |</span></span></code></pre> | ||
| 500 | <table> | ||
| 501 | <thead> | ||
| 502 | <tr><th>Option</th><th>Meaning</th></tr> | ||
| 503 | </thead> | ||
| 504 | <tbody> | ||
| 505 | <tr><td><code class="verbatim">type</code></td><td><code class="verbatim">2d</code> (the default), <code class="verbatim">3d</code>, <code class="verbatim">grid</code> or <code class="verbatim">radar</code></td></tr> | ||
| 506 | <tr><td><code class="verbatim">ind</code></td><td>The column of x values, counting from 1; 0 (the default) plots against row numbers</td></tr> | ||
| 507 | <tr><td><code class="verbatim">deps</code></td><td>The columns to plot, as a list such as <code class="verbatim">(2 3)</code>; all but <code class="verbatim">ind</code> by default</td></tr> | ||
| 508 | <tr><td><code class="verbatim">with</code></td><td><code class="verbatim">lines</code> (the default), <code class="verbatim">points</code>, <code class="verbatim">linespoints</code>, <code class="verbatim">impulses</code>, <code class="verbatim">boxes</code>, <code class="verbatim">histograms</code>, <code class="verbatim">steps</code>, <code class="verbatim">fsteps</code></td></tr> | ||
| 509 | <tr><td><code class="verbatim">title</code></td><td>The plot's title</td></tr> | ||
| 510 | <tr><td><code class="verbatim">file</code></td><td>Where the image goes, relative to the Org file's folder; without it the plot shows in a sheet</td></tr> | ||
| 511 | <tr><td><code class="verbatim">labels</code></td><td>Names for the columns, as a list; a header row above a rule names them otherwise</td></tr> | ||
| 512 | <tr><td><code class="verbatim">map</code></td><td>With <code class="verbatim">t</code>, a <code class="verbatim">3d</code> plot is seen from above</td></tr> | ||
| 513 | <tr><td><code class="verbatim">ymin</code>, <code class="verbatim">ymax</code>, <code class="verbatim">xmin</code>, <code class="verbatim">xmax</code></td><td>The axes' ranges; <code class="verbatim">min</code> and <code class="verbatim">max</code> are <code class="verbatim">ymin</code> and <code class="verbatim">ymax</code></td></tr> | ||
| 514 | <tr><td><code class="verbatim">ticks</code></td><td>How many marks the y axis has; for <code class="verbatim">radar</code>, how many rings the web has</td></tr> | ||
| 515 | <tr><td><code class="verbatim">transpose</code></td><td>With <code class="verbatim">yes</code>, rows become columns</td></tr> | ||
| 516 | <tr><td><code class="verbatim">set</code>, <code class="verbatim">line</code>, <code class="verbatim">script</code>, <code class="verbatim">timefmt</code></td><td>gnuplot commands, a line of gnuplot, a gnuplot script file and the time format, for gnuplot</td></tr> | ||
| 517 | </tbody> | ||
| 518 | </table> | ||
| 519 | <p>Options are read as Org reads them, quirks included: an option's name also matches inside a longer word (<code class="verbatim">timeind:t</code> sets <code class="verbatim">ind</code>), an unquoted value ends at a <code class="verbatim">.</code>, <code class="verbatim">,</code> or <code class="verbatim">;</code>, <code class="verbatim">set:</code> options before the last <code class="verbatim">line:</code> are dropped, and each <code class="verbatim">set:</code> and <code class="verbatim">line:</code> that's kept comes twice, as Org reads the options twice. An ind column of timestamps is plotted as dates, and one of text as labels.</p> | ||
| 520 | <p>A <code class="verbatim">radar</code> plot draws each row as an axis, clockwise from the top, and each column after the first as a series named by the header. Each axis is scaled from its row's lowest and highest values rounded outward (120 to 340 becomes 100 to 400), or from <code class="verbatim">ymin</code> to <code class="verbatim">ymax</code>. Org works out the number of rings from the values; where Org can't (it signals an error, as for a <code class="verbatim">ymin</code> above a row's values, or never finishes, as for a row whose values are all the same), orgstar reports it and asks for <code class="verbatim">ticks:</code>. <code class="verbatim">ticks:</code> can't be below 0, and without gnuplot it takes at most 1000. A row whose values or their range overflow a double is refused, as Emacs signals an error for it.</p> | ||
| 521 | <p>On the Mac, when gnuplot is installed (orgstar looks on the same <code class="verbatim">PATH</code> as code blocks), the table goes to gnuplot as Emacs sends it: the same data file and script, so every option and gnuplot's own terminals and styles apply. A plot without <code class="verbatim">file:</code> is drawn to an image and shown in a sheet. Without gnuplot, and on iOS, orgstar draws the plot itself with Swift Charts: <code class="verbatim">2d</code> as lines, points or bars by <code class="verbatim">with:</code>, <code class="verbatim">grid</code> as a heat map, <code class="verbatim">3d</code> as a surface (a wireframe in a file), <code class="verbatim">radar</code> as a web. <code class="verbatim">file:</code> then takes <code class="verbatim">.png</code>, <code class="verbatim">.jpg</code> or <code class="verbatim">.pdf</code>, 640 by 480 points as gnuplot's default, or <code class="verbatim">.svg</code> for a <code class="verbatim">2d</code> plot. A log axis places values from 1e-307 to 1e308 and leaves out others; it needs at least one, and its range, if given, must lie within them. If inline images are showing, a link to the file shows the new plot.</p> | ||
| 522 | <p>Without gnuplot these <code class="verbatim">set:</code> commands are followed, also as a <code class="verbatim">line:</code> that starts with <code class="verbatim">set</code>:</p> | ||
| 523 | <table> | ||
| 524 | <thead> | ||
| 525 | <tr><th>Command</th><th>Effect</th></tr> | ||
| 526 | </thead> | ||
| 527 | <tbody> | ||
| 528 | <tr><td><code class="verbatim">title 'T'</code></td><td>The title, over <code class="verbatim">title:</code></td></tr> | ||
| 529 | <tr><td><code class="verbatim">xlabel 'X'</code>, <code class="verbatim">ylabel 'Y'</code></td><td>The axes' names</td></tr> | ||
| 530 | <tr><td><code class="verbatim">xrange [0:10]</code>, <code class="verbatim">yrange [*:5]</code></td><td>The axes' ranges, low to high; <code class="verbatim">*</code> or nothing leaves an end to the data</td></tr> | ||
| 531 | <tr><td><code class="verbatim">logscale</code>, <code class="verbatim">logscale x</code>, <code class="verbatim">logscale y</code></td><td>Logarithmic axes</td></tr> | ||
| 532 | <tr><td><code class="verbatim">grid</code></td><td>Grid lines at the marks</td></tr> | ||
| 533 | <tr><td><code class="verbatim">key off</code>, <code class="verbatim">key top left</code></td><td>Hides or places the legend (top, bottom, left, right; else top right)</td></tr> | ||
| 534 | <tr><td><code class="verbatim">xtics 2</code>, <code class="verbatim">ytics 0.5</code></td><td>A mark every so many units, on an axis that isn't logarithmic</td></tr> | ||
| 535 | </tbody> | ||
| 536 | </table> | ||
| 537 | <p><code class="verbatim">2d</code> plots follow all of them, except that an x axis of text or dates takes no range, steps or log scale. <code class="verbatim">grid</code> and <code class="verbatim">3d map:t</code> plots follow the title and axis names; other <code class="verbatim">3d</code> plots and <code class="verbatim">radar</code> plots only the title. Other commands, other <code class="verbatim">line:</code> options and <code class="verbatim">script:</code> are left out, and the message after plotting names them, such as <code class="verbatim">Not followed without gnuplot: set:"style fill solid"</code>.</p> | ||
| 538 | <p>The <a href="../install.html">Mac App Store version</a> doesn't use gnuplot: it always draws the plot itself in the same way.</p> | ||
| 539 | <h2 id="on-ios">On iOS</h2> | ||
| 540 | <p>The iOS app evaluates formulas natively with the same engine. Tables that need Emacs are not recalculated there; the app reports <code class="verbatim">This table needs Emacs, which runs on the Mac</code> with the reason. Import and export are under More › Table, with Plot Table. Narrow columns work in the editor, as described under <em>Narrow columns</em>. See <a href="14-ios.html">iOS</a>.</p> | ||
| 541 | </main> | ||
| 542 | <footer class="site"> | ||
| 543 | © 2026 Christian Cleberg · <a href="https://krz.sh/apps/orgstar/">krz.sh/apps/orgstar</a> · <a href="/orgstar/third-party.html">third-party notices</a> | ||
| 544 | </footer> | ||
| 545 | </body> | ||
| 546 | </html>\ No newline at end of file | ||
guide/11-code-blocks.html added +834
| @@ -0,0 +1,834 @@ | |||
| 1 | <!DOCTYPE html> | ||
| 2 | <html lang="en"> | ||
| 3 | <head> | ||
| 4 | <meta charset="utf-8"> | ||
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
| 6 | <title>Code blocks · orgstar</title> | ||
| 7 | <meta name="description" content="Source blocks in orgstar: highlighting, editing, running with Babel, results, header arguments, noweb and tangling."> | ||
| 8 | <link rel="icon" href="../favicon.svg" type="image/svg+xml"> | ||
| 9 | <link rel="stylesheet" href="../theme.css"> | ||
| 10 | <link rel="stylesheet" href="../syntax.css"> | ||
| 11 | <link rel="stylesheet" href="../style.css"> | ||
| 12 | </head> | ||
| 13 | <body> | ||
| 14 | <header class="site"> | ||
| 15 | <a class="site-title" href="../index.html">orgstar</a> | ||
| 16 | <nav> | ||
| 17 | <a href="../install.html">Install</a> | ||
| 18 | <a href="../quickstart.html">Quick start</a> | ||
| 19 | <a href="index.html">Manual</a> | ||
| 20 | </nav> | ||
| 21 | </header> | ||
| 22 | <main> | ||
| 23 | <h1>Code blocks</h1> | ||
| 24 | <p class="lede">orgstar runs and tangles source blocks the way Org Babel does, and refuses anything it would run differently.</p> | ||
| 25 | <nav class="toc" aria-label="On this page"> | ||
| 26 | <h2>On this page</h2> | ||
| 27 | <ul> | ||
| 28 | <li><a href="#source-blocks">Source blocks</a> | ||
| 29 | <ul> | ||
| 30 | <li><a href="#syntax-highlighting">Syntax highlighting</a></li> | ||
| 31 | </ul></li> | ||
| 32 | <li><a href="#editing-a-block-apart">Editing a block apart</a></li> | ||
| 33 | <li><a href="#running-a-block">Running a block</a> | ||
| 34 | <ul> | ||
| 35 | <li><a href="#languages-that-run">Languages that run</a></li> | ||
| 36 | <li><a href="#javascript-in-javascriptcore">JavaScript in JavaScriptCore</a></li> | ||
| 37 | <li><a href="#compiled-languages">Compiled languages</a></li> | ||
| 38 | <li><a href="#the-trust-prompt">The trust prompt</a></li> | ||
| 39 | <li><a href="#eval">:eval</a></li> | ||
| 40 | <li><a href="#cancelling-a-run">Cancelling a run</a></li> | ||
| 41 | </ul></li> | ||
| 42 | <li><a href="#results">Results</a> | ||
| 43 | <ul> | ||
| 44 | <li><a href="#value-or-output">Value or output</a></li> | ||
| 45 | <li><a href="#result-types">Result types</a></li> | ||
| 46 | <li><a href="#result-formats">Result formats</a></li> | ||
| 47 | <li><a href="#inserting">Inserting</a></li> | ||
| 48 | <li><a href="#wrap">:wrap</a></li> | ||
| 49 | <li><a href="#results-in-files">Results in files</a></li> | ||
| 50 | </ul></li> | ||
| 51 | <li><a href="#header-arguments">Header arguments</a> | ||
| 52 | <ul> | ||
| 53 | <li><a href="#where-they-come-from">Where they come from</a></li> | ||
| 54 | <li><a href="#lisp-in-header-values">Lisp in header values</a></li> | ||
| 55 | <li><a href="#header-argument-reference">Header argument reference</a></li> | ||
| 56 | <li><a href="#arguments-that-are-refused">Arguments that are refused</a></li> | ||
| 57 | </ul></li> | ||
| 58 | <li><a href="#variables">Variables</a> | ||
| 59 | <ul> | ||
| 60 | <li><a href="#tables-in-variables">Tables in variables</a></li> | ||
| 61 | <li><a href="#standard-input-and-arguments">Standard input and arguments</a></li> | ||
| 62 | </ul></li> | ||
| 63 | <li><a href="#sessions">Sessions</a></li> | ||
| 64 | <li><a href="#caching">Caching</a></li> | ||
| 65 | <li><a href="#noweb">Noweb</a></li> | ||
| 66 | <li><a href="#calls">Calls</a> | ||
| 67 | <ul> | ||
| 68 | <li><a href="#call-lines">#+CALL: lines</a></li> | ||
| 69 | <li><a href="#inline-calls-and-blocks">Inline calls and blocks</a></li> | ||
| 70 | </ul></li> | ||
| 71 | <li><a href="#emacs-lisp-blocks">Emacs Lisp blocks</a></li> | ||
| 72 | <li><a href="#calc-blocks">calc blocks</a></li> | ||
| 73 | <li><a href="#sqlite-blocks">sqlite blocks</a></li> | ||
| 74 | <li><a href="#graphics">Graphics</a></li> | ||
| 75 | <li><a href="#tangling">Tangling</a> | ||
| 76 | <ul> | ||
| 77 | <li><a href="#tangle-and-file-names">:tangle and file names</a></li> | ||
| 78 | <li><a href="#tangling-arguments">Tangling arguments</a></li> | ||
| 79 | <li><a href="#comments">Comments</a></li> | ||
| 80 | <li><a href="#writing-the-files">Writing the files</a></li> | ||
| 81 | <li><a href="#what-tangling-refuses">What tangling refuses</a></li> | ||
| 82 | </ul></li> | ||
| 83 | <li><a href="#on-ios">On iOS</a></li> | ||
| 84 | <li><a href="#in-the-mac-app-store-version">In the Mac App Store version</a></li> | ||
| 85 | </ul> | ||
| 86 | </nav> | ||
| 87 | <h2 id="source-blocks">Source blocks</h2> | ||
| 88 | <p>A source block holds code in a named language:</p> | ||
| 89 | <pre><code class="language-org highlight"><span class="text org"><span class="markup raw block org"><span class="keyword control block begin org">#+begin_src</span><span class="variable parameter org"> python</span> | ||
| 90 | return 6 * 7 | ||
| 91 | <span class="keyword control block end org">#+end_src</span></span></span></code></pre> | ||
| 92 | <p>orgstar reads the same syntax Org does: the language after <code class="verbatim">#+begin_src</code>, then any switches such as <code class="verbatim">-i</code> or <code class="verbatim">-r</code>, then header arguments. A <code class="verbatim">#+NAME:</code> line above a block names it, so other blocks, <code class="verbatim">#+CALL:</code> lines and <code class="verbatim">:var</code> references can refer to it.</p> | ||
| 93 | <p>Lines inside a block that start with <code class="verbatim">*</code> or <code class="verbatim">#+</code> are protected with a leading comma, as Org does (<code class="verbatim">org-escape-code-in-region</code>). The comma is removed when the block runs, tangles or exports, and when you edit the block apart.</p> | ||
| 94 | <h3 id="syntax-highlighting">Syntax highlighting</h3> | ||
| 95 | <p>The code in a block is highlighted in the editor on the Mac and on iOS, in the iOS reader, and in the Mac's block editor, in the theme's <code class="verbatim">syntax-*</code> colours. Highlighting uses tree-sitter grammars for these language names:</p> | ||
| 96 | <table> | ||
| 97 | <thead> | ||
| 98 | <tr><th>Language names</th><th>Grammar</th></tr> | ||
| 99 | </thead> | ||
| 100 | <tbody> | ||
| 101 | <tr><td><code class="verbatim">sh</code>, <code class="verbatim">bash</code>, <code class="verbatim">shell</code>, <code class="verbatim">zsh</code></td><td>Bash</td></tr> | ||
| 102 | <tr><td><code class="verbatim">python</code>, <code class="verbatim">python3</code>, <code class="verbatim">py</code></td><td>Python</td></tr> | ||
| 103 | <tr><td><code class="verbatim">emacs-lisp</code>, <code class="verbatim">elisp</code></td><td>Emacs Lisp</td></tr> | ||
| 104 | <tr><td><code class="verbatim">c</code></td><td>C</td></tr> | ||
| 105 | <tr><td><code class="verbatim">c++</code>, <code class="verbatim">cpp</code></td><td>C++</td></tr> | ||
| 106 | <tr><td><code class="verbatim">r</code></td><td>R</td></tr> | ||
| 107 | <tr><td><code class="verbatim">js</code>, <code class="verbatim">javascript</code>, <code class="verbatim">node</code></td><td>JavaScript</td></tr> | ||
| 108 | <tr><td><code class="verbatim">java</code></td><td>Java</td></tr> | ||
| 109 | <tr><td><code class="verbatim">scheme</code></td><td>Scheme</td></tr> | ||
| 110 | <tr><td><code class="verbatim">clojure</code>, <code class="verbatim">clj</code></td><td>Clojure</td></tr> | ||
| 111 | <tr><td><code class="verbatim">haskell</code></td><td>Haskell</td></tr> | ||
| 112 | <tr><td><code class="verbatim">rust</code></td><td>Rust</td></tr> | ||
| 113 | <tr><td><code class="verbatim">go</code></td><td>Go</td></tr> | ||
| 114 | <tr><td><code class="verbatim">ruby</code></td><td>Ruby</td></tr> | ||
| 115 | <tr><td><code class="verbatim">json</code></td><td>JSON</td></tr> | ||
| 116 | <tr><td><code class="verbatim">yaml</code>, <code class="verbatim">yml</code></td><td>YAML</td></tr> | ||
| 117 | <tr><td><code class="verbatim">toml</code>, <code class="verbatim">conf-toml</code></td><td>TOML</td></tr> | ||
| 118 | <tr><td><code class="verbatim">lua</code></td><td>Lua</td></tr> | ||
| 119 | </tbody> | ||
| 120 | </table> | ||
| 121 | <p>Names are matched without regard to case. Blocks in any other language show as plain monospaced text.</p> | ||
| 122 | <h2 id="editing-a-block-apart">Editing a block apart</h2> | ||
| 123 | <p><code class="verbatim">org-edit-special</code> edits a block's contents in a separate editor. Put the caret in a <code class="verbatim">src</code>, <code class="verbatim">example</code> or <code class="verbatim">export</code> block (or on a <code class="verbatim">#+TBLFM:</code> line; see <a href="10-tables.html">Tables</a>) and run <strong>Edit Block</strong>.</p> | ||
| 124 | <table> | ||
| 125 | <thead> | ||
| 126 | <tr><th>Preset</th><th>Key</th></tr> | ||
| 127 | </thead> | ||
| 128 | <tbody> | ||
| 129 | <tr><td>Emacs</td><td><code class="verbatim">C-c '</code></td></tr> | ||
| 130 | <tr><td>Doom</td><td><code class="verbatim">C-c '</code>, or <code class="verbatim">SPC m '</code> in normal state</td></tr> | ||
| 131 | <tr><td>Mac</td><td><code class="verbatim">⌃⌘'</code></td></tr> | ||
| 132 | </tbody> | ||
| 133 | </table> | ||
| 134 | <p>On the Mac the block opens in a sheet titled with the block's kind and language, with the same highlighting as the main editor. The protecting commas are removed while you edit and added back when you save.</p> | ||
| 135 | <table> | ||
| 136 | <thead> | ||
| 137 | <tr><th>Action</th><th>Keys</th></tr> | ||
| 138 | </thead> | ||
| 139 | <tbody> | ||
| 140 | <tr><td>Save</td><td><code class="verbatim">C-c '</code> or ⌘Return, or <strong>Save Block</strong></td></tr> | ||
| 141 | <tr><td>Leave</td><td><code class="verbatim">C-c C-k</code> or Escape, or <strong>Cancel</strong></td></tr> | ||
| 142 | </tbody> | ||
| 143 | </table> | ||
| 144 | <p>If the block changed in the main editor while you edited it, the edit is not saved and the message area says so.</p> | ||
| 145 | <p>On iOS the block opens in a plain text sheet with Cancel and Save buttons.</p> | ||
| 146 | <h2 id="running-a-block">Running a block</h2> | ||
| 147 | <p><code class="verbatim">C-c C-c</code> in a source block runs it (<code class="verbatim">org-babel-execute-src-block</code>) and writes its result under it. The same command runs a <code class="verbatim">#+CALL:</code> line or an inline <code class="verbatim">src_</code> block when the caret is on one.</p> | ||
| 148 | <table> | ||
| 149 | <thead> | ||
| 150 | <tr><th>Preset</th><th>Key</th></tr> | ||
| 151 | </thead> | ||
| 152 | <tbody> | ||
| 153 | <tr><td>Emacs</td><td><code class="verbatim">C-c C-c</code></td></tr> | ||
| 154 | <tr><td>Doom</td><td><code class="verbatim">C-c C-c</code> in normal, insert and visual state</td></tr> | ||
| 155 | <tr><td>Mac</td><td><code class="verbatim">⌃⌘X</code></td></tr> | ||
| 156 | </tbody> | ||
| 157 | </table> | ||
| 158 | <p>The program runs in the folder of the file, or in <code class="verbatim">:dir</code>. It reads the code on standard input. While it runs, the message area shows "Running <em>language</em> block…"; when it ends, it shows "Code block evaluation complete." or the problem.</p> | ||
| 159 | <p>If the program writes to standard error or exits with a non-zero status, the message area shows the exit status and the first line of standard error. The result is still inserted, as Emacs does.</p> | ||
| 160 | <p>The block's text is remembered when the run starts. If you edit the block while it runs, so it can no longer be found, the result is not written.</p> | ||
| 161 | <h3 id="languages-that-run">Languages that run</h3> | ||
| 162 | <p>On the Mac, orgstar starts each interpreter outside a <code class="verbatim">:session</code> through <code class="verbatim">/bin/sh</code>, as Org does, with standard input read from a file. Because an app opened from the Dock does not see your shell's <code class="verbatim">PATH</code>, orgstar adds <code class="verbatim">/opt/homebrew/bin</code>, <code class="verbatim">/usr/local/bin</code>, <code class="verbatim">/Library/TeX/texbin</code>, <code class="verbatim">/usr/bin</code> and <code class="verbatim">/bin</code> to the end of it.</p> | ||
| 163 | <table> | ||
| 164 | <thead> | ||
| 165 | <tr><th>Language</th><th>Program run</th></tr> | ||
| 166 | </thead> | ||
| 167 | <tbody> | ||
| 168 | <tr><td><code class="verbatim">sh</code>, <code class="verbatim">bash</code>, <code class="verbatim">zsh</code>, <code class="verbatim">fish</code>, <code class="verbatim">ksh</code>, <code class="verbatim">dash</code>, <code class="verbatim">ash</code>, <code class="verbatim">csh</code>, <code class="verbatim">mksh</code>, <code class="verbatim">posh</code></td><td>The shell of that name</td></tr> | ||
| 169 | <tr><td><code class="verbatim">shell</code></td><td>The shell in <code class="verbatim">SHELL</code>, or <code class="verbatim">/bin/sh</code></td></tr> | ||
| 170 | <tr><td><code class="verbatim">python</code></td><td><code class="verbatim">python3</code>, or the program in <code class="verbatim">:python</code></td></tr> | ||
| 171 | <tr><td><code class="verbatim">emacs-lisp</code>, <code class="verbatim">elisp</code></td><td><code class="verbatim">emacs -Q --batch</code>, or the interpreter; see below</td></tr> | ||
| 172 | <tr><td><code class="verbatim">ruby</code></td><td><code class="verbatim">ruby</code>, or the program in <code class="verbatim">:ruby</code></td></tr> | ||
| 173 | <tr><td><code class="verbatim">js</code>, <code class="verbatim">javascript</code></td><td><code class="verbatim">node FILE</code>, the program written to a file, or JavaScriptCore without node; see below</td></tr> | ||
| 174 | <tr><td><code class="verbatim">R</code></td><td><code class="verbatim">Rscript -</code></td></tr> | ||
| 175 | <tr><td><code class="verbatim">awk</code></td><td><code class="verbatim">awk -f</code>, the program written to a file</td></tr> | ||
| 176 | <tr><td><code class="verbatim">calc</code></td><td>orgstar's Calc, or <code class="verbatim">emacs -Q --batch</code>; see below</td></tr> | ||
| 177 | <tr><td><code class="verbatim">sqlite</code></td><td><code class="verbatim">sqlite3</code>, or the SQLite library without it; see below</td></tr> | ||
| 178 | <tr><td><code class="verbatim">dot</code>, <code class="verbatim">plantuml</code>, <code class="verbatim">mermaid</code></td><td><code class="verbatim">dot</code>, <code class="verbatim">plantuml</code>, <code class="verbatim">mmdc</code>; <code class="verbatim">dot</code> and <code class="verbatim">mermaid</code> built in without them; see Graphics below</td></tr> | ||
| 179 | <tr><td><code class="verbatim">C</code>, <code class="verbatim">C++</code>, <code class="verbatim">cpp</code>, <code class="verbatim">D</code>, <code class="verbatim">java</code>, <code class="verbatim">fortran</code>, <code class="verbatim">clojure</code></td><td>A compiler, or <code class="verbatim">bb</code> or <code class="verbatim">clojure</code>; see Compiled languages below</td></tr> | ||
| 180 | </tbody> | ||
| 181 | </table> | ||
| 182 | <p>For <code class="verbatim">js</code>, <code class="verbatim">javascript</code> and <code class="verbatim">R</code>, <code class="verbatim">:cmd</code> names a different program. Since it runs through <code class="verbatim">/bin/sh</code>, a program in <code class="verbatim">:cmd</code>, <code class="verbatim">:python</code> or <code class="verbatim">:ruby</code> can be given with options, such as <code class="verbatim">:cmd "node --no-warnings"</code> or <code class="verbatim">:python "python3 -X utf8"</code>, or with <code class="verbatim">~</code> or a variable, such as <code class="verbatim">:cmd "~/bin/node"</code>. <code class="verbatim">awk</code> takes <code class="verbatim">:cmd-line</code> arguments after its program, and <code class="verbatim">:in-file</code> as the file it reads.</p> | ||
| 183 | <p>Any other language is refused with "No way to run <em>language</em> blocks yet."</p> | ||
| 184 | <p>A run that takes longer than five minutes is stopped. Runs in a <code class="verbatim">:session</code> have no time limit, except in JavaScriptCore.</p> | ||
| 185 | <p>The <a href="../install.html">Mac App Store version</a> starts no programs, so only Emacs Lisp, JavaScript, calc, sqlite, dot and mermaid blocks run there; see <em>In the Mac App Store version</em> below.</p> | ||
| 186 | <h3 id="javascript-in-javascriptcore">JavaScript in JavaScriptCore</h3> | ||
| 187 | <p>In the Mac App Store version and on iOS, <code class="verbatim">js</code> and <code class="verbatim">javascript</code> blocks run in JavaScriptCore, the JavaScript engine built into macOS and iOS. The download version uses it when <code class="verbatim">node</code>, or the program in <code class="verbatim">:cmd</code> after <code class="verbatim">/bin/sh</code> expands it, isn't installed; a <code class="verbatim">:cmd</code> with options, such as <code class="verbatim">node --no-warnings</code>, or with a command substitution, such as <code class="verbatim">$(which node)</code>, never runs in JavaScriptCore. A block runs as Emacs runs it, with <code class="verbatim">node</code> reading it from a file as a CommonJS module, where <code class="verbatim">this</code> is <code class="verbatim">module.exports</code> and top-level <code class="verbatim">var</code> declarations stay in the block. Its output and result are what node gives:</p> | ||
| 188 | <ul> | ||
| 189 | <li><code class="verbatim">console.log</code>, <code class="verbatim">console.info</code> and <code class="verbatim">console.debug</code> write to the output, <code class="verbatim">console.warn</code> and <code class="verbatim">console.error</code> to the error output, and <code class="verbatim">console.dir</code> prints with <code class="verbatim">util.inspect</code>. <code class="verbatim">process.stdout.write</code> and <code class="verbatim">process.stderr.write</code> write text.</li> | ||
| 190 | <li><code class="verbatim">require('util')</code> has <code class="verbatim">inspect</code>, <code class="verbatim">format</code> and <code class="verbatim">formatWithOptions</code>, which print values as Node 26 prints them. <code class="verbatim">require('process')</code> has <code class="verbatim">stdout</code> and <code class="verbatim">stderr</code>.</li> | ||
| 191 | <li><code class="verbatim">setTimeout</code>, <code class="verbatim">setInterval</code>, their <code class="verbatim">clear</code> functions and <code class="verbatim">queueMicrotask</code> work. Timers run after the program, in the order node runs them, and the run ends when none is left. In a <code class="verbatim">:session</code>, a block that leaves a timer set, or whose promise callbacks print or throw, is refused, since node's session returns before they run and they print later.</li> | ||
| 192 | <li>An uncaught error ends the run with status 1 and writes its name and message to the error output, such as "ReferenceError: hline is not defined".</li> | ||
| 193 | <li><code class="verbatim">require</code> of any other module fails as it does for a module node can't find: "Error: Cannot find module 'fs'".</li> | ||
| 194 | </ul> | ||
| 195 | <p>A block that uses something only node has fails with "This block uses <em>name</em>, which runs only in node.", rather than giving a different result. That covers other members of <code class="verbatim">process</code>, <code class="verbatim">util</code>, <code class="verbatim">console</code>, <code class="verbatim">require</code> and <code class="verbatim">module</code> (<code class="verbatim">process.env</code>, <code class="verbatim">console.table</code>, <code class="verbatim">require.resolve</code>, <code class="verbatim">module.id</code>) and listing their members; Node's other globals (<code class="verbatim">Buffer</code>, <code class="verbatim">fetch</code>, <code class="verbatim">URL</code>, <code class="verbatim">TextEncoder</code>, <code class="verbatim">setImmediate</code>, <code class="verbatim">structuredClone</code>, <code class="verbatim">SharedArrayBuffer</code>, <code class="verbatim">Temporal</code>, <code class="verbatim">ReadableStream</code>); top-level <code class="verbatim">await</code>, <code class="verbatim">import</code> or <code class="verbatim">export</code> statements, which node runs as an ES module, and <code class="verbatim">import()</code>; <code class="verbatim">__filename</code> and <code class="verbatim">__dirname</code>, which name Emacs's temporary file; listing the global object's properties with <code class="verbatim">Object.getOwnPropertyNames</code> or <code class="verbatim">Reflect.ownKeys</code>, and in a <code class="verbatim">:session</code> with <code class="verbatim">Object.keys</code> or <code class="verbatim">for…in</code>; the source text of a built-in function; an error's <code class="verbatim">stack</code>, <code class="verbatim">Error.stackTraceLimit</code>, <code class="verbatim">Error.captureStackTrace</code> and listing an error's own properties; and printing an <code class="verbatim">Error</code>, a <code class="verbatim">Promise</code>, an iterator or the global object with <code class="verbatim">util.inspect</code>, whose text in node comes from its own engine. There is no access to files, the network or other programs.</p> | ||
| 196 | <p>Some things still differ from node:</p> | ||
| 197 | <ul> | ||
| 198 | <li>Error messages written by the engine itself, such as a <code class="verbatim">TypeError</code>'s, are JavaScriptCore's, as a block that prints <code class="verbatim">e.message</code> shows. Only an uncaught <code class="verbatim">ReferenceError</code> is written in node's words.</li> | ||
| 199 | <li>A promise rejection nothing handles is not reported, and the run does not stop for it.</li> | ||
| 200 | <li><code class="verbatim">:cmd</code> is ignored.</li> | ||
| 201 | </ul> | ||
| 202 | <p>JavaScriptCore has no way to stop a running program. A block that is canceled, or stopped after five minutes, ends at once, but if its program never finishes it keeps running in the background, on one processor core, until orgstar quits. Cancelling a block in a <code class="verbatim">:session</code> discards the session.</p> | ||
| 203 | <h3 id="compiled-languages">Compiled languages</h3> | ||
| 204 | <p>On the Mac, <code class="verbatim">C</code>, <code class="verbatim">C++</code>, <code class="verbatim">cpp</code>, <code class="verbatim">D</code>, <code class="verbatim">java</code>, <code class="verbatim">fortran</code> and <code class="verbatim">clojure</code> blocks run as Org's <code class="verbatim">ob-C</code>, <code class="verbatim">ob-java</code>, <code class="verbatim">ob-fortran</code> and <code class="verbatim">ob-clojure</code> run them. orgstar writes the body, expanded as tangling writes it (see Tangling below), to a source file in a temporary folder, compiles it and runs the program in the file's folder or <code class="verbatim">:dir</code>, with a newline on standard input. What the compiler prints is dropped.</p> | ||
| 205 | <table> | ||
| 206 | <thead> | ||
| 207 | <tr><th>Language</th><th>Commands</th></tr> | ||
| 208 | </thead> | ||
| 209 | <tbody> | ||
| 210 | <tr><td><code class="verbatim">C</code></td><td><code class="verbatim">gcc -o bin FLAGS src LIBS</code>, then <code class="verbatim">bin CMDLINE</code></td></tr> | ||
| 211 | <tr><td><code class="verbatim">C++</code>, <code class="verbatim">cpp</code></td><td><code class="verbatim">g++ -o bin FLAGS src LIBS</code>, then <code class="verbatim">bin CMDLINE</code></td></tr> | ||
| 212 | <tr><td><code class="verbatim">D</code></td><td><code class="verbatim">rdmd FLAGS src CMDLINE</code>, which compiles and runs</td></tr> | ||
| 213 | <tr><td><code class="verbatim">fortran</code></td><td><code class="verbatim">gfortran -o bin FLAGS src</code>, then <code class="verbatim">bin CMDLINE</code></td></tr> | ||
| 214 | <tr><td><code class="verbatim">java</code></td><td><code class="verbatim">javac CMPFLAG Class.java</code>, then <code class="verbatim">java -cp dir CMDLINE Class CMDARGS</code></td></tr> | ||
| 215 | <tr><td><code class="verbatim">clojure</code></td><td><code class="verbatim">bb src</code> (babashka) when <code class="verbatim">bb</code> is installed, otherwise <code class="verbatim">clojure -M src</code></td></tr> | ||
| 216 | </tbody> | ||
| 217 | </table> | ||
| 218 | <p>FLAGS is <code class="verbatim">:flags</code>, LIBS is <code class="verbatim">:libs</code> or the inherited <code class="verbatim">LIBS</code> property, and CMDLINE is <code class="verbatim">:cmdline</code>. A Lisp list works for <code class="verbatim">:flags</code> and <code class="verbatim">:libs</code>; its items are joined with spaces.</p> | ||
| 219 | <table> | ||
| 220 | <thead> | ||
| 221 | <tr><th>Argument</th><th>Languages</th><th>Effect</th></tr> | ||
| 222 | </thead> | ||
| 223 | <tbody> | ||
| 224 | <tr><td><code class="verbatim">:flags</code></td><td>C, C++, D, Fortran</td><td>Compiler options.</td></tr> | ||
| 225 | <tr><td><code class="verbatim">:libs</code></td><td>C, C++</td><td>Libraries, after the source file, such as <code class="verbatim">-lm</code>.</td></tr> | ||
| 226 | <tr><td><code class="verbatim">:cmdline</code></td><td>C, C++, D, Fortran</td><td>The program's arguments.</td></tr> | ||
| 227 | <tr><td><code class="verbatim">:cmdline</code></td><td>Java</td><td>Options for <code class="verbatim">java</code>, before the class name.</td></tr> | ||
| 228 | <tr><td><code class="verbatim">:cmdargs</code></td><td>Java</td><td>The program's arguments.</td></tr> | ||
| 229 | <tr><td><code class="verbatim">:cmpflag</code></td><td>Java</td><td>Options for <code class="verbatim">javac</code>.</td></tr> | ||
| 230 | <tr><td><code class="verbatim">:javac</code>, <code class="verbatim">:java</code></td><td>Java</td><td>The compiler and runtime commands, with options; <code class="verbatim">javac</code> and <code class="verbatim">java</code> by default.</td></tr> | ||
| 231 | <tr><td><code class="verbatim">:classname</code></td><td>Java</td><td>The class to run; a dotted name gives its package.</td></tr> | ||
| 232 | <tr><td><code class="verbatim">:backend</code></td><td>Clojure</td><td><code class="verbatim">babashka</code> runs <code class="verbatim">bb</code>, <code class="verbatim">clojure-cli</code> runs <code class="verbatim">clojure -M</code>.</td></tr> | ||
| 233 | <tr><td><code class="verbatim">:includes</code>, <code class="verbatim">:defines</code>, <code class="verbatim">:namespaces</code>, <code class="verbatim">:imports</code>, <code class="verbatim">:main</code>, <code class="verbatim">:prologue</code>, <code class="verbatim">:epilogue</code>, <code class="verbatim">:ns</code>, <code class="verbatim">:var</code></td><td>as for tangling</td><td>What the expansion writes; see Tangling below.</td></tr> | ||
| 234 | </tbody> | ||
| 235 | </table> | ||
| 236 | <p>When <code class="verbatim">:imports</code> is absent, a D block reads the <code class="verbatim">IMPORTS</code> property where it is, and a Fortran block without <code class="verbatim">:includes</code> or <code class="verbatim">:defines</code> reads the <code class="verbatim">INCLUDES</code> and <code class="verbatim">DEFINES</code> properties, as Org does when it runs them. <code class="verbatim">:session</code> is ignored for these languages, as in Org.</p> | ||
| 237 | <p>Java's defaults are <code class="verbatim">:results output</code> and <code class="verbatim">:dir .</code> (<code class="verbatim">org-babel-default-header-args:java</code>). The <code class="verbatim">.java</code> and <code class="verbatim">.class</code> files are written in the folder the block runs in, under folders for the class's package (<code class="verbatim">org/ex/Hello.java</code> for <code class="verbatim">:classname org.ex.Hello</code>), and are left there. The class is <code class="verbatim">:classname</code>, the body's own class with its <code class="verbatim">package</code>, or <code class="verbatim">Main</code>.</p> | ||
| 238 | <p>Any other Clojure backend is refused: "The cider backend for clojure needs Emacs; orgstar runs babashka or clojure-cli."</p> | ||
| 239 | <p>Before a run, orgstar checks that each program it needs is on the <code class="verbatim">PATH</code> described above. If not, the block fails with "gcc isn't installed, so C blocks can't run." (<code class="verbatim">g++</code> for C++, <code class="verbatim">rdmd</code>, <code class="verbatim">gfortran</code>, or the commands <code class="verbatim">:javac</code> and <code class="verbatim">:java</code> name). For Clojure without a <code class="verbatim">:backend</code>, the message is "Neither bb nor clojure is installed, so clojure blocks can't run."</p> | ||
| 240 | <h3 id="the-trust-prompt">The trust prompt</h3> | ||
| 241 | <p>Before a block runs, orgstar asks "Run this <em>language</em> block? (yes, no, always)", as <code class="verbatim">org-confirm-babel-evaluate</code> does.</p> | ||
| 242 | <ul> | ||
| 243 | <li><code class="verbatim">yes</code> runs it this once.</li> | ||
| 244 | <li><code class="verbatim">no</code> does not run it.</li> | ||
| 245 | <li><code class="verbatim">always</code> runs it and remembers the block, so it runs without asking next time.</li> | ||
| 246 | </ul> | ||
| 247 | <p>A remembered block is identified by the file's path and the exact text of the block. Any change to the block, or moving the file, makes orgstar ask again. The remembered hashes are kept in <code class="verbatim">trusted.json</code> in orgstar's Application Support folder (<code class="verbatim">~/Library/Application Support/Orgstar</code> on the Mac, inside the container in the Mac App Store version). The same file records table formulas you allowed to run Lisp. To forget every choice, delete the file while orgstar is not running.</p> | ||
| 248 | <p>When a block's <code class="verbatim">:var</code> or <code class="verbatim">:stdin</code> refers to other blocks that have to run first, you are asked once for all of them. The prompt covers the block you ran and every block its references reach. If any of those blocks changes while the chain runs, orgstar stops with "The blocks changed while running; nothing more was run."</p> | ||
| 249 | <h3 id="eval"><code class="verbatim">:eval</code></h3> | ||
| 250 | <table> | ||
| 251 | <thead> | ||
| 252 | <tr><th>Value</th><th>Effect</th></tr> | ||
| 253 | </thead> | ||
| 254 | <tbody> | ||
| 255 | <tr><td><code class="verbatim">never</code>, <code class="verbatim">no</code></td><td>The block does not run: "Evaluation of this <em>language</em> code block is disabled."</td></tr> | ||
| 256 | <tr><td><code class="verbatim">query</code></td><td>Asks every time, with only <code class="verbatim">yes</code> and <code class="verbatim">no</code>. A block reached through <code class="verbatim">:var</code> with <code class="verbatim">:eval query</code> makes the whole chain ask every time.</td></tr> | ||
| 257 | <tr><td>anything else, or absent</td><td>Runs after the trust prompt.</td></tr> | ||
| 258 | </tbody> | ||
| 259 | </table> | ||
| 260 | <p><code class="verbatim">never-export</code> and <code class="verbatim">no-export</code> only stop evaluation during export in Org. orgstar does not run blocks during export, so with these values the block runs from <code class="verbatim">C-c C-c</code> like any other.</p> | ||
| 261 | <h3 id="cancelling-a-run">Cancelling a run</h3> | ||
| 262 | <p>On the Mac, Edit ▸ Cancel Running Task (⌘.) stops the running block. Its result is not inserted, and the message area shows "Code block canceled." The same command stops an export or table recalculation running in Emacs (see <a href="12-export.html">Export</a> and <a href="10-tables.html">Tables</a>). With nothing running it shows "Nothing is running". The command is also in the command palette.</p> | ||
| 263 | <p>Only one block runs at a time. Starting another block cancels the one that is running.</p> | ||
| 264 | <p>Cancelling a block that runs in a <code class="verbatim">:session</code> stops the session's interpreter, so the session's state is lost. The next block in that session starts a new one.</p> | ||
| 265 | <p>The iOS app has no cancel command.</p> | ||
| 266 | <h2 id="results">Results</h2> | ||
| 267 | <p>The result is written after a <code class="verbatim">#+RESULTS:</code> line below the block (<code class="verbatim">org-babel-insert-result</code>). Running again replaces it. A named block's result goes under <code class="verbatim">#+RESULTS: name</code>, wherever that line is in the file. An unnamed block's result is the <code class="verbatim">#+RESULTS:</code> line right after it, past blank lines. The result keeps the block's indentation, so a block inside a list item keeps its result inside the item.</p> | ||
| 268 | <pre><code class="language-org highlight"><span class="text org"><span class="markup raw block org"><span class="keyword control block begin org">#+begin_src</span><span class="variable parameter org"> sh</span> | ||
| 269 | echo hello | ||
| 270 | <span class="keyword control block end org">#+end_src</span> | ||
| 271 | </span> | ||
| 272 | <span class="keyword other keyword org">#+RESULTS:</span> | ||
| 273 | : hello</span></code></pre> | ||
| 274 | <p>By default a result is shaped like this:</p> | ||
| 275 | <ul> | ||
| 276 | <li>Text of fewer than ten lines gets a =: = prefix on each line.</li> | ||
| 277 | <li>Text of ten lines or more goes in an <code class="verbatim">#+begin_example</code> block.</li> | ||
| 278 | <li>A table becomes an aligned Org table.</li> | ||
| 279 | </ul> | ||
| 280 | <h3 id="value-or-output">Value or output</h3> | ||
| 281 | <table> | ||
| 282 | <thead> | ||
| 283 | <tr><th>Word</th><th>Result</th></tr> | ||
| 284 | </thead> | ||
| 285 | <tbody> | ||
| 286 | <tr><td><code class="verbatim">value</code></td><td>The value of the block. This is the default.</td></tr> | ||
| 287 | <tr><td><code class="verbatim">output</code></td><td>Everything the program printed on standard output.</td></tr> | ||
| 288 | </tbody> | ||
| 289 | </table> | ||
| 290 | <p>What "value" means depends on the language:</p> | ||
| 291 | <table> | ||
| 292 | <thead> | ||
| 293 | <tr><th>Language</th><th>Value</th></tr> | ||
| 294 | </thead> | ||
| 295 | <tbody> | ||
| 296 | <tr><td>Shells, by default</td><td>Standard output, read as a table: tab-separated columns, then comma-separated, then space-separated; a single field is a plain value.</td></tr> | ||
| 297 | <tr><td>Shells, <code class="verbatim">:results value</code> written out</td><td>The exit status of the last command.</td></tr> | ||
| 298 | <tr><td>Python</td><td>What the block returns. The body runs as a function, so it needs <code class="verbatim">return</code>. <code class="verbatim">:return expr</code> adds a final <code class="verbatim">return expr</code>.</td></tr> | ||
| 299 | <tr><td>Python in a <code class="verbatim">:session</code></td><td>The value of the last expression.</td></tr> | ||
| 300 | <tr><td><code class="verbatim">ruby</code>, <code class="verbatim">js</code> in a <code class="verbatim">:session</code></td><td>The value of the last expression, read as without a session.</td></tr> | ||
| 301 | <tr><td>Emacs Lisp</td><td>The value of the last form.</td></tr> | ||
| 302 | <tr><td><code class="verbatim">ruby</code></td><td>The value of the body, run as a lambda; strings as they are, other values as <code class="verbatim">inspect</code> prints them, arrays read as tables with <code class="verbatim">nil</code> rows as rules. <code class="verbatim">:results pp</code> prints it with <code class="verbatim">pp</code>.</td></tr> | ||
| 303 | <tr><td><code class="verbatim">js</code>, <code class="verbatim">javascript</code></td><td>What the body returns, as <code class="verbatim">util.inspect</code> prints it (in JavaScriptCore, orgstar's copy of it), arrays read as tables; it runs as a function, so it needs <code class="verbatim">return</code>.</td></tr> | ||
| 304 | <tr><td><code class="verbatim">awk</code></td><td>Standard output, read as a table as for shells.</td></tr> | ||
| 305 | <tr><td><code class="verbatim">R</code></td><td>Standard output, always.</td></tr> | ||
| 306 | <tr><td>C, C++, D</td><td>Standard output without its common indentation, read as a table as for shells.</td></tr> | ||
| 307 | <tr><td>Fortran</td><td>The same, with blank space around the output trimmed.</td></tr> | ||
| 308 | <tr><td>Java</td><td>With <code class="verbatim">:results value</code>, what the body returns; it runs as <code class="verbatim">main</code>, so it needs <code class="verbatim">return</code>. Lists and arrays become tables, with <code class="verbatim">null</code> rows as rules, and a returned string is written without its quotes. Java's default is <code class="verbatim">:results output</code>.</td></tr> | ||
| 309 | <tr><td>Clojure</td><td>The value of the last form as Clojure prints it. A number, or a string without its quotes, is written as that; vectors, lists and maps are written as printed, not as tables.</td></tr> | ||
| 310 | </tbody> | ||
| 311 | </table> | ||
| 312 | <p>Python lists of lists become tables, with <code class="verbatim">None</code> rows as rules. A flat list becomes a one-row table. Emacs Lisp lists become tables the same way, with <code class="verbatim">hline</code> for rules. Numbers are written the way Emacs prints them.</p> | ||
| 313 | <h3 id="result-types">Result types</h3> | ||
| 314 | <table> | ||
| 315 | <thead> | ||
| 316 | <tr><th>Word</th><th>Effect</th></tr> | ||
| 317 | </thead> | ||
| 318 | <tbody> | ||
| 319 | <tr><td><code class="verbatim">table</code>, <code class="verbatim">vector</code></td><td>Read the result as a table. This is the default for values.</td></tr> | ||
| 320 | <tr><td><code class="verbatim">list</code></td><td>Write a plain list, one =- = item per line or per element.</td></tr> | ||
| 321 | <tr><td><code class="verbatim">scalar</code>, <code class="verbatim">verbatim</code></td><td>Write the result as text without reading it as a table.</td></tr> | ||
| 322 | <tr><td><code class="verbatim">file</code></td><td>Write a link to a file (see Results in files below).</td></tr> | ||
| 323 | </tbody> | ||
| 324 | </table> | ||
| 325 | <p><code class="verbatim">:results verbatim</code> on an Emacs Lisp value writes it as <code class="verbatim">prin1</code> would, with quotes around strings.</p> | ||
| 326 | <p>With <code class="verbatim">:results output list</code>, the list made from the output is written as an example, in lines such as <code class="verbatim">: - a</code>, as Org writes it:</p> | ||
| 327 | <pre><code class="language-org highlight"><span class="text org"><span class="markup raw block org"><span class="keyword control block begin org">#+begin_src</span><span class="variable parameter org"> sh :results output list</span> | ||
| 328 | printf 'a\nb\n' | ||
| 329 | <span class="keyword control block end org">#+end_src</span> | ||
| 330 | </span> | ||
| 331 | <span class="keyword other keyword org">#+RESULTS:</span> | ||
| 332 | : - a | ||
| 333 | : - b</span></code></pre> | ||
| 334 | <h3 id="result-formats">Result formats</h3> | ||
| 335 | <table> | ||
| 336 | <thead> | ||
| 337 | <tr><th>Word</th><th>Written as</th></tr> | ||
| 338 | </thead> | ||
| 339 | <tbody> | ||
| 340 | <tr><td><code class="verbatim">raw</code></td><td>The text as it is, so Org markup in it takes effect.</td></tr> | ||
| 341 | <tr><td><code class="verbatim">drawer</code></td><td>Between <code class="verbatim">:results:</code> and <code class="verbatim">:end:</code>.</td></tr> | ||
| 342 | <tr><td><code class="verbatim">code</code></td><td>In a <code class="verbatim">#+begin_src</code> block of the block's language.</td></tr> | ||
| 343 | <tr><td><code class="verbatim">org</code></td><td>In a <code class="verbatim">#+begin_src org</code> block.</td></tr> | ||
| 344 | <tr><td><code class="verbatim">html</code></td><td>In a <code class="verbatim">#+begin_export html</code> block.</td></tr> | ||
| 345 | <tr><td><code class="verbatim">latex</code></td><td>In a <code class="verbatim">#+begin_export latex</code> block.</td></tr> | ||
| 346 | <tr><td><code class="verbatim">pp</code></td><td>Python: formatted with <code class="verbatim">pprint</code>; written as text.</td></tr> | ||
| 347 | </tbody> | ||
| 348 | </table> | ||
| 349 | <p>Lines that start with <code class="verbatim">*</code> or <code class="verbatim">#+</code> inside <code class="verbatim">code</code>, <code class="verbatim">org</code>, <code class="verbatim">html</code> and <code class="verbatim">latex</code> results are comma-protected.</p> | ||
| 350 | <h3 id="inserting">Inserting</h3> | ||
| 351 | <table> | ||
| 352 | <thead> | ||
| 353 | <tr><th>Word</th><th>Effect</th></tr> | ||
| 354 | </thead> | ||
| 355 | <tbody> | ||
| 356 | <tr><td><code class="verbatim">replace</code></td><td>Replace the previous result. This is the default.</td></tr> | ||
| 357 | <tr><td><code class="verbatim">append</code></td><td>Add after the previous result.</td></tr> | ||
| 358 | <tr><td><code class="verbatim">prepend</code></td><td>Add before the previous result.</td></tr> | ||
| 359 | <tr><td><code class="verbatim">silent</code></td><td>Show the output in the message area and write nothing.</td></tr> | ||
| 360 | <tr><td><code class="verbatim">none</code>, <code class="verbatim">discard</code></td><td>Write nothing.</td></tr> | ||
| 361 | </tbody> | ||
| 362 | </table> | ||
| 363 | <p>Words from different groups combine: <code class="verbatim">:results output list append</code>. A later word replaces an earlier one from the same group.</p> | ||
| 364 | <h3 id="wrap"><code class="verbatim">:wrap</code></h3> | ||
| 365 | <p><code class="verbatim">:wrap</code> puts the result in a block, ahead of any format word.</p> | ||
| 366 | <table> | ||
| 367 | <thead> | ||
| 368 | <tr><th>Value</th><th>Wrapped in</th></tr> | ||
| 369 | </thead> | ||
| 370 | <tbody> | ||
| 371 | <tr><td><code class="verbatim">:wrap</code> alone</td><td><code class="verbatim">#+begin_results</code> … <code class="verbatim">#+end_results</code></td></tr> | ||
| 372 | <tr><td><code class="verbatim">:wrap example</code></td><td><code class="verbatim">#+begin_example</code> … <code class="verbatim">#+end_example</code></td></tr> | ||
| 373 | <tr><td><code class="verbatim">:wrap src python</code></td><td><code class="verbatim">#+begin_src python</code> … <code class="verbatim">#+end_src</code></td></tr> | ||
| 374 | <tr><td><code class="verbatim">:wrap export html</code></td><td><code class="verbatim">#+begin_export html</code> … <code class="verbatim">#+end_export</code></td></tr> | ||
| 375 | <tr><td><code class="verbatim">:wrap no</code>, <code class="verbatim">:wrap nil</code></td><td>No wrapping</td></tr> | ||
| 376 | </tbody> | ||
| 377 | </table> | ||
| 378 | <p>Inside <code class="verbatim">example</code>, <code class="verbatim">src</code> and <code class="verbatim">export</code> wrappers, lines starting with <code class="verbatim">*</code> or <code class="verbatim">#+</code> are comma-protected.</p> | ||
| 379 | <h3 id="results-in-files">Results in files</h3> | ||
| 380 | <p>With <code class="verbatim">:results file</code>, the result is a link instead of text.</p> | ||
| 381 | <table> | ||
| 382 | <thead> | ||
| 383 | <tr><th>Header</th><th>Effect</th></tr> | ||
| 384 | </thead> | ||
| 385 | <tbody> | ||
| 386 | <tr><td><code class="verbatim">:file name</code></td><td>Write the result into <code class="verbatim">name</code> and link to it. Without <code class="verbatim">:results file</code>, <code class="verbatim">:file</code> has no effect, except in graphics blocks.</td></tr> | ||
| 387 | <tr><td><code class="verbatim">:output-dir dir</code></td><td>Put <code class="verbatim">:file</code> under <code class="verbatim">dir</code>. The folder must exist.</td></tr> | ||
| 388 | <tr><td><code class="verbatim">:file-desc text</code></td><td>Give the link a description: <code class="verbatim">[[file:name][text]]</code>. An empty <code class="verbatim">:file-desc</code> uses the file name.</td></tr> | ||
| 389 | </tbody> | ||
| 390 | </table> | ||
| 391 | <p>A relative <code class="verbatim">:file</code> is written in the folder the block ran in: the file's folder, or <code class="verbatim">:dir</code>. Without <code class="verbatim">:file</code>, <code class="verbatim">:results file</code> takes the result itself as the path to link to.</p> | ||
| 392 | <pre><code class="language-org highlight"><span class="text org"><span class="markup raw block org"><span class="keyword control block begin org">#+begin_src</span><span class="variable parameter org"> sh :results file :file out.txt :file-desc Output</span> | ||
| 393 | echo hello | ||
| 394 | <span class="keyword control block end org">#+end_src</span> | ||
| 395 | </span> | ||
| 396 | <span class="keyword other keyword org">#+RESULTS:</span> | ||
| 397 | <span class="punctuation definition link org">[[</span><span class="markup underline link org">file:out.txt</span><span class="punctuation definition link org">]</span><span class="punctuation definition link org">[</span><span class="string other link title org">Output</span><span class="punctuation definition link org">]]</span></span></code></pre> | ||
| 398 | <h2 id="header-arguments">Header arguments</h2> | ||
| 399 | <h3 id="where-they-come-from">Where they come from</h3> | ||
| 400 | <p>orgstar merges header arguments in this order, each layer overriding the ones before it (<code class="verbatim">org-babel-get-src-block-info</code>):</p> | ||
| 401 | <ol> | ||
| 402 | <li><code class="verbatim">#+PROPERTY: header-args …</code> in the file, then <code class="verbatim">header-args</code> properties of the block's headings, from the outermost heading inwards.</li> | ||
| 403 | <li><code class="verbatim">header-args:LANG</code> the same way, for blocks in language <code class="verbatim">LANG</code>.</li> | ||
| 404 | <li>The arguments on the <code class="verbatim">#+begin_src</code> line.</li> | ||
| 405 | <li><code class="verbatim">#+HEADER:</code> lines above the block.</li> | ||
| 406 | <li>For a call, the call's arguments (see Calls below).</li> | ||
| 407 | </ol> | ||
| 408 | <p>A property written with a <code class="verbatim">+</code>, such as <code class="verbatim">header-args+</code>, adds to the value inherited from above instead of replacing it. In a property drawer, <code class="verbatim">:header-args:sh:</code> is one property name, so its value applies only to <code class="verbatim">sh</code> blocks.</p> | ||
| 409 | <pre><code class="language-org highlight"><span class="text org"><span class="keyword other keyword org">#+PROPERTY:</span><span class="string unquoted org"> header-args :results output</span> | ||
| 410 | |||
| 411 | <span class="markup heading org"><span class="punctuation definition heading org">*</span> Scripts | ||
| 412 | </span>:PROPERTIES: | ||
| 413 | :header-args:sh: :dir /tmp | ||
| 414 | :END: | ||
| 415 | |||
| 416 | <span class="keyword other keyword org">#+HEADER:</span><span class="string unquoted org"> :results verbatim</span> | ||
| 417 | <span class="markup raw block org"><span class="keyword control block begin org">#+begin_src</span><span class="variable parameter org"> sh :var name="world"</span> | ||
| 418 | echo "hello $name" | ||
| 419 | <span class="keyword control block end org">#+end_src</span></span></span></code></pre> | ||
| 420 | <p>Without any of these, a block has <code class="verbatim">:results replace</code>, <code class="verbatim">:exports code</code>, <code class="verbatim">:session none</code>, <code class="verbatim">:cache no</code>, <code class="verbatim">:noweb no</code>, <code class="verbatim">:hlines no</code> and <code class="verbatim">:tangle no</code>. An inline <code class="verbatim">src_</code> block defaults to <code class="verbatim">:exports results</code> and <code class="verbatim">:hlines yes</code>.</p> | ||
| 421 | <h3 id="lisp-in-header-values">Lisp in header values</h3> | ||
| 422 | <p>A header value that starts with <code class="verbatim">(</code>, <code class="verbatim">'</code>, <code class="verbatim">`</code> or <code class="verbatim">[</code> and is not in quotes is Lisp, as in <code class="verbatim">org-babel-read</code>. orgstar evaluates it with its own Emacs Lisp interpreter, which also knows <code class="verbatim">buffer-file-name</code>, <code class="verbatim">default-directory</code>, <code class="verbatim">system-type</code> and the functions <code class="verbatim">expand-file-name</code>, <code class="verbatim">file-name-directory</code>, <code class="verbatim">file-name-nondirectory</code>, <code class="verbatim">file-name-sans-extension</code> and <code class="verbatim">file-name-as-directory</code>.</p> | ||
| 423 | <pre><code class="language-org highlight"><span class="text org"><span class="markup raw block org"><span class="keyword control block begin org">#+begin_src</span><span class="variable parameter org"> sh :dir (concat "/" "usr") :results output</span> | ||
| 424 | pwd | ||
| 425 | <span class="keyword control block end org">#+end_src</span></span></span></code></pre> | ||
| 426 | <p>A string or number takes the place of the form. Lisp that the interpreter cannot evaluate is refused where it matters: for <code class="verbatim">:var</code> ("is Lisp that only Emacs can evaluate"), <code class="verbatim">:colnames</code> and <code class="verbatim">:rownames</code>, and any header of a <code class="verbatim">:cache yes</code> block.</p> | ||
| 427 | <h3 id="header-argument-reference">Header argument reference</h3> | ||
| 428 | <table> | ||
| 429 | <thead> | ||
| 430 | <tr><th>Argument</th><th>Values</th><th>Effect</th></tr> | ||
| 431 | </thead> | ||
| 432 | <tbody> | ||
| 433 | <tr><td><code class="verbatim">:results</code></td><td>see Results above</td><td>How the result is collected, shaped and inserted.</td></tr> | ||
| 434 | <tr><td><code class="verbatim">:wrap</code></td><td>block type and parameters</td><td>Wraps the result in a block.</td></tr> | ||
| 435 | <tr><td><code class="verbatim">:file</code></td><td>file name</td><td>Where a file result goes; required for graphics.</td></tr> | ||
| 436 | <tr><td><code class="verbatim">:output-dir</code></td><td>folder</td><td>Folder for <code class="verbatim">:file</code>.</td></tr> | ||
| 437 | <tr><td><code class="verbatim">:file-desc</code></td><td>text</td><td>Description of a file result's link.</td></tr> | ||
| 438 | <tr><td><code class="verbatim">:var</code></td><td><code class="verbatim">name=value</code></td><td>Passes a value in (see Variables below).</td></tr> | ||
| 439 | <tr><td><code class="verbatim">:colnames</code></td><td><code class="verbatim">yes</code>, <code class="verbatim">no</code>, Lisp list</td><td>Header row of table variables (see Tables in variables below).</td></tr> | ||
| 440 | <tr><td><code class="verbatim">:rownames</code></td><td><code class="verbatim">yes</code>, <code class="verbatim">no</code>, Lisp list</td><td>First column of table variables.</td></tr> | ||
| 441 | <tr><td><code class="verbatim">:hlines</code></td><td><code class="verbatim">yes</code>, <code class="verbatim">no</code></td><td>Keep rules in table variables.</td></tr> | ||
| 442 | <tr><td><code class="verbatim">:separator</code></td><td>text</td><td>Column separator for tables in shell variables; a tab by default.</td></tr> | ||
| 443 | <tr><td><code class="verbatim">:hline-string</code></td><td>text</td><td>What a rule becomes in a shell variable with <code class="verbatim">:hlines yes</code>; <code class="verbatim">hline</code> by default.</td></tr> | ||
| 444 | <tr><td><code class="verbatim">:dir</code></td><td>folder</td><td>Folder to run in, relative to the file's folder. It must exist.</td></tr> | ||
| 445 | <tr><td><code class="verbatim">:session</code></td><td>name, <code class="verbatim">none</code></td><td>Runs in a long-lived interpreter (see Sessions below). Shells, Python, <code class="verbatim">ruby</code>, <code class="verbatim">js</code> and <code class="verbatim">R</code>; ignored for the compiled languages.</td></tr> | ||
| 446 | <tr><td><code class="verbatim">:stdin</code></td><td>name of a table, list or block</td><td>Feeds the value to standard input. Shells only.</td></tr> | ||
| 447 | <tr><td><code class="verbatim">:cmdline</code></td><td>arguments</td><td>Command-line arguments. Shells, <code class="verbatim">dot</code>, <code class="verbatim">plantuml</code>, <code class="verbatim">mermaid</code> and the compiled languages only.</td></tr> | ||
| 448 | <tr><td><code class="verbatim">:shebang</code></td><td><code class="verbatim">#!…</code> line</td><td>Runs the block as a script with this first line. Shells only; also used by tangling.</td></tr> | ||
| 449 | <tr><td><code class="verbatim">:padline</code></td><td><code class="verbatim">no</code></td><td>No blank line after the shebang of a script, or between tangled blocks.</td></tr> | ||
| 450 | <tr><td><code class="verbatim">:python</code></td><td>program</td><td>Python interpreter to use.</td></tr> | ||
| 451 | <tr><td><code class="verbatim">:cmd</code></td><td>program</td><td>Interpreter for <code class="verbatim">js</code>, <code class="verbatim">javascript</code> and <code class="verbatim">R</code>; <code class="verbatim">:ruby</code> for <code class="verbatim">ruby</code>.</td></tr> | ||
| 452 | <tr><td><code class="verbatim">:cmd-line</code>, <code class="verbatim">:in-file</code></td><td>arguments, file</td><td><code class="verbatim">awk</code>: arguments after the program, and the file it reads.</td></tr> | ||
| 453 | <tr><td><code class="verbatim">:return</code></td><td>expression</td><td>Python: the value to return.</td></tr> | ||
| 454 | <tr><td><code class="verbatim">:cache</code></td><td><code class="verbatim">yes</code>, <code class="verbatim">no</code></td><td>Skip the run when the result is current (see Caching below).</td></tr> | ||
| 455 | <tr><td><code class="verbatim">:eval</code></td><td><code class="verbatim">never</code>, <code class="verbatim">no</code>, <code class="verbatim">query</code>, …</td><td>Whether and how to ask before running (see <code class="verbatim">:eval</code> above).</td></tr> | ||
| 456 | <tr><td><code class="verbatim">:noweb</code></td><td>see Noweb below</td><td>Expands <code class="verbatim"><<name>></code> references.</td></tr> | ||
| 457 | <tr><td><code class="verbatim">:noweb-ref</code></td><td>name</td><td>Makes the block part of <code class="verbatim"><<name>></code>.</td></tr> | ||
| 458 | <tr><td><code class="verbatim">:noweb-sep</code></td><td>text</td><td>Separator between blocks joined under one <code class="verbatim">:noweb-ref</code>; a newline by default.</td></tr> | ||
| 459 | <tr><td><code class="verbatim">:noweb-prefix</code></td><td><code class="verbatim">no</code></td><td>Do not repeat the text before <code class="verbatim"><<name>></code> on each expanded line.</td></tr> | ||
| 460 | <tr><td><code class="verbatim">:exports</code></td><td><code class="verbatim">code</code>, <code class="verbatim">results</code>, <code class="verbatim">both</code>, <code class="verbatim">none</code></td><td>What export shows (see <a href="12-export.html">Export</a>).</td></tr> | ||
| 461 | <tr><td><code class="verbatim">:tangle</code></td><td>see Tangling below</td><td>Where tangling writes the block.</td></tr> | ||
| 462 | </tbody> | ||
| 463 | </table> | ||
| 464 | <h3 id="arguments-that-are-refused">Arguments that are refused</h3> | ||
| 465 | <p>orgstar does not run a block whose arguments it would handle differently from Emacs. Instead it says why and runs nothing.</p> | ||
| 466 | <table> | ||
| 467 | <thead> | ||
| 468 | <tr><th>Argument</th><th>Refused for</th><th>Message</th></tr> | ||
| 469 | </thead> | ||
| 470 | <tbody> | ||
| 471 | <tr><td><code class="verbatim">:prologue</code>, <code class="verbatim">:epilogue</code></td><td>graphics (<code class="verbatim">dot</code>, <code class="verbatim">plantuml</code>, <code class="verbatim">mermaid</code>)</td><td>"<code class="verbatim">:prologue</code> isn't supported yet; nothing was run."</td></tr> | ||
| 472 | <tr><td><code class="verbatim">:post</code></td><td>every language</td><td>"<code class="verbatim">:post</code> isn't supported yet; nothing was run."</td></tr> | ||
| 473 | <tr><td><code class="verbatim">:stdin</code>, <code class="verbatim">:shebang</code></td><td>languages other than shells</td><td>"<code class="verbatim">:stdin</code> isn't supported yet; nothing was run."</td></tr> | ||
| 474 | <tr><td><code class="verbatim">:cmdline</code></td><td>languages other than shells, graphics and the compiled languages</td><td>"<code class="verbatim">:cmdline</code> isn't supported for <em>language</em> yet; nothing was run."</td></tr> | ||
| 475 | <tr><td><code class="verbatim">:session</code></td><td><code class="verbatim">awk</code>, graphics and Emacs Lisp; the compiled languages ignore it</td><td>"<code class="verbatim">:session</code> isn't supported for <em>language</em> yet; nothing was run."</td></tr> | ||
| 476 | </tbody> | ||
| 477 | </table> | ||
| 478 | <h2 id="variables">Variables</h2> | ||
| 479 | <p><code class="verbatim">:var name=value</code> passes a value into the block (<code class="verbatim">org-babel-ref-resolve</code>). One <code class="verbatim">:var</code> can hold several assignments separated by spaces, and you can repeat <code class="verbatim">:var</code>. A later assignment to the same name replaces an earlier one.</p> | ||
| 480 | <table> | ||
| 481 | <thead> | ||
| 482 | <tr><th>Value</th><th>Meaning</th></tr> | ||
| 483 | </thead> | ||
| 484 | <tbody> | ||
| 485 | <tr><td><code class="verbatim">5</code>, <code class="verbatim">2.5</code></td><td>A number.</td></tr> | ||
| 486 | <tr><td><code class="verbatim">"two words"</code></td><td>A string. <code class="verbatim">\n</code> and <code class="verbatim">\t</code> in it are a newline and a tab.</td></tr> | ||
| 487 | <tr><td><code class="verbatim">'(1 2)</code>, <code class="verbatim">(+ 1 2)</code>, <code class="verbatim">'((1 2) hline (3 4))</code></td><td>Lisp: evaluated to a string, number, list or table.</td></tr> | ||
| 488 | <tr><td><code class="verbatim">tbl</code></td><td>The table or plain list under <code class="verbatim">#+NAME: tbl</code> in the same file.</td></tr> | ||
| 489 | <tr><td><code class="verbatim">gen</code></td><td>The result of the source block named <code class="verbatim">gen</code>, which runs first.</td></tr> | ||
| 490 | <tr><td><code class="verbatim">double(n=4)</code></td><td>The result of the block named <code class="verbatim">double</code>, run with <code class="verbatim">n</code> set to 4.</td></tr> | ||
| 491 | </tbody> | ||
| 492 | </table> | ||
| 493 | <pre><code class="language-org highlight"><span class="text org"><span class="keyword other keyword org">#+NAME:</span><span class="string unquoted org"> nums</span> | ||
| 494 | <span class="markup other table org">| 1 | 2 |</span> | ||
| 495 | <span class="markup other table org">| 3 | 4 |</span> | ||
| 496 | |||
| 497 | <span class="markup raw block org"><span class="keyword control block begin org">#+begin_src</span><span class="variable parameter org"> python :var t=nums :var scale=10</span> | ||
| 498 | return [[c * scale for c in row] for row in t] | ||
| 499 | <span class="keyword control block end org">#+end_src</span></span></span></code></pre> | ||
| 500 | <p>A referenced block runs before the block that refers to it, after the one trust prompt that covers them all. A block with <code class="verbatim">:cache yes</code> and a current result gives that result without running. A chain that leads back to itself is refused with "<em>name</em> refers to itself through :var".</p> | ||
| 501 | <p>These are not supported and are refused:</p> | ||
| 502 | <ul> | ||
| 503 | <li>Indexing into a table, such as <code class="verbatim">tbl[1,2]</code>: "References like … aren't supported yet."</li> | ||
| 504 | <li>A name that matches nothing in the file: "Can't find … for :var."</li> | ||
| 505 | <li>References to other files.</li> | ||
| 506 | </ul> | ||
| 507 | <p>How a value reaches the code depends on the language:</p> | ||
| 508 | <table> | ||
| 509 | <thead> | ||
| 510 | <tr><th>Language</th><th>Scalars</th><th>Lists</th><th>Tables</th></tr> | ||
| 511 | </thead> | ||
| 512 | <tbody> | ||
| 513 | <tr><td>bash</td><td>quoted string</td><td>indexed array (<code class="verbatim">declare -a</code>)</td><td>two or more columns: associative array keyed by the first column (<code class="verbatim">declare -A</code>); one column: indexed array</td></tr> | ||
| 514 | <tr><td>other shells</td><td>quoted string</td><td>one item per line</td><td>rows on lines, cells separated by a tab or <code class="verbatim">:separator</code></td></tr> | ||
| 515 | <tr><td>fish</td><td><code class="verbatim">set name 'value'</code></td><td>as other shells</td><td>as other shells</td></tr> | ||
| 516 | <tr><td>Python</td><td>literal</td><td>list</td><td>list of lists, <code class="verbatim">None</code> for rules</td></tr> | ||
| 517 | <tr><td>Emacs Lisp</td><td><code class="verbatim">let</code>-bound value</td><td>list</td><td>list of lists, <code class="verbatim">hline</code> for rules</td></tr> | ||
| 518 | <tr><td>Ruby</td><td><code class="verbatim">name=value</code> literal</td><td>array</td><td>array of arrays, <code class="verbatim">nil</code> for rules</td></tr> | ||
| 519 | <tr><td>JavaScript</td><td><code class="verbatim">var name=value;</code></td><td>array</td><td>array of arrays, <code class="verbatim">hline</code> for rules</td></tr> | ||
| 520 | <tr><td>R</td><td><code class="verbatim">name <- value</code>, integers with <code class="verbatim">L</code></td><td>one-column data frame</td><td>data frame read from tab-separated text, a header when the table has one</td></tr> | ||
| 521 | <tr><td>awk</td><td><code class="verbatim">-v name</code>'value'=</td><td>one item per line</td><td>rows on lines, cells separated by a tab</td></tr> | ||
| 522 | </tbody> | ||
| 523 | </table> | ||
| 524 | <p>For <code class="verbatim">shell</code> blocks, the bash forms are used when <code class="verbatim">SHELL</code> is bash. <code class="verbatim">:prologue</code> and <code class="verbatim">:epilogue</code> add a line before the variables and one after the body, in every language that runs; in Emacs Lisp only when the block has variables, as <code class="verbatim">org-babel-expand-body:emacs-lisp</code> does. C, C++, D, Java, Fortran and Clojure blocks get declarations as their expansion writes them; see Tangling below.</p> | ||
| 525 | <pre><code class="language-org highlight"><span class="text org"><span class="keyword other keyword org">#+NAME:</span><span class="string unquoted org"> kv</span> | ||
| 526 | <span class="markup other table org">| a | 1 |</span> | ||
| 527 | <span class="markup other table org">| b | 2 |</span> | ||
| 528 | |||
| 529 | <span class="markup raw block org"><span class="keyword control block begin org">#+begin_src</span><span class="variable parameter org"> bash :var t=kv :results output</span> | ||
| 530 | echo ${t[a]} ${t[b]} | ||
| 531 | <span class="keyword control block end org">#+end_src</span></span></span></code></pre> | ||
| 532 | <h3 id="tables-in-variables">Tables in variables</h3> | ||
| 533 | <p>A table passed as a variable loses some of its structure first (<code class="verbatim">org-babel-disassemble-tables</code>):</p> | ||
| 534 | <ul> | ||
| 535 | <li>Rules are removed, unless <code class="verbatim">:hlines yes</code>.</li> | ||
| 536 | <li>The first row is taken off as column names when <code class="verbatim">:colnames yes</code>, or when the table's only rule is under the first row. <code class="verbatim">:colnames no</code> keeps it as data.</li> | ||
| 537 | <li>The first column is taken off as row names when <code class="verbatim">:rownames yes</code>.</li> | ||
| 538 | </ul> | ||
| 539 | <p>If the result is a table of the same width (for columns) or height (for rows), the names are put back on it (<code class="verbatim">org-babel-reassemble-table</code>). Clojure results don't get them back, as in Org. <code class="verbatim">:colnames</code> and <code class="verbatim">:rownames</code> can also be Lisp lists of names to put on the result, such as <code class="verbatim">:colnames '("x" "y")</code>.</p> | ||
| 540 | <pre><code class="language-org highlight"><span class="text org"><span class="keyword other keyword org">#+NAME:</span><span class="string unquoted org"> tbl</span> | ||
| 541 | <span class="markup other table org">| a | b |</span> | ||
| 542 | <span class="markup other table org">|---+---|</span> | ||
| 543 | <span class="markup other table org">| 1 | x |</span> | ||
| 544 | <span class="markup other table org">| 2 | y |</span> | ||
| 545 | |||
| 546 | <span class="markup raw block org"><span class="keyword control block begin org">#+begin_src</span><span class="variable parameter org"> python :var t=tbl</span> | ||
| 547 | return [r + ["!"] for r in t] | ||
| 548 | <span class="keyword control block end org">#+end_src</span></span></span></code></pre> | ||
| 549 | <h3 id="standard-input-and-arguments">Standard input and arguments</h3> | ||
| 550 | <p>For shell blocks, <code class="verbatim">:stdin name</code> sends a table, list or block result to standard input, a table as tab-separated lines. <code class="verbatim">:cmdline</code> gives the script arguments, and <code class="verbatim">:shebang</code> its first line. With any of the three, the block is written to an executable script and run by the shell (<code class="verbatim">org-babel-sh-evaluate</code>); without <code class="verbatim">:shebang</code>, the first line is <code class="verbatim">#!/usr/bin/env</code> and the shell's name. A block with <code class="verbatim">:stdin</code> or <code class="verbatim">:cmdline</code> runs as a script even with a <code class="verbatim">:session</code>, and leaves the session untouched; <code class="verbatim">:shebang</code> alone runs in the session.</p> | ||
| 551 | <pre><code class="language-org highlight"><span class="text org"><span class="markup raw block org"><span class="keyword control block begin org">#+begin_src</span><span class="variable parameter org"> sh :cmdline one "two words" :results output</span> | ||
| 552 | for a in "$@"; do echo "[$a]"; done | ||
| 553 | <span class="keyword control block end org">#+end_src</span></span></span></code></pre> | ||
| 554 | <h2 id="sessions">Sessions</h2> | ||
| 555 | <p><code class="verbatim">:session name</code> runs the block in an interpreter that stays running, so variables, functions and the working folder carry over to the next block in the same session. Sessions work for shells, Python, Ruby, JavaScript (Node, or JavaScriptCore) and R on the Mac, and for JavaScript on iOS.</p> | ||
| 556 | <ul> | ||
| 557 | <li><code class="verbatim">:session</code> with no name uses <code class="verbatim">*language*</code>, such as <code class="verbatim">*sh*</code>. <code class="verbatim">:session none</code> runs without one.</li> | ||
| 558 | <li>A session belongs to one folder, one interpreter and one name. Blocks in different folders, or with different names, do not share state.</li> | ||
| 559 | <li>A session starts in the block's <code class="verbatim">:dir</code>, or the file's folder, the first time it is used.</li> | ||
| 560 | <li>A shell session's output is what the block prints. <code class="verbatim">:results value</code> gives the exit status of the last command.</li> | ||
| 561 | <li>A Python session runs the block at top level. Its value is the value of the last expression, so <code class="verbatim">return</code> is not used.</li> | ||
| 562 | <li>A Ruby session runs each block in the same binding, and a JavaScript session in Node's global context or one JavaScriptCore context, so local variables and <code class="verbatim">var</code> and <code class="verbatim">let</code> declarations carry over. Their value is the value of the last expression, written as without a session (<code class="verbatim">inspect</code>, <code class="verbatim">util.inspect</code>); <code class="verbatim">return</code> is not used. Errors go to the block's error output and leave the session running.</li> | ||
| 563 | <li>An R session runs each block with <code class="verbatim">source(…, print.eval = TRUE)</code> in one <code class="verbatim">R --slave</code> process; its result is the output, as without a session.</li> | ||
| 564 | </ul> | ||
| 565 | <p>Emacs runs these with packages beyond Org: inf-ruby for Ruby, ESS for R, and js-comint or skewer for JavaScript; with plain <code class="verbatim">node</code>, ob-js refuses sessions. orgstar's sessions don't need them, and their results can differ in detail from those packages' echoed output.</p> | ||
| 566 | <ul> | ||
| 567 | <li>Sessions stop when you quit orgstar, or when you cancel a block running in one.</li> | ||
| 568 | </ul> | ||
| 569 | <pre><code class="language-org highlight"><span class="text org"><span class="markup raw block org"><span class="keyword control block begin org">#+begin_src</span><span class="variable parameter org"> python :session py :results output</span> | ||
| 570 | a = 2 | ||
| 571 | print("set") | ||
| 572 | <span class="keyword control block end org">#+end_src</span> | ||
| 573 | </span> | ||
| 574 | <span class="markup raw block org"><span class="keyword control block begin org">#+begin_src</span><span class="variable parameter org"> python :session py</span> | ||
| 575 | a * 3 | ||
| 576 | <span class="keyword control block end org">#+end_src</span></span></span></code></pre> | ||
| 577 | <h2 id="caching">Caching</h2> | ||
| 578 | <p>With <code class="verbatim">:cache yes</code>, orgstar computes a SHA-1 hash of the block's header arguments and expanded body, as <code class="verbatim">org-babel-sha1-hash</code> does, and writes it on the results line: <code class="verbatim">#+RESULTS[hash]:</code>. When you run the block again and the hash matches, nothing runs and the message area shows the cached value ("Cached: …").</p> | ||
| 579 | <p>Change the block or its arguments and it runs again. Results inserted with <code class="verbatim">append</code> or <code class="verbatim">prepend</code> carry no hash. Inline blocks are not cached. A cached block that has Lisp in its header arguments the interpreter cannot evaluate is refused.</p> | ||
| 580 | <p>The hash of a C, C++, D, Java, Fortran or Clojure block is taken over the body as the language expands it (see Tangling below), with the <code class="verbatim">IMPORTS</code>, <code class="verbatim">INCLUDES</code> and <code class="verbatim">DEFINES</code> properties where the block is, and Java's default header arguments, as Emacs does. A result Emacs wrote for such a block with <code class="verbatim">:cache yes</code> is recognised as current, and <code class="verbatim">C-c C-c</code> shows it.</p> | ||
| 581 | <h2 id="noweb">Noweb</h2> | ||
| 582 | <p>A noweb reference <code class="verbatim"><<name>></code> in a block's body stands for other code. Whether references expand depends on <code class="verbatim">:noweb</code> and on what is happening:</p> | ||
| 583 | <table> | ||
| 584 | <thead> | ||
| 585 | <tr><th><code class="verbatim">:noweb</code></th><th>Running</th><th>Tangling</th><th>Exporting</th></tr> | ||
| 586 | </thead> | ||
| 587 | <tbody> | ||
| 588 | <tr><td><code class="verbatim">no</code> (default)</td><td>no</td><td>no</td><td>no</td></tr> | ||
| 589 | <tr><td><code class="verbatim">yes</code></td><td>expands</td><td>expands</td><td>no</td></tr> | ||
| 590 | <tr><td><code class="verbatim">tangle</code></td><td>no</td><td>expands</td><td>no</td></tr> | ||
| 591 | <tr><td><code class="verbatim">eval</code></td><td>expands</td><td>no</td><td>no</td></tr> | ||
| 592 | <tr><td><code class="verbatim">no-export</code></td><td>expands</td><td>expands</td><td>no</td></tr> | ||
| 593 | <tr><td><code class="verbatim">strip-export</code></td><td>expands</td><td>expands</td><td>no</td></tr> | ||
| 594 | <tr><td><code class="verbatim">strip-tangle</code></td><td>expands</td><td>removes the references</td><td>no</td></tr> | ||
| 595 | </tbody> | ||
| 596 | </table> | ||
| 597 | <p>Exported code always shows the references as written; see <a href="12-export.html">Export</a>.</p> | ||
| 598 | <p><code class="verbatim"><<name>></code> expands to the first of these that exists:</p> | ||
| 599 | <ol> | ||
| 600 | <li>The contents of the heading whose <code class="verbatim">ID</code> property is <code class="verbatim">name</code>, or whose <code class="verbatim">CUSTOM_ID</code> is <code class="verbatim">name</code> without its leading <code class="verbatim">#</code>.</li> | ||
| 601 | <li>The body of the source block named <code class="verbatim">name</code>.</li> | ||
| 602 | <li>The bodies of all blocks with <code class="verbatim">:noweb-ref name</code>, joined by each block's <code class="verbatim">:noweb-sep</code> (a newline by default).</li> | ||
| 603 | </ol> | ||
| 604 | <p>Blocks under a <code class="verbatim">COMMENT</code> heading are skipped. A referenced block expands its own references according to its own <code class="verbatim">:noweb</code>, up to 32 levels deep.</p> | ||
| 605 | <p>Text before the reference on its line is repeated before each line the reference brings in, so references inside comments or indented code keep their prefix. <code class="verbatim">:noweb-prefix no</code> turns this off.</p> | ||
| 606 | <pre><code class="language-org highlight"><span class="text org"><span class="keyword other keyword org">#+NAME:</span><span class="string unquoted org"> greeting</span> | ||
| 607 | <span class="markup raw block org"><span class="keyword control block begin org">#+begin_src</span><span class="variable parameter org"> sh</span> | ||
| 608 | echo hello | ||
| 609 | <span class="keyword control block end org">#+end_src</span> | ||
| 610 | </span> | ||
| 611 | <span class="markup raw block org"><span class="keyword control block begin org">#+begin_src</span><span class="variable parameter org"> sh :noweb yes</span> | ||
| 612 | <<greeting>> | ||
| 613 | echo world | ||
| 614 | <span class="keyword control block end org">#+end_src</span></span></span></code></pre> | ||
| 615 | <p>A reference that runs a block, <code class="verbatim"><<name()>></code>, is refused: "Noweb references that run a block (…) aren't supported yet; nothing was run."</p> | ||
| 616 | <h2 id="calls">Calls</h2> | ||
| 617 | <h3 id="call-lines"><code class="verbatim">#+CALL:</code> lines</h3> | ||
| 618 | <p><code class="verbatim">#+CALL:</code> runs a named block with other arguments, as Org's library of Babel calls do (<code class="verbatim">org-babel-lob-get-info</code>). Run it with <code class="verbatim">C-c C-c</code> on the line.</p> | ||
| 619 | <pre><code class="language-org highlight"><span class="text org"><span class="keyword other keyword org">#+NAME:</span><span class="string unquoted org"> double</span> | ||
| 620 | <span class="markup raw block org"><span class="keyword control block begin org">#+begin_src</span><span class="variable parameter org"> sh :var n=2</span> | ||
| 621 | echo $((n*2)) | ||
| 622 | <span class="keyword control block end org">#+end_src</span> | ||
| 623 | </span> | ||
| 624 | <span class="keyword other keyword org">#+CALL:</span><span class="string unquoted org"> double(n=5)</span> | ||
| 625 | |||
| 626 | <span class="keyword other keyword org">#+RESULTS:</span> | ||
| 627 | : 10</span></code></pre> | ||
| 628 | <p>The full form is <code class="verbatim">#+CALL: name[inside](arguments) end</code>:</p> | ||
| 629 | <ul> | ||
| 630 | <li><code class="verbatim">name</code> is the block to run. It must be in the same file.</li> | ||
| 631 | <li><code class="verbatim">[inside]</code> holds header arguments applied to the block, such as <code class="verbatim">[:results raw]</code>.</li> | ||
| 632 | <li><code class="verbatim">(arguments)</code> are <code class="verbatim">:var</code> assignments, separated by commas.</li> | ||
| 633 | <li><code class="verbatim">end</code> holds header arguments for the call's result, such as <code class="verbatim">:results verbatim</code>.</li> | ||
| 634 | </ul> | ||
| 635 | <p>The call also takes the <code class="verbatim">header-args</code> and <code class="verbatim">header-args:LANG</code> properties, and <code class="verbatim">#+PROPERTY:</code> lines, where the call is, with <code class="verbatim">LANG</code> the called block's language. They apply after the called block's own header arguments and before <code class="verbatim">[inside]</code>, as in Org.</p> | ||
| 636 | <p>The result goes under the call. A <code class="verbatim">#+NAME:</code> line above the <code class="verbatim">#+CALL:</code> names the result.</p> | ||
| 637 | <h3 id="inline-calls-and-blocks">Inline calls and blocks</h3> | ||
| 638 | <p>An inline source block, <code class="verbatim">src_sh{echo hi}</code>, runs with <code class="verbatim">C-c C-c</code> on it. Header arguments go in brackets: <code class="verbatim">src_sh[:var x=3]{echo $x}</code>. The result is written right after the block as a <code class="verbatim">results</code> macro:</p> | ||
| 639 | <pre><code class="language-org highlight"><span class="text org">Text src_sh{echo hi} {{{results(<span class="markup raw inline org">=hi=</span>)}}} end.</span></code></pre> | ||
| 640 | <p>Running again replaces the macro. With <code class="verbatim">:results raw</code> the result goes in as it is, without the macro. An inline result must be one line, and a table result must be a single cell.</p> | ||
| 641 | <p>An inline call, <code class="verbatim">call_double(n=6)</code>, has the same parts as a <code class="verbatim">#+CALL:</code> line: <code class="verbatim">call_name[inside](arguments)[end]</code>. <code class="verbatim">C-c C-c</code> on an inline call runs it, and its result is written after it as a <code class="verbatim">results</code> macro, as for inline blocks. It takes the properties where it is as a <code class="verbatim">#+CALL:</code> line does.</p> | ||
| 642 | <h2 id="emacs-lisp-blocks">Emacs Lisp blocks</h2> | ||
| 643 | <p>On the Mac, an <code class="verbatim">emacs-lisp</code> or <code class="verbatim">elisp</code> block runs in a new <code class="verbatim">emacs -Q --batch</code> for each run, with lexical binding on. <code class="verbatim">-Q</code> means your init file and packages are not loaded, and nothing carries over between runs. orgstar looks for Emacs at <code class="verbatim">ORGSTAR_EMACS</code>, then <code class="verbatim">/opt/homebrew/bin/emacs</code>, <code class="verbatim">/usr/local/bin/emacs</code>, <code class="verbatim">/Applications/Emacs.app/Contents/MacOS/Emacs</code>, <code class="verbatim">/run/current-system/sw/bin/emacs</code> and <code class="verbatim">/usr/bin/emacs</code>. Without Emacs, the block runs in orgstar's own Emacs Lisp interpreter, and a block that uses something the interpreter does not have fails with "This block uses Emacs Lisp that runs only in Emacs, and Emacs isn't installed."</p> | ||
| 644 | <p>On iOS, Emacs Lisp blocks run in orgstar's own Emacs Lisp interpreter. It has the forms and functions listed under Lisp formulas in <a href="10-tables.html">Tables</a>: list, string, number and control forms, regular expressions on strings, <code class="verbatim">defun</code>, <code class="verbatim">pcase</code>, <code class="verbatim">cl-loop</code>, the <code class="verbatim">seq-</code> and <code class="verbatim">cl-</code> sequence functions, time functions, <code class="verbatim">princ</code> and <code class="verbatim">message</code>. Like <code class="verbatim">emacs -Q --batch</code>, it uses lexical binding, with dynamic binding for variables declared with <code class="verbatim">defvar</code>, and the syntax table of Emacs Lisp mode for regular expressions and <code class="verbatim">capitalize</code>. A quoted lambda, <code class="verbatim">'(lambda ...)</code>, runs with dynamic binding, as in Emacs. A closure can be called, stored and passed to functions such as <code class="verbatim">mapcar</code>; a block that takes one apart as a list, compares it or prints it needs Emacs. It has no buffers. A block that uses something the interpreter does not have fails with "This block uses Emacs Lisp that runs only in Emacs, on the Mac." A Lisp error fails the run, as it does in Emacs.</p> | ||
| 645 | <p>In the <a href="../install.html">Mac App Store version</a>, Emacs Lisp blocks run in the same interpreter as on iOS. A block that uses something it does not have fails with "This block uses Emacs Lisp that runs only in Emacs."</p> | ||
| 646 | <p>Variables are bound with <code class="verbatim">let</code> around the body. <code class="verbatim">:results output</code> collects what the block prints with <code class="verbatim">princ</code>, <code class="verbatim">prin1</code>, <code class="verbatim">print</code> and <code class="verbatim">terpri</code>.</p> | ||
| 647 | <h2 id="calc-blocks">calc blocks</h2> | ||
| 648 | <p>A <code class="verbatim">calc</code> block runs as ob-calc runs it in <code class="verbatim">emacs -Q</code>, with orgstar's Calc, the one table formulas use. Each line of the body is trimmed and handled in turn; blank lines are skipped:</p> | ||
| 649 | <ul> | ||
| 650 | <li>A line that is the name of a <code class="verbatim">:var</code> puts its value on the stack.</li> | ||
| 651 | <li>A line that starts with <code class="verbatim">'</code> runs a stack key on the stack: <code class="verbatim">'+</code>, <code class="verbatim">'-</code>, <code class="verbatim">'*</code>, <code class="verbatim">'/</code>, <code class="verbatim">'^</code>, <code class="verbatim">'%</code> (modulo), <code class="verbatim">'\</code> (integer division), <code class="verbatim">'n</code> (negate), <code class="verbatim">'&</code> (inverse), <code class="verbatim">'Q</code> (square root) and <code class="verbatim">'A</code> (absolute value).</li> | ||
| 652 | <li>Any other line is a formula. Its value goes on the stack; if it isn't a number, the formula is evaluated again with the block's variables put in, and that goes on the stack as text, as ob-calc does.</li> | ||
| 653 | </ul> | ||
| 654 | <p>The result is the top of the stack, shown with Calc's own settings in <code class="verbatim">emacs -Q</code>: 12 significant digits, all of them shown (<code class="verbatim">1/3</code> gives <code class="verbatim">0.333333333333</code>). A vector is written as a table row and a matrix as a table, unless <code class="verbatim">:results</code> asks for a string. <code class="verbatim">:prologue</code> and <code class="verbatim">:epilogue</code> add lines before and after the body.</p> | ||
| 655 | <p>Each run starts with an empty stack. In Emacs the Calculator's stack carries over from one block to the next, so a block that relies on what an earlier block left there gives a different result in orgstar.</p> | ||
| 656 | <p><code class="verbatim">:var</code> values can be numbers, and lists and tables of integers; a table of one row is a vector. Errors that Emacs reports, such as "Too few elements on stack" or a stack key on a formula ("Invalid data object encountered"), fail the run without writing a result.</p> | ||
| 657 | <p>What orgstar's Calc doesn't do as Emacs's Calc does is refused rather than given a different result: functions and forms table formulas also refuse, Calc's constants such as <code class="verbatim">pi</code> and <code class="verbatim">e</code> (which Emacs replaces by their values), stack keys other than those above, dates, string variables, variables named like Calc's constants (<code class="verbatim">e</code>, <code class="verbatim">pi</code>, <code class="verbatim">i</code>) or with characters other than letters and digits, lists with fractional numbers, and a <code class="verbatim">:prologue</code> or <code class="verbatim">:epilogue</code> that is a bare number. The message is "This calc block can't be calculated here:" with the reason. The download version then runs the block in <code class="verbatim">emacs -Q --batch</code> when Emacs is installed.</p> | ||
| 658 | <h2 id="sqlite-blocks">sqlite blocks</h2> | ||
| 659 | <p>A <code class="verbatim">sqlite</code> block runs as ob-sqlite runs it: the body goes to <code class="verbatim">sqlite3</code> on standard input, with the options the header arguments name, and the output becomes the result. The download version runs <code class="verbatim">sqlite3</code> (macOS has one in <code class="verbatim">/usr/bin</code>) and uses the SQLite library only when it isn't installed. The Mac App Store version and iOS run the block in the SQLite library, writing the output as macOS's <code class="verbatim">sqlite3</code> writes it.</p> | ||
| 660 | <table> | ||
| 661 | <thead> | ||
| 662 | <tr><th>Header argument</th><th>Effect</th></tr> | ||
| 663 | </thead> | ||
| 664 | <tbody> | ||
| 665 | <tr><td><code class="verbatim">:db file</code></td><td>The database, relative to the file's folder or <code class="verbatim">:dir</code>; without it, an in-memory one</td></tr> | ||
| 666 | <tr><td><code class="verbatim">:readonly yes</code></td><td>Opens the database read-only</td></tr> | ||
| 667 | <tr><td><code class="verbatim">:csv</code>, <code class="verbatim">:list</code>, <code class="verbatim">:column</code>, <code class="verbatim">:html</code>, <code class="verbatim">:line</code></td><td>The output mode; without one or <code class="verbatim">:separator</code>, <code class="verbatim">csv</code></td></tr> | ||
| 668 | <tr><td><code class="verbatim">:separator s</code>, <code class="verbatim">:nullvalue s</code></td><td>The column separator and the text for NULL, in list mode</td></tr> | ||
| 669 | <tr><td><code class="verbatim">:colnames yes</code></td><td>The first row of the result becomes the table's header</td></tr> | ||
| 670 | <tr><td><code class="verbatim">:header</code>, <code class="verbatim">:echo</code>, <code class="verbatim">:bail</code></td><td>Pass <code class="verbatim">-header</code>, <code class="verbatim">-echo</code> and <code class="verbatim">-bail</code> to <code class="verbatim">sqlite3</code></td></tr> | ||
| 671 | </tbody> | ||
| 672 | </table> | ||
| 673 | <p>As in Emacs, a mode option resets the header, separator and NULL text to that mode's, so <code class="verbatim">:header</code> has an effect only with <code class="verbatim">:separator</code> alone.</p> | ||
| 674 | <p><code class="verbatim">:var</code> values replace <code class="verbatim">$name</code> in the body, in any case. A table becomes a CSV file and <code class="verbatim">$name</code> its path, for <code class="verbatim">.import</code>:</p> | ||
| 675 | <pre><code class="language-org highlight"><span class="text org"><span class="markup raw block org"><span class="keyword control block begin org">#+begin_src</span><span class="variable parameter org"> sqlite :var t=prices :db shop.db</span> | ||
| 676 | create table if not exists prices(item text, price real); | ||
| 677 | .import --csv $t prices | ||
| 678 | select item, price * 2 from prices; | ||
| 679 | <span class="keyword control block end org">#+end_src</span></span></span></code></pre> | ||
| 680 | <p>The output is read as a table the way ob-sqlite reads it, with <code class="verbatim">org-table-convert-region</code>; a single value becomes a scalar. Where that conversion fails in Emacs, as it does for output whose last line is empty in a mode other than <code class="verbatim">csv</code>, the run fails with the same message. In <code class="verbatim">csv</code> mode <code class="verbatim">sqlite3</code> ends lines with CR LF and Emacs keeps the CR, so the last column of each row ends with a CR, which shows as <code class="verbatim">^M</code>; orgstar writes the same.</p> | ||
| 681 | <p>In the Mac App Store version, <code class="verbatim">:db</code> must be in a folder orgstar has access to: a folder in the sidebar, or one you granted access to.</p> | ||
| 682 | <p>Without <code class="verbatim">sqlite3</code>, these dot-commands run: <code class="verbatim">.headers</code> (<code class="verbatim">.header</code>), <code class="verbatim">.mode</code> with <code class="verbatim">list</code>, <code class="verbatim">csv</code>, <code class="verbatim">column</code>, <code class="verbatim">html</code> or <code class="verbatim">line</code>, <code class="verbatim">.separator</code> and <code class="verbatim">.nullvalue</code> with one plain argument, and <code class="verbatim">.import FILE TABLE</code> (with <code class="verbatim">--csv</code> or not) into a table that exists, of rows that fit it. Anything else is refused with "This sqlite block can't run here:" and the reason: other dot-commands, header values with characters the shell would read differently (spaces, quotes, <code class="verbatim">~</code>, <code class="verbatim">;</code>, <code class="verbatim">|</code>), BLOB values, control characters other than tab and newline in values, text other than ASCII or values on several lines in <code class="verbatim">column</code> mode and in <code class="verbatim">line</code> mode's column names, <code class="verbatim">EXPLAIN</code> statements, text that isn't UTF-8, and <code class="verbatim">:echo</code> unless the result is text (<code class="verbatim">:results output</code>, for example). When the refused value comes after other statements, those statements have already run, and the message says so.</p> | ||
| 683 | <h2 id="graphics">Graphics</h2> | ||
| 684 | <p><code class="verbatim">dot</code> (Graphviz), <code class="verbatim">plantuml</code> and <code class="verbatim">mermaid</code> blocks draw a picture into <code class="verbatim">:file</code>, and the result is a link to it. <code class="verbatim">:file</code> is required: "<em>language</em> code blocks need a :file header argument". The file's extension picks the output format; with none, <code class="verbatim">png</code> is used.</p> | ||
| 685 | <table> | ||
| 686 | <thead> | ||
| 687 | <tr><th>Language</th><th>Command</th></tr> | ||
| 688 | </thead> | ||
| 689 | <tbody> | ||
| 690 | <tr><td><code class="verbatim">dot</code></td><td><code class="verbatim">dot -T/ext/ -o file</code></td></tr> | ||
| 691 | <tr><td><code class="verbatim">plantuml</code></td><td><code class="verbatim">plantuml -p -t/ext/</code>, output to the file</td></tr> | ||
| 692 | <tr><td><code class="verbatim">mermaid</code></td><td><code class="verbatim">mmdc -i input -o file</code></td></tr> | ||
| 693 | </tbody> | ||
| 694 | </table> | ||
| 695 | <p>A <code class="verbatim">plantuml</code> body without an <code class="verbatim">@start…</code> line is wrapped in <code class="verbatim">@startuml</code> and <code class="verbatim">@enduml</code>. <code class="verbatim">:cmdline</code> adds options to the command. <code class="verbatim">plantuml</code> must be installed and on the <code class="verbatim">PATH</code> described under Languages that run.</p> | ||
| 696 | <p>Without <code class="verbatim">dot</code> or <code class="verbatim">mmdc</code>, and in the Mac App Store version and on iOS, orgstar draws <code class="verbatim">dot</code> and <code class="verbatim">mermaid</code> blocks itself, with Graphviz and mermaid built in:</p> | ||
| 697 | <ul> | ||
| 698 | <li>It writes SVG and PNG files. Another extension fails with "<em>language</em> blocks draw only SVG and PNG files in this version of orgstar."</li> | ||
| 699 | <li><code class="verbatim">:cmdline</code> may hold <code class="verbatim">-K/engine/</code> for <code class="verbatim">dot</code>, and <code class="verbatim">-t /theme/</code> (<code class="verbatim">--theme</code>) and <code class="verbatim">-b /color/</code> (<code class="verbatim">--backgroundColor</code>) for <code class="verbatim">mermaid</code>. Anything else fails with "<em>language</em> blocks with this :cmdline don't run in this version of orgstar."</li> | ||
| 700 | <li>A PNG has the size the picture has at 96 dots per inch, on white unless <code class="verbatim">-b</code> says otherwise; a mermaid diagram wider than 800 points is scaled down to that, as <code class="verbatim">mmdc</code> does.</li> | ||
| 701 | <li>Mermaid labels are drawn as SVG text, not HTML, so line breaks and Markdown in labels can look different from <code class="verbatim">mmdc</code>'s.</li> | ||
| 702 | <li>The picture comes from the same Graphviz and mermaid code as the programs use, in the versions orgstar ships (Viz.js 3.31.0 and mermaid 12.3.0), so it can differ in detail from an installed program of another version or with other fonts.</li> | ||
| 703 | </ul> | ||
| 704 | <pre><code class="language-org highlight"><span class="text org"><span class="markup raw block org"><span class="keyword control block begin org">#+begin_src</span><span class="variable parameter org"> dot :file graph.svg</span> | ||
| 705 | digraph { a -> b } | ||
| 706 | <span class="keyword control block end org">#+end_src</span> | ||
| 707 | </span> | ||
| 708 | <span class="keyword other keyword org">#+RESULTS:</span> | ||
| 709 | <span class="punctuation definition link org">[[</span><span class="markup underline link org">file:graph.svg</span><span class="punctuation definition link org">]</span><span class="punctuation definition link org">]</span></span></code></pre> | ||
| 710 | <h2 id="tangling">Tangling</h2> | ||
| 711 | <p>Tangling writes source blocks to the files their <code class="verbatim">:tangle</code> argument names (<code class="verbatim">org-babel-tangle</code>).</p> | ||
| 712 | <table> | ||
| 713 | <thead> | ||
| 714 | <tr><th>Command</th><th>Emacs and Doom</th><th>Mac</th><th>What it tangles</th></tr> | ||
| 715 | </thead> | ||
| 716 | <tbody> | ||
| 717 | <tr><td>Tangle File</td><td><code class="verbatim">C-c C-v t</code>, <code class="verbatim">C-c C-v C-t</code></td><td><code class="verbatim">⌃⌘V</code></td><td>Every block in the file</td></tr> | ||
| 718 | <tr><td>Tangle Block</td><td>none</td><td><code class="verbatim">⌃⇧⌘V</code></td><td>The block at the caret (Emacs: <code class="verbatim">C-u C-c C-v t</code>)</td></tr> | ||
| 719 | <tr><td>Tangle Block's Target</td><td>none</td><td><code class="verbatim">⌃⌥⌘V</code></td><td>Every block going to the same file as the one at the caret (Emacs: <code class="verbatim">C-u C-u C-c C-v t</code>)</td></tr> | ||
| 720 | </tbody> | ||
| 721 | </table> | ||
| 722 | <p>All three are in the Org menu and the command palette. Tangling uses the text in the editor, saved or not, and the message area reports "Tangled <em>N</em> code blocks from <em>file</em>".</p> | ||
| 723 | <h3 id="tangle-and-file-names"><code class="verbatim">:tangle</code> and file names</h3> | ||
| 724 | <table> | ||
| 725 | <thead> | ||
| 726 | <tr><th><code class="verbatim">:tangle</code></th><th>Target</th></tr> | ||
| 727 | </thead> | ||
| 728 | <tbody> | ||
| 729 | <tr><td><code class="verbatim">no</code> (default)</td><td>Not tangled.</td></tr> | ||
| 730 | <tr><td><code class="verbatim">yes</code></td><td>The Org file's name with the language's extension, as Org's language files define it (<code class="verbatim">org-babel-tangle-lang-exts</code>): <code class="verbatim">py</code> for <code class="verbatim">python</code>, <code class="verbatim">rb</code> for <code class="verbatim">ruby</code>, <code class="verbatim">pl</code> for <code class="verbatim">perl</code>, <code class="verbatim">cpp</code> for <code class="verbatim">C++</code>, <code class="verbatim">d</code> for <code class="verbatim">D</code>, <code class="verbatim">awk</code>, <code class="verbatim">sed</code>, <code class="verbatim">lua</code>, <code class="verbatim">hs</code> for <code class="verbatim">haskell</code>, <code class="verbatim">java</code>, <code class="verbatim">tex</code> for <code class="verbatim">latex</code>, <code class="verbatim">ly</code> for <code class="verbatim">LilyPond</code>, <code class="verbatim">F90</code> for <code class="verbatim">fortran</code>, <code class="verbatim">clj</code> for <code class="verbatim">clojure</code>, <code class="verbatim">cljs</code> for <code class="verbatim">clojurescript</code>, <code class="verbatim">cs</code> for <code class="verbatim">csharp</code>, <code class="verbatim">groovy</code>, <code class="verbatim">jl</code> for <code class="verbatim">julia</code>, <code class="verbatim">lisp</code>, <code class="verbatim">max</code> for <code class="verbatim">maxima</code>, <code class="verbatim">ml</code> for <code class="verbatim">ocaml</code>, <code class="verbatim">pde</code> for <code class="verbatim">processing</code>, <code class="verbatim">el</code> for <code class="verbatim">emacs-lisp</code> and <code class="verbatim">elisp</code>, and <code class="verbatim">bib</code> for <code class="verbatim">bibtex</code>. Any other language is its own extension (<code class="verbatim">notes.sh</code> for <code class="verbatim">sh</code>).</td></tr> | ||
| 731 | <tr><td>a path</td><td>That file, relative to the Org file's folder. <code class="verbatim">~</code> is expanded.</td></tr> | ||
| 732 | <tr><td>Lisp</td><td>Evaluated as described under Lisp in header values, with <code class="verbatim">buffer-file-name</code> set to the Org file.</td></tr> | ||
| 733 | </tbody> | ||
| 734 | </table> | ||
| 735 | <p>Blocks under a <code class="verbatim">COMMENT</code> heading, or a heading tagged <code class="verbatim">ARCHIVE</code>, are skipped. Blocks going to the same file are written in the order they appear.</p> | ||
| 736 | <pre><code class="language-org highlight"><span class="text org"><span class="keyword other keyword org">#+PROPERTY:</span><span class="string unquoted org"> header-args:python :tangle script.py</span> | ||
| 737 | |||
| 738 | <span class="markup heading org"><span class="punctuation definition heading org">*</span> Tool | ||
| 739 | </span>:PROPERTIES: | ||
| 740 | :header-args: :tangle bin<span class="markup italic org">/tool.sh :mkdirp yes :shebang "#!/</span>bin/sh" | ||
| 741 | :END: | ||
| 742 | |||
| 743 | <span class="markup raw block org"><span class="keyword control block begin org">#+begin_src</span><span class="variable parameter org"> sh</span> | ||
| 744 | echo tool | ||
| 745 | <span class="keyword control block end org">#+end_src</span></span></span></code></pre> | ||
| 746 | <h3 id="tangling-arguments">Tangling arguments</h3> | ||
| 747 | <table> | ||
| 748 | <thead> | ||
| 749 | <tr><th>Argument</th><th>Values</th><th>Effect</th></tr> | ||
| 750 | </thead> | ||
| 751 | <tbody> | ||
| 752 | <tr><td><code class="verbatim">:mkdirp</code></td><td><code class="verbatim">yes</code></td><td>Create the target's folder if it is missing.</td></tr> | ||
| 753 | <tr><td><code class="verbatim">:tangle-mode</code></td><td><code class="verbatim">(identity #o755)</code>, <code class="verbatim">#o755</code>, <code class="verbatim">o755</code>, <code class="verbatim">rwxr-xr-x</code>, <code class="verbatim">u+x,g-r</code></td><td>Set the file's mode. A symbolic mode starts from <code class="verbatim">644</code>. When several blocks give a mode, the first one counts.</td></tr> | ||
| 754 | <tr><td><code class="verbatim">:shebang</code></td><td><code class="verbatim">#!…</code> line</td><td>First line of the file, written once. Makes the file mode <code class="verbatim">755</code> unless <code class="verbatim">:tangle-mode</code> says otherwise.</td></tr> | ||
| 755 | <tr><td><code class="verbatim">:padline</code></td><td><code class="verbatim">no</code></td><td>No blank line between this block and the one before it.</td></tr> | ||
| 756 | <tr><td><code class="verbatim">:comments</code></td><td><code class="verbatim">no</code>, <code class="verbatim">link</code>, <code class="verbatim">yes</code>, <code class="verbatim">org</code>, <code class="verbatim">both</code>, <code class="verbatim">noweb</code></td><td>Comments around each block (below).</td></tr> | ||
| 757 | <tr><td><code class="verbatim">:noweb</code></td><td>see Noweb above</td><td>Expand or strip <code class="verbatim"><<name>></code> references.</td></tr> | ||
| 758 | <tr><td><code class="verbatim">:prologue</code>, <code class="verbatim">:epilogue</code></td><td>text</td><td>A line before and after the block's code.</td></tr> | ||
| 759 | <tr><td><code class="verbatim">:var</code></td><td>as for running</td><td>Shell scalars become assignments, Python values become assignments, Emacs Lisp values are <code class="verbatim">let</code>-bound. For the languages below, as their Org language files write them.</td></tr> | ||
| 760 | <tr><td><code class="verbatim">:no-expand</code></td><td>any</td><td>Write the body without <code class="verbatim">:var</code>, <code class="verbatim">:prologue</code>, <code class="verbatim">:epilogue</code> or the language's wrapping.</td></tr> | ||
| 761 | </tbody> | ||
| 762 | </table> | ||
| 763 | <p>A table in <code class="verbatim">:var</code> loses its first row when its only rule is under that row, or with <code class="verbatim">:colnames yes</code>, and its rules unless <code class="verbatim">:hlines yes</code>, as when the block runs. This holds for every language.</p> | ||
| 764 | <p><code class="verbatim">C</code>, <code class="verbatim">C++</code>, <code class="verbatim">cpp</code>, <code class="verbatim">D</code>, <code class="verbatim">java</code>, <code class="verbatim">fortran</code> and <code class="verbatim">clojure</code> blocks are written as Org's <code class="verbatim">org-babel-expand-body:LANG</code> writes them:</p> | ||
| 765 | <table> | ||
| 766 | <thead> | ||
| 767 | <tr><th>Language</th><th>Written</th></tr> | ||
| 768 | </thead> | ||
| 769 | <tbody> | ||
| 770 | <tr><td><code class="verbatim">C</code>, <code class="verbatim">C++</code>, <code class="verbatim">cpp</code></td><td><code class="verbatim">#include</code> lines from <code class="verbatim">:includes</code>, <code class="verbatim">#define</code> lines from <code class="verbatim">:defines</code>, <code class="verbatim">using namespace</code> lines from <code class="verbatim">:namespaces</code>, the <code class="verbatim">:var</code> declarations with table sizes and column-name helpers, then the body between <code class="verbatim">:prologue</code> and <code class="verbatim">:epilogue</code>, wrapped in <code class="verbatim">int main()</code> unless it has a <code class="verbatim">main</code> or <code class="verbatim">:main no</code> is given.</td></tr> | ||
| 771 | <tr><td><code class="verbatim">D</code></td><td><code class="verbatim">module mmm;</code>, <code class="verbatim">import</code> lines from <code class="verbatim">:imports</code> (or the <code class="verbatim">IMPORTS</code> property, except when tangling) plus <code class="verbatim">std.stdio</code> and <code class="verbatim">std.conv</code>, the <code class="verbatim">:var</code> declarations, and the body wrapped in <code class="verbatim">int main()</code> as for C.</td></tr> | ||
| 772 | <tr><td><code class="verbatim">java</code></td><td>The body between <code class="verbatim">:prologue</code> and <code class="verbatim">:epilogue</code>, wrapped in a <code class="verbatim">main</code> method when it has no method and in a class when it has none. The class is named by <code class="verbatim">:classname</code> or the body's own class; a dotted <code class="verbatim">:classname</code> adds a <code class="verbatim">package</code> line. <code class="verbatim">:imports</code> adds <code class="verbatim">import</code> lines, and <code class="verbatim">:var</code> values become static fields.</td></tr> | ||
| 773 | <tr><td><code class="verbatim">fortran</code></td><td><code class="verbatim">#include</code> and <code class="verbatim">#define</code> lines from <code class="verbatim">:includes</code> and <code class="verbatim">:defines</code> (or the <code class="verbatim">INCLUDES</code> and <code class="verbatim">DEFINES</code> properties, except when tangling), then the <code class="verbatim">:var</code> declarations and the body in <code class="verbatim">program main</code>, unless the body has its own <code class="verbatim">program</code> statement (then <code class="verbatim">:var</code> is refused) or <code class="verbatim">:main no</code> is given.</td></tr> | ||
| 774 | <tr><td><code class="verbatim">clojure</code></td><td><code class="verbatim">(ns …)</code> from <code class="verbatim">:ns</code>, the body in a <code class="verbatim">let</code> of the <code class="verbatim">:var</code> values, and a printer around it unless <code class="verbatim">:results output</code>.</td></tr> | ||
| 775 | </tbody> | ||
| 776 | </table> | ||
| 777 | <p>With <code class="verbatim">:hlines yes</code>, a table that keeps rules is refused for C, C++, D and Fortran; Java writes <code class="verbatim">null</code> for each rule.</p> | ||
| 778 | <p>Block switches also apply. <code class="verbatim">-r</code> removes coderef labels such as <code class="verbatim">(ref:name)</code>, using the format from <code class="verbatim">-l</code> if given. <code class="verbatim">-i</code> keeps the block's indentation. Otherwise common indentation and surrounding blank lines are removed.</p> | ||
| 779 | <h3 id="comments">Comments</h3> | ||
| 780 | <table> | ||
| 781 | <thead> | ||
| 782 | <tr><th><code class="verbatim">:comments</code></th><th>Written</th></tr> | ||
| 783 | </thead> | ||
| 784 | <tbody> | ||
| 785 | <tr><td><code class="verbatim">no</code></td><td>The code only.</td></tr> | ||
| 786 | <tr><td><code class="verbatim">link</code>, <code class="verbatim">yes</code></td><td>A comment with a link back to the block before the code, and "<em>name</em> ends here" after it.</td></tr> | ||
| 787 | <tr><td><code class="verbatim">org</code></td><td>The Org text between the heading (or the previous block) and this block, as a comment.</td></tr> | ||
| 788 | <tr><td><code class="verbatim">both</code></td><td>The Org text and the link comments.</td></tr> | ||
| 789 | <tr><td><code class="verbatim">noweb</code></td><td>Link comments, plus link comments around each expanded noweb reference.</td></tr> | ||
| 790 | </tbody> | ||
| 791 | </table> | ||
| 792 | <p>The link is relative to the tangled file's folder. <em>name</em> is the block's <code class="verbatim">#+NAME</code>, or the heading's title and the block's number under that heading, such as <code class="verbatim">Setup:2</code>.</p> | ||
| 793 | <p>Comments need the language's comment syntax. orgstar knows it for: <code class="verbatim">emacs-lisp</code>, <code class="verbatim">elisp</code>, <code class="verbatim">lisp</code>, <code class="verbatim">scheme</code>, <code class="verbatim">asm</code> (<code class="verbatim">;;</code>); <code class="verbatim">python</code>, <code class="verbatim">ruby</code>, <code class="verbatim">perl</code>, <code class="verbatim">conf</code>, <code class="verbatim">toml</code>, <code class="verbatim">makefile</code>, <code class="verbatim">awk</code>, <code class="verbatim">tcl</code>, <code class="verbatim">m4</code>, <code class="verbatim">icon</code>, <code class="verbatim">desktop</code> and the shells except <code class="verbatim">fish</code> (<code class="verbatim">#</code>); <code class="verbatim">js</code>, <code class="verbatim">javascript</code>, <code class="verbatim">java</code>, <code class="verbatim">cpp</code>, <code class="verbatim">C++</code>, <code class="verbatim">objc</code>, <code class="verbatim">csharp</code>, <code class="verbatim">idl</code>, <code class="verbatim">pike</code>, <code class="verbatim">antlr</code>, <code class="verbatim">verilog</code> (<code class="verbatim">//</code>); <code class="verbatim">c</code>, <code class="verbatim">C</code>, <code class="verbatim">css</code> (<code class="verbatim">/* */</code>); <code class="verbatim">lua</code>, <code class="verbatim">sql</code>, <code class="verbatim">sqlite</code>, <code class="verbatim">vhdl</code> (<code class="verbatim">--</code>); <code class="verbatim">latex</code>, <code class="verbatim">tex</code>, <code class="verbatim">prolog</code> (<code class="verbatim">%%</code>); <code class="verbatim">ps</code>, <code class="verbatim">metapost</code> (<code class="verbatim">%</code>); <code class="verbatim">f90</code>, <code class="verbatim">dcl</code> (<code class="verbatim">!</code>); <code class="verbatim">html</code>, <code class="verbatim">xml</code>, <code class="verbatim">nxml</code>, <code class="verbatim">mhtml</code>, <code class="verbatim">sgml</code> (<code class="verbatim"><!-- --></code>); <code class="verbatim">octave</code> (<code class="verbatim">##</code>); <code class="verbatim">pascal</code> (<code class="verbatim">{ }</code>); <code class="verbatim">texinfo</code> (<code class="verbatim">@c</code>); <code class="verbatim">bibtex</code> (<code class="verbatim">@Comment</code>); <code class="verbatim">nroff</code> (<code class="verbatim">\"</code>); <code class="verbatim">bat</code> (<code class="verbatim">rem</code>). For any other language, <code class="verbatim">:comments</code> other than <code class="verbatim">no</code> stops tangling with a message.</p> | ||
| 794 | <h3 id="writing-the-files">Writing the files</h3> | ||
| 795 | <ul> | ||
| 796 | <li>A file whose contents would not change is left alone, so its modification time stays the same.</li> | ||
| 797 | <li>A read-only file is replaced.</li> | ||
| 798 | <li>Tangling into the Org file itself is refused: "Not allowed to tangle into the same file as self".</li> | ||
| 799 | <li>When a file's mode, from <code class="verbatim">:shebang</code> or <code class="verbatim">:tangle-mode</code>, can't be set, the other files are still written and their modes set, and the message area says "Tangled <em>N</em> code blocks from <em>file</em>, but can't set the mode of <em>path</em>: <em>reason</em>".</li> | ||
| 800 | </ul> | ||
| 801 | <h3 id="what-tangling-refuses">What tangling refuses</h3> | ||
| 802 | <p>Tangling stops, writes nothing and says why when:</p> | ||
| 803 | <ul> | ||
| 804 | <li><code class="verbatim">:var</code> refers to a source block, which would have to run: "would run a block while tangling".</li> | ||
| 805 | <li>A shell block's <code class="verbatim">:var</code> is a table or list.</li> | ||
| 806 | <li><code class="verbatim">:var</code> is used in a language other than shells, Python, Emacs Lisp, C, C++, D, Java, Fortran and Clojure.</li> | ||
| 807 | <li>A C, C++, D or Fortran block's <code class="verbatim">:var</code> table keeps rules (with <code class="verbatim">:hlines yes</code>), or a value has no type the language takes.</li> | ||
| 808 | <li>A Lisp header value cannot be evaluated: "is Lisp tangling can't evaluate yet; nothing was tangled."</li> | ||
| 809 | <li><code class="verbatim">:tangle-mode</code> is in a form it does not read.</li> | ||
| 810 | <li><code class="verbatim">:comments</code> needs a comment syntax it does not know.</li> | ||
| 811 | </ul> | ||
| 812 | <h2 id="on-ios">On iOS</h2> | ||
| 813 | <ul> | ||
| 814 | <li>Only Emacs Lisp blocks, in orgstar's own interpreter, JavaScript blocks, in JavaScriptCore (see <em>JavaScript in JavaScriptCore</em> above), and calc, sqlite, dot and mermaid blocks (see above) run. Any other language, compiled languages included, fails with "<em>language</em> blocks need the Mac to run." (for example "C blocks need the Mac to run."), and so does a block whose <code class="verbatim">:var</code> refers to a block in another language.</li> | ||
| 815 | <li>JavaScript blocks can use <code class="verbatim">:session</code>. There are no other sessions, and no graphics other than dot and mermaid.</li> | ||
| 816 | <li>The trust prompt works the same way, with its own <code class="verbatim">trusted.json</code> on the device.</li> | ||
| 817 | <li>There is no cancel command.</li> | ||
| 818 | <li>Tangling works, for files in folders orgstar can write to.</li> | ||
| 819 | <li>Edit Block opens a plain text sheet without highlighting.</li> | ||
| 820 | </ul> | ||
| 821 | <p>See <a href="14-ios.html">iOS</a> for the rest of the iOS app.</p> | ||
| 822 | <h2 id="in-the-mac-app-store-version">In the Mac App Store version</h2> | ||
| 823 | <ul> | ||
| 824 | <li>Only Emacs Lisp blocks, in the same interpreter as on iOS, JavaScript blocks, in JavaScriptCore, and calc, sqlite, dot and mermaid blocks run. Any other language, compiled languages included, fails with "<em>language</em> blocks don't run in this version of orgstar."</li> | ||
| 825 | <li>JavaScript blocks can use <code class="verbatim">:session</code>. There are no other sessions, and no graphics other than dot and mermaid.</li> | ||
| 826 | <li>The trust prompt works the same way.</li> | ||
| 827 | <li>Tangling works as in the download version, <code class="verbatim">:shebang</code> included. A target outside your folders needs access to its folder first: orgstar asks with Grant Access…, as described in <a href="../install.html">Install</a>. So does a <code class="verbatim">:file</code> result outside them.</li> | ||
| 828 | </ul> | ||
| 829 | </main> | ||
| 830 | <footer class="site"> | ||
| 831 | © 2026 Christian Cleberg · <a href="https://krz.sh/apps/orgstar/">krz.sh/apps/orgstar</a> · <a href="/orgstar/third-party.html">third-party notices</a> | ||
| 832 | </footer> | ||
| 833 | </body> | ||
| 834 | </html>\ No newline at end of file | ||
guide/12-export.html added +492
| @@ -0,0 +1,492 @@ | |||
| 1 | <!DOCTYPE html> | ||
| 2 | <html lang="en"> | ||
| 3 | <head> | ||
| 4 | <meta charset="utf-8"> | ||
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
| 6 | <title>Export · orgstar</title> | ||
| 7 | <meta name="description" content="Exporting Org files from orgstar to HTML, Markdown, PDF, Word, RTF, plain text, ODT, iCalendar, LaTeX and ASCII, and to PDF through LaTeX with Emacs;…"> | ||
| 8 | <link rel="icon" href="../favicon.svg" type="image/svg+xml"> | ||
| 9 | <link rel="stylesheet" href="../theme.css"> | ||
| 10 | <link rel="stylesheet" href="../syntax.css"> | ||
| 11 | <link rel="stylesheet" href="../style.css"> | ||
| 12 | </head> | ||
| 13 | <body> | ||
| 14 | <header class="site"> | ||
| 15 | <a class="site-title" href="../index.html">orgstar</a> | ||
| 16 | <nav> | ||
| 17 | <a href="../install.html">Install</a> | ||
| 18 | <a href="../quickstart.html">Quick start</a> | ||
| 19 | <a href="index.html">Manual</a> | ||
| 20 | </nav> | ||
| 21 | </header> | ||
| 22 | <main> | ||
| 23 | <h1>Export</h1> | ||
| 24 | <p class="lede">orgstar exports HTML, Markdown, PDF, Word, RTF, plain text, ODT, iCalendar, LaTeX and ASCII itself, and the Mac download version hands LaTeX-made PDF to Emacs.</p> | ||
| 25 | <nav class="toc" aria-label="On this page"> | ||
| 26 | <h2>On this page</h2> | ||
| 27 | <ul> | ||
| 28 | <li><a href="#exporting-a-file">Exporting a file</a> | ||
| 29 | <ul> | ||
| 30 | <li><a href="#on-the-mac">On the Mac</a></li> | ||
| 31 | <li><a href="#the-export-dialog">The export dialog</a></li> | ||
| 32 | <li><a href="#on-ios">On iOS</a></li> | ||
| 33 | </ul></li> | ||
| 34 | <li><a href="#html-export">HTML export</a> | ||
| 35 | <ul> | ||
| 36 | <li><a href="#title-author-and-date">Title, author and date</a></li> | ||
| 37 | <li><a href="#options">#+OPTIONS</a></li> | ||
| 38 | <li><a href="#which-headings-are-exported">Which headings are exported</a></li> | ||
| 39 | <li><a href="#the-page-head">The page head</a></li> | ||
| 40 | <li><a href="#math">Math</a></li> | ||
| 41 | <li><a href="#includes">Includes</a></li> | ||
| 42 | <li><a href="#macros">Macros</a></li> | ||
| 43 | <li><a href="#footnotes">Footnotes</a></li> | ||
| 44 | <li><a href="#tables">Tables</a></li> | ||
| 45 | <li><a href="#images-and-links">Images and links</a></li> | ||
| 46 | <li><a href="#source-blocks-and-their-results">Source blocks and their results</a></li> | ||
| 47 | <li><a href="#other-blocks-and-elements">Other blocks and elements</a></li> | ||
| 48 | <li><a href="#citations">Citations</a></li> | ||
| 49 | </ul></li> | ||
| 50 | <li><a href="#pdf-export">PDF export</a></li> | ||
| 51 | <li><a href="#latex-export">LaTeX export</a></li> | ||
| 52 | <li><a href="#word-rtf-and-plain-text">Word, RTF and plain text</a> | ||
| 53 | <ul> | ||
| 54 | <li><a href="#copying-as-rich-text">Copying as rich text</a></li> | ||
| 55 | </ul></li> | ||
| 56 | <li><a href="#odt-export">ODT export</a></li> | ||
| 57 | <li><a href="#ascii-export">ASCII export</a></li> | ||
| 58 | <li><a href="#markdown-export">Markdown export</a></li> | ||
| 59 | <li><a href="#icalendar-export">iCalendar export</a></li> | ||
| 60 | <li><a href="#publishing">Publishing</a></li> | ||
| 61 | <li><a href="#exporting-through-emacs">Exporting through Emacs</a></li> | ||
| 62 | <li><a href="#citations">Citations</a> | ||
| 63 | <ul> | ||
| 64 | <li><a href="#bibliography-files">Bibliography files</a></li> | ||
| 65 | <li><a href="#cite-export">#+cite_export:</a></li> | ||
| 66 | <li><a href="#citation-styles">Citation styles</a></li> | ||
| 67 | <li><a href="#the-bibliography">The bibliography</a></li> | ||
| 68 | </ul></li> | ||
| 69 | <li><a href="#what-export-does-not-do">What export does not do</a></li> | ||
| 70 | </ul> | ||
| 71 | </nav> | ||
| 72 | <h2 id="exporting-a-file">Exporting a file</h2> | ||
| 73 | <p>Export works on the file in the current editor, using its text as it is now, saved or not. It applies to Org files only; in any other file the command says "Not an org file". Source blocks are never run during export. Results already in the file are exported as they are; see <a href="11-code-blocks.html">Code blocks</a>.</p> | ||
| 74 | <h3 id="on-the-mac">On the Mac</h3> | ||
| 75 | <table> | ||
| 76 | <thead> | ||
| 77 | <tr><th>Format</th><th>Command</th><th>Emacs preset</th><th>Doom</th><th>Needs Emacs</th></tr> | ||
| 78 | </thead> | ||
| 79 | <tbody> | ||
| 80 | <tr><td>HTML</td><td>Export to HTML</td><td><code class="verbatim">C-c C-e h h</code></td><td><code class="verbatim">SPC m e h h</code>, <code class="verbatim">C-c C-e h h</code></td><td>no</td></tr> | ||
| 81 | <tr><td>HTML, then open it</td><td>Export to HTML and Open</td><td><code class="verbatim">C-c C-e h o</code></td><td><code class="verbatim">SPC m e h o</code>, <code class="verbatim">C-c C-e h o</code></td><td>no</td></tr> | ||
| 82 | <tr><td>Markdown</td><td>Export to Markdown</td><td><code class="verbatim">C-c C-e m m</code></td><td><code class="verbatim">SPC m e m m</code>, <code class="verbatim">C-c C-e m m</code></td><td>no</td></tr> | ||
| 83 | <tr><td>PDF</td><td>Export to PDF</td><td>—</td><td>—</td><td>no</td></tr> | ||
| 84 | <tr><td>Word</td><td>Export to Word</td><td>—</td><td>—</td><td>no</td></tr> | ||
| 85 | <tr><td>RTF</td><td>Export to RTF</td><td>—</td><td>—</td><td>no</td></tr> | ||
| 86 | <tr><td>Plain text</td><td>Export to Plain Text</td><td>—</td><td>—</td><td>no</td></tr> | ||
| 87 | <tr><td>PDF through LaTeX</td><td>Export to PDF with Emacs</td><td><code class="verbatim">C-c C-e l p</code></td><td><code class="verbatim">SPC m e l p</code>, <code class="verbatim">C-c C-e l p</code></td><td>yes</td></tr> | ||
| 88 | <tr><td>LaTeX</td><td>Export to LaTeX</td><td><code class="verbatim">C-c C-e l l</code></td><td><code class="verbatim">C-c C-e l l</code></td><td>no</td></tr> | ||
| 89 | <tr><td>ODT</td><td>Export to ODT</td><td><code class="verbatim">C-c C-e o o</code></td><td><code class="verbatim">C-c C-e o o</code></td><td>no</td></tr> | ||
| 90 | <tr><td>ASCII text</td><td>Export to Plain Text (ASCII)</td><td><code class="verbatim">C-c C-e t u</code></td><td><code class="verbatim">C-c C-e t u</code></td><td>no</td></tr> | ||
| 91 | <tr><td>iCalendar</td><td>Export to iCalendar</td><td><code class="verbatim">C-c C-e c f</code></td><td><code class="verbatim">C-c C-e c f</code></td><td>no</td></tr> | ||
| 92 | <tr><td>iCalendar, every agenda file</td><td>Export Agenda Files to iCalendar</td><td><code class="verbatim">C-c C-e c a</code></td><td><code class="verbatim">C-c C-e c a</code></td><td>no</td></tr> | ||
| 93 | <tr><td>iCalendar, agenda files in one</td><td>Combine Agenda Files into iCalendar</td><td><code class="verbatim">C-c C-e c c</code></td><td><code class="verbatim">C-c C-e c c</code></td><td>no</td></tr> | ||
| 94 | </tbody> | ||
| 95 | </table> | ||
| 96 | <p>The keys follow Emacs's export dispatcher (<code class="verbatim">org-export-dispatch</code>). <code class="verbatim">C-c C-e</code> on its own is only a prefix: pause after it and the key hints list the formats. The <code class="verbatim">SPC m e</code> keys work in normal state; the <code class="verbatim">C-c C-e</code> keys work in every Doom state. The Mac preset has no keys for the single formats; its <code class="verbatim">⇧⌘E</code> opens the export dialog.</p> | ||
| 97 | <p>All fourteen commands are in File ▸ Export and in the command palette. They write the export beside the Org file, with the same name and the format's extension: <code class="verbatim">.html</code>, <code class="verbatim">.md</code>, <code class="verbatim">.pdf</code>, <code class="verbatim">.docx</code>, <code class="verbatim">.rtf</code>, <code class="verbatim">.tex</code>, <code class="verbatim">.odt</code>, <code class="verbatim">.txt</code> or <code class="verbatim">.ics</code>. The two agenda-file commands are the exceptions; see <a href="#icalendar-export">iCalendar export</a>. <code class="verbatim">#+EXPORT_FILE_NAME:</code> names it instead, as in Org: relative to the Org file's folder (or absolute, or starting with <code class="verbatim">~</code>), with its extension replaced by the format's, so <code class="verbatim">#+EXPORT_FILE_NAME: out/report</code> writes <code class="verbatim">out/report.html</code>. A file already there is replaced. The message area shows "Exported to <em>name</em>".</p> | ||
| 98 | <p>The <a href="../install.html">Mac App Store version</a> has the thirteen commands that don't need Emacs; File ▸ Export, the export dialog and the command palette leave out Export to PDF with Emacs, and a key bound to it runs Export to PDF. When the export file, or an <code class="verbatim">#+INCLUDE:</code> or <code class="verbatim">#+SETUPFILE:</code>, is outside your folders, orgstar first asks for access to its folder; for the export file, Save Elsewhere… instead picks another place. See <a href="../install.html">Install</a>.</p> | ||
| 99 | <h3 id="the-export-dialog">The export dialog</h3> | ||
| 100 | <p><strong>Export…</strong> in the command palette, or <code class="verbatim">⇧⌘E</code> in the Mac preset, opens a dialog. The Emacs and Doom presets have no key for it; bind <code class="verbatim">app.export-dialog</code> in <code class="verbatim">keymap.toml</code> if you want one (see <a href="03-keys.html">Keys and commands</a>). The dialog has:</p> | ||
| 101 | <ul> | ||
| 102 | <li><strong>Format</strong>: HTML, Markdown, PDF, Word, Rich Text (RTF), Plain text, PDF via LaTeX (Emacs), ODT, LaTeX, Plain text, ASCII or iCalendar. The App Store version lists LaTeX and Plain text, ASCII last.</li> | ||
| 103 | <li><strong>Scope</strong>: the whole file, or the subtree at the caret (Org's <code class="verbatim">C-s</code> in the dispatcher). A subtree is exported as a document of its own: its heading is the title, its text the body, and its child headings move up a level. iCalendar is the exception: there the subtree's heading is an entry like any other. The file's <code class="verbatim">#+</code> keywords still apply, and the heading's <code class="verbatim">EXPORT_TITLE</code>, <code class="verbatim">EXPORT_AUTHOR</code>, <code class="verbatim">EXPORT_DATE</code>, <code class="verbatim">EXPORT_EMAIL</code>, <code class="verbatim">EXPORT_OPTIONS</code>, <code class="verbatim">EXPORT_SELECT_TAGS</code>, <code class="verbatim">EXPORT_EXCLUDE_TAGS</code>, <code class="verbatim">EXPORT_HTML_HEAD</code> and <code class="verbatim">EXPORT_HTML_HEAD_EXTRA</code> properties override them. Its planning line and property drawer are left out. The choice is available when the caret is under a heading.</li> | ||
| 104 | <li><strong>Body only</strong>: leave out the title and the page around the text (Org's <code class="verbatim">C-b</code>). HTML is then the table of contents, the text and the footnotes, without <code class="verbatim"><html></code>, <code class="verbatim"><head></code> or the title; Markdown has no title heading; ASCII has no title block or table of contents. Not available for PDF, Word, RTF, plain text, ODT and iCalendar.</li> | ||
| 105 | <li><strong>Destination</strong>: where <code class="verbatim">#+EXPORT_FILE_NAME:</code> says, or the subtree's <code class="verbatim">EXPORT_FILE_NAME</code> property for a subtree, else beside the Org file. <strong>Choose…</strong> picks another place and name. Changing the format changes the extension.</li> | ||
| 106 | <li><strong>Margins</strong>, <strong>Font</strong> and <strong>Page numbers</strong>, for PDF: see <em>PDF export</em>.</li> | ||
| 107 | <li><strong>Open after export</strong>: opens the file in its default app when the export finishes.</li> | ||
| 108 | </ul> | ||
| 109 | <p>The dialog remembers the format and the <strong>Open after export</strong> setting. The PDF settings are <code class="verbatim">config.toml</code> settings, and apply to every PDF export.</p> | ||
| 110 | <h3 id="on-ios">On iOS</h3> | ||
| 111 | <p>The Export menu offers HTML, Markdown, PDF, Word, Rich Text (RTF), Plain Text, ODT, iCalendar, LaTeX and Plain Text (ASCII), and Copy as Rich Text. It is under More in the editor, and in the toolbar in the reader. Choosing one opens the share sheet with the exported file, named after the Org file or its <code class="verbatim">#+EXPORT_FILE_NAME:</code>. Send it to another app, or use Save to Files to keep it. The export is the same as on the Mac, except that LaTeX, ODT and ASCII have no author unless the file has <code class="verbatim">#+AUTHOR:</code>. PDF through LaTeX is not available on iOS.</p> | ||
| 112 | <p>The Export menu also has Export Agenda Files to iCalendar and Combine Agenda Files into iCalendar (see <a href="#icalendar-export">iCalendar export</a>). Export to HTML and Open, in Commands or on <code class="verbatim">C-c C-e h o</code> with a hardware keyboard, shows the HTML export in Quick Look, with the file's images in the page; nothing is written beside the Org file. Copy as Rich Text is in Commands too.</p> | ||
| 113 | <h2 id="html-export">HTML export</h2> | ||
| 114 | <p>orgstar writes a complete HTML page: a small built-in stylesheet that follows the system's light or dark appearance, the title, an author and date line, the table of contents, then the document. It does not use Emacs, and its output is close to, but not the same as, <code class="verbatim">ox-html</code>.</p> | ||
| 115 | <h3 id="title-author-and-date">Title, author and date</h3> | ||
| 116 | <table> | ||
| 117 | <thead> | ||
| 118 | <tr><th>Keyword</th><th>Effect</th></tr> | ||
| 119 | </thead> | ||
| 120 | <tbody> | ||
| 121 | <tr><td><code class="verbatim">#+TITLE:</code></td><td>The page title and a top heading. Without one, the file's name is used.</td></tr> | ||
| 122 | <tr><td><code class="verbatim">#+AUTHOR:</code></td><td>Shown under the title.</td></tr> | ||
| 123 | <tr><td><code class="verbatim">#+DATE:</code></td><td>Shown under the title, after the author, as written.</td></tr> | ||
| 124 | <tr><td><code class="verbatim">#+LANGUAGE:</code></td><td>The page's <code class="verbatim">lang</code>, and the language of the words the export writes: the table of contents heading, <code class="verbatim">Figure N:</code> captions and the footnotes' label, as Org's <code class="verbatim">org-export-dictionary</code> translates them. Without one, <code class="verbatim">org-export-default-language</code> (<code class="verbatim">en</code>).</td></tr> | ||
| 125 | </tbody> | ||
| 126 | </table> | ||
| 127 | <p>Keywords in files named by <code class="verbatim">#+SETUPFILE:</code> count, as they do in Org.</p> | ||
| 128 | <h3 id="options"><code class="verbatim">#+OPTIONS</code></h3> | ||
| 129 | <table> | ||
| 130 | <thead> | ||
| 131 | <tr><th>Option</th><th>Values</th><th>Default</th><th>Effect</th></tr> | ||
| 132 | </thead> | ||
| 133 | <tbody> | ||
| 134 | <tr><td><code class="verbatim">toc</code></td><td><code class="verbatim">t</code>, <code class="verbatim">nil</code>, a number</td><td><code class="verbatim">t</code></td><td>Table of contents, to the given depth. <code class="verbatim">t</code> goes to <code class="verbatim">H</code>.</td></tr> | ||
| 135 | <tr><td><code class="verbatim">num</code></td><td><code class="verbatim">t</code>, <code class="verbatim">nil</code>, a number</td><td><code class="verbatim">t</code></td><td>Section numbers, to the given depth. <code class="verbatim">t</code> goes to <code class="verbatim">H</code>.</td></tr> | ||
| 136 | <tr><td><code class="verbatim">H</code></td><td>a number</td><td><code class="verbatim">3</code></td><td>The deepest heading level the table of contents and numbering count.</td></tr> | ||
| 137 | <tr><td><code class="verbatim">tags</code></td><td><code class="verbatim">t</code>, <code class="verbatim">nil</code>, <code class="verbatim">not-in-toc</code></td><td><code class="verbatim">t</code></td><td>Heading tags; <code class="verbatim">not-in-toc</code> leaves them out of the table of contents.</td></tr> | ||
| 138 | <tr><td><code class="verbatim">todo</code></td><td><code class="verbatim">t</code>, <code class="verbatim">nil</code></td><td><code class="verbatim">t</code></td><td>TODO keywords in headings.</td></tr> | ||
| 139 | <tr><td><code class="verbatim">pri</code></td><td><code class="verbatim">t</code>, <code class="verbatim">nil</code></td><td><code class="verbatim">nil</code></td><td>Priority cookies in headings.</td></tr> | ||
| 140 | <tr><td><code class="verbatim">tex</code></td><td><code class="verbatim">t</code>, <code class="verbatim">nil</code></td><td><code class="verbatim">t</code></td><td>LaTeX fragments and environments; <code class="verbatim">nil</code> drops them.</td></tr> | ||
| 141 | <tr><td><code class="verbatim">title</code></td><td><code class="verbatim">t</code>, <code class="verbatim">nil</code></td><td><code class="verbatim">t</code></td><td>The title heading.</td></tr> | ||
| 142 | <tr><td><code class="verbatim">author</code></td><td><code class="verbatim">t</code>, <code class="verbatim">nil</code></td><td><code class="verbatim">t</code></td><td>The author.</td></tr> | ||
| 143 | <tr><td><code class="verbatim">date</code></td><td><code class="verbatim">t</code>, <code class="verbatim">nil</code></td><td><code class="verbatim">t</code></td><td>The date.</td></tr> | ||
| 144 | </tbody> | ||
| 145 | </table> | ||
| 146 | <p>A depth for <code class="verbatim">toc</code> or <code class="verbatim">num</code> larger than <code class="verbatim">H</code> is cut to <code class="verbatim">H</code>. Any value other than <code class="verbatim">nil</code> turns an option on. Other <code class="verbatim">#+OPTIONS</code> keys are ignored by HTML export. iCalendar export also reads <code class="verbatim"><</code> (see <em>iCalendar</em> below) and <code class="verbatim">-</code>, which is on by default and turns <code class="verbatim">---</code>, <code class="verbatim">--</code> and <code class="verbatim">...</code> into dashes and an ellipsis in the text it writes.</p> | ||
| 147 | <pre><code class="language-org highlight"><span class="text org"><span class="keyword other keyword org">#+TITLE:</span><span class="string unquoted org"> Field notes</span> | ||
| 148 | <span class="keyword other keyword org">#+AUTHOR:</span><span class="string unquoted org"> Sam</span> | ||
| 149 | <span class="keyword other keyword org">#+OPTIONS:</span><span class="string unquoted org"> toc:2 num:nil pri:t ^:{}</span></span></code></pre> | ||
| 150 | <h3 id="which-headings-are-exported">Which headings are exported</h3> | ||
| 151 | <ul> | ||
| 152 | <li>A heading tagged with one of <code class="verbatim">#+EXCLUDE_TAGS</code> (<code class="verbatim">noexport</code> by default) is left out, with everything under it.</li> | ||
| 153 | <li>A heading whose title starts with <code class="verbatim">COMMENT</code> is left out.</li> | ||
| 154 | <li>A heading tagged <code class="verbatim">ARCHIVE</code> is exported as the heading alone, without its contents.</li> | ||
| 155 | <li>If any heading has one of <code class="verbatim">#+SELECT_TAGS</code> (<code class="verbatim">export</code> by default), only those headings, their ancestors and everything under them are exported.</li> | ||
| 156 | </ul> | ||
| 157 | <p>Each heading gets an <code class="verbatim">id</code> for links: its <code class="verbatim">CUSTOM_ID</code> property, or a slug made from its title. Headings are one level down from Org's: a top-level heading is an <code class="verbatim"><h2></code>, since the title is the <code class="verbatim"><h1></code>.</p> | ||
| 158 | <h3 id="the-page-head">The page head</h3> | ||
| 159 | <p>Each <code class="verbatim">#+HTML_HEAD:</code> and <code class="verbatim">#+HTML_HEAD_EXTRA:</code> line goes into the page's <code class="verbatim"><head></code> as written, in order. Use them for stylesheets and scripts:</p> | ||
| 160 | <pre><code class="language-org highlight"><span class="text org"><span class="keyword other keyword org">#+HTML_HEAD:</span><span class="string unquoted org"> <link rel="stylesheet" href="notes.css"></span></span></code></pre> | ||
| 161 | <p>The built-in stylesheet is always included first. Other <code class="verbatim">#+HTML_…</code> keywords are not used.</p> | ||
| 162 | <h3 id="math">Math</h3> | ||
| 163 | <p>LaTeX fragments (<code class="verbatim">\(…\)</code>, <code class="verbatim">\[…\]</code>, <code class="verbatim">$…$</code>, <code class="verbatim">$$…$$</code>) and LaTeX environments are left in the page for MathJax. When the page has any, orgstar adds MathJax 3 from <code class="verbatim">cdn.jsdelivr.net</code>, so the page needs a network connection to show math. PDF export uses a copy of MathJax that comes with orgstar instead, so math in a PDF needs no network connection. Entities such as <code class="verbatim">\alpha</code> become their characters.</p> | ||
| 164 | <h3 id="includes">Includes</h3> | ||
| 165 | <p><code class="verbatim">#+INCLUDE:</code> inserts another file before export, as <code class="verbatim">org-export-expand-include-keyword</code> does. Paths are relative to the Org file.</p> | ||
| 166 | <table> | ||
| 167 | <thead> | ||
| 168 | <tr><th>Form</th><th>Effect</th></tr> | ||
| 169 | </thead> | ||
| 170 | <tbody> | ||
| 171 | <tr><td><code class="verbatim">#+INCLUDE: "part.org"</code></td><td>The file's contents, read as Org; its includes are expanded too, up to eight levels.</td></tr> | ||
| 172 | <tr><td><code class="verbatim">#+INCLUDE: "part.org::*Heading"</code></td><td>Only the subtree with that heading.</td></tr> | ||
| 173 | <tr><td><code class="verbatim">#+INCLUDE: "part.org::#custom-id"</code></td><td>Only the subtree with that <code class="verbatim">CUSTOM_ID</code>.</td></tr> | ||
| 174 | <tr><td><code class="verbatim">#+INCLUDE: "code.sh" src sh</code></td><td>The file in a source block.</td></tr> | ||
| 175 | <tr><td><code class="verbatim">#+INCLUDE: "log.txt" example</code></td><td>The file in an example block.</td></tr> | ||
| 176 | <tr><td><code class="verbatim">#+INCLUDE: "page.html" export html</code></td><td>The file in an export block.</td></tr> | ||
| 177 | <tr><td><code class="verbatim">quote</code>, <code class="verbatim">verse</code>, <code class="verbatim">center</code>, <code class="verbatim">comment</code></td><td>The file in a block of that kind.</td></tr> | ||
| 178 | <tr><td><code class="verbatim">:lines "5-10"</code></td><td>Only those lines; either end may be left out.</td></tr> | ||
| 179 | <tr><td><code class="verbatim">:minlevel 2</code></td><td>Shift the included headings so the shallowest is at that level.</td></tr> | ||
| 180 | </tbody> | ||
| 181 | </table> | ||
| 182 | <p>A file that cannot be read is replaced by an empty line. In a file included as Org from another folder, relative <code class="verbatim">file:</code> links are rewritten relative to the Org file, as Org does: <code class="verbatim">[[file:pic.png]]</code> in <code class="verbatim">sub/part.org</code> becomes <code class="verbatim">[[file:sub/pic.png]]</code>. A link written without <code class="verbatim">file:</code>, such as <code class="verbatim">[[./pic.png]]</code>, comes back as <code class="verbatim">[[sub/pic.png]]</code>, which Org then reads as a link to a heading.</p> | ||
| 183 | <h3 id="macros">Macros</h3> | ||
| 184 | <p><code class="verbatim">{{{name(arguments)}}}</code> is replaced before export (<code class="verbatim">org-macro-replace-all</code>).</p> | ||
| 185 | <table> | ||
| 186 | <thead> | ||
| 187 | <tr><th>Macro</th><th>Replaced by</th></tr> | ||
| 188 | </thead> | ||
| 189 | <tbody> | ||
| 190 | <tr><td><code class="verbatim">#+MACRO: name text</code></td><td><code class="verbatim">text</code>, with <code class="verbatim">$1</code>, =$2=… replaced by the arguments.</td></tr> | ||
| 191 | <tr><td><code class="verbatim">{{{title}}}</code>, <code class="verbatim">{{{author}}}</code>, <code class="verbatim">{{{date}}}</code>, <code class="verbatim">{{{email}}}</code></td><td>That keyword's value.</td></tr> | ||
| 192 | <tr><td><code class="verbatim">{{{keyword(NAME)}}}</code></td><td>The value of <code class="verbatim">#+NAME:</code>.</td></tr> | ||
| 193 | <tr><td><code class="verbatim">{{{input-file}}}</code></td><td>The Org file's name.</td></tr> | ||
| 194 | <tr><td><code class="verbatim">{{{property(NAME)}}}</code></td><td>The value of property <code class="verbatim">NAME</code> of the entry the macro is in; <code class="verbatim">ITEM</code> gives the heading's title. Empty before the first heading.</td></tr> | ||
| 195 | <tr><td><code class="verbatim">{{{property(NAME,SEARCH)}}}</code></td><td>The same for the entry <code class="verbatim">SEARCH</code> finds in this file: <code class="verbatim">*Title</code>, <code class="verbatim">#custom-id</code> or a title.</td></tr> | ||
| 196 | <tr><td><code class="verbatim">{{{n}}}</code>, <code class="verbatim">{{{n(name)}}}</code></td><td>A counter, increased at each use. <code class="verbatim">n(name,-)</code> repeats the current value; <code class="verbatim">n(name,5)</code> sets it to 5.</td></tr> | ||
| 197 | <tr><td><code class="verbatim">{{{time(format)}}}</code></td><td>The current time, formatted as <code class="verbatim">format-time-string</code> does.</td></tr> | ||
| 198 | </tbody> | ||
| 199 | </table> | ||
| 200 | <p>Arguments are separated by commas; write <code class="verbatim">\,</code> for a literal comma. Macros defined with <code class="verbatim">(eval …)</code>, and macros orgstar does not know, become empty. <code class="verbatim">#+MACRO:</code> definitions in setup files count.</p> | ||
| 201 | <h3 id="footnotes">Footnotes</h3> | ||
| 202 | <p>Footnote references, named or inline (<code class="verbatim">[fn:: text]</code>), become numbered superscript links. The notes are collected in a Footnotes section at the end, numbered in the order they are first referenced, each with a link back. A reference without a definition is exported as written.</p> | ||
| 203 | <h3 id="tables">Tables</h3> | ||
| 204 | <p>An Org table becomes an HTML <code class="verbatim"><table></code>. If it has rules, the rows before the first rule are the header (<code class="verbatim"><thead></code>) and the rest the body. <code class="verbatim">#+CAPTION:</code> gives the table a caption. <code class="verbatim">#+TBLFM:</code> lines are not exported.</p> | ||
| 205 | <p>A table.el table (one drawn with <code class="verbatim">+</code>, <code class="verbatim">-</code> and <code class="verbatim">|</code>) becomes a table with each cell's <code class="verbatim">colspan</code> and <code class="verbatim">rowspan</code>, and the lines in a cell joined with line breaks. If its drawing is not a well-formed table, it is exported as preformatted text.</p> | ||
| 206 | <h3 id="images-and-links">Images and links</h3> | ||
| 207 | <p>A link to an image file without a description becomes an <code class="verbatim"><img></code>. The image types are <code class="verbatim">png</code>, <code class="verbatim">jpg</code>, <code class="verbatim">jpeg</code>, <code class="verbatim">gif</code>, <code class="verbatim">svg</code>, <code class="verbatim">webp</code>, <code class="verbatim">bmp</code>, <code class="verbatim">tif</code>, <code class="verbatim">tiff</code> and <code class="verbatim">avif</code>. <code class="verbatim">#+ATTR_HTML:</code> before the paragraph adds attributes (<code class="verbatim">:width 300 :alt "Map"</code>); without an <code class="verbatim">:alt</code>, the file name is used.</p> | ||
| 208 | <p>An <code class="verbatim">attachment:</code> link is exported as a <code class="verbatim">file:</code> link to the file in its entry's attachment folder, with its full path, as Org's <code class="verbatim">org-attach-expand-links</code> does; when the entry has no attachment folder, to that name in the Org file's folder. An attached image therefore shows as an image.</p> | ||
| 209 | <p>An image paragraph with <code class="verbatim">#+CAPTION:</code> or <code class="verbatim">#+ATTR_HTML:</code> becomes a <code class="verbatim"><figure></code>; a caption is numbered "Figure 1:", "Figure 2:" and so on.</p> | ||
| 210 | <p>Links to <code class="verbatim">.org</code> files point to the <code class="verbatim">.html</code> file of the same name. Links to headings (<code class="verbatim">[[*Heading]]</code>), to <code class="verbatim">CUSTOM_ID</code> targets and to radio targets point to the heading's or target's <code class="verbatim">id</code> on the page. <code class="verbatim">id:</code> links point to <code class="verbatim">#</code> and the ID. Other links are written as they are.</p> | ||
| 211 | <h3 id="source-blocks-and-their-results">Source blocks and their results</h3> | ||
| 212 | <p>A source block is exported as <code class="verbatim"><pre><code class</code>"language-LANG">=, with the code escaped and its common indentation removed. Code in a language the editor highlights is colored as the editor colors it: each token is a <code class="verbatim"><span></code> with the class Emacs's htmlize gives its face (<code class="verbatim">org-keyword</code>, <code class="verbatim">org-string</code>, <code class="verbatim">org-comment</code>, <code class="verbatim">org-function-name</code>, <code class="verbatim">org-type</code>, <code class="verbatim">org-constant</code>, <code class="verbatim">org-property-name</code>, <code class="verbatim">org-variable-name</code>), and the page's stylesheet colors them with the theme's <code class="verbatim">syntax-</code> colors, light and dark. Other languages are exported plain; the <code class="verbatim">language-</code> class lets a script or stylesheet in <code class="verbatim">#+HTML_HEAD</code> highlight them. Noweb references are shown as written. Code references are covered in <a href="09-links.html">Links</a>: labels come off the lines, <code class="verbatim">-n</code> and <code class="verbatim">+n</code> number them, and <code class="verbatim">[[(name)]]</code> links to the labelled line.</p> | ||
| 213 | <p>The block's <code class="verbatim">:exports</code> header argument decides what appears. orgstar resolves it as running the block would: from the <code class="verbatim">#+begin_src</code> line, <code class="verbatim">#+HEADER:</code> lines, <code class="verbatim">header-args</code> properties and <code class="verbatim">#+PROPERTY:</code> lines (see <a href="11-code-blocks.html">Code blocks</a>). Without one, it is <code class="verbatim">results</code> for <code class="verbatim">dot</code>, <code class="verbatim">plantuml</code>, <code class="verbatim">ditaa</code>, <code class="verbatim">gnuplot</code>, <code class="verbatim">latex</code> and <code class="verbatim">lilypond</code> blocks, as their Org defaults set it, and <code class="verbatim">code</code> for other languages.</p> | ||
| 214 | <table> | ||
| 215 | <thead> | ||
| 216 | <tr><th><code class="verbatim">:exports</code></th><th>Exported</th></tr> | ||
| 217 | </thead> | ||
| 218 | <tbody> | ||
| 219 | <tr><td><code class="verbatim">code</code></td><td>The code.</td></tr> | ||
| 220 | <tr><td><code class="verbatim">results</code></td><td>The block's existing <code class="verbatim">#+RESULTS:</code>.</td></tr> | ||
| 221 | <tr><td><code class="verbatim">both</code></td><td>The code, then the results.</td></tr> | ||
| 222 | <tr><td><code class="verbatim">none</code></td><td>Nothing.</td></tr> | ||
| 223 | </tbody> | ||
| 224 | </table> | ||
| 225 | <p>A <code class="verbatim">#+CALL:</code> line exports its existing results, never the call itself; <code class="verbatim">:exports code</code> or <code class="verbatim">none</code> on the call, or in the <code class="verbatim">header-args</code> properties where the call is, exports nothing. An inline <code class="verbatim">src_</code> block has <code class="verbatim">:exports results</code> by default: the <code class="verbatim">{{{results(…)}}}</code> after it is exported and its code is not. With <code class="verbatim">:exports code</code> the code is exported in <code class="verbatim"><code></code> and the results are not; with <code class="verbatim">both</code>, both. An inline <code class="verbatim">call_</code> never appears itself, and the <code class="verbatim">{{{results(…)}}}</code> after it is always exported, whatever <code class="verbatim">:exports</code> says, as in Org.</p> | ||
| 226 | <h3 id="other-blocks-and-elements">Other blocks and elements</h3> | ||
| 227 | <table> | ||
| 228 | <thead> | ||
| 229 | <tr><th>Org</th><th>HTML</th></tr> | ||
| 230 | </thead> | ||
| 231 | <tbody> | ||
| 232 | <tr><td><code class="verbatim">#+begin_example</code></td><td><code class="verbatim"><pre></code></td></tr> | ||
| 233 | <tr><td>=: = lines</td><td><code class="verbatim"><pre class</code>"example">=</td></tr> | ||
| 234 | <tr><td><code class="verbatim">#+begin_quote</code></td><td><code class="verbatim"><blockquote></code></td></tr> | ||
| 235 | <tr><td><code class="verbatim">#+begin_center</code></td><td><code class="verbatim"><div class</code>"center">=</td></tr> | ||
| 236 | <tr><td><code class="verbatim">#+begin_verse</code></td><td><code class="verbatim"><p class</code>"verse">=, lines and indentation kept</td></tr> | ||
| 237 | <tr><td><code class="verbatim">#+begin_export html</code></td><td>Its contents, as they are</td></tr> | ||
| 238 | <tr><td><code class="verbatim">#+begin_export</code> other formats</td><td>Nothing</td></tr> | ||
| 239 | <tr><td><code class="verbatim">#+begin_comment</code></td><td>Nothing</td></tr> | ||
| 240 | <tr><td><code class="verbatim">#+begin_NAME</code>, any other name</td><td><code class="verbatim"><div class</code>"NAME">= (a special block)</td></tr> | ||
| 241 | <tr><td><code class="verbatim">@@html:…@@</code></td><td>Its contents, as they are; other back-ends' snippets are dropped</td></tr> | ||
| 242 | <tr><td>Plain, numbered and description lists</td><td><code class="verbatim"><ul></code>, <code class="verbatim"><ol></code>, <code class="verbatim"><dl></code>; checkboxes as <code class="verbatim">[X]</code>, <code class="verbatim">[-]</code>, <code class="verbatim">[ ]</code></td></tr> | ||
| 243 | <tr><td>Timestamps</td><td><code class="verbatim"><time datetime</code>"…">=</td></tr> | ||
| 244 | <tr><td>Inline tasks</td><td><code class="verbatim"><div class</code>"inlinetask">= with the title in bold</td></tr> | ||
| 245 | <tr><td>Dynamic blocks</td><td>Their contents</td></tr> | ||
| 246 | <tr><td><code class="verbatim">-----</code></td><td><code class="verbatim"><hr></code></td></tr> | ||
| 247 | </tbody> | ||
| 248 | </table> | ||
| 249 | <p>Comments, drawers, property drawers, planning lines, clock lines and keywords are not exported.</p> | ||
| 250 | <h3 id="citations">Citations</h3> | ||
| 251 | <p>HTML and Markdown export handle citations the same way; see Citations below.</p> | ||
| 252 | <h2 id="pdf-export">PDF export</h2> | ||
| 253 | <p>Export to PDF makes the HTML export into a PDF, laid out and split into pages by the system's web engine as printing does. It needs neither Emacs nor TeX, and works on iOS. The PDF has what the HTML export has: the title, the byline, the table of contents, colored code, tables, images and math (MathJax, which comes with orgstar and needs no network connection). For the page:</p> | ||
| 254 | <ul> | ||
| 255 | <li>Colors are always the light ones, whatever the system's appearance.</li> | ||
| 256 | <li>Pages are US Letter where that is the usual size and A4 elsewhere; on the Mac, the paper size set for printing.</li> | ||
| 257 | <li>Code blocks, tables, figures and quotes are kept on one page when they fit, and a heading is not left at the bottom of a page.</li> | ||
| 258 | <li>Margins are 50 points on every side (<code class="verbatim">pdf-margin</code> under <code class="verbatim">[orgstar]</code> in <code class="verbatim">config.toml</code>; Margins in the Export dialog).</li> | ||
| 259 | <li>The text is in the export's own font, or the family <code class="verbatim">pdf-font</code> names (Font in the dialog). Code stays monospaced.</li> | ||
| 260 | <li>Each page's number is centred in its bottom margin (<code class="verbatim">pdf-page-numbers</code>; Page numbers in the dialog). The numbers are annotations on the pages, so the table of contents and other links keep working.</li> | ||
| 261 | </ul> | ||
| 262 | <p>For typeset output with LaTeX's classes and packages, use Export to PDF with Emacs instead (see <em>Exporting through Emacs</em>).</p> | ||
| 263 | <h2 id="latex-export">LaTeX export</h2> | ||
| 264 | <p>Export to LaTeX writes the <code class="verbatim">.tex</code> file that Emacs's <code class="verbatim">org-latex-export-to-latex</code> writes under <code class="verbatim">emacs -Q</code> (Org 9.8.7), without Emacs, on the Mac and iOS. It has the same preamble, sectioning, lists, tables, verbatim source blocks, figures, footnotes, links and escaping. Two things differ: the <code class="verbatim">\label</code> keys are made from the document, so they stay the same between exports, where Emacs picks new random ones each time; and <code class="verbatim">\author</code> is the name of the Mac's user account, which is what <code class="verbatim">user-full-name</code> usually is, unless the file has <code class="verbatim">#+AUTHOR:</code>.</p> | ||
| 265 | <p>It reads:</p> | ||
| 266 | <table> | ||
| 267 | <thead> | ||
| 268 | <tr><th>Keyword</th><th>Effect</th></tr> | ||
| 269 | </thead> | ||
| 270 | <tbody> | ||
| 271 | <tr><td><code class="verbatim">#+LATEX_CLASS:</code></td><td><code class="verbatim">article</code> (the default), <code class="verbatim">report</code> or <code class="verbatim">book</code>, with Org's default sectioning</td></tr> | ||
| 272 | <tr><td><code class="verbatim">#+LATEX_CLASS_OPTIONS:</code></td><td>Replaces <code class="verbatim">[11pt]</code> in <code class="verbatim">\documentclass</code></td></tr> | ||
| 273 | <tr><td><code class="verbatim">#+LATEX_HEADER:</code></td><td>Lines added after the packages</td></tr> | ||
| 274 | <tr><td><code class="verbatim">#+LATEX_HEADER_EXTRA:</code></td><td>Lines added after those</td></tr> | ||
| 275 | <tr><td><code class="verbatim">#+LATEX_COMPILER:</code></td><td><code class="verbatim">pdflatex</code> (the default), <code class="verbatim">xelatex</code> or <code class="verbatim">lualatex</code>: the packages for that engine</td></tr> | ||
| 276 | <tr><td><code class="verbatim">#+ATTR_LATEX:</code></td><td>On tables (<code class="verbatim">:environment</code>, <code class="verbatim">:align</code>, <code class="verbatim">:width</code>, <code class="verbatim">:float</code>, <code class="verbatim">:placement</code>, <code class="verbatim">:center</code>, <code class="verbatim">:font</code>, <code class="verbatim">:caption</code>, <code class="verbatim">:options</code>), images (<code class="verbatim">:width</code>, <code class="verbatim">:height</code>, <code class="verbatim">:scale</code>, <code class="verbatim">:options</code>, <code class="verbatim">:float</code>, <code class="verbatim">:placement</code>, <code class="verbatim">:center</code>), lists, quote, example and special blocks</td></tr> | ||
| 277 | </tbody> | ||
| 278 | </table> | ||
| 279 | <p><code class="verbatim">#+TITLE</code>, <code class="verbatim">#+SUBTITLE</code>, <code class="verbatim">#+AUTHOR</code>, <code class="verbatim">#+DATE</code>, <code class="verbatim">#+KEYWORDS</code>, <code class="verbatim">#+DESCRIPTION</code>, <code class="verbatim">#+LANGUAGE</code> and <code class="verbatim">#+OPTIONS</code> work as in Emacs, as do the tags and <code class="verbatim">COMMENT</code> that leave headings out (see <em>Which headings are exported</em>). Body-only and subtree export are in the export dialog. In a subtree export, the heading's <code class="verbatim">EXPORT_LATEX_CLASS</code>, <code class="verbatim">EXPORT_LATEX_CLASS_OPTIONS</code>, <code class="verbatim">EXPORT_LATEX_HEADER</code>, <code class="verbatim">EXPORT_LATEX_HEADER_EXTRA</code>, <code class="verbatim">EXPORT_LATEX_COMPILER</code>, <code class="verbatim">EXPORT_SUBTITLE</code>, <code class="verbatim">EXPORT_KEYWORDS</code>, <code class="verbatim">EXPORT_DESCRIPTION</code> and <code class="verbatim">EXPORT_LANGUAGE</code> properties replace the file's keywords. As in Emacs, a <code class="verbatim">PROPERTY+</code> line adds its value to the property's, after a space.</p> | ||
| 280 | <p>A file with something this export doesn't handle stops with "Can't export to LaTeX: " and what it was, rather than giving a <code class="verbatim">.tex</code> that differs from Emacs's: a LaTeX class other than the three, Babel or Polyglossia in the header, citations, radio targets, inline tasks, table.el tables, inline source blocks and calls, <code class="verbatim">#+CALL</code>, source blocks exported with their results, footnote definitions of several paragraphs, footnotes in headings, tables or item tags, <code class="verbatim">:mode math</code> and long tables, <code class="verbatim">UNNUMBERED</code> and <code class="verbatim">ALT_TITLE</code>, <code class="verbatim">tex:verbatim</code>, a quote or center block whose first line holds only spaces and whose second line is not blank, a keyword such as <code class="verbatim">#+SUBTITLE</code> repeated with an empty value, plain (unbracketed) links of types it doesn't write, such as <code class="verbatim">id:</code> and <code class="verbatim">info:</code>, plain links to images, a plain link that runs on into markup such as <code class="verbatim">shell:a_b</code>, and <code class="verbatim">#+OPTIONS</code> items other than <code class="verbatim">toc</code>, <code class="verbatim">num</code>, <code class="verbatim">H</code>, <code class="verbatim">tags</code>, <code class="verbatim">todo</code>, <code class="verbatim">pri</code>, <code class="verbatim">^</code>, <code class="verbatim">tex</code>, <code class="verbatim">title</code>, <code class="verbatim">author</code>, <code class="verbatim">date</code>, <code class="verbatim">-</code> and <code class="verbatim">timestamp</code> set to something other than Org's default. A link Emacs can't resolve stops the export in both, including a link to a heading, target or named element the export leaves out. On iOS the share sheet stops and the message shows at the bottom of the screen. Publishing to LaTeX stops with the file's name in the message. In the download version, when Emacs is installed, such a file is exported by Emacs instead (see <em>Exporting through Emacs</em>).</p> | ||
| 281 | <h2 id="word-rtf-and-plain-text">Word, RTF and plain text</h2> | ||
| 282 | <p>Export to Word, Export to RTF and Export to Plain Text make the HTML export into a document of that kind, as the system reads HTML: headings, emphasis, links, colored keywords and code, lists, and tables. Word files (<code class="verbatim">.docx</code>) are written by orgstar itself, so tables come through as Word tables; RTF keeps them too on the Mac. On iOS, where the system's HTML reader keeps no tables, Word's tables are made from the HTML export's tables, with header cells bold and the cells' text without its styles; RTF and plain text there have the cells' text but no table. Plain text is the same text without its styles: list bullets and table cells are kept, separated by tabs. Fonts are Helvetica Neue for text and Menlo for code, and the colors are the light ones.</p> | ||
| 283 | <p>In Word files, the title has Word's Title style and headings have its Heading 1 to Heading 6 styles, so Word's navigation pane, outline view and contents fields find them. Images from <code class="verbatim">file:</code> links come through as pictures, as wide as their pixels at 96 to the inch, scaled to <code class="verbatim">#+ATTR_HTML: :width</code> when it is set, and no wider than the page. PNG, JPEG and GIF go in as they are; other formats the system can read, such as HEIC, WebP and TIFF, go in as PNG. SVG and images at web addresses are left out. RTF and plain text have no images.</p> | ||
| 284 | <p>For Org's own ASCII layout, with underlined headings and drawn tables, use Export to Plain Text (ASCII); see <em>ASCII export</em>.</p> | ||
| 285 | <h3 id="copying-as-rich-text">Copying as rich text</h3> | ||
| 286 | <p><strong>Copy as Rich Text</strong> (the command palette on the Mac, the Export menu on iOS) puts the selection, or the whole file when nothing is selected, on the clipboard as HTML, RTF and plain text. Paste it into Mail, Pages, Word or a web form to get the formatted text. On iOS it copies the whole file.</p> | ||
| 287 | <h2 id="odt-export">ODT export</h2> | ||
| 288 | <p>Export to ODT writes an OpenDocument text file (<code class="verbatim">.odt</code>) for LibreOffice, Pages or Word. orgstar writes it itself, on the Mac and on iOS, the way Emacs's <code class="verbatim">ox-odt</code> does under <code class="verbatim">emacs -Q</code>: the same headings, paragraphs, lists, tables, links, notes and images, with ox-odt's style names, so a template that restyles ox-odt's output restyles this one too.</p> | ||
| 289 | <ul> | ||
| 290 | <li>The title, subtitle (<code class="verbatim">#+SUBTITLE:</code>), author and date come first, then the table of contents and the text. On the Mac, without <code class="verbatim">#+AUTHOR:</code>, the author is your account's full name, as <code class="verbatim">user-full-name</code> is in Emacs. Without <code class="verbatim">#+TITLE:</code> there is no title.</li> | ||
| 291 | <li>Headings are numbered by the word processor, to the depth <code class="verbatim">num</code> gives (<code class="verbatim">num:t</code> numbers every level). Headings deeper than <code class="verbatim">H</code> become list items. <code class="verbatim">#+TOC: headlines</code> puts a table of contents where it is; <code class="verbatim">local</code> limits it to the section, counts the depth from there and leaves out the title.</li> | ||
| 292 | <li>Footnotes are the word processor's own notes, numbered as ox-odt numbers them: those referred to in the text first, then those referred to only from other notes. A note referred to again shows its number.</li> | ||
| 293 | <li>Tables keep their header rows, alignment cookies, column groups and cell borders. A table inside a list item ends the list, sits indented below it, and the list carries on after it, as in ox-odt.</li> | ||
| 294 | <li>Images from <code class="verbatim">file:</code> links (PNG, JPEG, GIF and SVG) are put inside the file. Their size is their pixels at 96 to the inch, or <code class="verbatim">#+ATTR_ODT: :width</code>, <code class="verbatim">:length</code> (the height) or <code class="verbatim">:scale</code>, and no more than 17 by 20 cm. A caption or <code class="verbatim">#+NAME:</code> numbers figures, tables and source blocks, and a link to the name shows the number.</li> | ||
| 295 | <li>LaTeX fragments and environments are kept as written, in code style, as ox-odt does without a MathML converter. Source blocks are not colored; a language Emacs has no mode for gets ox-odt's plain code style.</li> | ||
| 296 | <li>Without <code class="verbatim">:exports</code>, every source block exports its code, <code class="verbatim">dot</code>, <code class="verbatim">plantuml</code>, <code class="verbatim">ditaa</code>, <code class="verbatim">gnuplot</code>, <code class="verbatim">latex</code> and <code class="verbatim">lilypond</code> included: <code class="verbatim">emacs -Q</code> loads no Babel library to give them <code class="verbatim">results</code>, so their <code class="verbatim">#+RESULTS:</code> are left out, with or without <code class="verbatim">:file</code>. With <code class="verbatim">:exports results</code> or <code class="verbatim">both</code>, the <code class="verbatim">#+RESULTS:</code> already in the file are exported as they are. A line of only spaces in a source block is exported empty, unless <code class="verbatim">-i</code> keeps the indentation.</li> | ||
| 297 | <li>Of the <code class="verbatim">#+OPTIONS</code>, <code class="verbatim">\n</code>, <code class="verbatim">f</code>, <code class="verbatim">|</code>, <code class="verbatim">e</code> and <code class="verbatim">d</code> (<code class="verbatim">t</code> or <code class="verbatim">nil</code>) are read, along with those every export reads.</li> | ||
| 298 | <li><code class="verbatim">#+ODT:</code> lines, <code class="verbatim">#+BEGIN_EXPORT odt</code> blocks and <code class="verbatim">@@odt:...@@</code> snippets go in as they are.</li> | ||
| 299 | <li>The styles (<code class="verbatim">styles.xml</code>) are orgstar's own: A4 pages with 2 cm margins. <code class="verbatim">#+ODT_STYLES_FILE:</code> is not read.</li> | ||
| 300 | </ul> | ||
| 301 | <p>The export stops with a message, instead of writing something different from ox-odt, for: a link that leads nowhere, an image file that can't be read, inline tasks, table templates (<code class="verbatim">#+ATTR_ODT: :style</code>), a link without a description to a <code class="verbatim"><<target>></code> or to a code line that isn't numbered, an inline source block exported as code, a table in a quote or other block inside a list, an annotation in a dated document, <code class="verbatim">#+TOC:</code> with <code class="verbatim">:target</code>, and these <code class="verbatim">#+OPTIONS</code> at other than their default: <code class="verbatim">p</code>, <code class="verbatim">c</code>, <code class="verbatim">prop</code>, <code class="verbatim">broken-links</code>, <code class="verbatim">:</code>, <code class="verbatim">*</code>, <code class="verbatim">stat</code>, <code class="verbatim">tasks</code>, <code class="verbatim"><</code>, <code class="verbatim">arch</code>, <code class="verbatim">email</code>, <code class="verbatim">'</code>, <code class="verbatim">tex</code> other than <code class="verbatim">t</code> or <code class="verbatim">nil</code>, and <code class="verbatim">d</code> with a list of drawers. ODT export is always the whole document: the export dialog's <strong>Body only</strong> doesn't apply.</p> | ||
| 302 | <h2 id="ascii-export">ASCII export</h2> | ||
| 303 | <p>Export to Plain Text (ASCII) writes the <code class="verbatim">.txt</code> file that Emacs's <code class="verbatim">org-ascii-export-to-ascii</code> writes under <code class="verbatim">emacs -Q</code> (Org 9.8.7), without Emacs, on the Mac and iOS: a centered title block, a table of contents, numbered headings underlined by level, paragraphs filled to 72 columns, links listed at the end of their section, and footnotes at the end. It uses Org's default <code class="verbatim">ascii</code> charset (<code class="verbatim">org-ascii-charset</code>), so bullets, rules and table borders are plain ASCII characters. Without <code class="verbatim">#+AUTHOR:</code>, the author on the Mac is your account's full name, as <code class="verbatim">user-full-name</code> is in Emacs.</p> | ||
| 304 | <p><code class="verbatim">#+TITLE</code>, <code class="verbatim">#+SUBTITLE</code>, <code class="verbatim">#+AUTHOR</code>, <code class="verbatim">#+DATE</code>, <code class="verbatim">#+LANGUAGE</code>, <code class="verbatim">#+TOC: headlines</code>, <code class="verbatim">#+ASCII:</code> lines, <code class="verbatim">#+BEGIN_EXPORT ascii</code> blocks, <code class="verbatim">@@ascii:...@@</code> snippets, <code class="verbatim">#+ATTR_ASCII: :width</code> on horizontal rules, and the <code class="verbatim">center</code>, <code class="verbatim">justifyleft</code> and <code class="verbatim">justifyright</code> blocks work as in Emacs, as do the tags and <code class="verbatim">COMMENT</code> that leave headings out (see <em>Which headings are exported</em>). Body-only and subtree export are in the export dialog. In a subtree export, the heading's <code class="verbatim">EXPORT_TITLE</code>, <code class="verbatim">EXPORT_SUBTITLE</code>, <code class="verbatim">EXPORT_AUTHOR</code>, <code class="verbatim">EXPORT_DATE</code>, <code class="verbatim">EXPORT_LANGUAGE</code>, <code class="verbatim">EXPORT_OPTIONS</code>, <code class="verbatim">EXPORT_SELECT_TAGS</code> and <code class="verbatim">EXPORT_EXCLUDE_TAGS</code> properties replace the file's keywords. Leading tabs in a source block become spaces, as in Emacs.</p> | ||
| 305 | <p>A file with something this export doesn't handle stops with "Can't export to plain text: " and what it was, rather than giving a <code class="verbatim">.txt</code> that differs from Emacs's: citations and <code class="verbatim">#+BIBLIOGRAPHY</code>, radio targets, inline tasks, table.el tables, diary sexps, inline source blocks and calls, <code class="verbatim">#+CALL</code>, source blocks exported with their results, <code class="verbatim">#+RESULTS</code> without a source block, wide or combining characters (such as CJK text, emoji and combining accents), also in the <code class="verbatim">#+LANGUAGE</code> words for captions, for section references in footnotes, and for a link's note when they take a line past the text width, tabs outside source and example blocks or in the indentation of an indented source block, footnote definitions of several paragraphs, footnotes in headings, keywords, captions or other footnotes, <code class="verbatim">UNNUMBERED</code> and <code class="verbatim">ALT_TITLE</code>, tables with special columns or column groups, empty list items, alphabetical counters, affiliated keywords in list items, blocks whose first line is blank, headings inside blocks, numbered source blocks inside other blocks, verse blocks with more than text, links inside link descriptions, <code class="verbatim">doi</code>, <code class="verbatim">info</code>, <code class="verbatim">irc</code>, <code class="verbatim">attachment</code>, <code class="verbatim">docview</code>, <code class="verbatim">bbdb</code>, <code class="verbatim">bibtex</code>, <code class="verbatim">gnus</code>, <code class="verbatim">rmail</code>, <code class="verbatim">mhe</code>, <code class="verbatim">w3m</code> and <code class="verbatim">eww</code> links, plain links other than <code class="verbatim">http</code>, <code class="verbatim">https</code>, <code class="verbatim">mailto</code> and <code class="verbatim">file</code> in any case, links to <code class="verbatim"><<targets>></code> and named elements, short or repeated captions, unknown entities, a keyword such as <code class="verbatim">#+SUBTITLE</code> repeated with an empty value, <code class="verbatim">#+TOC:</code> other than <code class="verbatim">headlines</code> or with <code class="verbatim">local</code> or <code class="verbatim">:target</code>, and <code class="verbatim">#+OPTIONS</code> items other than <code class="verbatim">toc</code>, <code class="verbatim">num</code>, <code class="verbatim">H</code>, <code class="verbatim">tags</code>, <code class="verbatim">todo</code>, <code class="verbatim">pri</code>, <code class="verbatim">^</code>, <code class="verbatim">tex</code>, <code class="verbatim">title</code>, <code class="verbatim">author</code>, <code class="verbatim">date</code>, <code class="verbatim">-</code>, <code class="verbatim"><</code> and <code class="verbatim">timestamp</code> set to something other than Org's default. A link Emacs can't resolve stops the export in both, including a link to a heading the export leaves out, as does a described link to a heading with <code class="verbatim">#+LANGUAGE: sl</code>. On iOS the share sheet stops and the message shows at the bottom of the screen. Publishing to plain text stops with the file's name in the message. In the download version, when Emacs is installed, such a file is exported by Emacs instead (see <em>Exporting through Emacs</em>).</p> | ||
| 306 | <h2 id="markdown-export">Markdown export</h2> | ||
| 307 | <p>Markdown export writes GitHub-flavored Markdown:</p> | ||
| 308 | <ul> | ||
| 309 | <li><code class="verbatim">#+TITLE:</code> becomes a top <code class="verbatim">#</code> heading. Org headings are one level down: <code class="verbatim">*</code> is <code class="verbatim">##</code>. TODO keywords stay in the heading text, and tags are shown as inline code. Priority cookies are left out unless <code class="verbatim">#+OPTIONS</code> has <code class="verbatim">pri:t</code>.</li> | ||
| 310 | <li>Source blocks become fenced code blocks with the language; example blocks, =: = lines and table.el tables become fenced blocks without one.</li> | ||
| 311 | <li>Tables become pipe tables. A rule after the first row makes it the header; otherwise the header row is empty.</li> | ||
| 312 | <li>Checkboxes become task-list items (<code class="verbatim">- [x]</code>, <code class="verbatim">- [ ]</code>).</li> | ||
| 313 | <li>Footnotes become <code class="verbatim">[^1]</code> references with the notes at the end.</li> | ||
| 314 | <li>Quotes become <code class="verbatim">></code> blocks. Verse lines end with two spaces.</li> | ||
| 315 | <li>Images become <code class="verbatim"></code>. Links to <code class="verbatim">.org</code> files, with or without <code class="verbatim">file:</code>, point to the <code class="verbatim">.md</code> file of the same name; a search option after <code class="verbatim">::</code> is dropped.</li> | ||
| 316 | <li><code class="verbatim">#+begin_export</code> blocks for <code class="verbatim">markdown</code>, <code class="verbatim">md</code> or <code class="verbatim">html</code>, and <code class="verbatim">@@html:…@@</code> snippets, are copied as they are.</li> | ||
| 317 | <li>Underline, subscripts and superscripts are written as HTML tags.</li> | ||
| 318 | <li><code class="verbatim">:exports</code> is handled as in HTML export.</li> | ||
| 319 | <li>Citations are handled as in HTML export.</li> | ||
| 320 | </ul> | ||
| 321 | <p>As in HTML export, <code class="verbatim">#+INCLUDE:</code> lines are expanded and macros replaced first, and <code class="verbatim">#+EXCLUDE_TAGS</code>, <code class="verbatim">#+SELECT_TAGS</code>, <code class="verbatim">COMMENT</code> headings and <code class="verbatim">ARCHIVE</code> tags decide which headings are exported (see <em>Which headings are exported</em>). Of the <code class="verbatim">#+OPTIONS</code>, Markdown export reads <code class="verbatim">todo</code>, <code class="verbatim">pri</code>, <code class="verbatim">tags</code>, <code class="verbatim">^</code> and <code class="verbatim">title</code>; the others do not apply. It writes no author or date.</p> | ||
| 322 | <h2 id="icalendar-export">iCalendar export</h2> | ||
| 323 | <p>iCalendar export writes the <code class="verbatim">.ics</code> file <code class="verbatim">org-icalendar-export-to-ics</code> writes, for calendar apps to read or subscribe to. Each heading can give:</p> | ||
| 324 | <ul> | ||
| 325 | <li>a <code class="verbatim">VEVENT</code> for its <code class="verbatim">DEADLINE</code> and one for its <code class="verbatim">SCHEDULED</code> date, as <code class="verbatim">org-icalendar-use-deadline</code> and <code class="verbatim">org-icalendar-use-scheduled</code> say. Their summaries start with =DL: = and =S: =;</li> | ||
| 326 | <li>a <code class="verbatim">VEVENT</code> for each other timestamp in its title and text, active ones only unless <code class="verbatim">#+OPTIONS</code> has <code class="verbatim"><:t</code> or <code class="verbatim"><:inactive</code>;</li> | ||
| 327 | <li>a <code class="verbatim">VTODO</code> for a task, as <code class="verbatim">org-icalendar-include-todo</code> says. Its <code class="verbatim">DTSTART</code> is the scheduled date (with <code class="verbatim">todo-start</code> in <code class="verbatim">org-icalendar-use-scheduled</code>), its <code class="verbatim">DUE</code> the deadline (with <code class="verbatim">todo-due</code> in <code class="verbatim">org-icalendar-use-deadline</code>); without a scheduled date, a deadline with a <code class="verbatim">+</code> repeater starts its warning period before it. <code class="verbatim">STATUS</code> is <code class="verbatim">NEEDS-ACTION</code> or <code class="verbatim">COMPLETED</code>, and <code class="verbatim">PRIORITY</code> maps <code class="verbatim">A</code> to 1, <code class="verbatim">B</code> to 5 and <code class="verbatim">C</code> to 9.</li> | ||
| 328 | </ul> | ||
| 329 | <table> | ||
| 330 | <thead> | ||
| 331 | <tr><th>Setting</th><th>Values</th><th>Default</th></tr> | ||
| 332 | </thead> | ||
| 333 | <tbody> | ||
| 334 | <tr><td><code class="verbatim">org-icalendar-use-deadline</code></td><td><code class="verbatim">event-if-not-todo</code>, <code class="verbatim">event-if-todo</code>, <code class="verbatim">event-if-todo-not-done</code>, <code class="verbatim">todo-due</code>, separated by spaces</td><td><code class="verbatim">"event-if-not-todo todo-due"</code></td></tr> | ||
| 335 | <tr><td><code class="verbatim">org-icalendar-use-scheduled</code></td><td>the same, with <code class="verbatim">todo-start</code> for <code class="verbatim">todo-due</code></td><td><code class="verbatim">"todo-start"</code></td></tr> | ||
| 336 | <tr><td><code class="verbatim">org-icalendar-include-todo</code></td><td><code class="verbatim">nil</code>, <code class="verbatim">t</code> (tasks not done), <code class="verbatim">all</code>, <code class="verbatim">unblocked</code> (not done, without unfinished children, and not after an unfinished sibling under an <code class="verbatim">ORDERED</code> parent), or TODO keywords separated by spaces</td><td><code class="verbatim">"nil"</code></td></tr> | ||
| 337 | <tr><td><code class="verbatim">org-icalendar-combined-agenda-file</code></td><td>the file Combine Agenda Files into iCalendar writes</td><td><code class="verbatim">"~/org.ics"</code></td></tr> | ||
| 338 | </tbody> | ||
| 339 | </table> | ||
| 340 | <p>The summary is the heading's title, or its <code class="verbatim">SUMMARY</code> property. The description is the heading's text as Org's ASCII export writes it, filled to 70 columns, or its <code class="verbatim">DESCRIPTION</code> property; <code class="verbatim">LOCATION</code>, <code class="verbatim">CLASS</code>, <code class="verbatim">TIMEZONE</code> and <code class="verbatim">APPT_WARNTIME</code> (an alarm, minutes before a timed event) are read too. <code class="verbatim">CATEGORIES</code> lists the heading's tags and its category. An <code class="verbatim">ID</code> property is the <code class="verbatim">UID</code>; a heading without one gets a new random <code class="verbatim">UID</code> each time, as in Org with <code class="verbatim">org-icalendar-store-UID</code> nil. Repeaters become <code class="verbatim">RRULE</code> lines. Times are local times without a zone, as Org writes them by default; a <code class="verbatim">TIMEZONE</code> property of <code class="verbatim">UTC</code> writes them in UTC, and any other value names the zone (<code class="verbatim">TZID</code>).</p> | ||
| 341 | <p><code class="verbatim">#+ICALENDAR_EXCLUDE_TAGS:</code> lists tags whose subtrees are left out; <code class="verbatim">#+EXCLUDE_TAGS:</code> doesn't apply, so <code class="verbatim">noexport</code> subtrees are exported unless listed. <code class="verbatim">#+SELECT_TAGS</code>, <code class="verbatim">COMMENT</code> headings and <code class="verbatim">ARCHIVE</code> tags apply as in the other exports. <code class="verbatim">#+ICAL-TTL:</code> sets <code class="verbatim">X-PUBLISHED-TTL</code>, the refresh period, such as <code class="verbatim">PT1H</code>. The calendar is named after the file, its description is <code class="verbatim">#+TITLE:</code>, and its owner <code class="verbatim">#+AUTHOR:</code> or your full name. Lines longer than 75 characters are folded and lines end in CRLF, as RFC 5545 asks.</p> | ||
| 342 | <p>Export Agenda Files to iCalendar writes an <code class="verbatim">.ics</code> beside each agenda file (see <a href="07-agenda.html">The agenda</a>). Combine Agenda Files into iCalendar writes all their entries to one calendar named <code class="verbatim">OrgMode</code> at <code class="verbatim">org-icalendar-combined-agenda-file</code>. On iOS, the Export menu's iCalendar shares the current file's calendar, Export Agenda Files to iCalendar writes beside each agenda file as on the Mac, and Combine Agenda Files into iCalendar opens the share sheet with the combined calendar, named as <code class="verbatim">org-icalendar-combined-agenda-file</code> is; from Commands it opens in Quick Look, whose share button saves or sends it.</p> | ||
| 343 | <p>Differences from Org: diary sexps (<code class="verbatim">%%(…)</code> lines and <code class="verbatim"><%%(…)></code> timestamps) are left out, as they need Emacs's <code class="verbatim">icalendar.el</code>. The other <code class="verbatim">org-icalendar-*</code> variables keep Org's defaults: alarms only from <code class="verbatim">APPT_WARNTIME</code>, categories <code class="verbatim">(local-tags category)</code>, the whole body as the description, and local times. Descriptions of tables with column groups or alignment cookies, center blocks and links to targets can differ from Org's in layout.</p> | ||
| 344 | <h2 id="publishing">Publishing</h2> | ||
| 345 | <p>Publishing (<code class="verbatim">org-publish</code>) exports a folder of Org files to a folder of HTML, Markdown, LaTeX, ODT or plain text files, copies other files beside them, and can write a sitemap. Projects are <code class="verbatim">[[publish]]</code> tables in <code class="verbatim">config.toml</code>, as <code class="verbatim">org-publish-project-alist</code> entries are in Emacs:</p> | ||
| 346 | <pre><code class="language-toml highlight"><span class="source toml"><span class="punctuation definition table array toml">[[</span><span class="entity name section toml">publish</span><span class="punctuation definition table array toml">]]</span> | ||
| 347 | <span class="variable other key toml">name</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>notes<span class="punctuation definition string end toml">"</span></span> | ||
| 348 | <span class="variable other key toml">base-directory</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>~/notes<span class="punctuation definition string end toml">"</span></span> | ||
| 349 | <span class="variable other key toml">publishing-directory</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>~/public_html<span class="punctuation definition string end toml">"</span></span> | ||
| 350 | <span class="variable other key toml">recursive</span> <span class="keyword operator assignment toml">=</span> <span class="constant language toml">true</span> | ||
| 351 | <span class="variable other key toml">auto-sitemap</span> <span class="keyword operator assignment toml">=</span> <span class="constant language toml">true</span> | ||
| 352 | <span class="variable other key toml">sitemap-title</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>Notes<span class="punctuation definition string end toml">"</span></span> | ||
| 353 | |||
| 354 | <span class="punctuation definition table array toml">[[</span><span class="entity name section toml">publish</span><span class="punctuation definition table array toml">]]</span> | ||
| 355 | <span class="variable other key toml">name</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>static<span class="punctuation definition string end toml">"</span></span> | ||
| 356 | <span class="variable other key toml">base-directory</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>~/notes<span class="punctuation definition string end toml">"</span></span> | ||
| 357 | <span class="variable other key toml">base-extension</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>css<span class="constant character escape toml">\\</span>|png<span class="constant character escape toml">\\</span>|jpg<span class="punctuation definition string end toml">"</span></span> | ||
| 358 | <span class="variable other key toml">recursive</span> <span class="keyword operator assignment toml">=</span> <span class="constant language toml">true</span> | ||
| 359 | <span class="variable other key toml">publishing-directory</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>~/public_html<span class="punctuation definition string end toml">"</span></span> | ||
| 360 | <span class="variable other key toml">publishing-function</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>org-publish-attachment<span class="punctuation definition string end toml">"</span></span> | ||
| 361 | |||
| 362 | <span class="punctuation definition table array toml">[[</span><span class="entity name section toml">publish</span><span class="punctuation definition table array toml">]]</span> | ||
| 363 | <span class="variable other key toml">name</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>site<span class="punctuation definition string end toml">"</span></span> | ||
| 364 | <span class="variable other key toml">components</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>notes static<span class="punctuation definition string end toml">"</span></span></span></code></pre> | ||
| 365 | <table> | ||
| 366 | <thead> | ||
| 367 | <tr><th>Key</th><th>Value</th><th>Default</th></tr> | ||
| 368 | </thead> | ||
| 369 | <tbody> | ||
| 370 | <tr><td><code class="verbatim">name</code></td><td>The project's name</td><td>required</td></tr> | ||
| 371 | <tr><td><code class="verbatim">base-directory</code></td><td>The folder of files to publish: absolute, <code class="verbatim">~/…</code>, or relative to the first folder in the sidebar</td><td>required</td></tr> | ||
| 372 | <tr><td><code class="verbatim">publishing-directory</code></td><td>Where the published files go, the same way</td><td>required</td></tr> | ||
| 373 | <tr><td><code class="verbatim">base-extension</code></td><td>The extension of the files to publish, an Emacs regexp such as ="css\\</td><td>png"<code class="verbatim">, or =any</code></td><td><code class="verbatim">"org"</code></td></tr> | ||
| 374 | <tr><td><code class="verbatim">recursive</code></td><td>Files in subfolders too</td><td><code class="verbatim">false</code></td></tr> | ||
| 375 | <tr><td><code class="verbatim">exclude</code></td><td>An Emacs regexp on the file's path under <code class="verbatim">base-directory</code>; matching files are left out</td><td></td></tr> | ||
| 376 | <tr><td><code class="verbatim">include</code></td><td>More files, relative to <code class="verbatim">base-directory</code>, separated by spaces</td><td></td></tr> | ||
| 377 | <tr><td><code class="verbatim">publishing-function</code></td><td><code class="verbatim">org-html-publish-to-html</code>, <code class="verbatim">org-md-publish-to-md</code>, <code class="verbatim">org-latex-publish-to-latex</code>, <code class="verbatim">org-odt-publish-to-odt</code>, <code class="verbatim">org-ascii-publish-to-ascii</code> or <code class="verbatim">org-publish-attachment</code> (copied as they are), several separated by spaces</td><td><code class="verbatim">org-html-publish-to-html</code></td></tr> | ||
| 378 | <tr><td><code class="verbatim">body-only</code></td><td>The export's body only</td><td><code class="verbatim">false</code></td></tr> | ||
| 379 | <tr><td><code class="verbatim">auto-sitemap</code></td><td>Write a sitemap into <code class="verbatim">base-directory</code> and publish it with the rest</td><td><code class="verbatim">false</code></td></tr> | ||
| 380 | <tr><td><code class="verbatim">sitemap-filename</code></td><td>The sitemap's name</td><td><code class="verbatim">"sitemap.org"</code></td></tr> | ||
| 381 | <tr><td><code class="verbatim">sitemap-title</code></td><td>Its <code class="verbatim">#+TITLE</code></td><td><code class="verbatim">"Sitemap for project NAME"</code></td></tr> | ||
| 382 | <tr><td><code class="verbatim">sitemap-style</code></td><td><code class="verbatim">tree</code> (folders nest) or <code class="verbatim">list</code></td><td><code class="verbatim">"tree"</code></td></tr> | ||
| 383 | <tr><td><code class="verbatim">sitemap-sort-files</code></td><td><code class="verbatim">alphabetically</code> (by title), <code class="verbatim">chronologically</code> or <code class="verbatim">anti-chronologically</code> (by <code class="verbatim">#+DATE</code>, else the file's date), or <code class="verbatim">nil</code></td><td><code class="verbatim">"alphabetically"</code></td></tr> | ||
| 384 | <tr><td><code class="verbatim">sitemap-sort-folders</code></td><td>In a <code class="verbatim">list</code> sitemap: <code class="verbatim">ignore</code> (no folders), <code class="verbatim">first</code>, <code class="verbatim">last</code> or <code class="verbatim">nil</code> (mixed)</td><td><code class="verbatim">"ignore"</code></td></tr> | ||
| 385 | <tr><td><code class="verbatim">sitemap-ignore-case</code></td><td>Sort titles ignoring case</td><td><code class="verbatim">false</code></td></tr> | ||
| 386 | <tr><td><code class="verbatim">components</code></td><td>For a project of projects: the projects' names, separated by spaces</td><td></td></tr> | ||
| 387 | </tbody> | ||
| 388 | </table> | ||
| 389 | <p>Files whose names start with a dot are left out. An Org file publishes to the same path under <code class="verbatim">publishing-directory</code>, named by <code class="verbatim">#+EXPORT_FILE_NAME</code> when it has one, with links to other <code class="verbatim">.org</code> files pointing to their <code class="verbatim">.html</code>. The sitemap lists each file as a link with its <code class="verbatim">#+TITLE</code> (or its name), as Org's default sitemap does.</p> | ||
| 390 | <p>On the Mac, File ▸ Publish has the commands, which are also in the command palette. On iOS they are in Commands in the editor; Publish Project… lists the projects to choose from. As with the iOS share sheet, LaTeX, ODT and plain text published on iOS have no author unless the file has <code class="verbatim">#+AUTHOR:</code>.</p> | ||
| 391 | <table> | ||
| 392 | <thead> | ||
| 393 | <tr><th>Command</th><th>Emacs preset</th><th>What it does</th></tr> | ||
| 394 | </thead> | ||
| 395 | <tbody> | ||
| 396 | <tr><td>Publish Project…</td><td><code class="verbatim">C-c C-e P x</code></td><td>Asks for a project and publishes it (<code class="verbatim">org-publish</code>)</td></tr> | ||
| 397 | <tr><td>Publish All Projects</td><td><code class="verbatim">C-c C-e P a</code></td><td><code class="verbatim">org-publish-all</code></td></tr> | ||
| 398 | <tr><td>Publish Current File</td><td><code class="verbatim">C-c C-e P f</code></td><td>The current file, in the first project that has it (<code class="verbatim">org-publish-current-file</code>)</td></tr> | ||
| 399 | <tr><td>Publish Current Project</td><td><code class="verbatim">C-c C-e P p</code></td><td>The first project that has the current file (<code class="verbatim">org-publish-current-project</code>)</td></tr> | ||
| 400 | </tbody> | ||
| 401 | </table> | ||
| 402 | <p>A file whose published copy is newer than it is skipped, as Org skips files that haven't changed; delete the copy to publish it again. The message area says how many files were published and how many were up to date. Differences from Org: preparation and completion functions, <code class="verbatim">:makeindex</code>, custom sitemap functions and the export options a project can set (<code class="verbatim">:with-toc</code>, <code class="verbatim">:html-head</code> and the rest) aren't read; set those with <code class="verbatim">#+OPTIONS</code> and the other keywords in the files, or a <code class="verbatim">#+SETUPFILE</code>.</p> | ||
| 403 | <p>On iOS, orgstar can write only inside the folders you added. A relative <code class="verbatim">base-directory</code> or <code class="verbatim">publishing-directory</code> is read from the first folder. For a project whose <code class="verbatim">publishing-directory</code> is outside your folders, orgstar asks for a folder the first time it publishes the project ("Choose the folder <em>name</em> publishes to"), and publishes there from then on. A project whose <code class="verbatim">base-directory</code> can't be read stops with "Can't read <em>name</em>'s base-directory".</p> | ||
| 404 | <h2 id="exporting-through-emacs">Exporting through Emacs</h2> | ||
| 405 | <p>On the Mac, PDF through LaTeX is done by Emacs, with <code class="verbatim">org-latex-export-to-pdf</code>, the function Emacs's dispatcher uses.</p> | ||
| 406 | <p>LaTeX and plain text go to Emacs (<code class="verbatim">org-latex-export-to-latex</code>, <code class="verbatim">org-ascii-export-to-ascii</code>) only for a file orgstar's own export can't write as Emacs would; see <em>LaTeX export</em> and <em>ASCII export</em>. The <a href="../install.html">Mac App Store version</a> doesn't run Emacs and has none of these exports.</p> | ||
| 407 | <p>orgstar runs <code class="verbatim">emacs -Q --batch</code> in the Org file's folder. It opens the file, replaces its contents with the editor's current text without saving, and calls the function. Emacs writes the result beside the file, as it would itself; with a destination chosen in the export dialog, orgstar then moves it there. The message area shows "Exporting with Emacs…" and then "Exported to <em>name</em>".</p> | ||
| 408 | <p>What you need:</p> | ||
| 409 | <ul> | ||
| 410 | <li>Emacs, at <code class="verbatim">ORGSTAR_EMACS</code> or one of <code class="verbatim">/opt/homebrew/bin/emacs</code>, <code class="verbatim">/usr/local/bin/emacs</code>, <code class="verbatim">/Applications/Emacs.app/Contents/MacOS/Emacs</code>, <code class="verbatim">/run/current-system/sw/bin/emacs</code> or <code class="verbatim">/usr/bin/emacs</code>. Without it the export fails with "Emacs isn't installed, so this format can't be exported."</li> | ||
| 411 | <li>For PDF, a TeX installation that Emacs's LaTeX export can run. Emacs runs with your <code class="verbatim">PATH</code> plus <code class="verbatim">/opt/homebrew/bin</code>, <code class="verbatim">/usr/local/bin</code>, <code class="verbatim">/Library/TeX/texbin</code>, <code class="verbatim">/usr/bin</code> and <code class="verbatim">/bin</code>, the same as code blocks get, so <code class="verbatim">latexmk</code> and <code class="verbatim">pdflatex</code> from MacTeX or Homebrew are found when orgstar was opened from the Dock.</li> | ||
| 412 | </ul> | ||
| 413 | <p>Things to know:</p> | ||
| 414 | <ul> | ||
| 415 | <li><code class="verbatim">-Q</code> means Emacs does not load your init file. Your LaTeX classes, export settings and packages from it are not used; the export uses Org's defaults and what the file itself sets.</li> | ||
| 416 | <li>File-local variables are applied only when Emacs considers them safe.</li> | ||
| 417 | <li><code class="verbatim">org-export-use-babel</code> is off, so no source blocks run.</li> | ||
| 418 | <li>An export that takes more than two minutes is stopped with "Emacs took too long to export."</li> | ||
| 419 | <li>Edit ▸ Cancel Running Task (<code class="verbatim">⌘.</code>) stops the export and shows "Export canceled". Starting another export or table recalculation in Emacs cancels the one that is running.</li> | ||
| 420 | <li>If Emacs fails, the message area shows the last line of its error output.</li> | ||
| 421 | </ul> | ||
| 422 | <p>To use your own Emacs configuration, or formats orgstar does not list, export from Emacs itself; see <a href="15-alongside-emacs.html">Alongside Emacs</a>.</p> | ||
| 423 | <h2 id="citations">Citations</h2> | ||
| 424 | <p>HTML and Markdown export process citations as Org's <code class="verbatim">basic</code> citation processor does (<code class="verbatim">oc-basic</code>).</p> | ||
| 425 | <pre><code class="language-org highlight"><span class="text org"><span class="keyword other keyword org">#+bibliography:</span><span class="string unquoted org"> refs.bib</span> | ||
| 426 | <span class="keyword other keyword org">#+cite_export:</span><span class="string unquoted org"> basic author-year</span> | ||
| 427 | |||
| 428 | As shown in [cite:@smith2020], and again [cite/t:@smith2020; see @lee2019 p. 4]. | ||
| 429 | |||
| 430 | <span class="keyword other keyword org">#+print_bibliography:</span></span></code></pre> | ||
| 431 | <h3 id="bibliography-files">Bibliography files</h3> | ||
| 432 | <p>Each <code class="verbatim">#+bibliography:</code> line names one file, relative to the Org file, optionally in quotes. A file ending in <code class="verbatim">.json</code> is read as CSL-JSON; anything else is read as BibTeX, with <code class="verbatim">@string</code> abbreviations expanded and <code class="verbatim">@comment</code> and <code class="verbatim">@preamble</code> skipped. You can have several <code class="verbatim">#+bibliography:</code> lines; for a key in more than one file, the first file wins.</p> | ||
| 433 | <h3 id="cite-export"><code class="verbatim">#+cite_export:</code></h3> | ||
| 434 | <p><code class="verbatim">#+cite_export: PROCESSOR [BIBLIOGRAPHY-STYLE [CITATION-STYLE]]</code>.</p> | ||
| 435 | <ul> | ||
| 436 | <li>With no <code class="verbatim">#+cite_export:</code>, or with <code class="verbatim">basic</code>, citations are processed.</li> | ||
| 437 | <li>With any other processor, such as <code class="verbatim">csl</code> or <code class="verbatim">biblatex</code>, orgstar leaves citations as they are written.</li> | ||
| 438 | <li>The citation style, which may include a variant (<code class="verbatim">text/bare</code>), is the default for citations that do not name one.</li> | ||
| 439 | </ul> | ||
| 440 | <h3 id="citation-styles">Citation styles</h3> | ||
| 441 | <p>A citation is <code class="verbatim">[cite:…]</code> or <code class="verbatim">[cite/style:…]</code> or <code class="verbatim">[cite/style/variant:…]</code>, holding one or more <code class="verbatim">@key</code> references separated by <code class="verbatim">;</code>. Each reference may have its own prefix and suffix, and the whole citation a common prefix and suffix.</p> | ||
| 442 | <table> | ||
| 443 | <thead> | ||
| 444 | <tr><th>Style</th><th>Output</th></tr> | ||
| 445 | </thead> | ||
| 446 | <tbody> | ||
| 447 | <tr><td>default (none given)</td><td><code class="verbatim">(Author, Year)</code></td></tr> | ||
| 448 | <tr><td><code class="verbatim">author</code>, <code class="verbatim">a</code></td><td><code class="verbatim">Author</code></td></tr> | ||
| 449 | <tr><td><code class="verbatim">noauthor</code>, <code class="verbatim">na</code></td><td><code class="verbatim">(Year)</code></td></tr> | ||
| 450 | <tr><td><code class="verbatim">text</code>, <code class="verbatim">t</code></td><td><code class="verbatim">Author (Year)</code></td></tr> | ||
| 451 | <tr><td><code class="verbatim">note</code>, <code class="verbatim">ft</code></td><td>A footnote holding the <code class="verbatim">text</code> form</td></tr> | ||
| 452 | <tr><td><code class="verbatim">numeric</code>, <code class="verbatim">nb</code></td><td><code class="verbatim">(1)</code>, numbered by the cited works sorted by author; three or more in a row as <code class="verbatim">1-3</code></td></tr> | ||
| 453 | <tr><td><code class="verbatim">nocite</code>, <code class="verbatim">n</code></td><td>Nothing; the work is still listed in the bibliography</td></tr> | ||
| 454 | </tbody> | ||
| 455 | </table> | ||
| 456 | <table> | ||
| 457 | <thead> | ||
| 458 | <tr><th>Variant</th><th>Effect</th></tr> | ||
| 459 | </thead> | ||
| 460 | <tbody> | ||
| 461 | <tr><td><code class="verbatim">bare</code>, <code class="verbatim">b</code></td><td>No parentheses</td></tr> | ||
| 462 | <tr><td><code class="verbatim">caps</code>, <code class="verbatim">c</code></td><td>Capitalized author</td></tr> | ||
| 463 | <tr><td><code class="verbatim">bare-caps</code>, <code class="verbatim">bc</code></td><td>Both</td></tr> | ||
| 464 | </tbody> | ||
| 465 | </table> | ||
| 466 | <p>Works by the same author in the same year get <code class="verbatim">a</code>, <code class="verbatim">b</code>, … after the year. A key not found in any bibliography file shows as <code class="verbatim">??</code> and <code class="verbatim">????</code>. Citations in the title are dropped.</p> | ||
| 467 | <p>For <code class="verbatim">note</code> citations, the blank before the citation is removed and punctuation right after it moves in front of the footnote mark, as <code class="verbatim">org-cite-adjust-note</code> does.</p> | ||
| 468 | <h3 id="the-bibliography">The bibliography</h3> | ||
| 469 | <p><code class="verbatim">#+print_bibliography:</code> is replaced by an entry for every cited work, sorted by author. The bibliography style from <code class="verbatim">#+cite_export:</code> sets the form:</p> | ||
| 470 | <table> | ||
| 471 | <thead> | ||
| 472 | <tr><th>Bibliography style</th><th>Entry</th></tr> | ||
| 473 | </thead> | ||
| 474 | <tbody> | ||
| 475 | <tr><td>default</td><td><code class="verbatim">Author (Year). /Title/, Publisher.</code></td></tr> | ||
| 476 | <tr><td><code class="verbatim">plain</code></td><td><code class="verbatim">Surnames. Title, Publisher, Year.</code></td></tr> | ||
| 477 | <tr><td><code class="verbatim">numeric</code></td><td><code class="verbatim">[1] Author, /Title/, Publisher, Year.</code></td></tr> | ||
| 478 | </tbody> | ||
| 479 | </table> | ||
| 480 | <p>The publisher part comes from the <code class="verbatim">publisher</code>, <code class="verbatim">journal</code>, <code class="verbatim">institution</code> or <code class="verbatim">school</code> field. Without <code class="verbatim">#+print_bibliography:</code> no bibliography is written.</p> | ||
| 481 | <h2 id="what-export-does-not-do">What export does not do</h2> | ||
| 482 | <ul> | ||
| 483 | <li>Subtree and body-only export are in the export dialog only; the single-format commands export the whole file. There is no asynchronous export.</li> | ||
| 484 | <li>Source blocks are not run, and noweb references are not expanded.</li> | ||
| 485 | <li>Export settings in the dialog are not per file.</li> | ||
| 486 | </ul> | ||
| 487 | </main> | ||
| 488 | <footer class="site"> | ||
| 489 | © 2026 Christian Cleberg · <a href="https://krz.sh/apps/orgstar/">krz.sh/apps/orgstar</a> · <a href="/orgstar/third-party.html">third-party notices</a> | ||
| 490 | </footer> | ||
| 491 | </body> | ||
| 492 | </html>\ No newline at end of file | ||
guide/13-configuration.html added +866
| @@ -0,0 +1,866 @@ | |||
| 1 | <!DOCTYPE html> | ||
| 2 | <html lang="en"> | ||
| 3 | <head> | ||
| 4 | <meta charset="utf-8"> | ||
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
| 6 | <title>Configuration · orgstar</title> | ||
| 7 | <meta name="description" content="The Settings window, the files in ~/.config/orgstar, in-file settings, importing from Emacs, themes and fonts."> | ||
| 8 | <link rel="icon" href="../favicon.svg" type="image/svg+xml"> | ||
| 9 | <link rel="stylesheet" href="../theme.css"> | ||
| 10 | <link rel="stylesheet" href="../syntax.css"> | ||
| 11 | <link rel="stylesheet" href="../style.css"> | ||
| 12 | </head> | ||
| 13 | <body> | ||
| 14 | <header class="site"> | ||
| 15 | <a class="site-title" href="../index.html">orgstar</a> | ||
| 16 | <nav> | ||
| 17 | <a href="../install.html">Install</a> | ||
| 18 | <a href="../quickstart.html">Quick start</a> | ||
| 19 | <a href="index.html">Manual</a> | ||
| 20 | </nav> | ||
| 21 | </header> | ||
| 22 | <main> | ||
| 23 | <h1>Configuration</h1> | ||
| 24 | <p class="lede">Every setting lives in a text file you can edit, and most of them also appear in the Settings window.</p> | ||
| 25 | <nav class="toc" aria-label="On this page"> | ||
| 26 | <h2>On this page</h2> | ||
| 27 | <ul> | ||
| 28 | <li><a href="#where-settings-live">Where settings live</a> | ||
| 29 | <ul> | ||
| 30 | <li><a href="#opening-config-toml">Opening config.toml</a></li> | ||
| 31 | <li><a href="#problems-in-the-files">Problems in the files</a></li> | ||
| 32 | </ul></li> | ||
| 33 | <li><a href="#the-settings-window">The Settings window</a> | ||
| 34 | <ul> | ||
| 35 | <li><a href="#general">General</a></li> | ||
| 36 | <li><a href="#editing">Editing</a></li> | ||
| 37 | <li><a href="#language">Language</a></li> | ||
| 38 | </ul></li> | ||
| 39 | <li><a href="#appearance">Appearance</a> | ||
| 40 | <ul> | ||
| 41 | <li><a href="#agenda">Agenda</a></li> | ||
| 42 | <li><a href="#capture">Capture</a></li> | ||
| 43 | <li><a href="#settings-only-in-config-toml">Settings only in config.toml</a></li> | ||
| 44 | </ul></li> | ||
| 45 | <li><a href="#config-toml-reference">config.toml reference</a> | ||
| 46 | <ul> | ||
| 47 | <li><a href="#top-level">Top level</a></li> | ||
| 48 | <li><a href="#org-agenda-prefix-format">[org-agenda-prefix-format]</a></li> | ||
| 49 | <li><a href="#org-agenda-sorting-strategy">[org-agenda-sorting-strategy]</a></li> | ||
| 50 | <li><a href="#org-stuck-projects">[org-stuck-projects]</a></li> | ||
| 51 | <li><a href="#org-agenda-time-grid">[org-agenda-time-grid]</a></li> | ||
| 52 | <li><a href="#org-structure-template-alist">[org-structure-template-alist]</a></li> | ||
| 53 | <li><a href="#denote-templates">[denote-templates]</a></li> | ||
| 54 | <li><a href="#"></a></li> | ||
| 55 | <li><a href="#theme">[theme]</a></li> | ||
| 56 | <li><a href="#orgstar">[orgstar]</a></li> | ||
| 57 | <li><a href="#an-example">An example</a></li> | ||
| 58 | <li><a href="#names-from-earlier-versions">Names from earlier versions</a></li> | ||
| 59 | </ul></li> | ||
| 60 | <li><a href="#keymap-toml-and-capture-toml">keymap.toml and capture.toml</a></li> | ||
| 61 | <li><a href="#in-file-settings">In-file settings</a> | ||
| 62 | <ul> | ||
| 63 | <li><a href="#keywords-orgstar-reads">Keywords orgstar reads</a></li> | ||
| 64 | <li><a href="#startup-options">#+STARTUP options</a></li> | ||
| 65 | <li><a href="#setup-files">Setup files</a></li> | ||
| 66 | </ul></li> | ||
| 67 | <li><a href="#import-from-emacs">Import from Emacs</a> | ||
| 68 | <ul> | ||
| 69 | <li><a href="#running-it">Running it</a></li> | ||
| 70 | <li><a href="#doom-emacs">Doom Emacs</a></li> | ||
| 71 | <li><a href="#what-it-reads">What it reads</a></li> | ||
| 72 | <li><a href="#how-variables-map">How variables map</a></li> | ||
| 73 | <li><a href="#limits-of-the-lisp-reader">Limits of the Lisp reader</a></li> | ||
| 74 | </ul></li> | ||
| 75 | <li><a href="#themes">Themes</a> | ||
| 76 | <ul> | ||
| 77 | <li><a href="#theme-files">Theme files</a></li> | ||
| 78 | <li><a href="#color-keys">Color keys</a></li> | ||
| 79 | </ul></li> | ||
| 80 | <li><a href="#appearance">Appearance</a></li> | ||
| 81 | <li><a href="#fonts">Fonts</a></li> | ||
| 82 | </ul> | ||
| 83 | </nav> | ||
| 84 | <h2 id="where-settings-live">Where settings live</h2> | ||
| 85 | <p>orgstar keeps its settings in a configuration folder:</p> | ||
| 86 | <ul> | ||
| 87 | <li><code class="verbatim">$XDG_CONFIG_HOME/orgstar</code> when <code class="verbatim">XDG_CONFIG_HOME</code> is set and not empty,</li> | ||
| 88 | <li>otherwise <code class="verbatim">~/.config/orgstar</code>.</li> | ||
| 89 | </ul> | ||
| 90 | <p>The environment variable <code class="verbatim">ORGSTAR_CONFIG_DIR</code> overrides both. If a file is missing from the configuration folder but exists in <code class="verbatim">~/Library/Application Support/Orgstar</code> (where earlier versions kept it), orgstar reads it from there, and reloads it when you edit it there.</p> | ||
| 91 | <p>The <a href="../install.html">Mac App Store version</a> keeps the configuration folder in its container, <code class="verbatim">~/Library/Containers/sh.krz.orgstar/Data/.config/orgstar</code>. Settings ▸ General ▸ Choose Configuration Folder… makes it use another folder, such as <code class="verbatim">~/.config/orgstar</code> shared with the download version or kept with your dotfiles; Use Default Folder goes back to the container.</p> | ||
| 92 | <p>The folder holds these files:</p> | ||
| 93 | <table> | ||
| 94 | <thead> | ||
| 95 | <tr><th>File</th><th>What it holds</th><th>Written by orgstar</th></tr> | ||
| 96 | </thead> | ||
| 97 | <tbody> | ||
| 98 | <tr><td><code class="verbatim">config.toml</code></td><td>Every setting of the Settings window, the theme, and publishing projects</td><td>Yes, when you change a setting</td></tr> | ||
| 99 | <tr><td><code class="verbatim">keymap.toml</code></td><td>Your key bindings, on top of the preset</td><td>Only by Import from Emacs</td></tr> | ||
| 100 | <tr><td><code class="verbatim">capture.toml</code></td><td>Capture templates</td><td>Only by Import from Emacs</td></tr> | ||
| 101 | <tr><td><code class="verbatim">views.toml</code></td><td>Saved agenda views</td><td>No</td></tr> | ||
| 102 | <tr><td><code class="verbatim">default-theme.toml</code></td><td>The default theme's colors, for reference</td><td>Yes, at every launch</td></tr> | ||
| 103 | </tbody> | ||
| 104 | </table> | ||
| 105 | <p><code class="verbatim">config.toml</code> is the source of truth. The Settings window writes each change into it, keeping your comments and the order of lines, and edits you make to the file apply while orgstar runs. If the file doesn't exist at launch, orgstar creates it with every setting at its current value and a comment after each one.</p> | ||
| 106 | <p>When you add the folder to a dotfiles repository, keep <code class="verbatim">default-theme.toml</code> out of it or ignore its changes: orgstar rewrites it whenever its contents differ from the built-in theme.</p> | ||
| 107 | <h3 id="opening-config-toml">Opening config.toml</h3> | ||
| 108 | <ul> | ||
| 109 | <li>orgstar ▸ Edit Config File (<code class="verbatim">⌥⌘,</code>) opens <code class="verbatim">config.toml</code> as a buffer in the main window. The command palette has the same command as Edit Config File.</li> | ||
| 110 | <li>Settings ▸ General has three buttons for the file: Edit in orgstar, Open with Default App, and Show in Finder.</li> | ||
| 111 | </ul> | ||
| 112 | <p>Saving the buffer applies the file, the same as saving it from another editor.</p> | ||
| 113 | <h3 id="problems-in-the-files">Problems in the files</h3> | ||
| 114 | <p>If <code class="verbatim">config.toml</code> has a line orgstar can't use, the problem shows in the message line under the editor, with a count when there are more. Each problem names the file and the key:</p> | ||
| 115 | <ul> | ||
| 116 | <li><code class="verbatim">config.toml: unknown setting editor.foo</code></li> | ||
| 117 | <li><code class="verbatim">config.toml: org-log-done must be one of nil, time, note</code></li> | ||
| 118 | <li><code class="verbatim">config.toml: org-agenda-start-day must look like "-3d" or "+0d"</code></li> | ||
| 119 | <li><code class="verbatim">config.toml: theme.light.background must be a color such as "#1f2328"</code></li> | ||
| 120 | </ul> | ||
| 121 | <p>A file that isn't valid TOML is reported with its parse error, and none of it applies. <code class="verbatim">keymap.toml</code>, <code class="verbatim">capture.toml</code> and <code class="verbatim">views.toml</code> report their problems the same way when they are read.</p> | ||
| 122 | <h2 id="the-settings-window">The Settings window</h2> | ||
| 123 | <p>Open it with orgstar ▸ Settings (<code class="verbatim">⌘,</code>). It has six panes. The last, orgstar+, has the plans and Restore Purchases in the Mac App Store version and the license key in the download version. Each control in the others writes the <code class="verbatim">config.toml</code> key named in the tables below; the config.toml reference below gives the type and the Emacs variable.</p> | ||
| 124 | <h3 id="general">General</h3> | ||
| 125 | <table> | ||
| 126 | <thead> | ||
| 127 | <tr><th>Control</th><th>Choices</th><th>Default</th><th>Key</th></tr> | ||
| 128 | </thead> | ||
| 129 | <tbody> | ||
| 130 | <tr><td>config.toml: Edit in orgstar</td><td>Opens the file in the main window</td><td></td><td></td></tr> | ||
| 131 | <tr><td>config.toml: Open with Default App</td><td>Opens the file in the app macOS uses for <code class="verbatim">.toml</code></td><td></td><td></td></tr> | ||
| 132 | <tr><td>config.toml: Show in Finder</td><td>Selects the file in Finder</td><td></td><td></td></tr> | ||
| 133 | <tr><td>Folder: Choose Configuration Folder…</td><td>Mac App Store version: reads and writes the configuration in a folder you choose</td><td></td><td></td></tr> | ||
| 134 | <tr><td>Folder: Use Default Folder</td><td>Mac App Store version: goes back to the folder in the app's container</td><td></td><td></td></tr> | ||
| 135 | <tr><td>Emacs: Import from Emacs…</td><td>Opens the import sheet; see Import from Emacs below</td><td></td><td></td></tr> | ||
| 136 | <tr><td>Check for updates automatically</td><td>Download version: once a day; orgstar ▸ Check for Updates… checks now</td><td>Asked on the second launch</td><td></td></tr> | ||
| 137 | <tr><td>Save files</td><td>Automatically, when typing stops; Only with File ▸ Save (<code class="verbatim">⌘S</code>)</td><td>Automatically</td><td><code class="verbatim">save</code></td></tr> | ||
| 138 | <tr><td>Keys</td><td>Emacs; Mac; Doom (Vim keys)</td><td>Emacs</td><td><code class="verbatim">keymap</code></td></tr> | ||
| 139 | <tr><td>Show hidden files and folders</td><td>On or off</td><td>On</td><td><code class="verbatim">show-hidden-files</code></td></tr> | ||
| 140 | <tr><td>Keep orgstar in the menu bar</td><td>On or off</td><td>Off</td><td><code class="verbatim">menu-bar-item</code></td></tr> | ||
| 141 | <tr><td>Option as Meta</td><td>Left Option; Right Option; Both; Neither</td><td>Left Option</td><td><code class="verbatim">option-as-meta</code></td></tr> | ||
| 142 | </tbody> | ||
| 143 | </table> | ||
| 144 | <p>Automatic saving writes a file one second after you stop typing. The keymap presets and <code class="verbatim">keymap.toml</code> are covered in <a href="03-keys.html">Keys and commands</a>.</p> | ||
| 145 | <h3 id="editing">Editing</h3> | ||
| 146 | <table> | ||
| 147 | <thead> | ||
| 148 | <tr><th>Control</th><th>Choices or range</th><th>Default</th><th>Key</th></tr> | ||
| 149 | </thead> | ||
| 150 | <tbody> | ||
| 151 | <tr><td>Tags</td><td>Aligned to end at column 77; One space after the title</td><td>Aligned (<code class="verbatim">-77</code>)</td><td><code class="verbatim">org-tags-column</code></td></tr> | ||
| 152 | <tr><td>M-RET adds the new heading after the subtree</td><td>On or off</td><td>Off</td><td><code class="verbatim">org-insert-heading-respect-content</code></td></tr> | ||
| 153 | <tr><td>M-RET splits the line at the caret</td><td>On or off</td><td>Off</td><td><code class="verbatim">org-M-RET-may-split-line</code></td></tr> | ||
| 154 | <tr><td>Lists can use letters (a. b. c.)</td><td>On or off</td><td>On</td><td><code class="verbatim">org-list-allow-alphabetical</code></td></tr> | ||
| 155 | <tr><td>M-q fills to column N</td><td>40 to 200</td><td>80</td><td><code class="verbatim">fill-column</code></td></tr> | ||
| 156 | <tr><td>Long lines run off the edge instead of wrapping (org-startup-truncated)</td><td>On or off</td><td>Off</td><td><code class="verbatim">org-startup-truncated</code></td></tr> | ||
| 157 | <tr><td>Emacs hides emphasis markers (org-hide-emphasis-markers)</td><td>On or off</td><td>On</td><td><code class="verbatim">org-hide-emphasis-markers</code></td></tr> | ||
| 158 | <tr><td>Emacs shows entities as characters (org-pretty-entities)</td><td>On or off</td><td>On</td><td><code class="verbatim">org-pretty-entities</code></td></tr> | ||
| 159 | <tr><td>Default TODO keywords</td><td>Text in <code class="verbatim">#+TODO</code> syntax, one sequence per line</td><td>See below</td><td><code class="verbatim">org-todo-keywords</code></td></tr> | ||
| 160 | <tr><td>Entries can't be done before their TODO children (org-enforce-todo-dependencies)</td><td>On or off</td><td>Off</td><td><code class="verbatim">org-enforce-todo-dependencies</code></td></tr> | ||
| 161 | <tr><td>Entries can't be done with unchecked boxes (org-enforce-todo-checkbox-dependencies)</td><td>On or off</td><td>Off</td><td><code class="verbatim">org-enforce-todo-checkbox-dependencies</code></td></tr> | ||
| 162 | <tr><td>When an entry is done (org-log-done)</td><td>Record nothing; Record the time, as CLOSED; Record the time and ask for a note</td><td>Record nothing</td><td><code class="verbatim">org-log-done</code></td></tr> | ||
| 163 | <tr><td>State notes go in a LOGBOOK drawer (org-log-into-drawer)</td><td>On or off</td><td>Off</td><td><code class="verbatim">org-log-into-drawer</code></td></tr> | ||
| 164 | <tr><td>Speed keys (org-use-speed-commands)</td><td>On or off</td><td>Off</td><td><code class="verbatim">org-use-speed-commands</code></td></tr> | ||
| 165 | <tr><td>Check spelling while typing (spell-check)</td><td>On or off</td><td>Off</td><td><code class="verbatim">spell-check</code></td></tr> | ||
| 166 | </tbody> | ||
| 167 | </table> | ||
| 168 | <p>The two "Emacs hides" and "Emacs shows" switches describe your Emacs, not orgstar's display. Tag alignment, table alignment and <code class="verbatim">M-q</code> measure text the way your Emacs displays it, so a file edited in both keeps the same layout. Set them to match your Emacs configuration. They also control whether orgstar hides markers and shows entities when markup is hidden.</p> | ||
| 169 | <p>The Tags picker offers two values. <code class="verbatim">config.toml</code> accepts any integer; with a value other than <code class="verbatim">-77</code> or <code class="verbatim">0</code> the picker shows no selection.</p> | ||
| 170 | <p>The long-lines switch applies to files as they open; View ▸ Truncate or Wrap Long Lines switches the file in front.</p> | ||
| 171 | <p>Default TODO keywords apply to files without a <code class="verbatim">#+TODO</code> line. orgstar reads them at launch, so a change takes effect after you quit and reopen orgstar.</p> | ||
| 172 | <p>The two dependency switches are described under Dependencies in <a href="05-todos-and-tags.html">TODOs and tags</a>.</p> | ||
| 173 | <p>The LOGBOOK switch writes <code class="verbatim">org-log-into-drawer</code> as <code class="verbatim">"LOGBOOK"</code> or <code class="verbatim">""</code>. A drawer name of your own in <code class="verbatim">config.toml</code> shows the switch on; turning it off and on again replaces the name with <code class="verbatim">LOGBOOK</code>. Logging is described under Logging in <a href="05-todos-and-tags.html">TODOs and tags</a>, speed keys in <a href="03-keys.html">Keys and commands</a> and spell checking in <a href="02-the-editor.html">The editor</a>.</p> | ||
| 174 | <h3 id="language">Language</h3> | ||
| 175 | <p>orgstar's menus, settings and agenda are in English, German, French, Japanese, Spanish and Brazilian Portuguese, and follow the language chosen in System Settings ▸ General ▸ Language & Region on the Mac and Settings ▸ General ▸ Language & Region on iOS (or the app's own language there). What orgstar writes into your files, such as clock tables, is in the language Org would use: a clock table's <code class="verbatim">:lang</code>, else <code class="verbatim">org-export-default-language</code>. Exports use the file's <code class="verbatim">#+LANGUAGE:</code>; see <a href="12-export.html">Export</a>.</p> | ||
| 176 | <h2 id="appearance">Appearance</h2> | ||
| 177 | <table> | ||
| 178 | <thead> | ||
| 179 | <tr><th>Control</th><th>Range</th><th>Default</th><th>Key</th></tr> | ||
| 180 | </thead> | ||
| 181 | <tbody> | ||
| 182 | <tr><td>Theme: Light</td><td>A built-in light theme</td><td>Default</td><td><code class="verbatim">light-theme</code></td></tr> | ||
| 183 | <tr><td>Theme: Dark</td><td>A built-in dark theme</td><td>Default</td><td><code class="verbatim">dark-theme</code></td></tr> | ||
| 184 | <tr><td>Theme: Copy to Config Folder</td><td>Writes <code class="verbatim">my-theme.toml</code> and makes it <code class="verbatim">theme-file</code></td><td></td><td></td></tr> | ||
| 185 | <tr><td>App Icon</td><td>One of 13 icons, shown in the Dock while orgstar runs</td><td>Default</td><td>(this Mac only)</td></tr> | ||
| 186 | <tr><td>Font</td><td>System monospaced, or any installed monospaced family</td><td>System monospaced</td><td><code class="verbatim">font</code></td></tr> | ||
| 187 | <tr><td>Body text</td><td>Same as Font, System, or any installed proportional family</td><td>Same as Font</td><td><code class="verbatim">body-font</code></td></tr> | ||
| 188 | <tr><td>Size</td><td>8 to 36 pt</td><td>13 pt</td><td><code class="verbatim">font-size</code></td></tr> | ||
| 189 | <tr><td>Line spacing</td><td>0 to 16 pt</td><td>2 pt</td><td><code class="verbatim">line-spacing</code></td></tr> | ||
| 190 | <tr><td>Text width</td><td>Whole editor, or 60 to 120 columns</td><td>Whole editor</td><td><code class="verbatim">text-width</code></td></tr> | ||
| 191 | <tr><td>Headings grow by N pt a level</td><td>0 to 8 pt</td><td>1 pt</td><td><code class="verbatim">heading-size-step</code></td></tr> | ||
| 192 | <tr><td>Colors: Edit in config.toml</td><td>Opens <code class="verbatim">config.toml</code></td><td></td><td></td></tr> | ||
| 193 | <tr><td>Colors: Show Default Theme</td><td>Opens <code class="verbatim">default-theme.toml</code></td><td></td><td></td></tr> | ||
| 194 | </tbody> | ||
| 195 | </table> | ||
| 196 | <p>See Themes and Fonts below.</p> | ||
| 197 | <h3 id="agenda">Agenda</h3> | ||
| 198 | <table> | ||
| 199 | <thead> | ||
| 200 | <tr><th>Control</th><th>Range</th><th>Default</th><th>Key</th></tr> | ||
| 201 | </thead> | ||
| 202 | <tbody> | ||
| 203 | <tr><td>Agenda shows N days</td><td>1 to 366</td><td>10</td><td><code class="verbatim">org-agenda-span</code></td></tr> | ||
| 204 | <tr><td>Agenda starts N days before today</td><td>0 to 14 days before</td><td>3 days</td><td><code class="verbatim">org-agenda-start-day</code></td></tr> | ||
| 205 | <tr><td>Include files in subfolders</td><td>On or off</td><td>Off</td><td><code class="verbatim">agenda-include-subfolders</code></td></tr> | ||
| 206 | <tr><td>Show days without entries</td><td>On or off</td><td>Off</td><td><code class="verbatim">org-agenda-show-all-dates</code></td></tr> | ||
| 207 | <tr><td>Habits only today</td><td>On or off</td><td>On</td><td><code class="verbatim">org-habit-show-habits-only-for-today</code></td></tr> | ||
| 208 | <tr><td>Blocked entries</td><td>Dimmed; Hidden; Shown as usual</td><td>Dimmed</td><td><code class="verbatim">org-agenda-dim-blocked-tasks</code></td></tr> | ||
| 209 | <tr><td>Show events from Calendar</td><td>On or off</td><td>Off</td><td><code class="verbatim">calendar-events</code></td></tr> | ||
| 210 | <tr><td>A checkbox for each calendar</td><td>On or off</td><td>All on</td><td><code class="verbatim">calendar-event-calendars</code></td></tr> | ||
| 211 | <tr><td>Show reminders from Reminders</td><td>On or off</td><td>Off</td><td><code class="verbatim">agenda-reminders</code></td></tr> | ||
| 212 | <tr><td>A checkbox for each list</td><td>On or off</td><td>All on</td><td><code class="verbatim">agenda-reminder-lists</code></td></tr> | ||
| 213 | <tr><td>Notify before timed agenda entries</td><td>On or off</td><td>On</td><td><code class="verbatim">reminders</code></td></tr> | ||
| 214 | <tr><td>N minutes before</td><td>0 to 120</td><td>12</td><td><code class="verbatim">appt-message-warning-time</code></td></tr> | ||
| 215 | <tr><td>Ask what to do with idle time while clocked in</td><td>On or off</td><td>Off</td><td><code class="verbatim">org-clock-idle-time</code></td></tr> | ||
| 216 | <tr><td>After N minutes without keyboard or mouse input</td><td>1 to 240</td><td>15 when turned on</td><td><code class="verbatim">org-clock-idle-time</code></td></tr> | ||
| 217 | <tr><td>Remember N recently clocked entries</td><td>1 to 35</td><td>5</td><td><code class="verbatim">org-clock-history-length</code></td></tr> | ||
| 218 | </tbody> | ||
| 219 | </table> | ||
| 220 | <p>An entry's <code class="verbatim">APPT_WARNTIME</code> property overrides the lead time. The agenda is covered in <a href="07-agenda.html">The agenda</a>.</p> | ||
| 221 | <p>The calendar checkboxes appear once Show events from Calendar is on and orgstar may read your calendars; turning the switch on asks for that access. While every calendar is checked, <code class="verbatim">calendar-event-calendars</code> is empty, so calendars you add later show too. The last checked calendar can't be unchecked; turn off Show events from Calendar instead. The Reminders list checkboxes work the same way. See <a href="07-agenda.html">The agenda</a>.</p> | ||
| 222 | <p>Turning on the idle question sets <code class="verbatim">org-clock-idle-time</code> to 15 minutes; turning it off sets it to <code class="verbatim">0</code>. The minutes stepper is disabled while the question is off. Idle time and the clock history are covered in <a href="06-dates-and-clocking.html">Dates and clocking</a>.</p> | ||
| 223 | <h3 id="capture">Capture</h3> | ||
| 224 | <table> | ||
| 225 | <thead> | ||
| 226 | <tr><th>Control</th><th>Default</th><th>Key</th></tr> | ||
| 227 | </thead> | ||
| 228 | <tbody> | ||
| 229 | <tr><td>⌃⌥Space opens Capture from any app</td><td>On</td><td><code class="verbatim">global-capture-hotkey</code></td></tr> | ||
| 230 | </tbody> | ||
| 231 | </table> | ||
| 232 | <p>The footer shows the path of <code class="verbatim">capture.toml</code>. Templates are covered in <a href="08-capture.html">Capture</a>.</p> | ||
| 233 | <h3 id="settings-only-in-config-toml">Settings only in config.toml</h3> | ||
| 234 | <p>These settings have no control in the Settings window. Some are in the View menu.</p> | ||
| 235 | <table> | ||
| 236 | <thead> | ||
| 237 | <tr><th>Key</th><th>Also in</th></tr> | ||
| 238 | </thead> | ||
| 239 | <tbody> | ||
| 240 | <tr><td><code class="verbatim">org-log-reschedule</code></td><td></td></tr> | ||
| 241 | <tr><td><code class="verbatim">org-log-redeadline</code></td><td></td></tr> | ||
| 242 | <tr><td><code class="verbatim">org-startup-indented</code></td><td></td></tr> | ||
| 243 | <tr><td><code class="verbatim">org-hide-leading-stars</code></td><td></td></tr> | ||
| 244 | <tr><td><code class="verbatim">org-startup-align-all-tables</code></td><td></td></tr> | ||
| 245 | <tr><td><code class="verbatim">org-startup-with-inline-images</code></td><td></td></tr> | ||
| 246 | <tr><td><code class="verbatim">org-startup-with-latex-preview</code></td><td></td></tr> | ||
| 247 | <tr><td><code class="verbatim">org-display-remote-inline-images</code></td><td></td></tr> | ||
| 248 | <tr><td><code class="verbatim">org-cycle-hide-drawer-startup</code></td><td></td></tr> | ||
| 249 | <tr><td><code class="verbatim">org-cycle-hide-block-startup</code></td><td></td></tr> | ||
| 250 | <tr><td><code class="verbatim">electric-pair-mode</code></td><td></td></tr> | ||
| 251 | <tr><td><code class="verbatim">display-line-numbers-type</code></td><td>View ▸ Show Line Numbers (<code class="verbatim">⇧⌘L</code>), View ▸ Line Numbers</td></tr> | ||
| 252 | <tr><td><code class="verbatim">pdf-margin</code>, <code class="verbatim">pdf-font</code>, <code class="verbatim">pdf-page-numbers</code></td><td>File ▸ Export ▸ Export… (the dialog's PDF settings)</td></tr> | ||
| 253 | <tr><td><code class="verbatim">tab-bar</code></td><td>View ▸ Show Tab Bar</td></tr> | ||
| 254 | <tr><td><code class="verbatim">show-markup</code></td><td>View ▸ Show Markup (<code class="verbatim">⇧⌘M</code>)</td></tr> | ||
| 255 | <tr><td><code class="verbatim">ignored-folders</code></td><td></td></tr> | ||
| 256 | <tr><td><code class="verbatim">org-archive-location</code></td><td></td></tr> | ||
| 257 | <tr><td><code class="verbatim">org-export-default-language</code></td><td></td></tr> | ||
| 258 | <tr><td><code class="verbatim">org-use-tag-inheritance</code>, <code class="verbatim">org-tags-exclude-from-inheritance</code>, <code class="verbatim">org-tag-alist</code></td><td></td></tr> | ||
| 259 | <tr><td><code class="verbatim">org-track-ordered-property-with-tag</code></td><td></td></tr> | ||
| 260 | <tr><td><code class="verbatim">org-timer-format</code>, <code class="verbatim">org-timer-default-timer</code></td><td></td></tr> | ||
| 261 | <tr><td><code class="verbatim">org-roam-directory</code>, <code class="verbatim">org-roam-dailies-directory</code>, <code class="verbatim">org-roam-dailies-file</code>, <code class="verbatim">org-roam-dailies-head</code>, <code class="verbatim">org-roam-dailies-entry</code></td><td></td></tr> | ||
| 262 | <tr><td><code class="verbatim">notes-package</code>, <code class="verbatim">denote-directory</code>, <code class="verbatim">denote-prompts</code>, <code class="verbatim">denote-silo-directories</code>, <code class="verbatim">denote-sequence-scheme</code>, <code class="verbatim">denote-journal-directory</code>, <code class="verbatim">denote-journal-keyword</code>, <code class="verbatim">denote-journal-interval</code>, <code class="verbatim">denote-journal-title-format</code></td><td></td></tr> | ||
| 263 | <tr><td><code class="verbatim">org-attach-id-dir</code>, <code class="verbatim">org-attach-use-inheritance</code></td><td></td></tr> | ||
| 264 | <tr><td><code class="verbatim">org-yank-image-save-method</code>, <code class="verbatim">org-yank-dnd-method</code></td><td></td></tr> | ||
| 265 | <tr><td><code class="verbatim">org-crypt-tag-matcher</code></td><td></td></tr> | ||
| 266 | <tr><td><code class="verbatim">org-agenda-start-on-weekday</code></td><td></td></tr> | ||
| 267 | <tr><td><code class="verbatim">org-deadline-warning-days</code></td><td></td></tr> | ||
| 268 | <tr><td><code class="verbatim">org-agenda-skip-scheduled-if-done</code></td><td></td></tr> | ||
| 269 | <tr><td><code class="verbatim">org-agenda-skip-deadline-if-done</code></td><td></td></tr> | ||
| 270 | <tr><td><code class="verbatim">org-habit-show-habits-only-for-today</code></td><td></td></tr> | ||
| 271 | <tr><td><code class="verbatim">org-agenda-log-mode-items</code></td><td></td></tr> | ||
| 272 | <tr><td><code class="verbatim">org-clock-into-drawer</code></td><td></td></tr> | ||
| 273 | <tr><td><code class="verbatim">org-clock-rounding-minutes</code>, <code class="verbatim">org-clock-out-remove-zero-time-clocks</code>, <code class="verbatim">org-clock-in-switch-to-state</code>, <code class="verbatim">org-clock-out-when-done</code></td><td></td></tr> | ||
| 274 | <tr><td><code class="verbatim">org-agenda-todo-ignore-with-date</code>, <code class="verbatim">org-agenda-todo-ignore-scheduled</code>, <code class="verbatim">org-agenda-todo-ignore-deadlines</code>, <code class="verbatim">org-agenda-todo-ignore-timestamp</code>, <code class="verbatim">org-agenda-tags-todo-honor-ignore-options</code></td><td></td></tr> | ||
| 275 | <tr><td><code class="verbatim">org-agenda-search-view-always-boolean</code></td><td></td></tr> | ||
| 276 | <tr><td><code class="verbatim">org-agenda-search-view-force-full-words</code></td><td></td></tr> | ||
| 277 | <tr><td><code class="verbatim">[org-agenda-prefix-format]</code></td><td></td></tr> | ||
| 278 | <tr><td><code class="verbatim">[org-agenda-sorting-strategy]</code>, <code class="verbatim">org-agenda-sort-notime-is-late</code>, <code class="verbatim">org-agenda-sort-noeffort-is-high</code></td><td></td></tr> | ||
| 279 | <tr><td><code class="verbatim">[org-agenda-time-grid]</code>, <code class="verbatim">org-agenda-use-time-grid</code>, <code class="verbatim">org-agenda-show-current-time-in-grid</code></td><td></td></tr> | ||
| 280 | <tr><td><code class="verbatim">[org-stuck-projects]</code></td><td></td></tr> | ||
| 281 | <tr><td><code class="verbatim">org-agenda-files</code></td><td></td></tr> | ||
| 282 | <tr><td><code class="verbatim">org-icalendar-use-deadline</code>, <code class="verbatim">org-icalendar-use-scheduled</code>, <code class="verbatim">org-icalendar-include-todo</code>, <code class="verbatim">org-icalendar-combined-agenda-file</code></td><td></td></tr> | ||
| 283 | <tr><td><code class="verbatim">org-refile-targets</code>, <code class="verbatim">org-refile-use-outline-path</code>, <code class="verbatim">org-refile-allow-creating-parent-nodes</code></td><td></td></tr> | ||
| 284 | <tr><td><code class="verbatim">theme-file</code></td><td></td></tr> | ||
| 285 | </tbody> | ||
| 286 | </table> | ||
| 287 | <h2 id="config-toml-reference">config.toml reference</h2> | ||
| 288 | <p>Settings that mirror an Emacs variable sit at the top of the file under that variable's name. The agenda prefix formats are in <code class="verbatim">[org-agenda-prefix-format]</code>, the sorting strategies in <code class="verbatim">[org-agenda-sorting-strategy]</code>, the time grid in <code class="verbatim">[org-agenda-time-grid]</code>, stuck projects in <code class="verbatim">[org-stuck-projects]</code>, type and theme in <code class="verbatim">[theme]</code>, and the settings Emacs has no variable for in <code class="verbatim">[orgstar]</code>.</p> | ||
| 289 | <p>A key you remove from the file goes back to its default. A key that isn't in the table below is reported as unknown.</p> | ||
| 290 | <h3 id="top-level">Top level</h3> | ||
| 291 | <table> | ||
| 292 | <thead> | ||
| 293 | <tr><th>Key</th><th>Type</th><th>Default</th><th>Effect</th></tr> | ||
| 294 | </thead> | ||
| 295 | <tbody> | ||
| 296 | <tr><td><code class="verbatim">fill-column</code></td><td>integer</td><td><code class="verbatim">80</code></td><td>The column <code class="verbatim">M-q</code> fills to. Mirrors <code class="verbatim">fill-column</code>.</td></tr> | ||
| 297 | <tr><td><code class="verbatim">org-tags-column</code></td><td>integer</td><td><code class="verbatim">-77</code></td><td>Negative: tags end at that column. <code class="verbatim">0</code>: one space between title and tags. Mirrors <code class="verbatim">org-tags-column</code>.</td></tr> | ||
| 298 | <tr><td><code class="verbatim">org-insert-heading-respect-content</code></td><td>boolean</td><td><code class="verbatim">false</code></td><td><code class="verbatim">M-RET</code> adds the new heading after the current subtree. Mirrors <code class="verbatim">org-insert-heading-respect-content</code>.</td></tr> | ||
| 299 | <tr><td><code class="verbatim">org-M-RET-may-split-line</code></td><td>boolean</td><td><code class="verbatim">false</code></td><td><code class="verbatim">M-RET</code> in the middle of a line splits it at the caret. Mirrors the <code class="verbatim">default</code> entry of <code class="verbatim">org-M-RET-may-split-line</code>.</td></tr> | ||
| 300 | <tr><td><code class="verbatim">org-list-allow-alphabetical</code></td><td>boolean</td><td><code class="verbatim">true</code></td><td><code class="verbatim">a.</code>, <code class="verbatim">b)</code>, <code class="verbatim">A.</code> are list bullets. Mirrors <code class="verbatim">org-list-allow-alphabetical</code>.</td></tr> | ||
| 301 | <tr><td><code class="verbatim">org-hide-emphasis-markers</code></td><td>boolean</td><td><code class="verbatim">true</code></td><td>Your Emacs hides <code class="verbatim">*bold*</code> and <code>=code=</code> markers; orgstar hides them when markup is hidden and measures text without them. Mirrors <code class="verbatim">org-hide-emphasis-markers</code>.</td></tr> | ||
| 302 | <tr><td><code class="verbatim">org-pretty-entities</code></td><td>boolean</td><td><code class="verbatim">true</code></td><td>Your Emacs shows <code class="verbatim">\alpha</code> as α and lowers <code class="verbatim">x_{1}</code>; orgstar does the same when markup is hidden. Mirrors <code class="verbatim">org-pretty-entities</code>.</td></tr> | ||
| 303 | <tr><td><code class="verbatim">org-todo-keywords</code></td><td>string</td><td>see below</td><td>Keywords for files without <code class="verbatim">#+TODO</code>, in <code class="verbatim">#+TODO</code> syntax; separate sequences with <code class="verbatim">\n</code>. Letters in parentheses turn on fast selection. Read at launch. Mirrors <code class="verbatim">org-todo-keywords</code>.</td></tr> | ||
| 304 | <tr><td><code class="verbatim">org-log-done</code></td><td>string</td><td><code class="verbatim">"nil"</code></td><td><code class="verbatim">nil</code>, <code class="verbatim">time</code> (a <code class="verbatim">CLOSED</code> timestamp) or <code class="verbatim">note</code> (<code class="verbatim">CLOSED</code> and a note). Mirrors <code class="verbatim">org-log-done</code>.</td></tr> | ||
| 305 | <tr><td><code class="verbatim">org-log-reschedule</code></td><td>string</td><td><code class="verbatim">"nil"</code></td><td><code class="verbatim">nil</code>, <code class="verbatim">time</code> or <code class="verbatim">note</code>: log changing or removing a <code class="verbatim">SCHEDULED</code> date. Mirrors <code class="verbatim">org-log-reschedule</code>.</td></tr> | ||
| 306 | <tr><td><code class="verbatim">org-log-redeadline</code></td><td>string</td><td><code class="verbatim">"nil"</code></td><td><code class="verbatim">nil</code>, <code class="verbatim">time</code> or <code class="verbatim">note</code>: log changing or removing a <code class="verbatim">DEADLINE</code>. Mirrors <code class="verbatim">org-log-redeadline</code>.</td></tr> | ||
| 307 | <tr><td><code class="verbatim">org-log-into-drawer</code></td><td>string</td><td><code class="verbatim">""</code></td><td>The drawer state notes go in. <code class="verbatim">"LOGBOOK"</code> is Emacs's <code class="verbatim">t</code>; <code class="verbatim">""</code> puts them under the heading. Mirrors <code class="verbatim">org-log-into-drawer</code>.</td></tr> | ||
| 308 | <tr><td><code class="verbatim">org-enforce-todo-dependencies</code></td><td>boolean</td><td><code class="verbatim">false</code></td><td>An entry can't become done while a descendant has an active TODO keyword, or under an <code class="verbatim">ORDERED</code> parent while an earlier sibling has one. Mirrors <code class="verbatim">org-enforce-todo-dependencies</code>.</td></tr> | ||
| 309 | <tr><td><code class="verbatim">org-enforce-todo-checkbox-dependencies</code></td><td>boolean</td><td><code class="verbatim">false</code></td><td>An entry can't become done while its text has an unchecked checkbox. Mirrors <code class="verbatim">org-enforce-todo-checkbox-dependencies</code>.</td></tr> | ||
| 310 | <tr><td><code class="verbatim">org-archive-location</code></td><td>string</td><td><code class="verbatim">"%s_archive::"</code></td><td>Where Archive Subtree moves an entry that has no <code class="verbatim">ARCHIVE</code> property and whose file has no <code class="verbatim">#+ARCHIVE:</code>, as <code class="verbatim">file::heading</code>; <code class="verbatim">%s</code> is the file's name. Mirrors <code class="verbatim">org-archive-location</code>.</td></tr> | ||
| 311 | <tr><td><code class="verbatim">org-export-default-language</code></td><td>string</td><td><code class="verbatim">"en"</code></td><td>The language of exports without <code class="verbatim">#+LANGUAGE:</code> and of clock tables without <code class="verbatim">:lang</code>, such as <code class="verbatim">"de"</code>. Mirrors <code class="verbatim">org-export-default-language</code>.</td></tr> | ||
| 312 | <tr><td><code class="verbatim">org-use-tag-inheritance</code></td><td>string</td><td><code class="verbatim">"t"</code></td><td>Which tags inherit: <code class="verbatim">"t"</code> all, <code class="verbatim">"nil"</code> none, tag names separated by spaces, or a regular expression in braces such as <code class="verbatim">"{^@}"</code>. Read at launch. Mirrors <code class="verbatim">org-use-tag-inheritance</code>.</td></tr> | ||
| 313 | <tr><td><code class="verbatim">org-tags-exclude-from-inheritance</code></td><td>string</td><td><code class="verbatim">""</code></td><td>Tags that never inherit, separated by spaces. Read at launch. Mirrors <code class="verbatim">org-tags-exclude-from-inheritance</code>.</td></tr> | ||
| 314 | <tr><td><code class="verbatim">org-tag-alist</code></td><td>string</td><td><code class="verbatim">""</code></td><td>The tags Set Tags offers in files without <code class="verbatim">#+TAGS</code>, in <code class="verbatim">#+TAGS</code> syntax with keys and groups, rows separated by <code class="verbatim">\n</code>. Mirrors <code class="verbatim">org-tag-alist</code>.</td></tr> | ||
| 315 | <tr><td><code class="verbatim">org-track-ordered-property-with-tag</code></td><td>string</td><td><code class="verbatim">"nil"</code></td><td>A tag that Toggle ORDERED Property adds and removes with the property: <code class="verbatim">"t"</code> for the tag <code class="verbatim">ORDERED</code>, or a tag name. Mirrors <code class="verbatim">org-track-ordered-property-with-tag</code>.</td></tr> | ||
| 316 | <tr><td><code class="verbatim">auto-fill-mode</code></td><td>boolean</td><td><code class="verbatim">false</code></td><td>Typing a space past <code class="verbatim">fill-column</code> breaks the line. View ▸ Turn Auto Fill On or Off changes it for one buffer. Mirrors <code class="verbatim">auto-fill-mode</code> in <code class="verbatim">org-mode-hook</code>.</td></tr> | ||
| 317 | <tr><td><code class="verbatim">org-roam-directory</code></td><td>string</td><td><code class="verbatim">""</code></td><td>The folder org-roam notes are in; empty for the first sidebar folder. Mirrors <code class="verbatim">org-roam-directory</code>.</td></tr> | ||
| 318 | <tr><td><code class="verbatim">org-roam-dailies-directory</code></td><td>string</td><td><code class="verbatim">"daily/"</code></td><td>The folder daily notes are in, relative to <code class="verbatim">org-roam-directory</code>. Mirrors <code class="verbatim">org-roam-dailies-directory</code>.</td></tr> | ||
| 319 | <tr><td><code class="verbatim">org-roam-dailies-file</code></td><td>string</td><td><code class="verbatim">"%<%Y-%m-%d>.org"</code></td><td>A daily note's file name; <code class="verbatim">%<…></code> formats its date.</td></tr> | ||
| 320 | <tr><td><code class="verbatim">org-roam-dailies-head</code></td><td>string</td><td><code class="verbatim">"#+title: %<%Y-%m-%d>\n"</code></td><td>What a new daily note starts with, under its <code class="verbatim">ID</code>.</td></tr> | ||
| 321 | <tr><td><code class="verbatim">org-roam-dailies-entry</code></td><td>string</td><td><code class="verbatim">"* %?"</code></td><td>The capture template Capture to Daily Note files. See <a href="09-links.html">Links</a>.</td></tr> | ||
| 322 | <tr><td><code class="verbatim">notes-package</code></td><td>string</td><td><code class="verbatim">"org-roam"</code></td><td>Whose conventions Find Node…, Insert Node Link… and the daily-note commands follow: <code class="verbatim">"org-roam"</code> or <code class="verbatim">"denote"</code>.</td></tr> | ||
| 323 | <tr><td><code class="verbatim">denote-directory</code></td><td>string</td><td><code class="verbatim">""</code></td><td>The folders of Denote notes, separated by <code class="verbatim">:</code>, new notes going in the first; empty for the first sidebar folder. Mirrors <code class="verbatim">denote-directory</code>.</td></tr> | ||
| 324 | <tr><td><code class="verbatim">denote-silo-directories</code></td><td>string</td><td><code class="verbatim">""</code></td><td>The folders New Note in Silo… and Find Note in Silo… choose from, separated by <code class="verbatim">:</code>; empty for <code class="verbatim">denote-directory</code>'s. Mirrors <code class="verbatim">denote-silo-directories</code>.</td></tr> | ||
| 325 | <tr><td><code class="verbatim">denote-sequence-scheme</code></td><td>string</td><td><code class="verbatim">"numeric"</code></td><td>How denote-sequence numbers notes: <code class="verbatim">"numeric"</code>, <code class="verbatim">"alphanumeric"</code> or <code class="verbatim">"alphanumeric-delimited"</code>. Mirrors <code class="verbatim">denote-sequence-scheme</code>.</td></tr> | ||
| 326 | <tr><td><code class="verbatim">denote-prompts</code></td><td>string</td><td><code class="verbatim">"title keywords"</code></td><td>What a new Denote note asks, in order, separated by spaces: <code class="verbatim">title</code>, <code class="verbatim">keywords</code>, <code class="verbatim">subdirectory</code>, <code class="verbatim">date</code>, <code class="verbatim">template</code>, <code class="verbatim">signature</code>. Mirrors <code class="verbatim">denote-prompts</code>.</td></tr> | ||
| 327 | <tr><td><code class="verbatim">denote-journal-directory</code></td><td>string</td><td><code class="verbatim">"journal"</code></td><td>The folder journal entries are in, relative to <code class="verbatim">denote-directory</code>. Mirrors <code class="verbatim">denote-journal-directory</code>.</td></tr> | ||
| 328 | <tr><td><code class="verbatim">denote-journal-keyword</code></td><td>string</td><td><code class="verbatim">"journal"</code></td><td>The keyword journal entries have. Mirrors <code class="verbatim">denote-journal-keyword</code>.</td></tr> | ||
| 329 | <tr><td><code class="verbatim">denote-journal-interval</code></td><td>string</td><td><code class="verbatim">"daily"</code></td><td>How long one journal entry lasts: <code class="verbatim">"daily"</code>, <code class="verbatim">"weekly"</code>, <code class="verbatim">"monthly"</code> or <code class="verbatim">"yearly"</code>. Mirrors <code class="verbatim">denote-journal-interval</code>.</td></tr> | ||
| 330 | <tr><td><code class="verbatim">denote-journal-title-format</code></td><td>string</td><td><code class="verbatim">"%A %-e %B %Y %H:%M"</code></td><td>A new journal entry's title, a <code class="verbatim">format-time-string</code> format.</td></tr> | ||
| 331 | <tr><td><code class="verbatim">org-timer-format</code></td><td>string</td><td><code class="verbatim">"%s "</code></td><td>What Insert Timer Value writes, with <code class="verbatim">%s</code> for the <code class="verbatim">h:mm:ss</code> value. Mirrors <code class="verbatim">org-timer-format</code>.</td></tr> | ||
| 332 | <tr><td><code class="verbatim">org-timer-default-timer</code></td><td>string</td><td><code class="verbatim">"0"</code></td><td>The countdown Set Countdown Timer… offers, in minutes or <code class="verbatim">h:mm:ss</code>; <code class="verbatim">"0"</code> offers none. Mirrors <code class="verbatim">org-timer-default-timer</code>.</td></tr> | ||
| 333 | <tr><td><code class="verbatim">org-attach-id-dir</code></td><td>string</td><td><code class="verbatim">"data/"</code></td><td>The folder ID-based attachment folders go in, relative to the org file's folder unless absolute. See <a href="04-outlines.html">Outlines</a>. Mirrors <code class="verbatim">org-attach-id-dir</code>.</td></tr> | ||
| 334 | <tr><td><code class="verbatim">org-attach-use-inheritance</code></td><td>string</td><td><code class="verbatim">"selective"</code></td><td>Whether attachment folders come from an ancestor's <code class="verbatim">DIR</code> or <code class="verbatim">ID</code>: <code class="verbatim">selective</code>, <code class="verbatim">"t"</code> or <code class="verbatim">"nil"</code>. Mirrors <code class="verbatim">org-attach-use-inheritance</code>.</td></tr> | ||
| 335 | <tr><td><code class="verbatim">org-yank-image-save-method</code></td><td>string</td><td><code class="verbatim">"attach"</code></td><td>Where a pasted image goes: <code class="verbatim">attach</code> for the entry's attachment folder, or a folder, relative to the org file's folder unless absolute. See <a href="09-links.html">Links</a>. Mirrors <code class="verbatim">org-yank-image-save-method</code>.</td></tr> | ||
| 336 | <tr><td><code class="verbatim">org-yank-dnd-method</code></td><td>string</td><td><code class="verbatim">"ask"</code></td><td>What dropping files on the editor does: <code class="verbatim">ask</code>, <code class="verbatim">attach</code>, <code class="verbatim">open</code> or <code class="verbatim">file-link</code>. See <a href="09-links.html">Links</a>. Mirrors <code class="verbatim">org-yank-dnd-method</code>.</td></tr> | ||
| 337 | <tr><td><code class="verbatim">org-crypt-tag-matcher</code></td><td>string</td><td><code class="verbatim">"crypt"</code></td><td>The tag Encrypt Tagged Entries… encrypts. A single tag. See <a href="04-outlines.html">Outlines</a>. Mirrors <code class="verbatim">org-crypt-tag-matcher</code>.</td></tr> | ||
| 338 | <tr><td><code class="verbatim">org-startup-indented</code></td><td>boolean</td><td><code class="verbatim">true</code></td><td>Indent bodies under their headings, as <code class="verbatim">org-indent-mode</code>. <code class="verbatim">#+STARTUP: indent</code> / <code class="verbatim">noindent</code> override it. Mirrors <code class="verbatim">org-startup-indented</code>.</td></tr> | ||
| 339 | <tr><td><code class="verbatim">org-hide-leading-stars</code></td><td>boolean</td><td><code class="verbatim">false</code></td><td>Show only a heading's last star, without indentation. <code class="verbatim">#+STARTUP: hidestars</code> / <code class="verbatim">showstars</code> override it. Mirrors <code class="verbatim">org-hide-leading-stars</code>.</td></tr> | ||
| 340 | <tr><td><code class="verbatim">org-startup-align-all-tables</code></td><td>boolean</td><td><code class="verbatim">false</code></td><td>Align every table when a file opens. <code class="verbatim">#+STARTUP: align</code> / <code class="verbatim">noalign</code> override it. Mirrors <code class="verbatim">org-startup-align-all-tables</code>.</td></tr> | ||
| 341 | <tr><td><code class="verbatim">org-startup-truncated</code></td><td>boolean</td><td><code class="verbatim">false</code></td><td>Long lines run off the right edge instead of wrapping. Mirrors <code class="verbatim">org-startup-truncated</code>.</td></tr> | ||
| 342 | <tr><td><code class="verbatim">spell-check</code></td><td>boolean</td><td><code class="verbatim">false</code></td><td>Check spelling while typing, outside code, links, dates, tags and keywords.</td></tr> | ||
| 343 | <tr><td><code class="verbatim">electric-pair-mode</code></td><td>boolean</td><td><code class="verbatim">true</code></td><td>Type brackets, <code class="verbatim"><></code> and quotes in pairs. Mirrors <code class="verbatim">electric-pair-mode</code>.</td></tr> | ||
| 344 | <tr><td><code class="verbatim">org-startup-with-inline-images</code></td><td>boolean</td><td><code class="verbatim">false</code></td><td>Show image links as images when a file opens. <code class="verbatim">#+STARTUP: inlineimages</code> / <code class="verbatim">noinlineimages</code> override it. Mirrors <code class="verbatim">org-startup-with-inline-images</code>.</td></tr> | ||
| 345 | <tr><td><code class="verbatim">org-display-remote-inline-images</code></td><td>string</td><td><code class="verbatim">"skip"</code></td><td>Images at http(s) links: <code class="verbatim">skip</code>, <code class="verbatim">download</code> (kept until orgstar quits) or <code class="verbatim">cache</code> (kept on disk). See <a href="09-links.html">Links</a>. Mirrors <code class="verbatim">org-display-remote-inline-images</code>.</td></tr> | ||
| 346 | <tr><td><code class="verbatim">org-startup-with-latex-preview</code></td><td>boolean</td><td><code class="verbatim">false</code></td><td>Show LaTeX fragments as typeset math when a file opens. <code class="verbatim">#+STARTUP: latexpreview</code> / <code class="verbatim">nolatexpreview</code> override it. Mirrors <code class="verbatim">org-startup-with-latex-preview</code>.</td></tr> | ||
| 347 | <tr><td><code class="verbatim">org-use-speed-commands</code></td><td>boolean</td><td><code class="verbatim">false</code></td><td>Single keys at the start of a heading line run commands (<code class="verbatim">n</code>, <code class="verbatim">p</code>, <code class="verbatim">t</code>, <code class="verbatim">c</code>, …). Mirrors <code class="verbatim">org-use-speed-commands</code>.</td></tr> | ||
| 348 | <tr><td><code class="verbatim">org-cycle-hide-drawer-startup</code></td><td>boolean</td><td><code class="verbatim">true</code></td><td>Fold drawers when a file opens. <code class="verbatim">#+STARTUP: hidedrawers</code> / <code class="verbatim">nohidedrawers</code> override it. Mirrors <code class="verbatim">org-cycle-hide-drawer-startup</code>.</td></tr> | ||
| 349 | <tr><td><code class="verbatim">org-cycle-hide-block-startup</code></td><td>boolean</td><td><code class="verbatim">false</code></td><td>Fold blocks when a file opens. <code class="verbatim">#+STARTUP: hideblocks</code> / <code class="verbatim">nohideblocks</code> override it. Mirrors <code class="verbatim">org-cycle-hide-block-startup</code>.</td></tr> | ||
| 350 | <tr><td><code class="verbatim">display-line-numbers-type</code></td><td>boolean or string</td><td><code class="verbatim">false</code></td><td>Line numbers in the editor's gutter: <code class="verbatim">true</code>, <code class="verbatim">false</code>, <code class="verbatim">"relative"</code> or <code class="verbatim">"visual"</code>. See <a href="02-the-editor.html">The editor</a>.</td></tr> | ||
| 351 | <tr><td><code class="verbatim">org-agenda-span</code></td><td>integer</td><td><code class="verbatim">10</code></td><td>Days the agenda shows. Mirrors <code class="verbatim">org-agenda-span</code>.</td></tr> | ||
| 352 | <tr><td><code class="verbatim">org-agenda-start-day</code></td><td>string</td><td><code class="verbatim">"+0d"</code></td><td>The agenda's first day relative to today, as <code class="verbatim">"-3d"</code> or <code class="verbatim">"+0d"</code>. Only day offsets are accepted. Mirrors <code class="verbatim">org-agenda-start-day</code>.</td></tr> | ||
| 353 | <tr><td><code class="verbatim">org-agenda-start-on-weekday</code></td><td>string</td><td><code class="verbatim">"1"</code></td><td>The day weeks start on, <code class="verbatim">"0"</code> (Sunday) to <code class="verbatim">"6"</code> (Saturday), for the week view and spans of 7 or 14 days. <code class="verbatim">"nil"</code> starts them on the day the view starts from. Mirrors <code class="verbatim">org-agenda-start-on-weekday</code>.</td></tr> | ||
| 354 | <tr><td><code class="verbatim">org-deadline-warning-days</code></td><td>integer</td><td><code class="verbatim">14</code></td><td>Days ahead the agenda and the deadline sparse tree warn about a deadline. A <code class="verbatim">-Nd</code> cookie in the timestamp overrides it. Mirrors <code class="verbatim">org-deadline-warning-days</code>.</td></tr> | ||
| 355 | <tr><td><code class="verbatim">org-agenda-show-all-dates</code></td><td>boolean</td><td><code class="verbatim">false</code></td><td>Show days without entries in the agenda; today always shows. Emacs's default is <code class="verbatim">t</code>. Mirrors <code class="verbatim">org-agenda-show-all-dates</code>.</td></tr> | ||
| 356 | <tr><td><code class="verbatim">org-agenda-skip-scheduled-if-done</code></td><td>boolean</td><td><code class="verbatim">false</code></td><td>Leave a done entry's scheduled date out of the agenda, even on its own day. Mirrors <code class="verbatim">org-agenda-skip-scheduled-if-done</code>.</td></tr> | ||
| 357 | <tr><td><code class="verbatim">org-agenda-skip-deadline-if-done</code></td><td>boolean</td><td><code class="verbatim">false</code></td><td>Leave a done entry's deadline out of the agenda, even on its own day. Mirrors <code class="verbatim">org-agenda-skip-deadline-if-done</code>.</td></tr> | ||
| 358 | <tr><td><code class="verbatim">org-habit-show-habits-only-for-today</code></td><td>boolean</td><td><code class="verbatim">true</code></td><td>Show habits only on today's agenda. Off, a habit also shows on the later days it is scheduled for. Mirrors <code class="verbatim">org-habit-show-habits-only-for-today</code>.</td></tr> | ||
| 359 | <tr><td><code class="verbatim">org-agenda-log-mode-items</code></td><td>string</td><td><code class="verbatim">"closed clock"</code></td><td>What log mode shows, separated by spaces: <code class="verbatim">closed</code>, <code class="verbatim">clock</code> and <code class="verbatim">state</code>. Mirrors <code class="verbatim">org-agenda-log-mode-items</code>.</td></tr> | ||
| 360 | <tr><td><code class="verbatim">org-agenda-todo-ignore-with-date</code></td><td>boolean</td><td><code class="verbatim">false</code></td><td>The TODO list leaves out entries with an active timestamp anywhere in their text. Mirrors <code class="verbatim">org-agenda-todo-ignore-with-date</code>.</td></tr> | ||
| 361 | <tr><td><code class="verbatim">org-agenda-todo-ignore-scheduled</code></td><td>string</td><td><code class="verbatim">"nil"</code></td><td>The TODO list leaves out scheduled entries: <code class="verbatim">"all"</code> (or <code class="verbatim">"t"</code>) all of them, <code class="verbatim">"future"</code> those scheduled after today, <code class="verbatim">"past"</code> today or before, <code class="verbatim">"N"</code> N or more days ahead, <code class="verbatim">"-N"</code> N or more days ago. Mirrors <code class="verbatim">org-agenda-todo-ignore-scheduled</code>.</td></tr> | ||
| 362 | <tr><td><code class="verbatim">org-agenda-todo-ignore-deadlines</code></td><td>string</td><td><code class="verbatim">"nil"</code></td><td>As the last, for deadlines: <code class="verbatim">"near"</code> (or <code class="verbatim">"t"</code>) those within their warning period, <code class="verbatim">"far"</code> those beyond it, <code class="verbatim">"all"</code>, <code class="verbatim">"future"</code>, <code class="verbatim">"past"</code>, <code class="verbatim">"N"</code>, <code class="verbatim">"-N"</code>. Mirrors <code class="verbatim">org-agenda-todo-ignore-deadlines</code>.</td></tr> | ||
| 363 | <tr><td><code class="verbatim">org-agenda-todo-ignore-timestamp</code></td><td>string</td><td><code class="verbatim">"nil"</code></td><td>As the last, for other active timestamps in the entry: <code class="verbatim">"all"</code> (or <code class="verbatim">"t"</code>), <code class="verbatim">"future"</code>, <code class="verbatim">"past"</code>, <code class="verbatim">"N"</code>, <code class="verbatim">"-N"</code>. Mirrors <code class="verbatim">org-agenda-todo-ignore-timestamp</code>.</td></tr> | ||
| 364 | <tr><td><code class="verbatim">org-agenda-tags-todo-honor-ignore-options</code></td><td>boolean</td><td><code class="verbatim">false</code></td><td>The four settings above apply to TODO-only matches (<code class="verbatim">M</code>) too. Mirrors <code class="verbatim">org-agenda-tags-todo-honor-ignore-options</code>.</td></tr> | ||
| 365 | <tr><td><code class="verbatim">org-agenda-search-view-always-boolean</code></td><td>boolean</td><td><code class="verbatim">false</code></td><td>The agenda's text search reads every string as <code class="verbatim">+word -word {regexp}</code> snippets, never as a phrase. Mirrors <code class="verbatim">org-agenda-search-view-always-boolean</code>.</td></tr> | ||
| 366 | <tr><td><code class="verbatim">org-agenda-search-view-force-full-words</code></td><td>boolean</td><td><code class="verbatim">false</code></td><td>Text search snippets match whole words only, as a leading <code class="verbatim">:</code> does. Mirrors <code class="verbatim">org-agenda-search-view-force-full-words</code>.</td></tr> | ||
| 367 | <tr><td><code class="verbatim">org-refile-targets</code></td><td>string</td><td><code class="verbatim">""</code></td><td>Refile targets as Lisp, as <code class="verbatim">org-refile-targets</code> takes them: <code class="verbatim">((nil :maxlevel . 3) (org-agenda-files :tag . "project"))</code>. <code class="verbatim">""</code> offers headings to level 3 in every file. See <a href="04-outlines.html">Outlines</a>. Mirrors <code class="verbatim">org-refile-targets</code>.</td></tr> | ||
| 368 | <tr><td><code class="verbatim">org-refile-use-outline-path</code></td><td>string</td><td><code class="verbatim">"file"</code></td><td>How refile targets are written: <code class="verbatim">nil</code>, <code class="verbatim">t</code>, <code class="verbatim">file</code>, <code class="verbatim">full-file-path</code>, <code class="verbatim">buffer-name</code> or <code class="verbatim">title</code>. Mirrors <code class="verbatim">org-refile-use-outline-path</code>.</td></tr> | ||
| 369 | <tr><td><code class="verbatim">org-refile-allow-creating-parent-nodes</code></td><td>string</td><td><code class="verbatim">"nil"</code></td><td><code class="verbatim">t</code> or <code class="verbatim">confirm</code>: a refile target typed as <code class="verbatim">TARGET/New heading</code> adds the heading; <code class="verbatim">confirm</code> asks first. Mirrors <code class="verbatim">org-refile-allow-creating-parent-nodes</code>.</td></tr> | ||
| 370 | <tr><td><code class="verbatim">org-agenda-files</code></td><td>string</td><td><code class="verbatim">""</code></td><td>Files and folders the agenda reads, separated by <code class="verbatim">\n</code>; a file that isn't <code class="verbatim">.org</code> lists more, one per line. <code class="verbatim">""</code> reads the folders' files. See <a href="07-agenda.html">The agenda</a>. Mirrors <code class="verbatim">org-agenda-files</code>.</td></tr> | ||
| 371 | <tr><td><code class="verbatim">org-icalendar-use-deadline</code></td><td>string</td><td><code class="verbatim">"event-if-not-todo todo-due"</code></td><td>What a <code class="verbatim">DEADLINE</code> makes in iCalendar export: <code class="verbatim">event-if-not-todo</code>, <code class="verbatim">event-if-todo</code>, <code class="verbatim">event-if-todo-not-done</code>, <code class="verbatim">todo-due</code>. See <a href="12-export.html">Export</a>. Mirrors <code class="verbatim">org-icalendar-use-deadline</code>.</td></tr> | ||
| 372 | <tr><td><code class="verbatim">org-icalendar-use-scheduled</code></td><td>string</td><td><code class="verbatim">"todo-start"</code></td><td>As the last, for <code class="verbatim">SCHEDULED</code>, with <code class="verbatim">todo-start</code>. Mirrors <code class="verbatim">org-icalendar-use-scheduled</code>.</td></tr> | ||
| 373 | <tr><td><code class="verbatim">org-icalendar-include-todo</code></td><td>string</td><td><code class="verbatim">"nil"</code></td><td>Tasks as <code class="verbatim">VTODO</code>: <code class="verbatim">nil</code>, <code class="verbatim">t</code> (not done), <code class="verbatim">all</code>, <code class="verbatim">unblocked</code>, or TODO keywords separated by spaces. Mirrors <code class="verbatim">org-icalendar-include-todo</code>.</td></tr> | ||
| 374 | <tr><td><code class="verbatim">org-icalendar-combined-agenda-file</code></td><td>string</td><td><code class="verbatim">"~/org.ics"</code></td><td>Where Combine Agenda Files into iCalendar writes. Mirrors <code class="verbatim">org-icalendar-combined-agenda-file</code>.</td></tr> | ||
| 375 | <tr><td><code class="verbatim">org-agenda-use-time-grid</code></td><td>boolean</td><td><code class="verbatim">true</code></td><td>Grid lines at the times in <code class="verbatim">[org-agenda-time-grid]</code>, on the days it names. Mirrors <code class="verbatim">org-agenda-use-time-grid</code>.</td></tr> | ||
| 376 | <tr><td><code class="verbatim">org-agenda-show-current-time-in-grid</code></td><td>boolean</td><td><code class="verbatim">true</code></td><td>The now line on today's grid. Mirrors <code class="verbatim">org-agenda-show-current-time-in-grid</code>.</td></tr> | ||
| 377 | <tr><td><code class="verbatim">org-agenda-sort-notime-is-late</code></td><td>boolean</td><td><code class="verbatim">true</code></td><td>Lines without a time sort after timed ones for <code class="verbatim">time-up</code>, and lines without a date after dated ones for the date keys. Mirrors <code class="verbatim">org-agenda-sort-notime-is-late</code>.</td></tr> | ||
| 378 | <tr><td><code class="verbatim">org-agenda-sort-noeffort-is-high</code></td><td>boolean</td><td><code class="verbatim">true</code></td><td>Entries without an <code class="verbatim">Effort</code> sort as the longest for <code class="verbatim">effort-up</code>. Mirrors <code class="verbatim">org-agenda-sort-noeffort-is-high</code>.</td></tr> | ||
| 379 | <tr><td><code class="verbatim">org-agenda-dim-blocked-tasks</code></td><td>string</td><td><code class="verbatim">"t"</code></td><td><code class="verbatim">t</code> dims entries the two enforce settings block, <code class="verbatim">invisible</code> hides them (entries blocked only by checkboxes are still dimmed), <code class="verbatim">nil</code> shows them as usual. Mirrors <code class="verbatim">org-agenda-dim-blocked-tasks</code>.</td></tr> | ||
| 380 | <tr><td><code class="verbatim">appt-message-warning-time</code></td><td>integer</td><td><code class="verbatim">12</code></td><td>Minutes of warning before timed entries. An entry's <code class="verbatim">APPT_WARNTIME</code> property overrides it. Mirrors <code class="verbatim">appt-message-warning-time</code>.</td></tr> | ||
| 381 | <tr><td><code class="verbatim">org-clock-idle-time</code></td><td>integer</td><td><code class="verbatim">0</code></td><td>Minutes without keyboard or mouse input, with a clock running, before orgstar asks what to do with the idle time. <code class="verbatim">0</code> never asks (Emacs's <code class="verbatim">nil</code>). Mac only. Mirrors <code class="verbatim">org-clock-idle-time</code>.</td></tr> | ||
| 382 | <tr><td><code class="verbatim">org-clock-into-drawer</code></td><td>string</td><td><code class="verbatim">"t"</code></td><td>Where clock lines go: <code class="verbatim">"t"</code> the log drawer (<code class="verbatim">LOGBOOK</code>), <code class="verbatim">"nil"</code> no drawer, <code class="verbatim">"N"</code> a drawer once there are N clock lines, or a drawer's name. An entry's <code class="verbatim">CLOCK_INTO_DRAWER</code> property overrides it. Mirrors <code class="verbatim">org-clock-into-drawer</code>.</td></tr> | ||
| 383 | <tr><td><code class="verbatim">org-clock-rounding-minutes</code></td><td>integer</td><td><code class="verbatim">0</code></td><td>Clocks start and end on multiples of this many minutes; <code class="verbatim">0</code> doesn't round. Mirrors <code class="verbatim">org-clock-rounding-minutes</code>.</td></tr> | ||
| 384 | <tr><td><code class="verbatim">org-clock-out-remove-zero-time-clocks</code></td><td>boolean</td><td><code class="verbatim">false</code></td><td>Clocking out removes a clock line of <code class="verbatim">0:00</code>. Mirrors <code class="verbatim">org-clock-out-remove-zero-time-clocks</code>.</td></tr> | ||
| 385 | <tr><td><code class="verbatim">org-clock-in-switch-to-state</code></td><td>string</td><td><code class="verbatim">""</code></td><td>The keyword an entry takes when you clock in; <code class="verbatim">""</code> leaves it. Mirrors <code class="verbatim">org-clock-in-switch-to-state</code>.</td></tr> | ||
| 386 | <tr><td><code class="verbatim">org-clock-out-when-done</code></td><td>string</td><td><code class="verbatim">"t"</code></td><td><code class="verbatim">"t"</code>: marking the clocked entry done clocks out; <code class="verbatim">"nil"</code>: it doesn't; or the keywords that clock out, separated by spaces. Mirrors <code class="verbatim">org-clock-out-when-done</code>.</td></tr> | ||
| 387 | <tr><td><code class="verbatim">org-clock-history-length</code></td><td>integer</td><td><code class="verbatim">5</code></td><td>How many recently clocked entries orgstar remembers. Mirrors <code class="verbatim">org-clock-history-length</code>.</td></tr> | ||
| 388 | </tbody> | ||
| 389 | </table> | ||
| 390 | <p>The default <code class="verbatim">org-todo-keywords</code> is Org's, <code class="verbatim">"TODO | DONE"</code>. Doom Emacs's set, as Import from Emacs writes it from a Doom configuration, is:</p> | ||
| 391 | <pre><code class="language-toml highlight"><span class="source toml"><span class="variable other key toml">org-todo-keywords</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>TODO(t) PROJ(p) LOOP(r) STRT(s) WAIT(w) HOLD(h) IDEA(i) | DONE(d) KILL(k)<span class="punctuation definition string end toml">"</span></span></span></code></pre> | ||
| 392 | <p>The startup settings (<code class="verbatim">org-startup-*</code>, <code class="verbatim">org-hide-leading-stars</code>, <code class="verbatim">org-cycle-hide-*-startup</code>) apply when a file opens. Files already open keep their state until you open them again.</p> | ||
| 393 | <h3 id="org-agenda-prefix-format">[org-agenda-prefix-format]</h3> | ||
| 394 | <table> | ||
| 395 | <thead> | ||
| 396 | <tr><th>Key</th><th>Type</th><th>Default</th><th>Effect</th></tr> | ||
| 397 | </thead> | ||
| 398 | <tbody> | ||
| 399 | <tr><td><code class="verbatim">agenda</code></td><td>string</td><td><code class="verbatim">" %i %-12:c%?-12t% s"</code></td><td>Prefix of lines in the day view</td></tr> | ||
| 400 | <tr><td><code class="verbatim">todo</code></td><td>string</td><td><code class="verbatim">" %i %-12:c"</code></td><td>Prefix of lines in the TODO list</td></tr> | ||
| 401 | <tr><td><code class="verbatim">tags</code></td><td>string</td><td><code class="verbatim">" %i %-12:c"</code></td><td>Prefix of tag and property matches</td></tr> | ||
| 402 | </tbody> | ||
| 403 | </table> | ||
| 404 | <p>These mirror the entries of <code class="verbatim">org-agenda-prefix-format</code>. Rows show the category, time and leader in their own places; the rest of the format, such as <code class="verbatim">%e</code> or <code class="verbatim">%b</code>, shows after the category. A time written in heading text leaves the title when the <code class="verbatim">agenda</code> format contains <code class="verbatim">%t</code>. A view in <code class="verbatim">views.toml</code> can set its own with <code class="verbatim">prefix-format</code>. See <a href="07-agenda.html">The agenda</a>.</p> | ||
| 405 | <h3 id="org-agenda-sorting-strategy">[org-agenda-sorting-strategy]</h3> | ||
| 406 | <table> | ||
| 407 | <thead> | ||
| 408 | <tr><th>Key</th><th>Type</th><th>Default</th><th>Effect</th></tr> | ||
| 409 | </thead> | ||
| 410 | <tbody> | ||
| 411 | <tr><td><code class="verbatim">agenda</code></td><td>string</td><td><code class="verbatim">"habit-down time-up urgency-down category-keep"</code></td><td>Order of lines within a day</td></tr> | ||
| 412 | <tr><td><code class="verbatim">todo</code></td><td>string</td><td><code class="verbatim">"urgency-down category-keep"</code></td><td>Order of the TODO list</td></tr> | ||
| 413 | <tr><td><code class="verbatim">tags</code></td><td>string</td><td><code class="verbatim">"urgency-down category-keep"</code></td><td>Order of tag and property matches</td></tr> | ||
| 414 | <tr><td><code class="verbatim">search</code></td><td>string</td><td><code class="verbatim">"category-keep"</code></td><td>Order of text search results</td></tr> | ||
| 415 | </tbody> | ||
| 416 | </table> | ||
| 417 | <p>These mirror the entries of <code class="verbatim">org-agenda-sorting-strategy</code>, keys separated by spaces. Unknown keys are ignored. A view in <code class="verbatim">views.toml</code> can set its own with <code class="verbatim">sorting-strategy</code>. The keys are listed in <a href="07-agenda.html">The agenda</a>.</p> | ||
| 418 | <h3 id="org-stuck-projects">[org-stuck-projects]</h3> | ||
| 419 | <table> | ||
| 420 | <thead> | ||
| 421 | <tr><th>Key</th><th>Type</th><th>Default</th><th>Effect</th></tr> | ||
| 422 | </thead> | ||
| 423 | <tbody> | ||
| 424 | <tr><td><code class="verbatim">match</code></td><td>string</td><td><code class="verbatim">"+LEVEL=2/-DONE"</code></td><td>The entries that are projects</td></tr> | ||
| 425 | <tr><td><code class="verbatim">todo</code></td><td>string</td><td><code class="verbatim">"TODO NEXT NEXTACTION"</code></td><td>Keywords, separated by spaces, that make a project active; <code class="verbatim">*</code> for any open one</td></tr> | ||
| 426 | <tr><td><code class="verbatim">tags</code></td><td>string</td><td><code class="verbatim">""</code></td><td>Tags, separated by spaces, that make a project active; <code class="verbatim">*</code> for any</td></tr> | ||
| 427 | <tr><td><code class="verbatim">regexp</code></td><td>string</td><td><code class="verbatim">""</code></td><td>An Emacs regular expression that makes a project active</td></tr> | ||
| 428 | </tbody> | ||
| 429 | </table> | ||
| 430 | <p>These mirror the four elements of <code class="verbatim">org-stuck-projects</code>. See <a href="07-agenda.html">The agenda</a>.</p> | ||
| 431 | <h3 id="org-agenda-time-grid">[org-agenda-time-grid]</h3> | ||
| 432 | <table> | ||
| 433 | <thead> | ||
| 434 | <tr><th>Key</th><th>Type</th><th>Default</th><th>Effect</th></tr> | ||
| 435 | </thead> | ||
| 436 | <tbody> | ||
| 437 | <tr><td><code class="verbatim">when</code></td><td>string</td><td><code class="verbatim">"daily today require-timed"</code></td><td>Which days get a grid, separated by spaces</td></tr> | ||
| 438 | <tr><td><code class="verbatim">times</code></td><td>string</td><td><code class="verbatim">"800 1000 1200 1400 1600 1800 2000"</code></td><td>The grid's times as <code class="verbatim">HHMM</code></td></tr> | ||
| 439 | </tbody> | ||
| 440 | </table> | ||
| 441 | <p>These mirror the first two elements of <code class="verbatim">org-agenda-time-grid</code>. <code class="verbatim">when</code> takes <code class="verbatim">daily</code> (views of one day), <code class="verbatim">today</code>, <code class="verbatim">weekly</code> (every day), <code class="verbatim">require-timed</code> (only days with a timed entry) and <code class="verbatim">remove-match</code> (no line at a time an entry has). orgstar draws the lines itself, so Emacs's third and fourth elements, the strings for the lines, have no equivalent.</p> | ||
| 442 | <h3 id="org-structure-template-alist">[org-structure-template-alist]</h3> | ||
| 443 | <p>Block templates for Insert Structure Template (<code class="verbatim">C-c C-,</code>) and <code class="verbatim"><</code> completion, each a key and the block type it inserts. They go over Org's default <code class="verbatim">org-structure-template-alist</code>: a key Org has (<code class="verbatim">s</code>, <code class="verbatim">q</code>, …) gets the new type, and other keys are added after Org's.</p> | ||
| 444 | <pre><code class="language-toml highlight"><span class="source toml"><span class="punctuation definition table toml">[</span><span class="entity name section toml">org-structure-template-alist</span><span class="punctuation definition table toml">]</span> | ||
| 445 | <span class="variable other key toml">el</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>src emacs-lisp<span class="punctuation definition string end toml">"</span></span> | ||
| 446 | <span class="variable other key toml">py</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>src python<span class="punctuation definition string end toml">"</span></span></span></code></pre> | ||
| 447 | <p>Keys are letters, digits, <code class="verbatim">_</code> and <code class="verbatim">-</code>. Without the table, Org's templates apply. Emacs import adds entries here and so does nothing else in the app; remove one by deleting its line.</p> | ||
| 448 | <h3 id="denote-templates">[denote-templates]</h3> | ||
| 449 | <p>Text a new Denote note starts with after its front matter, chosen by key when <code class="verbatim">denote-prompts</code> has <code class="verbatim">template</code>. Mirrors <code class="verbatim">denote-templates</code>.</p> | ||
| 450 | <pre><code class="language-toml highlight"><span class="source toml"><span class="punctuation definition table toml">[</span><span class="entity name section toml">denote-templates</span><span class="punctuation definition table toml">]</span> | ||
| 451 | <span class="variable other key toml">report</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>* Summary<span class="constant character escape toml">\n</span><span class="constant character escape toml">\n</span>* Details<span class="constant character escape toml">\n</span><span class="punctuation definition string end toml">"</span></span> | ||
| 452 | <span class="variable other key toml">memo</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>* To<span class="constant character escape toml">\n</span><span class="constant character escape toml">\n</span>* From<span class="constant character escape toml">\n</span><span class="punctuation definition string end toml">"</span></span></span></code></pre> | ||
| 453 | <p>Keys are letters, digits, <code class="verbatim">_</code> and <code class="verbatim">-</code>. Emacs import adds entries here; remove one by deleting its line.</p> | ||
| 454 | <h3><a href="publish">publish</a></h3> | ||
| 455 | <p>Publishing projects, one table each, as <code class="verbatim">org-publish-project-alist</code> has them. They're read when you publish; see <a href="12-export.org::*Publishing">Publishing</a> for the keys. The Settings window leaves them as they are.</p> | ||
| 456 | <h3 id="theme">[theme]</h3> | ||
| 457 | <table> | ||
| 458 | <thead> | ||
| 459 | <tr><th>Key</th><th>Type</th><th>Default</th><th>Effect</th></tr> | ||
| 460 | </thead> | ||
| 461 | <tbody> | ||
| 462 | <tr><td><code class="verbatim">font</code></td><td>string</td><td><code class="verbatim">""</code></td><td>A font family. <code class="verbatim">""</code> uses the system's monospaced font.</td></tr> | ||
| 463 | <tr><td><code class="verbatim">body-font</code></td><td>string</td><td><code class="verbatim">""</code></td><td>A font family for prose, or <code class="verbatim">"system"</code> for the system's proportional font. <code class="verbatim">""</code> uses <code class="verbatim">font</code> throughout.</td></tr> | ||
| 464 | <tr><td><code class="verbatim">font-size</code></td><td>integer</td><td><code class="verbatim">13</code></td><td>Points.</td></tr> | ||
| 465 | <tr><td><code class="verbatim">line-spacing</code></td><td>integer</td><td><code class="verbatim">2</code></td><td>Points between lines.</td></tr> | ||
| 466 | <tr><td><code class="verbatim">text-width</code></td><td>integer</td><td><code class="verbatim">0</code></td><td>The widest the text runs, in columns of <code class="verbatim">font</code>, centred in a wider editor. <code class="verbatim">0</code> uses the whole width.</td></tr> | ||
| 467 | <tr><td><code class="verbatim">heading-size-step</code></td><td>integer</td><td><code class="verbatim">1</code></td><td>Points a heading is larger than the level below. Level 4 and deeper are body size.</td></tr> | ||
| 468 | <tr><td><code class="verbatim">light-theme</code></td><td>string</td><td><code class="verbatim">"default-light"</code></td><td>The built-in theme for light appearance: <code class="verbatim">default-light</code>, <code class="verbatim">solarized-light</code>, <code class="verbatim">gruvbox-light</code>, <code class="verbatim">modus-operandi</code>, <code class="verbatim">catppuccin-latte</code>, <code class="verbatim">tomorrow</code> or <code class="verbatim">paper</code>.</td></tr> | ||
| 469 | <tr><td><code class="verbatim">dark-theme</code></td><td>string</td><td><code class="verbatim">"default-dark"</code></td><td>The built-in theme for dark appearance: <code class="verbatim">default-dark</code>, <code class="verbatim">solarized-dark</code>, <code class="verbatim">gruvbox-dark</code>, <code class="verbatim">modus-vivendi</code>, <code class="verbatim">catppuccin-mocha</code>, <code class="verbatim">nord</code>, <code class="verbatim">dracula</code>, <code class="verbatim">tokyo-night</code> or <code class="verbatim">doom-one</code>.</td></tr> | ||
| 470 | <tr><td><code class="verbatim">theme-file</code></td><td>string</td><td><code class="verbatim">""</code></td><td>A theme in its own file in the configuration folder, applied under the colors in <code class="verbatim">config.toml</code>.</td></tr> | ||
| 471 | </tbody> | ||
| 472 | </table> | ||
| 473 | <p>Any other key in <code class="verbatim">[theme]</code> is a color; see Themes below.</p> | ||
| 474 | <h3 id="orgstar">[orgstar]</h3> | ||
| 475 | <table> | ||
| 476 | <thead> | ||
| 477 | <tr><th>Key</th><th>Type</th><th>Default</th><th>Effect</th></tr> | ||
| 478 | </thead> | ||
| 479 | <tbody> | ||
| 480 | <tr><td><code class="verbatim">save</code></td><td>string</td><td><code class="verbatim">"automatic"</code></td><td><code class="verbatim">automatic</code> (one second after typing stops) or <code class="verbatim">explicit</code> (only with <code class="verbatim">⌘S</code>).</td></tr> | ||
| 481 | <tr><td><code class="verbatim">keymap</code></td><td>string</td><td><code class="verbatim">"emacs"</code></td><td><code class="verbatim">emacs</code>, <code class="verbatim">mac</code> or <code class="verbatim">doom</code>. Your own bindings go in <code class="verbatim">keymap.toml</code>.</td></tr> | ||
| 482 | <tr><td><code class="verbatim">option-as-meta</code></td><td>string</td><td><code class="verbatim">"left"</code></td><td>Which Option key is Meta: <code class="verbatim">left</code>, <code class="verbatim">right</code>, <code class="verbatim">both</code> or <code class="verbatim">none</code>.</td></tr> | ||
| 483 | <tr><td><code class="verbatim">pdf-margin</code></td><td>integer</td><td><code class="verbatim">50</code></td><td>PDF export's page margins, in points.</td></tr> | ||
| 484 | <tr><td><code class="verbatim">pdf-font</code></td><td>string</td><td><code class="verbatim">""</code></td><td>A font family for PDF export's text; <code class="verbatim">""</code> keeps the export's own.</td></tr> | ||
| 485 | <tr><td><code class="verbatim">pdf-page-numbers</code></td><td>boolean</td><td><code class="verbatim">true</code></td><td>Number PDF export's pages.</td></tr> | ||
| 486 | <tr><td><code class="verbatim">tab-bar</code></td><td>boolean</td><td><code class="verbatim">false</code></td><td>A tab for each open buffer above the editor.</td></tr> | ||
| 487 | <tr><td><code class="verbatim">show-markup</code></td><td>boolean</td><td><code class="verbatim">false</code></td><td>Show link brackets and emphasis markers.</td></tr> | ||
| 488 | <tr><td><code class="verbatim">show-hidden-files</code></td><td>boolean</td><td><code class="verbatim">true</code></td><td>List dotfiles and dot folders in your folders.</td></tr> | ||
| 489 | <tr><td><code class="verbatim">ignored-folders</code></td><td>string</td><td>see below</td><td>Folder names never listed or searched, separated by spaces.</td></tr> | ||
| 490 | <tr><td><code class="verbatim">agenda-include-subfolders</code></td><td>boolean</td><td><code class="verbatim">false</code></td><td>The agenda reads org files in subfolders too.</td></tr> | ||
| 491 | <tr><td><code class="verbatim">agenda-exclude-archives</code></td><td>boolean</td><td><code class="verbatim">false</code></td><td>The agenda leaves out files that other agenda files archive to.</td></tr> | ||
| 492 | <tr><td><code class="verbatim">reminders</code></td><td>boolean</td><td><code class="verbatim">true</code></td><td>Notify before timed entries.</td></tr> | ||
| 493 | <tr><td><code class="verbatim">calendar-events</code></td><td>boolean</td><td><code class="verbatim">false</code></td><td>Show events from Calendar in the agenda.</td></tr> | ||
| 494 | <tr><td><code class="verbatim">calendar-event-calendars</code></td><td>string</td><td><code class="verbatim">""</code></td><td>The calendars whose events show, by title or identifier, separated by commas; <code class="verbatim">""</code> for all.</td></tr> | ||
| 495 | <tr><td><code class="verbatim">agenda-reminders</code></td><td>boolean</td><td><code class="verbatim">false</code></td><td>Show incomplete reminders with a due date from Reminders in the agenda, read-only.</td></tr> | ||
| 496 | <tr><td><code class="verbatim">agenda-reminder-lists</code></td><td>string</td><td><code class="verbatim">""</code></td><td>The Reminders lists shown, by title or identifier, separated by commas; <code class="verbatim">""</code> for all.</td></tr> | ||
| 497 | <tr><td><code class="verbatim">global-capture-hotkey</code></td><td>boolean</td><td><code class="verbatim">true</code></td><td><code class="verbatim">⌃⌥Space</code> opens Capture from any app.</td></tr> | ||
| 498 | <tr><td><code class="verbatim">menu-bar-item</code></td><td>boolean</td><td><code class="verbatim">false</code></td><td>Keep orgstar in the menu bar, with capture and today's agenda; off shows it only while a clock runs.</td></tr> | ||
| 499 | </tbody> | ||
| 500 | </table> | ||
| 501 | <p>The default <code class="verbatim">ignored-folders</code> is:</p> | ||
| 502 | <pre><code class="language-toml highlight"><span class="source toml"><span class="variable other key toml">ignored-folders</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>.Spotlight-V100 .Trash .build .bzr .cache .fseventsd .git .gradle .hg .jj .mypy_cache .next .pytest_cache .stfolder .stversions .svn .terraform .tox .venv node_modules<span class="punctuation definition string end toml">"</span></span></span></code></pre> | ||
| 503 | <h3 id="an-example">An example</h3> | ||
| 504 | <pre><code class="language-toml highlight"><span class="source toml"><span class="variable other key toml">fill-column</span> <span class="keyword operator assignment toml">=</span> <span class="constant numeric toml">72</span> | ||
| 505 | <span class="variable other key toml">org-tags-column</span> <span class="keyword operator assignment toml">=</span> <span class="constant numeric toml">0</span> | ||
| 506 | <span class="variable other key toml">org-todo-keywords</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>TODO(t) NEXT(n) WAIT(w@/!) | DONE(d!) CANCELED(c@)<span class="punctuation definition string end toml">"</span></span> | ||
| 507 | <span class="variable other key toml">org-log-done</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>time<span class="punctuation definition string end toml">"</span></span> | ||
| 508 | <span class="variable other key toml">org-log-into-drawer</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>LOGBOOK<span class="punctuation definition string end toml">"</span></span> | ||
| 509 | <span class="variable other key toml">org-startup-truncated</span> <span class="keyword operator assignment toml">=</span> <span class="constant language toml">true</span> | ||
| 510 | <span class="variable other key toml">org-agenda-span</span> <span class="keyword operator assignment toml">=</span> <span class="constant numeric toml">7</span> | ||
| 511 | <span class="variable other key toml">org-agenda-start-day</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>+0d<span class="punctuation definition string end toml">"</span></span> | ||
| 512 | |||
| 513 | <span class="punctuation definition table toml">[</span><span class="entity name section toml">theme</span><span class="punctuation definition table toml">]</span> | ||
| 514 | <span class="variable other key toml">font</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>JetBrains Mono<span class="punctuation definition string end toml">"</span></span> | ||
| 515 | <span class="variable other key toml">font-size</span> <span class="keyword operator assignment toml">=</span> <span class="constant numeric toml">14</span> | ||
| 516 | <span class="variable other key toml">link</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>#0a7ea4<span class="punctuation definition string end toml">"</span></span> | ||
| 517 | |||
| 518 | <span class="punctuation definition table toml">[</span><span class="entity name section toml">theme.todo</span><span class="punctuation definition table toml">]</span> | ||
| 519 | <span class="variable other key toml">WAIT</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>#bf8700<span class="punctuation definition string end toml">"</span></span> | ||
| 520 | |||
| 521 | <span class="punctuation definition table toml">[</span><span class="entity name section toml">orgstar</span><span class="punctuation definition table toml">]</span> | ||
| 522 | <span class="variable other key toml">keymap</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>doom<span class="punctuation definition string end toml">"</span></span> | ||
| 523 | <span class="variable other key toml">save</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>explicit<span class="punctuation definition string end toml">"</span></span></span></code></pre> | ||
| 524 | <h3 id="names-from-earlier-versions">Names from earlier versions</h3> | ||
| 525 | <p>Earlier versions used keys such as <code class="verbatim">editor.fill-column</code> and <code class="verbatim">agenda.span</code>. orgstar still reads them. At launch, each such key in the file is renamed in place to its current name and moved to its current section; the rest of the file, and the comments on those lines, stay as they are. When a setting is in the file under both names, the current name wins and the old line is removed. A section the move leaves empty is removed. A file that lacks a whole section (such as <code class="verbatim">[theme]</code>) gets that section added at the end.</p> | ||
| 526 | <h2 id="keymap-toml-and-capture-toml">keymap.toml and capture.toml</h2> | ||
| 527 | <p><code class="verbatim">keymap.toml</code> holds <code class="verbatim">[[bind]]</code> tables with <code class="verbatim">keys</code>, <code class="verbatim">command</code>, and optionally <code class="verbatim">mode</code> and <code class="verbatim">when</code>. They layer over the preset chosen in Keys. orgstar reloads the file when it changes. See <a href="03-keys.html">Keys and commands</a>.</p> | ||
| 528 | <pre><code class="language-toml highlight"><span class="source toml"><span class="punctuation definition table array toml">[[</span><span class="entity name section toml">bind</span><span class="punctuation definition table array toml">]]</span> | ||
| 529 | <span class="variable other key toml">keys</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>C-c a<span class="punctuation definition string end toml">"</span></span> | ||
| 530 | <span class="variable other key toml">command</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>app.agenda<span class="punctuation definition string end toml">"</span></span></span></code></pre> | ||
| 531 | <p><code class="verbatim">capture.toml</code> holds <code class="verbatim">[[template]]</code> tables. Without the file, orgstar uses two templates: <code class="verbatim">t</code> (Personal todo, under <code class="verbatim">Inbox</code> in <code class="verbatim">todo.org</code>) and <code class="verbatim">n</code> (Personal notes, under <code class="verbatim">Inbox</code> in <code class="verbatim">notes.org</code>). See <a href="08-capture.html">Capture</a>.</p> | ||
| 532 | <p><code class="verbatim">views.toml</code> holds <code class="verbatim">[[view]]</code> tables for the agenda; see <a href="07-agenda.html">The agenda</a>.</p> | ||
| 533 | <h2 id="in-file-settings">In-file settings</h2> | ||
| 534 | <p>Keyword lines in a file set options for that file, as in Emacs. orgstar reads them outside blocks; for <code class="verbatim">#+STARTUP</code> only keyword lines count, so a <code class="verbatim">#+STARTUP</code> line inside a paragraph or a block changes nothing: not folding, logging or inline images.</p> | ||
| 535 | <h3 id="keywords-orgstar-reads">Keywords orgstar reads</h3> | ||
| 536 | <table> | ||
| 537 | <thead> | ||
| 538 | <tr><th>Keyword</th><th>Effect</th></tr> | ||
| 539 | </thead> | ||
| 540 | <tbody> | ||
| 541 | <tr><td><code class="verbatim">#+TODO</code>, <code class="verbatim">#+SEQ_TODO</code></td><td>A TODO sequence: active keywords, a bar, then done keywords. Without the bar, the last word is the done state. <code class="verbatim">NAME(k)</code> gives a fast-selection key, <code class="verbatim">NAME(k!/@)</code> logging on entering and leaving. Any TODO line replaces the default keywords.</td></tr> | ||
| 542 | <tr><td><code class="verbatim">#+TYP_TODO</code></td><td>A type sequence. As in Org, type sequences come first, then <code class="verbatim">#+TODO</code>, then <code class="verbatim">#+SEQ_TODO</code>.</td></tr> | ||
| 543 | <tr><td><code class="verbatim">#+PRIORITIES</code></td><td>Three values: highest, lowest, default, as <code class="verbatim">A C B</code> or <code class="verbatim">1 5 3</code>. The default is <code class="verbatim">A C B</code>.</td></tr> | ||
| 544 | <tr><td><code class="verbatim">#+STARTUP</code></td><td>Startup options; see below.</td></tr> | ||
| 545 | <tr><td><code class="verbatim">#+TAGS</code></td><td>Tags for fast tag selection with <code class="verbatim">C-c C-q</code>, with keys as <code class="verbatim">work(w)</code>, groups in <code class="verbatim">{ }</code> and tag groups in <code class="verbatim">[ ]</code>. Without <code class="verbatim">#+TAGS</code>, <code class="verbatim">C-c C-q</code> offers the tags used in the file.</td></tr> | ||
| 546 | <tr><td><code class="verbatim">#+FILETAGS</code></td><td>Tags every heading in the file inherits, as <code class="verbatim">:work:project:</code>.</td></tr> | ||
| 547 | <tr><td><code class="verbatim">#+PROPERTY</code></td><td>A file-wide property, as <code class="verbatim">#+PROPERTY: header-args :results output</code>. <code class="verbatim">NAME+</code> appends to the value.</td></tr> | ||
| 548 | <tr><td><code class="verbatim">#+CATEGORY</code></td><td>The file's category in the agenda. Without it the category is the file name.</td></tr> | ||
| 549 | <tr><td><code class="verbatim">#+ARCHIVE</code></td><td>Where <code class="verbatim">C-c C-x C-a</code> archives to. The default is <code class="verbatim">%s_archive::</code>.</td></tr> | ||
| 550 | <tr><td><code class="verbatim">#+COLUMNS</code></td><td>The default column view format.</td></tr> | ||
| 551 | <tr><td><code class="verbatim">#+LINK</code></td><td>A link abbreviation, as <code class="verbatim">#+LINK: gh https://github.com/%s</code>.</td></tr> | ||
| 552 | <tr><td><code class="verbatim">#+CONSTANTS</code></td><td>Constants for table formulas, as <code class="verbatim">#+CONSTANTS: c=299792458 pi=3.14</code>.</td></tr> | ||
| 553 | <tr><td><code class="verbatim">#+SETUPFILE</code></td><td>A file whose keyword lines count as this file's; see below.</td></tr> | ||
| 554 | <tr><td><code class="verbatim">#+TITLE</code>, <code class="verbatim">#+AUTHOR</code>, <code class="verbatim">#+DESCRIPTION</code></td><td>Used by export, Quick Look and Spotlight.</td></tr> | ||
| 555 | <tr><td><code class="verbatim">#+OPTIONS</code>, <code class="verbatim">#+MACRO</code>, <code class="verbatim">#+INCLUDE</code>, <code class="verbatim">#+EXCLUDE_TAGS</code>, <code class="verbatim">#+SELECT_TAGS</code></td><td>Export settings; see <a href="12-export.html">Export</a>.</td></tr> | ||
| 556 | </tbody> | ||
| 557 | </table> | ||
| 558 | <pre><code class="language-org highlight"><span class="text org"><span class="keyword other keyword org">#+TODO:</span><span class="string unquoted org"> TODO(t) NEXT(n) WAIT(w@/!) | DONE(d!) CANCELED(c@)</span> | ||
| 559 | <span class="keyword other keyword org">#+PRIORITIES:</span><span class="string unquoted org"> A E C</span> | ||
| 560 | <span class="keyword other keyword org">#+STARTUP:</span><span class="string unquoted org"> content logdrawer</span> | ||
| 561 | <span class="keyword other keyword org">#+FILETAGS:</span><span class="string unquoted org"> :work:</span> | ||
| 562 | <span class="keyword other keyword org">#+CATEGORY:</span><span class="string unquoted org"> acme</span></span></code></pre> | ||
| 563 | <p>After you change a keyword line, press <code class="verbatim">C-c C-c</code> on it to read the file's settings again, as <code class="verbatim">org-mode-restart</code> does in Emacs. Changes to <code class="verbatim">#+TODO</code>, <code class="verbatim">#+SEQ_TODO</code>, <code class="verbatim">#+TYP_TODO</code> and <code class="verbatim">#+PRIORITIES</code> apply as you type.</p> | ||
| 564 | <h3 id="startup-options">#+STARTUP options</h3> | ||
| 565 | <table> | ||
| 566 | <thead> | ||
| 567 | <tr><th>Option</th><th>Effect</th></tr> | ||
| 568 | </thead> | ||
| 569 | <tbody> | ||
| 570 | <tr><td><code class="verbatim">overview</code>, <code class="verbatim">fold</code></td><td>Only top-level headings show when the file opens.</td></tr> | ||
| 571 | <tr><td><code class="verbatim">content</code></td><td>All headings show, no bodies.</td></tr> | ||
| 572 | <tr><td><code class="verbatim">showall</code>, <code class="verbatim">nofold</code></td><td>Everything shows.</td></tr> | ||
| 573 | <tr><td><code class="verbatim">show2levels</code> … <code class="verbatim">show5levels</code> (any <code class="verbatim">showNlevels</code>)</td><td>Headings down to level N show.</td></tr> | ||
| 574 | <tr><td><code class="verbatim">showeverything</code></td><td>Everything shows, including drawers and blocks; <code class="verbatim">VISIBILITY</code> properties are ignored.</td></tr> | ||
| 575 | <tr><td><code class="verbatim">hidedrawers</code>, <code class="verbatim">nohidedrawers</code></td><td>Fold or don't fold drawers at startup.</td></tr> | ||
| 576 | <tr><td><code class="verbatim">hideblocks</code>, <code class="verbatim">nohideblocks</code></td><td>Fold or don't fold blocks at startup.</td></tr> | ||
| 577 | <tr><td><code class="verbatim">indent</code>, <code class="verbatim">noindent</code></td><td>Virtual indentation on or off.</td></tr> | ||
| 578 | <tr><td><code class="verbatim">hidestars</code>, <code class="verbatim">showstars</code></td><td>Hide leading stars or show them.</td></tr> | ||
| 579 | <tr><td><code class="verbatim">align</code>, <code class="verbatim">noalign</code></td><td>Align every table when the file opens, or don't.</td></tr> | ||
| 580 | <tr><td><code class="verbatim">inlineimages</code>, <code class="verbatim">noinlineimages</code></td><td>Show image links as images, or don't.</td></tr> | ||
| 581 | <tr><td><code class="verbatim">latexpreview</code>, <code class="verbatim">nolatexpreview</code></td><td>Show LaTeX fragments as typeset math, or don't.</td></tr> | ||
| 582 | <tr><td><code class="verbatim">shrink</code></td><td>Shrink table columns that have a width cookie.</td></tr> | ||
| 583 | <tr><td><code class="verbatim">logdone</code>, <code class="verbatim">lognotedone</code>, <code class="verbatim">nologdone</code></td><td>Record a time, a note, or nothing when an entry becomes done.</td></tr> | ||
| 584 | <tr><td><code class="verbatim">logrepeat</code>, <code class="verbatim">lognoterepeat</code>, <code class="verbatim">nologrepeat</code></td><td>The same, when a repeating entry is completed.</td></tr> | ||
| 585 | <tr><td><code class="verbatim">logreschedule</code>, <code class="verbatim">lognotereschedule</code>, <code class="verbatim">nologreschedule</code></td><td>The same, when a scheduled date changes.</td></tr> | ||
| 586 | <tr><td><code class="verbatim">logredeadline</code>, <code class="verbatim">lognoteredeadline</code>, <code class="verbatim">nologredeadline</code></td><td>The same, when a deadline changes.</td></tr> | ||
| 587 | <tr><td><code class="verbatim">logdrawer</code>, <code class="verbatim">nologdrawer</code></td><td>Notes go in <code class="verbatim">LOGBOOK</code>, or under the heading.</td></tr> | ||
| 588 | </tbody> | ||
| 589 | </table> | ||
| 590 | <p>After the startup visibility, orgstar applies each heading's <code class="verbatim">VISIBILITY</code> property and folds subtrees tagged <code class="verbatim">ARCHIVE</code>, unless <code class="verbatim">showeverything</code> is set.</p> | ||
| 591 | <p>Completion offers every option of <code class="verbatim">org-startup-options</code>. Options not in the table above, such as <code class="verbatim">odd</code>, <code class="verbatim">entitiespretty</code>, <code class="verbatim">constSI</code> and the footnote options, are accepted and ignored.</p> | ||
| 592 | <h3 id="setup-files">Setup files</h3> | ||
| 593 | <p><code class="verbatim">#+SETUPFILE: path</code> reads the keyword lines of another file and treats them as if they were in this file, before its own lines. This follows <code class="verbatim">org--collect-keywords-1</code> in Org:</p> | ||
| 594 | <ul> | ||
| 595 | <li>A relative path is relative to the folder of the file that names it. <code class="verbatim">~</code> expands to your home folder. Quotes around the path are removed.</li> | ||
| 596 | <li>A setup file can name further setup files; each is read once, and a file never reads itself.</li> | ||
| 597 | <li>URLs (anything starting with <code class="verbatim">scheme://</code>) aren't fetched.</li> | ||
| 598 | <li>A setup file that can't be read, or isn't UTF-8, is skipped without a message.</li> | ||
| 599 | </ul> | ||
| 600 | <p>Keywords from setup files count for TODO keywords, priorities, <code class="verbatim">#+STARTUP</code>, <code class="verbatim">#+TAGS</code>, <code class="verbatim">#+FILETAGS</code>, <code class="verbatim">#+PROPERTY</code>, <code class="verbatim">#+CATEGORY</code>, <code class="verbatim">#+ARCHIVE</code>, <code class="verbatim">#+COLUMNS</code>, <code class="verbatim">#+LINK</code>, <code class="verbatim">#+CONSTANTS</code> and export. orgstar reads setup files when a file opens, when you press <code class="verbatim">C-c C-c</code> on a keyword line, and when the file changes on disk. If you edit only the setup file, press <code class="verbatim">C-c C-c</code> on a keyword line of each open file that uses it.</p> | ||
| 601 | <h2 id="import-from-emacs">Import from Emacs</h2> | ||
| 602 | <p>Import from Emacs reads your Emacs or Doom Emacs configuration and offers to carry its org settings, folders, capture templates, key bindings and agenda views over. Nothing changes until you choose Import.</p> | ||
| 603 | <h3 id="running-it">Running it</h3> | ||
| 604 | <ol> | ||
| 605 | <li>Open Settings ▸ General and click Import from Emacs…, or run Import from Emacs… from the command palette (<code class="verbatim">⇧⌘P</code>).</li> | ||
| 606 | <li>orgstar looks for a configuration in these places, in order, and reads the first it finds: <code class="verbatim">$DOOMDIR</code>, <code class="verbatim">~/.config/doom</code>, <code class="verbatim">~/.doom.d</code>, <code class="verbatim">~/.config/emacs</code>, <code class="verbatim">~/.emacs.d</code>, <code class="verbatim">~/.emacs</code>. A folder counts when it holds <code class="verbatim">init.el</code>, <code class="verbatim">config.el</code>, <code class="verbatim">config.org</code> or <code class="verbatim">custom.el</code>. Doom's own installation folder (one with <code class="verbatim">lisp/doom.el</code>) is skipped.</li> | ||
| 607 | <li>To read another configuration, click Choose… and pick a file or a folder. For a folder, orgstar reads <code class="verbatim">init.el</code>, <code class="verbatim">config.el</code> (or <code class="verbatim">config.org</code> when there is no <code class="verbatim">config.el</code>) and <code class="verbatim">custom.el</code> in it.</li> | ||
| 608 | <li>The sheet lists what it found under Settings, Folders, Capture templates, Key bindings, Structure templates and Agenda views, each with the line it came from (<code class="verbatim">config.el:27</code>, or <code class="verbatim">Doom default</code>). Everything is selected; clear what you don't want.</li> | ||
| 609 | <li>Click Import. The sheet then summarizes what was imported and any problems.</li> | ||
| 610 | </ol> | ||
| 611 | <p>What Import does with each kind of item:</p> | ||
| 612 | <ul> | ||
| 613 | <li>Settings are written to <code class="verbatim">config.toml</code>.</li> | ||
| 614 | <li>Folders are added to the sidebar if they exist and aren't there already.</li> | ||
| 615 | <li>Capture templates are appended to <code class="verbatim">capture.toml</code>, except those whose key is already in the file.</li> | ||
| 616 | <li>Key bindings are appended to <code class="verbatim">keymap.toml</code>, except those already in the file with the same keys, command and state. Running the import again adds no duplicates.</li> | ||
| 617 | <li>Agenda views are appended to <code class="verbatim">views.toml</code>, except those whose name is already in the file.</li> | ||
| 618 | </ul> | ||
| 619 | <p>The Not imported section lists what orgstar read but can't use, with the reason: settings it has no equivalent for, values it can't work out without running Emacs, bindings to code rather than a command, and files it couldn't read. The footer counts variables that aren't about org, which are left alone.</p> | ||
| 620 | <p>A literate configuration (<code class="verbatim">config.org</code>) is read as <code class="verbatim">org-babel-load-file</code> and Doom tangle it: its <code class="verbatim">emacs-lisp</code> and <code class="verbatim">elisp</code> blocks, except blocks whose <code class="verbatim">:tangle</code> is <code class="verbatim">no</code> (set on the block, in a <code class="verbatim">#+HEADER:</code> line, in a <code class="verbatim">header-args</code> property or in <code class="verbatim">#+PROPERTY:</code>) and blocks under a COMMENT or <code class="verbatim">:ARCHIVE:</code> heading. Items show the line of <code class="verbatim">config.org</code> they came from. When the folder also has a <code class="verbatim">config.el</code>, it is read instead, as the file <code class="verbatim">config.org</code> tangles to.</p> | ||
| 621 | <p>On iOS, Settings ▸ Import from Emacs reads a configuration folder you choose; see <a href="14-ios.html">iOS</a>.</p> | ||
| 622 | <p>In the <a href="../install.html">Mac App Store version</a>, Import from Emacs first opens a picker at the configuration it finds, since the app can read only what you choose. For a Doom configuration, Choose Doom Folder… picks Doom's installation folder, so its org defaults are read; without it the footer says Doom's own org defaults were skipped. On Import, each folder to add opens a picker at that folder, and only the folders you choose there are added.</p> | ||
| 623 | <h3 id="doom-emacs">Doom Emacs</h3> | ||
| 624 | <p>A configuration counts as Doom when it contains <code class="verbatim">(doom!</code>, <code class="verbatim">(map! = or =(after! =. orgstar then also reads Doom's own org defaults, from the Doom installation in =$EMACSDIR</code>, <code class="verbatim">~/.config/emacs</code> or <code class="verbatim">~/.emacs.d</code>: <code class="verbatim">modules/lang/org/config.el</code> and <code class="verbatim">lisp/doom-emacs.el</code>. Your configuration overrides them. Doom defaults orgstar has no use for are counted in the footer rather than listed.</p> | ||
| 625 | <p>A Doom configuration, or any configuration that enables <code class="verbatim">evil</code>, adds <code class="verbatim">keymap = "doom"</code>.</p> | ||
| 626 | <h3 id="what-it-reads">What it reads</h3> | ||
| 627 | <p>orgstar reads the configuration as Lisp data; it never runs it. It looks at these forms:</p> | ||
| 628 | <table> | ||
| 629 | <thead> | ||
| 630 | <tr><th>Form</th><th>What orgstar takes</th></tr> | ||
| 631 | </thead> | ||
| 632 | <tbody> | ||
| 633 | <tr><td><code class="verbatim">setq</code>, <code class="verbatim">setq-default</code>, <code class="verbatim">setq!</code>, <code class="verbatim">setopt</code>, <code class="verbatim">csetq</code></td><td>Each variable and value</td></tr> | ||
| 634 | <tr><td><code class="verbatim">defvar</code>, <code class="verbatim">defcustom</code></td><td>The value, below every other assignment</td></tr> | ||
| 635 | <tr><td><code class="verbatim">custom-set-variables</code></td><td>Each quoted <code class="verbatim">(variable value)</code></td></tr> | ||
| 636 | <tr><td><code class="verbatim">after!</code>, <code class="verbatim">with-eval-after-load</code>, <code class="verbatim">eval-after-load</code></td><td>The forms inside, ranked above plain assignments</td></tr> | ||
| 637 | <tr><td><code class="verbatim">add-to-list</code> on <code class="verbatim">org-structure-template-alist</code></td><td>The entry added</td></tr> | ||
| 638 | <tr><td><code class="verbatim">use-package</code>, <code class="verbatim">use-package!</code></td><td>Forms in <code class="verbatim">:config</code> and <code class="verbatim">:init</code>, and pairs in <code class="verbatim">:custom</code></td></tr> | ||
| 639 | <tr><td><code class="verbatim">progn</code>, <code class="verbatim">when</code>, <code class="verbatim">unless</code>, <code class="verbatim">if</code>, <code class="verbatim">let</code>, <code class="verbatim">let*</code>, <code class="verbatim">with-no-warnings</code></td><td>The forms inside. Conditions aren't evaluated, so every branch is read.</td></tr> | ||
| 640 | <tr><td><code class="verbatim">map!</code> (Doom)</td><td>Bindings, with <code class="verbatim">:leader</code> (<code class="verbatim">SPC</code>), <code class="verbatim">:localleader</code> (<code class="verbatim">SPC m</code>), <code class="verbatim">:prefix</code>, and state keywords such as <code class="verbatim">:n</code>, <code class="verbatim">:i</code>, <code class="verbatim">:v</code>, <code class="verbatim">:nv</code></td></tr> | ||
| 641 | <tr><td><code class="verbatim">define-key</code>, <code class="verbatim">keymap-set</code>, <code class="verbatim">global-set-key</code>, <code class="verbatim">keymap-global-set</code></td><td>Bindings</td></tr> | ||
| 642 | <tr><td><code class="verbatim">evil-define-key</code>, <code class="verbatim">evil-define-key*</code></td><td>Bindings in the <code class="verbatim">normal</code>, <code class="verbatim">insert</code> or <code class="verbatim">visual</code> state</td></tr> | ||
| 643 | </tbody> | ||
| 644 | </table> | ||
| 645 | <p>When a variable is set more than once, the last assignment wins, with assignments inside <code class="verbatim">after!</code> and similar forms winning over plain ones, and those over Doom's defaults.</p> | ||
| 646 | <p>orgstar works out a value when it is a literal, a quoted or backquoted form (with <code class="verbatim">,</code> and <code class="verbatim">,@</code>), a variable set earlier in the configuration, or a call to <code class="verbatim">list</code>, <code class="verbatim">concat</code>, <code class="verbatim">expand-file-name</code>, <code class="verbatim">file-name-concat</code> or <code class="verbatim">file-name-as-directory</code> on such values. Anything else, such as a function call or a value computed from the environment, is listed under Not imported as worked out when Emacs runs.</p> | ||
| 647 | <p>Only variables whose names start with <code class="verbatim">org-</code>, <code class="verbatim">appt-</code>, <code class="verbatim">display-line-numbers</code>, <code class="verbatim">fill-column</code>, <code class="verbatim">evil-</code>, <code class="verbatim">doom-font</code>, <code class="verbatim">doom-variable-pitch-font</code>, <code class="verbatim">doom-theme</code> or <code class="verbatim">calendar-week-start-day</code> are considered.</p> | ||
| 648 | <h3 id="how-variables-map">How variables map</h3> | ||
| 649 | <table> | ||
| 650 | <thead> | ||
| 651 | <tr><th>Emacs variable</th><th>Becomes</th></tr> | ||
| 652 | </thead> | ||
| 653 | <tbody> | ||
| 654 | <tr><td><code class="verbatim">fill-column</code>, <code class="verbatim">org-tags-column</code>, <code class="verbatim">appt-message-warning-time</code>, <code class="verbatim">org-deadline-warning-days</code></td><td>The same key, when the value is a number</td></tr> | ||
| 655 | <tr><td><code class="verbatim">org-insert-heading-respect-content</code>, <code class="verbatim">org-list-allow-alphabetical</code>, <code class="verbatim">org-hide-emphasis-markers</code>, <code class="verbatim">org-pretty-entities</code>, <code class="verbatim">org-cycle-hide-drawer-startup</code>, <code class="verbatim">org-cycle-hide-block-startup</code>, <code class="verbatim">org-use-speed-commands</code>, <code class="verbatim">org-startup-with-inline-images</code>, <code class="verbatim">org-startup-with-latex-preview</code>, <code class="verbatim">org-startup-indented</code>, <code class="verbatim">org-hide-leading-stars</code>, <code class="verbatim">org-startup-align-all-tables</code>, <code class="verbatim">org-startup-truncated</code></td><td>The same key: <code class="verbatim">nil</code> or an empty list is <code class="verbatim">false</code>, anything else <code class="verbatim">true</code></td></tr> | ||
| 656 | <tr><td><code class="verbatim">org-hide-drawer-startup</code>, <code class="verbatim">org-hide-block-startup</code></td><td><code class="verbatim">org-cycle-hide-drawer-startup</code>, <code class="verbatim">org-cycle-hide-block-startup</code></td></tr> | ||
| 657 | <tr><td><code class="verbatim">org-M-RET-may-split-line</code></td><td><code class="verbatim">org-M-RET-may-split-line</code>, from the <code class="verbatim">default</code> entry of an alist; other per-context entries aren't supported</td></tr> | ||
| 658 | <tr><td><code class="verbatim">org-agenda-prefix-format</code></td><td><code class="verbatim">[org-agenda-prefix-format]</code>: a string sets all three views; an alist sets <code class="verbatim">agenda</code>, <code class="verbatim">todo</code> and <code class="verbatim">tags</code></td></tr> | ||
| 659 | <tr><td><code class="verbatim">org-agenda-sorting-strategy</code></td><td><code class="verbatim">[org-agenda-sorting-strategy]</code>: a list sets all four views; an alist sets <code class="verbatim">agenda</code>, <code class="verbatim">todo</code>, <code class="verbatim">tags</code> and <code class="verbatim">search</code>. A list with <code class="verbatim">user-defined-up</code> or <code class="verbatim">user-defined-down</code> isn't imported</td></tr> | ||
| 660 | <tr><td><code class="verbatim">org-agenda-sort-notime-is-late</code>, <code class="verbatim">org-agenda-sort-noeffort-is-high</code>, <code class="verbatim">org-agenda-use-time-grid</code>, <code class="verbatim">org-agenda-show-current-time-in-grid</code></td><td>The same key, as booleans</td></tr> | ||
| 661 | <tr><td><code class="verbatim">org-agenda-custom-commands</code></td><td>A <code class="verbatim">views.toml</code> view per command, named by its description, and per block a <code class="verbatim">[[view.block]]</code>. Types <code class="verbatim">agenda</code>, <code class="verbatim">alltodo</code>, <code class="verbatim">todo</code>, <code class="verbatim">tags</code>, <code class="verbatim">tags-todo</code>, <code class="verbatim">search</code> and <code class="verbatim">stuck</code>; settings <code class="verbatim">org-agenda-span</code>, <code class="verbatim">org-agenda-start-day</code>, <code class="verbatim">org-agenda-overriding-header</code>, <code class="verbatim">org-agenda-sorting-strategy</code>, <code class="verbatim">org-agenda-prefix-format</code> (a string) and <code class="verbatim">org-agenda-skip-function</code> as <code class="verbatim">org-agenda-skip-entry-if</code> or <code class="verbatim">org-agenda-skip-subtree-if</code>. Entries from <code class="verbatim">(add-to-list 'org-agenda-custom-commands …)</code> too. Other types, other settings and file lists aren't imported</td></tr> | ||
| 662 | <tr><td><code class="verbatim">org-refile-targets</code></td><td><code class="verbatim">org-refile-targets</code>, the value written as Lisp, when its files and specs are ones orgstar reads (not functions or variables)</td></tr> | ||
| 663 | <tr><td><code class="verbatim">org-refile-use-outline-path</code>, <code class="verbatim">org-refile-allow-creating-parent-nodes</code></td><td>The symbol as a string</td></tr> | ||
| 664 | <tr><td><code class="verbatim">org-stuck-projects</code></td><td><code class="verbatim">[org-stuck-projects]</code>: <code class="verbatim">match</code>, <code class="verbatim">todo</code>, <code class="verbatim">tags</code> and <code class="verbatim">regexp</code> from the four elements</td></tr> | ||
| 665 | <tr><td><code class="verbatim">org-agenda-time-grid</code></td><td><code class="verbatim">[org-agenda-time-grid]</code>: <code class="verbatim">when</code> from the first element, <code class="verbatim">times</code> from the second; the strings are left out</td></tr> | ||
| 666 | <tr><td><code class="verbatim">org-icalendar-use-deadline</code>, <code class="verbatim">org-icalendar-use-scheduled</code></td><td>The list's symbols, separated by spaces</td></tr> | ||
| 667 | <tr><td><code class="verbatim">org-icalendar-include-todo</code></td><td><code class="verbatim">nil</code>, <code class="verbatim">t</code>, <code class="verbatim">all</code> or <code class="verbatim">unblocked</code>, or a list of keywords separated by spaces</td></tr> | ||
| 668 | <tr><td><code class="verbatim">org-icalendar-combined-agenda-file</code></td><td>The file name, from a string or a simple form</td></tr> | ||
| 669 | <tr><td><code class="verbatim">org-display-remote-inline-images</code></td><td>The symbol as a string, when it's <code class="verbatim">skip</code>, <code class="verbatim">download</code> or <code class="verbatim">cache</code></td></tr> | ||
| 670 | <tr><td><code class="verbatim">org-publish-project-alist</code></td><td>A <code class="verbatim">[[publish]]</code> table in <code class="verbatim">config.toml</code> per project whose publishing functions are <code class="verbatim">org-html-publish-to-html</code>, <code class="verbatim">org-md-publish-to-md</code> or <code class="verbatim">org-publish-attachment</code>: the directories, <code class="verbatim">:base-extension</code>, <code class="verbatim">:recursive</code>, <code class="verbatim">:exclude</code>, <code class="verbatim">:include</code>, <code class="verbatim">:body-only</code>, the sitemap properties and <code class="verbatim">:components</code>. Other properties are reported as left out</td></tr> | ||
| 671 | <tr><td><code class="verbatim">org-log-done</code>, <code class="verbatim">org-log-reschedule</code>, <code class="verbatim">org-log-redeadline</code></td><td>The same key: <code class="verbatim">nil</code>, <code class="verbatim">time</code> (also <code class="verbatim">t</code>) or <code class="verbatim">note</code></td></tr> | ||
| 672 | <tr><td><code class="verbatim">org-log-into-drawer</code></td><td>A string as given; <code class="verbatim">t</code> becomes <code class="verbatim">"LOGBOOK"</code>; <code class="verbatim">nil</code> becomes <code class="verbatim">""</code></td></tr> | ||
| 673 | <tr><td><code class="verbatim">display-line-numbers-type</code></td><td><code class="verbatim">true</code> unless <code class="verbatim">nil</code>; <code class="verbatim">relative</code> and <code class="verbatim">visual</code> as they are</td></tr> | ||
| 674 | <tr><td><code class="verbatim">auto-fill-mode</code></td><td><code class="verbatim">true</code> for <code class="verbatim">(add-hook 'org-mode-hook #'auto-fill-mode)</code> or <code class="verbatim">turn-on-auto-fill</code>, or in <code class="verbatim">text-mode-hook</code></td></tr> | ||
| 675 | <tr><td><code class="verbatim">org-agenda-span</code></td><td>A number, or <code class="verbatim">day</code> (1), <code class="verbatim">week</code> (7), <code class="verbatim">fortnight</code> (14), <code class="verbatim">month</code> (30), <code class="verbatim">year</code> (365)</td></tr> | ||
| 676 | <tr><td><code class="verbatim">org-clock-idle-time</code></td><td>Minutes; <code class="verbatim">nil</code> becomes <code class="verbatim">0</code> (never)</td></tr> | ||
| 677 | <tr><td><code class="verbatim">org-clock-history-length</code></td><td>The same key, when the value is a positive number</td></tr> | ||
| 678 | <tr><td><code class="verbatim">org-clock-into-drawer</code></td><td>A drawer name as given, a number as a string, <code class="verbatim">t</code> or <code class="verbatim">nil</code></td></tr> | ||
| 679 | <tr><td><code class="verbatim">org-clock-rounding-minutes</code>, <code class="verbatim">org-clock-out-remove-zero-time-clocks</code></td><td>The same key</td></tr> | ||
| 680 | <tr><td><code class="verbatim">org-clock-in-switch-to-state</code></td><td>A keyword string; a function isn't supported</td></tr> | ||
| 681 | <tr><td><code class="verbatim">org-use-tag-inheritance</code></td><td><code class="verbatim">t</code>, <code class="verbatim">nil</code>, a list of tags as names separated by spaces, or a regular expression in braces</td></tr> | ||
| 682 | <tr><td><code class="verbatim">org-tags-exclude-from-inheritance</code></td><td>The list's tags separated by spaces</td></tr> | ||
| 683 | <tr><td><code class="verbatim">org-tag-alist</code></td><td><code class="verbatim">#+TAGS</code> syntax: <code class="verbatim">("work" . ?w)</code> is <code class="verbatim">work(w)</code>; <code class="verbatim">:startgroup</code>, <code class="verbatim">:endgroup</code>, <code class="verbatim">:startgrouptag</code>, <code class="verbatim">:grouptags</code>, <code class="verbatim">:endgrouptag</code> and <code class="verbatim">:newline</code> become <code class="verbatim">{</code>, <code class="verbatim">}</code>, <code class="verbatim">[</code>, <code class="verbatim">:</code>, <code class="verbatim">]</code> and a new row</td></tr> | ||
| 684 | <tr><td><code class="verbatim">org-clock-out-when-done</code></td><td><code class="verbatim">t</code>, <code class="verbatim">nil</code>, or a list of keywords as a string separated by spaces</td></tr> | ||
| 685 | <tr><td><code class="verbatim">org-agenda-start-day</code></td><td>A day offset such as <code class="verbatim">"-3d"</code>; <code class="verbatim">nil</code> becomes <code class="verbatim">"+0d"</code>. Other forms aren't supported.</td></tr> | ||
| 686 | <tr><td><code class="verbatim">org-agenda-start-on-weekday</code></td><td><code class="verbatim">"0"</code> to <code class="verbatim">"6"</code>, or <code class="verbatim">"nil"</code></td></tr> | ||
| 687 | <tr><td><code class="verbatim">org-agenda-log-mode-items</code></td><td>The symbols <code class="verbatim">closed</code>, <code class="verbatim">clock</code> and <code class="verbatim">state</code> of the list, separated by spaces</td></tr> | ||
| 688 | <tr><td><code class="verbatim">org-agenda-todo-ignore-scheduled</code>, <code class="verbatim">-deadlines</code>, <code class="verbatim">-timestamp</code></td><td>The symbol or number as a string; <code class="verbatim">org-agenda-todo-ignore-with-date</code> and <code class="verbatim">org-agenda-tags-todo-honor-ignore-options</code> as booleans</td></tr> | ||
| 689 | <tr><td><code class="verbatim">org-track-ordered-property-with-tag</code></td><td>A tag name as given; <code class="verbatim">t</code> becomes <code class="verbatim">"t"</code>, <code class="verbatim">nil</code> <code class="verbatim">"nil"</code></td></tr> | ||
| 690 | <tr><td><code class="verbatim">org-roam-directory</code>, <code class="verbatim">org-roam-dailies-directory</code></td><td>The same keys, when the value is a string or a form that makes one</td></tr> | ||
| 691 | <tr><td><code class="verbatim">denote-directory</code>, <code class="verbatim">denote-journal-directory</code>, <code class="verbatim">denote-journal-keyword</code></td><td>The same keys, when the value is a string</td></tr> | ||
| 692 | <tr><td><code class="verbatim">denote-prompts</code></td><td>The same key, the symbols separated by spaces</td></tr> | ||
| 693 | <tr><td><code class="verbatim">denote-directory</code> as a list, <code class="verbatim">denote-silo-directories</code></td><td>The same key, the folders separated by <code class="verbatim">:</code></td></tr> | ||
| 694 | <tr><td><code class="verbatim">denote-sequence-scheme</code>, <code class="verbatim">denote-journal-interval</code></td><td>The same key</td></tr> | ||
| 695 | <tr><td><code class="verbatim">denote-templates</code></td><td><code class="verbatim">[denote-templates]</code>: entries whose text is a string or <code class="verbatim">concat</code> of strings; a function is listed as unsupported</td></tr> | ||
| 696 | <tr><td><code class="verbatim">denote-journal-title-format</code></td><td>The same key; the symbols <code class="verbatim">day-date-month-year</code>, <code class="verbatim">-24h</code> and <code class="verbatim">-12h</code> become their formats</td></tr> | ||
| 697 | <tr><td><code class="verbatim">org-roam-dailies-capture-templates</code></td><td><code class="verbatim">org-roam-dailies-file</code>, <code class="verbatim">-head</code> and <code class="verbatim">-entry</code>, from the first template's <code class="verbatim">(file+head NAME HEAD)</code> target and template</td></tr> | ||
| 698 | <tr><td><code class="verbatim">org-timer-format</code>, <code class="verbatim">org-timer-default-timer</code></td><td>The same keys; a number becomes a string</td></tr> | ||
| 699 | <tr><td><code class="verbatim">org-attach-id-dir</code></td><td>The same key, when the value is a string or an <code class="verbatim">expand-file-name</code> form</td></tr> | ||
| 700 | <tr><td><code class="verbatim">org-attach-use-inheritance</code></td><td><code class="verbatim">selective</code>, or <code class="verbatim">t</code> / <code class="verbatim">nil</code> as <code class="verbatim">"t"</code> / <code class="verbatim">"nil"</code></td></tr> | ||
| 701 | <tr><td><code class="verbatim">org-yank-image-save-method</code></td><td><code class="verbatim">attach</code>, or a folder name</td></tr> | ||
| 702 | <tr><td><code class="verbatim">org-yank-dnd-method</code></td><td><code class="verbatim">ask</code>, <code class="verbatim">attach</code>, <code class="verbatim">open</code> or <code class="verbatim">file-link</code></td></tr> | ||
| 703 | <tr><td><code class="verbatim">org-crypt-tag-matcher</code></td><td>The same key, when the value is a single tag</td></tr> | ||
| 704 | <tr><td><code class="verbatim">org-archive-location</code></td><td>The same key, when the value is a <code class="verbatim">file::heading</code> string</td></tr> | ||
| 705 | <tr><td><code class="verbatim">org-structure-template-alist</code></td><td><code class="verbatim">[org-structure-template-alist]</code>: each <code class="verbatim">("key" . "type")</code> entry that isn't one of Org's, from <code class="verbatim">setq</code> or <code class="verbatim">(add-to-list 'org-structure-template-alist …)</code></td></tr> | ||
| 706 | <tr><td><code class="verbatim">org-todo-keywords</code></td><td><code class="verbatim">org-todo-keywords</code>, one line per sequence. Keywords with spaces are left out; <code class="verbatim">type</code> sequences are read as sequences.</td></tr> | ||
| 707 | <tr><td><code class="verbatim">org-directory</code></td><td>A folder to add</td></tr> | ||
| 708 | <tr><td><code class="verbatim">org-agenda-files</code></td><td><code class="verbatim">org-agenda-files</code>, the entries separated by <code class="verbatim">\n</code>; the string form becomes one entry naming the list file. Also a folder to add for each entry; for a <code class="verbatim">.org</code> file, its folder; none for a list file</td></tr> | ||
| 709 | <tr><td><code class="verbatim">org-capture-templates</code></td><td>Templates for <code class="verbatim">capture.toml</code>; see below</td></tr> | ||
| 710 | <tr><td><code class="verbatim">doom-font</code></td><td><code class="verbatim">font</code> and <code class="verbatim">font-size</code>, from <code class="verbatim">(font-spec :family … :size …)</code> or <code class="verbatim">"Family-14"</code></td></tr> | ||
| 711 | <tr><td><code class="verbatim">doom-variable-pitch-font</code></td><td>Not imported: orgstar uses one font</td></tr> | ||
| 712 | <tr><td><code class="verbatim">doom-theme</code></td><td>Not imported: set colors under <code class="verbatim">[theme]</code></td></tr> | ||
| 713 | <tr><td><code class="verbatim">evil-mode</code> in use, or Doom</td><td><code class="verbatim">keymap = "doom"</code></td></tr> | ||
| 714 | </tbody> | ||
| 715 | </table> | ||
| 716 | <p>Any other <code class="verbatim">org-</code> or <code class="verbatim">appt-</code> variable is listed as having no equivalent.</p> | ||
| 717 | <p>Capture templates are imported when their type is <code class="verbatim">entry</code>, <code class="verbatim">item</code>, <code class="verbatim">checkitem</code>, <code class="verbatim">plain</code> or <code class="verbatim">table-line</code>, their template is a string, and their target is <code class="verbatim">file</code>, <code class="verbatim">file+headline</code>, <code class="verbatim">file+olp</code>, <code class="verbatim">file+olp+datetree</code>, <code class="verbatim">file+datetree</code>, <code class="verbatim">file+weektree</code>, <code class="verbatim">id</code> or <code class="verbatim">clock</code>. The properties <code class="verbatim">:prepend</code>, <code class="verbatim">:immediate-finish</code>, <code class="verbatim">:jump-to-captured</code>, <code class="verbatim">:clock-in</code>, <code class="verbatim">:clock-keep</code>, <code class="verbatim">:clock-resume</code>, <code class="verbatim">:empty-lines</code>, <code class="verbatim">:empty-lines-before</code>, <code class="verbatim">:empty-lines-after</code>, <code class="verbatim">:tree-type</code> (<code class="verbatim">day</code>, <code class="verbatim">week</code>, <code class="verbatim">month</code>) and <code class="verbatim">:table-line-pos</code> carry over; others are listed as left out. Template groups (a key and a name only) are skipped.</p> | ||
| 718 | <p>Key bindings are imported when the command is one orgstar has a counterpart for, such as <code class="verbatim">org-todo</code>, <code class="verbatim">org-schedule</code>, <code class="verbatim">org-refile</code>, <code class="verbatim">org-capture</code> or <code class="verbatim">save-buffer</code>. The clock commands <code class="verbatim">org-clock-in</code>, <code class="verbatim">org-clock-out</code>, <code class="verbatim">org-clock-cancel</code>, <code class="verbatim">org-clock-goto</code>, <code class="verbatim">org-clock-in-last</code>, <code class="verbatim">org-resolve-clocks</code> and <code class="verbatim">org-clock-mark-default-task</code> map to Clock In, Clock Out, Cancel Clock, Go to Clocked Entry, Clock In to Last Entry, Resolve Open Clocks… and Mark as Default Clock Task. Keys must be a string or <code class="verbatim">(kbd "…")</code>; bindings with key vectors such as <code class="verbatim">[f5]</code> are skipped. In a Doom configuration, bindings without a state go to the <code class="verbatim">normal</code> state.</p> | ||
| 719 | <h3 id="limits-of-the-lisp-reader">Limits of the Lisp reader</h3> | ||
| 720 | <ul> | ||
| 721 | <li>Comments (<code class="verbatim">;</code>) are skipped. Strings understand <code class="verbatim">\n</code>, <code class="verbatim">\t</code>, <code class="verbatim">\"</code> and line continuations; other escapes give the character itself.</li> | ||
| 722 | <li><code class="verbatim">#'</code> reads as <code class="verbatim">function</code>. Other <code class="verbatim">#</code> syntax is read as a symbol, so forms using it aren't understood.</li> | ||
| 723 | <li>A syntax error anywhere in a file, such as an unclosed parenthesis, stops that file from being read at all. The error and its line show under Not imported.</li> | ||
| 724 | <li>Macros other than those in the table above are not expanded, and functions are not called. Settings made by code you wrote (a <code class="verbatim">defun</code> that calls <code class="verbatim">setq</code>, a hook) aren't found.</li> | ||
| 725 | </ul> | ||
| 726 | <h2 id="themes">Themes</h2> | ||
| 727 | <p>The default theme has light and dark colors after GitHub's light and dark themes for text and code. TODO keywords, priorities and the agenda's statuses use the system's red, orange, blue and green, as iOS and macOS show them. It leaves the sidebar, the modeline, the agenda's background and the accent of buttons and toggles to the system.</p> | ||
| 728 | <p><code class="verbatim">light-theme</code> and <code class="verbatim">dark-theme</code> choose a built-in theme for each appearance instead (Settings ▸ Appearance ▸ Theme). The light themes are Default, Solarized Light, Gruvbox Light, Modus Operandi, Catppuccin Latte, Tomorrow and Paper; the dark themes are Default, Solarized Dark, Gruvbox Dark, Modus Vivendi, Catppuccin Mocha, Nord, Dracula, Tokyo Night and doom-one. Every one but Default sets every color key, the sidebar, modeline, agenda and accent included. An unknown name, or one of the other appearance, is reported and Default is used.</p> | ||
| 729 | <p>You change any of them by setting colors in <code class="verbatim">config.toml</code>, or by keeping a theme in its own file. Copy to Config Folder writes the two chosen themes, every color written out, into <code class="verbatim">my-theme.toml</code> and sets <code class="verbatim">theme-file</code> to it; it leaves an existing <code class="verbatim">my-theme.toml</code> as it is.</p> | ||
| 730 | <p>Colors are strings in the form <code class="verbatim">"#rrggbb"</code> or <code class="verbatim">"#rrggbbaa"</code>. They go in these tables:</p> | ||
| 731 | <table> | ||
| 732 | <thead> | ||
| 733 | <tr><th>Table</th><th>Effect</th></tr> | ||
| 734 | </thead> | ||
| 735 | <tbody> | ||
| 736 | <tr><td><code class="verbatim">[theme]</code></td><td>Sets a color for both light and dark appearance</td></tr> | ||
| 737 | <tr><td><code class="verbatim">[theme.light]</code></td><td>Sets a color for light appearance only</td></tr> | ||
| 738 | <tr><td><code class="verbatim">[theme.dark]</code></td><td>Sets a color for dark appearance only</td></tr> | ||
| 739 | <tr><td><code class="verbatim">[theme.todo]</code></td><td>Colors TODO keywords by name, in both appearances, as <code class="verbatim">org-todo-keyword-faces</code></td></tr> | ||
| 740 | <tr><td><code class="verbatim">[theme.category]</code></td><td>Colors agenda categories by name, in both appearances</td></tr> | ||
| 741 | </tbody> | ||
| 742 | </table> | ||
| 743 | <pre><code class="language-toml highlight"><span class="source toml"><span class="punctuation definition table toml">[</span><span class="entity name section toml">theme</span><span class="punctuation definition table toml">]</span> | ||
| 744 | <span class="variable other key toml">heading-1</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>#005cc5<span class="punctuation definition string end toml">"</span></span> | ||
| 745 | |||
| 746 | <span class="punctuation definition table toml">[</span><span class="entity name section toml">theme.dark</span><span class="punctuation definition table toml">]</span> | ||
| 747 | <span class="variable other key toml">background</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>#1e1e1e<span class="punctuation definition string end toml">"</span></span> | ||
| 748 | <span class="variable other key toml">foreground</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>#d4d4d4<span class="punctuation definition string end toml">"</span></span> | ||
| 749 | |||
| 750 | <span class="punctuation definition table toml">[</span><span class="entity name section toml">theme.todo</span><span class="punctuation definition table toml">]</span> | ||
| 751 | <span class="variable other key toml">WAIT</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>#bf8700<span class="punctuation definition string end toml">"</span></span> | ||
| 752 | <span class="variable other key toml">PROJ</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>#8250df<span class="punctuation definition string end toml">"</span></span> | ||
| 753 | |||
| 754 | <span class="punctuation definition table toml">[</span><span class="entity name section toml">theme.category</span><span class="punctuation definition table toml">]</span> | ||
| 755 | <span class="variable other key toml">work</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>#0a66d8<span class="punctuation definition string end toml">"</span></span></span></code></pre> | ||
| 756 | <p>A keyword without its own color takes its class's color. Case doesn't matter in these lists:</p> | ||
| 757 | <table> | ||
| 758 | <thead> | ||
| 759 | <tr><th>Class</th><th>Key</th><th>Keywords</th></tr> | ||
| 760 | </thead> | ||
| 761 | <tbody> | ||
| 762 | <tr><td>Under way</td><td><code class="verbatim">todo-next</code></td><td><code class="verbatim">NEXT</code>, <code class="verbatim">STRT</code>, <code class="verbatim">START</code>, <code class="verbatim">STARTED</code>, <code class="verbatim">DOING</code>, <code class="verbatim">ACTIVE</code>, <code class="verbatim">INPROGRESS</code>, <code class="verbatim">IN-PROGRESS</code></td></tr> | ||
| 763 | <tr><td>On hold</td><td><code class="verbatim">todo-waiting</code></td><td><code class="verbatim">WAIT</code>, <code class="verbatim">WAITING</code>, <code class="verbatim">HOLD</code>, <code class="verbatim">ONHOLD</code>, <code class="verbatim">BLOCKED</code>, <code class="verbatim">DEFERRED</code>, <code class="verbatim">SOMEDAY</code>, <code class="verbatim">MAYBE</code></td></tr> | ||
| 764 | <tr><td>Cancelled</td><td><code class="verbatim">todo-cancelled</code></td><td>Done keywords <code class="verbatim">KILL</code>, <code class="verbatim">KILLED</code>, <code class="verbatim">CANCELLED</code>, <code class="verbatim">CANCELED</code>, <code class="verbatim">CANCEL</code>, <code class="verbatim">SKIPPED</code>, <code class="verbatim">SKIP</code>, <code class="verbatim">ABORTED</code>, <code class="verbatim">NO</code>, <code class="verbatim">WONTFIX</code></td></tr> | ||
| 765 | <tr><td>Other open</td><td><code class="verbatim">todo</code></td><td>Any other keyword that isn't done</td></tr> | ||
| 766 | <tr><td>Other done</td><td><code class="verbatim">done</code></td><td>Any other done keyword</td></tr> | ||
| 767 | </tbody> | ||
| 768 | </table> | ||
| 769 | <p>The classes color keywords in the editors, the iOS reader, the agenda and its widgets.</p> | ||
| 770 | <p>A category without its own color gets a hue worked out from its name, the same on every run and device, at a lightness that reads on the appearance's background.</p> | ||
| 771 | <p><code class="verbatim">default-theme.toml</code> in the configuration folder lists every color key with the default theme's values, light and dark. Settings ▸ Appearance ▸ Show Default Theme opens it. Copy lines from it into <code class="verbatim">config.toml</code>; edits to <code class="verbatim">default-theme.toml</code> itself are overwritten at the next launch.</p> | ||
| 772 | <h3 id="theme-files">Theme files</h3> | ||
| 773 | <p>To keep a theme in its own file, put it in the configuration folder with the same tables (<code class="verbatim">[theme]</code>, <code class="verbatim">[theme.light]</code>, <code class="verbatim">[theme.dark]</code>, <code class="verbatim">[theme.todo]</code>, <code class="verbatim">[theme.category]</code>) and name it in <code class="verbatim">config.toml</code>:</p> | ||
| 774 | <pre><code class="language-toml highlight"><span class="source toml"><span class="punctuation definition table toml">[</span><span class="entity name section toml">theme</span><span class="punctuation definition table toml">]</span> | ||
| 775 | <span class="variable other key toml">theme-file</span> <span class="keyword operator assignment toml">=</span> <span class="string quoted double toml"><span class="punctuation definition string begin toml">"</span>solarized.toml<span class="punctuation definition string end toml">"</span></span></span></code></pre> | ||
| 776 | <p>The colors stack in this order, each over the one before: the themes chosen with <code class="verbatim">light-theme</code> and <code class="verbatim">dark-theme</code>, the theme file, then the colors in <code class="verbatim">config.toml</code>. The path is relative to the configuration folder and may name a subfolder, as <code class="verbatim">themes/solarized.toml</code>. orgstar reloads the theme file when it changes. Only colors are read from a theme file; <code class="verbatim">font</code> and the other type keys in its <code class="verbatim">[theme]</code> table are ignored.</p> | ||
| 777 | <h3 id="color-keys">Color keys</h3> | ||
| 778 | <table> | ||
| 779 | <thead> | ||
| 780 | <tr><th>Key</th><th>Colors</th></tr> | ||
| 781 | </thead> | ||
| 782 | <tbody> | ||
| 783 | <tr><td><code class="verbatim">background</code></td><td>the editor's background</td></tr> | ||
| 784 | <tr><td><code class="verbatim">foreground</code></td><td>body text</td></tr> | ||
| 785 | <tr><td><code class="verbatim">cursor</code></td><td>the caret</td></tr> | ||
| 786 | <tr><td><code class="verbatim">selection</code></td><td>selected text's background</td></tr> | ||
| 787 | <tr><td><code class="verbatim">accent</code></td><td>buttons, toggles and selection in lists; unset: the system's</td></tr> | ||
| 788 | <tr><td><code class="verbatim">heading-1</code> … <code class="verbatim">heading-7</code></td><td>headings of that level</td></tr> | ||
| 789 | <tr><td><code class="verbatim">heading-8</code></td><td>level 8 and deeper headings</td></tr> | ||
| 790 | <tr><td><code class="verbatim">todo</code></td><td>TODO keywords not yet done</td></tr> | ||
| 791 | <tr><td><code class="verbatim">todo-next</code></td><td>keywords of work under way: <code class="verbatim">NEXT</code>, <code class="verbatim">STRT</code> and the others above</td></tr> | ||
| 792 | <tr><td><code class="verbatim">todo-waiting</code></td><td>keywords of work on hold: <code class="verbatim">WAIT</code>, <code class="verbatim">HOLD</code> and the others above</td></tr> | ||
| 793 | <tr><td><code class="verbatim">done</code></td><td>DONE keywords</td></tr> | ||
| 794 | <tr><td><code class="verbatim">todo-cancelled</code></td><td>done keywords that cancel: <code class="verbatim">KILL</code>, <code class="verbatim">CANCELLED</code> and the others above</td></tr> | ||
| 795 | <tr><td><code class="verbatim">priority</code></td><td><code class="verbatim">[#A]</code> cookies; in the agenda, priorities other than A, B and C</td></tr> | ||
| 796 | <tr><td><code class="verbatim">priority-a</code></td><td>agenda: priority A</td></tr> | ||
| 797 | <tr><td><code class="verbatim">priority-b</code></td><td>agenda: priority B</td></tr> | ||
| 798 | <tr><td><code class="verbatim">priority-c</code></td><td>agenda: priority C</td></tr> | ||
| 799 | <tr><td><code class="verbatim">tags</code></td><td><code class="verbatim">:tags:</code></td></tr> | ||
| 800 | <tr><td><code class="verbatim">link</code></td><td>links</td></tr> | ||
| 801 | <tr><td><code class="verbatim">timestamp</code></td><td>timestamps</td></tr> | ||
| 802 | <tr><td><code class="verbatim">code</code></td><td><code class="verbatim">~code~</code> and inline source</td></tr> | ||
| 803 | <tr><td><code class="verbatim">verbatim</code></td><td><code>=verbatim=</code></td></tr> | ||
| 804 | <tr><td><code class="verbatim">inline-background</code></td><td>behind <code class="verbatim">~code~</code> and <code>=verbatim=</code></td></tr> | ||
| 805 | <tr><td><code class="verbatim">markup</code></td><td>link brackets and emphasis markers</td></tr> | ||
| 806 | <tr><td><code class="verbatim">comment</code></td><td>comments</td></tr> | ||
| 807 | <tr><td><code class="verbatim">keyword</code></td><td><code class="verbatim">#+KEYWORD</code> lines</td></tr> | ||
| 808 | <tr><td><code class="verbatim">metadata</code></td><td>planning lines, drawers, properties and clocks</td></tr> | ||
| 809 | <tr><td><code class="verbatim">special</code></td><td>footnotes, statistics cookies, targets, macros and LaTeX</td></tr> | ||
| 810 | <tr><td><code class="verbatim">block-background</code></td><td>the band behind blocks</td></tr> | ||
| 811 | <tr><td><code class="verbatim">block-delimiter</code></td><td><code class="verbatim">#+begin_</code> and <code class="verbatim">#+end_</code> lines</td></tr> | ||
| 812 | <tr><td><code class="verbatim">table</code></td><td>tables</td></tr> | ||
| 813 | <tr><td><code class="verbatim">line-number</code></td><td>line numbers</td></tr> | ||
| 814 | <tr><td><code class="verbatim">line-number-current</code></td><td>the caret's line number</td></tr> | ||
| 815 | <tr><td><code class="verbatim">syntax-keyword</code></td><td>code: keywords</td></tr> | ||
| 816 | <tr><td><code class="verbatim">syntax-string</code></td><td>code: strings</td></tr> | ||
| 817 | <tr><td><code class="verbatim">syntax-comment</code></td><td>code: comments</td></tr> | ||
| 818 | <tr><td><code class="verbatim">syntax-function</code></td><td>code: functions</td></tr> | ||
| 819 | <tr><td><code class="verbatim">syntax-type</code></td><td>code: types and modules</td></tr> | ||
| 820 | <tr><td><code class="verbatim">syntax-number</code></td><td>code: numbers, constants and escapes</td></tr> | ||
| 821 | <tr><td><code class="verbatim">syntax-property</code></td><td>code: properties, attributes and tags</td></tr> | ||
| 822 | <tr><td><code class="verbatim">syntax-label</code></td><td>code: labels</td></tr> | ||
| 823 | <tr><td><code class="verbatim">sidebar-background</code></td><td>the folder sidebar and the outline</td></tr> | ||
| 824 | <tr><td><code class="verbatim">sidebar-foreground</code></td><td>file and heading names there</td></tr> | ||
| 825 | <tr><td><code class="verbatim">sidebar-header</code></td><td>folder names there</td></tr> | ||
| 826 | <tr><td><code class="verbatim">modeline-background</code></td><td>the modeline and message line</td></tr> | ||
| 827 | <tr><td><code class="verbatim">modeline-foreground</code></td><td>modeline text</td></tr> | ||
| 828 | <tr><td><code class="verbatim">modeline-highlight</code></td><td>the outline path and the clock in the modeline</td></tr> | ||
| 829 | <tr><td><code class="verbatim">state-normal</code></td><td>the NORMAL tag (Doom keys)</td></tr> | ||
| 830 | <tr><td><code class="verbatim">state-insert</code></td><td>the INSERT tag</td></tr> | ||
| 831 | <tr><td><code class="verbatim">state-visual</code></td><td>the VISUAL and V-LINE tags</td></tr> | ||
| 832 | <tr><td><code class="verbatim">agenda-background</code></td><td>the agenda and board; the iOS widgets</td></tr> | ||
| 833 | <tr><td><code class="verbatim">agenda-date</code></td><td>agenda day headers after today</td></tr> | ||
| 834 | <tr><td><code class="verbatim">agenda-today</code></td><td>today's header and the now line</td></tr> | ||
| 835 | <tr><td><code class="verbatim">agenda-time</code></td><td>times and statuses of agenda rows with the normal status</td></tr> | ||
| 836 | <tr><td><code class="verbatim">agenda-category</code></td><td>categories</td></tr> | ||
| 837 | <tr><td><code class="verbatim">agenda-overdue</code></td><td>agenda: the status of entries past their deadline or scheduled date, and the Overdue group</td></tr> | ||
| 838 | <tr><td><code class="verbatim">agenda-due-soon</code></td><td>agenda: the status of deadlines due today or coming up</td></tr> | ||
| 839 | <tr><td><code class="verbatim">agenda-event</code></td><td>agenda: calendar events whose calendar has no color</td></tr> | ||
| 840 | <tr><td><code class="verbatim">habit-clear</code></td><td>habit graph: not due yet</td></tr> | ||
| 841 | <tr><td><code class="verbatim">habit-ready</code></td><td>habit graph: due</td></tr> | ||
| 842 | <tr><td><code class="verbatim">habit-alert</code></td><td>habit graph: due today, last chance</td></tr> | ||
| 843 | <tr><td><code class="verbatim">habit-overdue</code></td><td>habit graph: overdue</td></tr> | ||
| 844 | </tbody> | ||
| 845 | </table> | ||
| 846 | <p>The default theme leaves <code class="verbatim">sidebar-background</code>, <code class="verbatim">sidebar-foreground</code>, <code class="verbatim">sidebar-header</code>, <code class="verbatim">modeline-background</code>, <code class="verbatim">modeline-foreground</code> and <code class="verbatim">agenda-background</code> unset, so those parts keep the standard macOS look. Set them to color those parts too. In the views around the editor (sidebar, modeline, agenda), a color you set for one appearance only leaves the other appearance to the system. In the editor, a color set for one appearance only takes the default theme's color in the other.</p> | ||
| 847 | <p>An unknown color key, a value that isn't a color, or an unknown table such as <code class="verbatim">[theme.solarized]</code> is reported as a problem and skipped.</p> | ||
| 848 | <h2 id="appearance">Appearance</h2> | ||
| 849 | <p>orgstar follows the system's light or dark appearance (System Settings ▸ Appearance). There is no setting to fix one appearance; to use the same colors in both, set them under <code class="verbatim">[theme]</code> rather than <code class="verbatim">[theme.light]</code> or <code class="verbatim">[theme.dark]</code>.</p> | ||
| 850 | <h2 id="fonts">Fonts</h2> | ||
| 851 | <p>By default the editor uses one font for everything: body text, headings, code and tables. Choose it in Settings ▸ Appearance or with <code class="verbatim">font</code> under <code class="verbatim">[theme]</code>.</p> | ||
| 852 | <ul> | ||
| 853 | <li>The Font menu lists installed monospaced families. <code class="verbatim">config.toml</code> accepts any family name; a family that isn't installed falls back to the system's monospaced font. Tags and tables line up in columns, so a proportional font there misaligns them.</li> | ||
| 854 | <li>Body text (<code class="verbatim">body-font</code>) sets a second font for prose, as Emacs's <code class="verbatim">mixed-pitch-mode</code> does. Paragraphs, list text and headings use it. Tables, source and example blocks, verbatim and code, keyword lines, planning lines, drawers, timestamps and tags keep <code class="verbatim">font</code>, and so do a heading's stars and a line's leading blanks, bullet and checkbox, so text still starts under the indentation. Tags after a heading in the body font no longer line up at <code class="verbatim">org-tags-column</code>; the file is unchanged. A family that isn't installed falls back to <code class="verbatim">font</code>.</li> | ||
| 855 | <li><code class="verbatim">font-size</code> is the body size, at least 6 points.</li> | ||
| 856 | <li>Headings are bold. Level 1 is <code class="verbatim">font-size</code> plus three times <code class="verbatim">heading-size-step</code>, level 2 plus two times, level 3 plus one time; level 4 and deeper are body size. Set <code class="verbatim">heading-size-step = 0</code> for one size throughout.</li> | ||
| 857 | <li><code class="verbatim">line-spacing</code> adds space between lines, in points.</li> | ||
| 858 | <li><code class="verbatim">text-width</code> keeps lines of text to that many columns of <code class="verbatim">font</code> in a wider editor, with equal margins either side and the line numbers beside the text, as <code class="verbatim">olivetti-mode</code> does in Emacs. Long lines wrap at it; with lines truncated (View ▸ Truncate or Wrap Long Lines) the text takes the whole width. It changes only the display: <code class="verbatim">M-q</code> still fills to <code class="verbatim">fill-column</code>.</li> | ||
| 859 | </ul> | ||
| 860 | <p>On iPhone and iPad, the editor and reader use the same theme, read from the synced configuration folder. <code class="verbatim">font</code> and <code class="verbatim">body-font</code> apply when the family is installed on the device, otherwise the system's monospaced font is used, and <code class="verbatim">font-size</code> is the size at the default Dynamic Type setting, scaled with the size chosen on the device. The <code class="verbatim">selection</code> color, the <code class="verbatim">cursor</code> color and the <code class="verbatim">syntax-*</code> colors apply there too. See <a href="14-ios.html">iPhone and iPad</a>.</p> | ||
| 861 | </main> | ||
| 862 | <footer class="site"> | ||
| 863 | © 2026 Christian Cleberg · <a href="https://krz.sh/apps/orgstar/">krz.sh/apps/orgstar</a> · <a href="/orgstar/third-party.html">third-party notices</a> | ||
| 864 | </footer> | ||
| 865 | </body> | ||
| 866 | </html>\ No newline at end of file | ||
guide/14-ios.html added +479
| @@ -0,0 +1,479 @@ | |||
| 1 | <!DOCTYPE html> | ||
| 2 | <html lang="en"> | ||
| 3 | <head> | ||
| 4 | <meta charset="utf-8"> | ||
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
| 6 | <title>iPhone and iPad · orgstar</title> | ||
| 7 | <meta name="description" content="The iOS app: folders, reading and editing, search, the agenda, widgets, capture, clocking, reminders, export and settings."> | ||
| 8 | <link rel="icon" href="../favicon.svg" type="image/svg+xml"> | ||
| 9 | <link rel="stylesheet" href="../theme.css"> | ||
| 10 | <link rel="stylesheet" href="../syntax.css"> | ||
| 11 | <link rel="stylesheet" href="../style.css"> | ||
| 12 | </head> | ||
| 13 | <body> | ||
| 14 | <header class="site"> | ||
| 15 | <a class="site-title" href="../index.html">orgstar</a> | ||
| 16 | <nav> | ||
| 17 | <a href="../install.html">Install</a> | ||
| 18 | <a href="../quickstart.html">Quick start</a> | ||
| 19 | <a href="index.html">Manual</a> | ||
| 20 | </nav> | ||
| 21 | </header> | ||
| 22 | <main> | ||
| 23 | <h1>iPhone and iPad</h1> | ||
| 24 | <p class="lede">orgstar for iPhone and iPad reads and edits the same org files as the Mac, with the agenda, capture and search.</p> | ||
| 25 | <nav class="toc" aria-label="On this page"> | ||
| 26 | <h2>On this page</h2> | ||
| 27 | <ul> | ||
| 28 | <li><a href="#overview">Overview</a></li> | ||
| 29 | <li><a href="#folders-and-file-access">Folders and file access</a></li> | ||
| 30 | <li><a href="#the-reader">The reader</a></li> | ||
| 31 | <li><a href="#the-editor">The editor</a> | ||
| 32 | <ul> | ||
| 33 | <li><a href="#panes-and-windows-on-ipad">Panes and windows on iPad</a></li> | ||
| 34 | <li><a href="#saving">Saving</a></li> | ||
| 35 | <li><a href="#themes-and-display">Themes and display</a></li> | ||
| 36 | <li><a href="#the-key-bar">The key bar</a></li> | ||
| 37 | <li><a href="#commands">Commands</a></li> | ||
| 38 | <li><a href="#hardware-keyboard">Hardware keyboard</a></li> | ||
| 39 | </ul></li> | ||
| 40 | <li><a href="#search">Search</a></li> | ||
| 41 | <li><a href="#the-agenda">The agenda</a></li> | ||
| 42 | <li><a href="#widgets-and-the-live-activity">Widgets and the Live Activity</a> | ||
| 43 | <ul> | ||
| 44 | <li><a href="#widgets">Widgets</a></li> | ||
| 45 | <li><a href="#controls">Controls</a></li> | ||
| 46 | <li><a href="#the-clock-s-live-activity">The clock's Live Activity</a></li> | ||
| 47 | <li><a href="#orgstar-links">orgstar:// links</a></li> | ||
| 48 | </ul></li> | ||
| 49 | <li><a href="#apple-watch">Apple Watch</a> | ||
| 50 | <ul> | ||
| 51 | <li><a href="#complications">Complications</a></li> | ||
| 52 | </ul></li> | ||
| 53 | <li><a href="#capture">Capture</a> | ||
| 54 | <ul> | ||
| 55 | <li><a href="#from-the-share-sheet">From the share sheet</a></li> | ||
| 56 | <li><a href="#from-shortcuts">From Shortcuts</a></li> | ||
| 57 | </ul></li> | ||
| 58 | <li><a href="#clocking">Clocking</a></li> | ||
| 59 | <li><a href="#reminders">Reminders</a></li> | ||
| 60 | <li><a href="#export">Export</a></li> | ||
| 61 | <li><a href="#code-blocks-and-tables">Code blocks and tables</a></li> | ||
| 62 | <li><a href="#conflicts-and-versions">Conflicts and versions</a></li> | ||
| 63 | <li><a href="#settings">Settings</a></li> | ||
| 64 | <li><a href="#spotlight-and-quick-look">Spotlight and Quick Look</a></li> | ||
| 65 | <li><a href="#what-the-mac-has-that-ios-doesn-t">What the Mac has that iOS doesn't</a></li> | ||
| 66 | </ul> | ||
| 67 | </nav> | ||
| 68 | <h2 id="overview">Overview</h2> | ||
| 69 | <p>On first launch, a few screens introduce the app, ask for the folder of org files, and offer notifications, Calendar events and Reminders; each permission is asked for only when you choose it, and every one can be changed later in Settings. The app has three tabs, and opens on Folders until a folder has been added:</p> | ||
| 70 | <dl> | ||
| 71 | <dt>Agenda</dt> | ||
| 72 | <dd>the agenda over your folders, with capture.</dd> | ||
| 73 | <dt>Folders</dt> | ||
| 74 | <dd>the folders of org files you added. Each shows its subfolders and org files; tap a subfolder to open it.</dd> | ||
| 75 | <dt>Settings</dt> | ||
| 76 | <dd>where the app's settings come from.</dd> | ||
| 77 | </dl> | ||
| 78 | <p>The search button (the magnifying glass) at the top right of Agenda and Folders opens Search.</p> | ||
| 79 | <p>Files open in a reader first. The Edit button in the reader opens the editor. Both use the same open file, so an edit in the editor shows in the reader when you go back.</p> | ||
| 80 | <h2 id="folders-and-file-access">Folders and file access</h2> | ||
| 81 | <p>orgstar on iOS works on folders you choose, in iCloud Drive or in another app's storage (for example a folder kept by a Syncthing client).</p> | ||
| 82 | <ol> | ||
| 83 | <li>Open the Folders tab and tap Add Folder (the folder icon with a plus).</li> | ||
| 84 | <li>Choose a folder in the picker.</li> | ||
| 85 | </ol> | ||
| 86 | <p>orgstar keeps access to the folder across launches. Each folder appears as a section listing its <code class="verbatim">.org</code> files by their path inside the folder. Remove Folder at the end of a section removes it from orgstar; the files stay where they are. An added folder that is empty also has Delete Folder…, which deletes it from disk too.</p> | ||
| 87 | <p>Swipe left on a file, or touch and hold it, to delete it. orgstar asks first. A file in iCloud Drive goes to Recently Deleted in the Files app; elsewhere it is removed. New File… and New Folder… under + at the top right make one in the folder shown, or with several added folders, in the one you pick; a file name without an extension gets <code class="verbatim">.org</code>. Empty folders are listed too and delete the same way; a folder with anything in it other than hidden files can't be deleted from orgstar.</p> | ||
| 88 | <p>Files that iCloud hasn't downloaded to the device yet appear in grey with a cloud icon. orgstar asks iCloud to download them and lists them as files once they arrive.</p> | ||
| 89 | <p>orgstar sees changes made by iCloud and by apps that use the system's file coordination, and reads every folder again each time you return to the app, since not every sync app reports its changes. An open file takes in changes from disk as described in <a href="15-alongside-emacs.html">Working alongside Emacs and other tools</a>.</p> | ||
| 90 | <p>There is no way to open a single file from the Files app. Add the folder that contains it.</p> | ||
| 91 | <h2 id="the-reader">The reader</h2> | ||
| 92 | <p>Tap a file in Folders or Search, or Open in File in an agenda entry's sheet, to read it.</p> | ||
| 93 | <ul> | ||
| 94 | <li>Tap a heading to fold or unfold it, as <code class="verbatim">TAB</code> cycles it on the Mac. A chevron marks headings with content.</li> | ||
| 95 | <li>The file opens with the visibility its <code class="verbatim">#+STARTUP</code> line asks for, then each heading's <code class="verbatim">VISIBILITY</code> property when <code class="verbatim">#+STARTUP</code> sets a visibility. Drawers and blocks are folded as <code class="verbatim">org-cycle-hide-drawer-startup</code> and <code class="verbatim">org-cycle-hide-block-startup</code> say, or as the file's <code class="verbatim">#+STARTUP</code> says (<code class="verbatim">hidedrawers</code>, <code class="verbatim">nohideblocks</code> and the like). Tap a folded drawer's first line or its <code class="verbatim">…</code> to open it, and the first line again to fold it.</li> | ||
| 96 | <li>Text is styled as in the editor, in the theme's colours, font, size, line spacing and heading sizes, on the theme's background: TODO keywords, priorities, tags, emphasis, code, timestamps, links, and the code in src blocks. Text can be selected and copied.</li> | ||
| 97 | <li>The reader follows the editor's display settings (see Themes and display below): Show Markup, hidden emphasis markers, pretty entities, indentation, leading stars, inline images and truncated lines. Tables show at full width, without narrowed columns.</li> | ||
| 98 | <li>Tap a link to follow it. Links to headings and files in your folders open in the reader; links to other files, such as an attached PDF or image, open in Quick Look; web links open in the browser.</li> | ||
| 99 | <li>The toolbar has Outline (a list of headings to jump to), Export, and Edit.</li> | ||
| 100 | </ul> | ||
| 101 | <h2 id="the-editor">The editor</h2> | ||
| 102 | <p>Tap Edit in the reader. The title shows the buffer name, with <code class="verbatim">•</code> while there are unsaved changes. The tab bar is hidden while you edit.</p> | ||
| 103 | <p>The editor folds headings, drawers and blocks (tap a fold's <code class="verbatim">…</code> to open it, and an open drawer's first line to fold it), styles text with the theme from the configuration folder (see Themes and display below), and runs the same Org commands as the Mac. Autocorrection, smart quotes and smart dashes are off; spell checking follows <code class="verbatim">spell-check</code> in <code class="verbatim">config.toml</code> and is off by default; it leaves out code, links, dates, tags and keywords, as on the Mac. More ▸ Word Count shows the words, characters and reading time of the selection, or of the file.</p> | ||
| 104 | <p>The toolbar has:</p> | ||
| 105 | <dl> | ||
| 106 | <dt>Conflict</dt> | ||
| 107 | <dd>shown while the file and your edits conflict; opens the conflict sheet.</dd> | ||
| 108 | <dt></dt> | ||
| 109 | <dd>Undo</dd> | ||
| 110 | <dt>More</dt> | ||
| 111 | <dd>Commands, Clock In, Show Markup, Recent Entries, Export, Sync Conflict Copies, and Recovered Versions.</dd> | ||
| 112 | </dl> | ||
| 113 | <p>Messages from commands show at the top of the editor for a few seconds; tap one to dismiss it.</p> | ||
| 114 | <h3 id="panes-and-windows-on-ipad">Panes and windows on iPad</h3> | ||
| 115 | <p>On iPad, the editor can show a file in several panes, as a Mac window does (see <a href="01-files-and-folders.html">Files and folders</a>):</p> | ||
| 116 | <table> | ||
| 117 | <thead> | ||
| 118 | <tr><th>Command</th><th>Where</th><th>Emacs keys</th><th>Does</th></tr> | ||
| 119 | </thead> | ||
| 120 | <tbody> | ||
| 121 | <tr><td>Split Pane Right</td><td>More ▸ Panes, Commands, a hardware keyboard</td><td><code class="verbatim">C-x 3</code></td><td>Halves the focused pane side by side; the new pane shows the same file</td></tr> | ||
| 122 | <tr><td>Split Pane Below</td><td>More ▸ Panes, Commands, a hardware keyboard</td><td><code class="verbatim">C-x 2</code></td><td>Halves the focused pane one above the other</td></tr> | ||
| 123 | <tr><td>Next Pane</td><td>More ▸ Panes, Commands, a hardware keyboard</td><td><code class="verbatim">C-x o</code></td><td>Moves focus to the next pane</td></tr> | ||
| 124 | <tr><td>Close Pane</td><td>More ▸ Panes, Commands, a hardware keyboard</td><td><code class="verbatim">C-x 0</code></td><td>Closes the focused pane</td></tr> | ||
| 125 | <tr><td>Close Other Panes</td><td>More ▸ Panes, Commands, a hardware keyboard</td><td><code class="verbatim">C-x 1</code></td><td>Closes every pane but the focused one</td></tr> | ||
| 126 | </tbody> | ||
| 127 | </table> | ||
| 128 | <p>The focused pane has a line along its top and the toolbar acts on it; tap in a pane to focus it. Every pane shows the same buffer: text typed in one shows in the others at once, and folds, narrowing and styles are the buffer's. The caret and scroll position are each pane's own, and so is undo: Undo in a pane undoes what was typed or changed in that pane. A link to another file opens it on its own screen, leaving the panes as they are.</p> | ||
| 129 | <p>Each iPad window (scene), opened from the app switcher or by dragging the app from the Dock, has its own tabs, screens and panes over the same open files, so a file edited in one window shows the edit in the others. The pane commands aren't offered on iPhone or in a narrow window.</p> | ||
| 130 | <h3 id="saving">Saving</h3> | ||
| 131 | <p>The iOS app always saves automatically: one second after you stop typing, when you leave the editor, and when the app goes to the background. The <code class="verbatim">save</code> setting doesn't apply on iOS.</p> | ||
| 132 | <p>Files that aren't valid UTF-8 open read-only; commands that would change them say so.</p> | ||
| 133 | <h3 id="themes-and-display">Themes and display</h3> | ||
| 134 | <p>The editor and the reader use the theme set in the configuration folder's <code class="verbatim">config.toml</code>, stacked as on the Mac: the themes chosen with <code class="verbatim">light-theme</code> and <code class="verbatim">dark-theme</code>, then the theme file named by <code class="verbatim">theme-file</code>, then the colours in <code class="verbatim">[theme]</code>, <code class="verbatim">[theme.light]</code>, <code class="verbatim">[theme.dark]</code>, <code class="verbatim">[theme.todo]</code> and <code class="verbatim">[theme.category]</code>. A TODO keyword without a colour in <code class="verbatim">[theme.todo]</code> takes its class's colour: <code class="verbatim">todo-next</code> for <code class="verbatim">NEXT</code> and <code class="verbatim">STRT</code>, <code class="verbatim">todo-waiting</code> for <code class="verbatim">WAIT</code> and <code class="verbatim">HOLD</code>, <code class="verbatim">todo-cancelled</code> for <code class="verbatim">KILL</code> and <code class="verbatim">CANCELLED</code>, and so on (see <a href="13-configuration.html">Configuration</a> for the lists). Colours follow the system's light or dark appearance. Problems in the theme show in the Settings tab with the other problems. A change to <code class="verbatim">config.toml</code> or the theme file applies as it syncs, to open editors too. See <a href="13-configuration.html">Configuration</a> for the colour keys.</p> | ||
| 135 | <p>Settings ▸ Light Theme and Dark Theme choose the built-in themes, shown as a few lines of Org in each theme's colours; with a configuration folder the choice is written to its <code class="verbatim">config.toml</code>, so the Mac uses it too. Settings ▸ App Icon chooses the home screen icon from the same thirteen as the Mac; iOS confirms the change. The icon is chosen per device.</p> | ||
| 136 | <dl> | ||
| 137 | <dt>Font</dt> | ||
| 138 | <dd><code class="verbatim">font</code> when that family is installed on the device, otherwise the system's monospaced font. <code class="verbatim">body-font</code>, when set, is used for prose as on the Mac.</dd> | ||
| 139 | <dt>Size</dt> | ||
| 140 | <dd><code class="verbatim">font-size</code> is the size at the default Dynamic Type setting, 13 pt by default. Text grows and shrinks with the text size chosen in the system Settings app.</dd> | ||
| 141 | <dt>Line spacing and headings</dt> | ||
| 142 | <dd><code class="verbatim">line-spacing</code> and <code class="verbatim">heading-size-step</code> apply as on the Mac.</dd> | ||
| 143 | <dt>Text width</dt> | ||
| 144 | <dd><code class="verbatim">text-width</code> keeps the editor's text to that many columns, centred, on an iPad or a wide window.</dd> | ||
| 145 | <dt>Caret and selection</dt> | ||
| 146 | <dd>the selection highlight takes the theme's <code class="verbatim">selection</code> colour, over block bands too; the caret and the selection handles take <code class="verbatim">cursor</code>.</dd> | ||
| 147 | </dl> | ||
| 148 | <p>The editor and the reader apply these display settings; only the editor aligns tables when a file opens. The startup settings (<code class="verbatim">org-cycle-hide-*-startup</code>, <code class="verbatim">org-startup-*</code>, <code class="verbatim">org-hide-leading-stars</code>) apply when a file opens, and a <code class="verbatim">#+STARTUP</code> keyword in the file overrides them, as on the Mac.</p> | ||
| 149 | <table> | ||
| 150 | <thead> | ||
| 151 | <tr><th>Setting</th><th>In the iOS editor</th><th><code class="verbatim">#+STARTUP</code></th></tr> | ||
| 152 | </thead> | ||
| 153 | <tbody> | ||
| 154 | <tr><td><code class="verbatim">show-markup</code></td><td>Link brackets and targets, and emphasis markers, show</td><td></td></tr> | ||
| 155 | <tr><td><code class="verbatim">org-hide-emphasis-markers</code></td><td>Emphasis markers hide while markup is hidden</td><td></td></tr> | ||
| 156 | <tr><td><code class="verbatim">org-pretty-entities</code></td><td>Entities and sub- and superscripts show as characters while markup is hidden</td><td></td></tr> | ||
| 157 | <tr><td><code class="verbatim">org-cycle-hide-drawer-startup</code></td><td>Drawers start folded</td><td><code class="verbatim">hidedrawers</code>, <code class="verbatim">nohidedrawers</code></td></tr> | ||
| 158 | <tr><td><code class="verbatim">org-cycle-hide-block-startup</code></td><td>Blocks start folded</td><td><code class="verbatim">hideblocks</code>, <code class="verbatim">nohideblocks</code></td></tr> | ||
| 159 | <tr><td><code class="verbatim">org-startup-indented</code></td><td>Bodies are indented under their headings</td><td><code class="verbatim">indent</code>, <code class="verbatim">noindent</code></td></tr> | ||
| 160 | <tr><td><code class="verbatim">org-hide-leading-stars</code></td><td>Without indentation, only a heading's last star shows</td><td><code class="verbatim">hidestars</code>, <code class="verbatim">showstars</code></td></tr> | ||
| 161 | <tr><td><code class="verbatim">org-startup-with-inline-images</code></td><td>Image links show as images</td><td><code class="verbatim">inlineimages</code>, <code class="verbatim">noinlineimages</code></td></tr> | ||
| 162 | <tr><td><code class="verbatim">org-startup-with-latex-preview</code></td><td>LaTeX fragments show as typeset math; Show or Hide LaTeX Previews in Commands switches them</td><td><code class="verbatim">latexpreview</code>, <code class="verbatim">nolatexpreview</code></td></tr> | ||
| 163 | <tr><td><code class="verbatim">org-startup-align-all-tables</code></td><td>Every table is aligned</td><td><code class="verbatim">align</code>, <code class="verbatim">noalign</code></td></tr> | ||
| 164 | <tr><td><code class="verbatim">org-startup-truncated</code></td><td>Long lines run off the right edge, and the editor scrolls sideways</td><td></td></tr> | ||
| 165 | </tbody> | ||
| 166 | </table> | ||
| 167 | <p>While markup is hidden, the line with the caret shows its markup, so you can edit it. More ▸ Show Markup, or Show or Hide Markup in Commands, switches markup in every editor and in the reader. The switch lasts until <code class="verbatim">show-markup</code> in <code class="verbatim">config.toml</code> changes; then the file's value applies.</p> | ||
| 168 | <p>The visibility from <code class="verbatim">#+STARTUP</code> applies first, then each heading's <code class="verbatim">VISIBILITY</code> property. As on the Mac, <code class="verbatim">VISIBILITY</code> properties apply only when <code class="verbatim">#+STARTUP</code> sets a visibility (<code class="verbatim">overview</code>, <code class="verbatim">content</code>, <code class="verbatim">showall</code> and the like).</p> | ||
| 169 | <p>An image line shows its image, and the link text is hidden except on the caret's line. <code class="verbatim">#+ATTR_ORG: :width N</code> sets the width in points; images are never wider than the editor. Show or Hide Inline Images in Commands, or <code class="verbatim">C-c C-x C-v</code> on a hardware keyboard, switches images in the open file. Truncate or Wrap Long Lines in Commands, or <code class="verbatim">C-x x t</code>, switches long lines. See <a href="02-the-editor.html">The editor</a> for which lines show as images.</p> | ||
| 170 | <p>Code in src blocks is highlighted in the theme's <code class="verbatim">syntax-*</code> colours, as on the Mac (see <a href="11-code-blocks.html">Code blocks</a>).</p> | ||
| 171 | <p>Table columns with width cookies narrow as on the Mac: <code class="verbatim">#+STARTUP: shrink</code> narrows them when the file opens, and Shrink or Expand Table Column (<code class="verbatim">C-c TAB</code>), Shrink Table Columns with Widths and Expand Table Columns are in Commands when the caret is in a table. See <a href="10-tables.html">Tables</a>.</p> | ||
| 172 | <h3 id="the-key-bar">The key bar</h3> | ||
| 173 | <p>A bar above the on-screen keyboard has buttons for Org's keys. Each does what its Emacs key does at the caret, so the arrows promote and demote headings, indent list items, or move table columns, depending on where the caret is. Scroll the bar sideways for more.</p> | ||
| 174 | <table> | ||
| 175 | <thead> | ||
| 176 | <tr><th>Button</th><th>Key</th></tr> | ||
| 177 | </thead> | ||
| 178 | <tbody> | ||
| 179 | <tr><td>Commands</td><td>the command list</td></tr> | ||
| 180 | <tr><td>Fold</td><td><code class="verbatim">TAB</code></td></tr> | ||
| 181 | <tr><td>Overview</td><td><code class="verbatim">S-TAB</code></td></tr> | ||
| 182 | <tr><td>Promote</td><td><code class="verbatim">M-<left></code></td></tr> | ||
| 183 | <tr><td>Demote</td><td><code class="verbatim">M-<right></code></td></tr> | ||
| 184 | <tr><td>Move up</td><td><code class="verbatim">M-<up></code></td></tr> | ||
| 185 | <tr><td>Move down</td><td><code class="verbatim">M-<down></code></td></tr> | ||
| 186 | <tr><td>New heading or item</td><td><code class="verbatim">M-RET</code></td></tr> | ||
| 187 | <tr><td>TODO</td><td><code class="verbatim">C-c C-t</code></td></tr> | ||
| 188 | <tr><td>Act at point</td><td><code class="verbatim">C-c C-c</code></td></tr> | ||
| 189 | <tr><td>Schedule</td><td><code class="verbatim">C-c C-s</code></td></tr> | ||
| 190 | <tr><td>Deadline</td><td><code class="verbatim">C-c C-d</code></td></tr> | ||
| 191 | <tr><td>Tags</td><td><code class="verbatim">C-c C-q</code></td></tr> | ||
| 192 | <tr><td>Open link</td><td><code class="verbatim">C-c C-o</code></td></tr> | ||
| 193 | <tr><td>Bold, Italic, Code</td><td>Emphasize with <code class="verbatim">*</code>, <code class="verbatim">/</code> or <code class="verbatim">~</code>: the selection, or a pair of markers with the caret between</td></tr> | ||
| 194 | <tr><td>Hide keyboard</td><td></td></tr> | ||
| 195 | </tbody> | ||
| 196 | </table> | ||
| 197 | <h3 id="commands">Commands</h3> | ||
| 198 | <p>Commands (in the key bar or More) lists every command that applies at the caret, with its Emacs key. Type to narrow the list. The command runs once the list closes.</p> | ||
| 199 | <p>When a command asks a question, a sheet opens:</p> | ||
| 200 | <ul> | ||
| 201 | <li>Text questions have a field, and a list of choices that narrows as you type. For tags, choosing a tag adds it to what you typed.</li> | ||
| 202 | <li>Date questions have a calendar as well as the field; Org's date syntax (<code class="verbatim">+2d</code>, <code class="verbatim">fri</code>, <code class="verbatim">14:00</code>) works in the field.</li> | ||
| 203 | <li>Fast selection (TODO keywords and tags with keys) lists each option with its key. For tags, tap several and then Done; inherited tags are listed below.</li> | ||
| 204 | </ul> | ||
| 205 | <p>Cancel answers nothing, as <code class="verbatim">C-g</code> does.</p> | ||
| 206 | <p><code class="verbatim">C-c '</code> on a block, and <code class="verbatim">C-c `</code> on a table field, open the text in a sheet of its own; Save puts it back. A src block's code is colored as its language, as in the editor.</p> | ||
| 207 | <p>More ▸ Backlinks lists the links to the heading at the caret and to the file; More ▸ Daily Notes, Find Node…, Insert Node Link… and Node Graph work with org-roam-style notes, and the Folders tab's calendar menu opens today's, yesterday's and tomorrow's note. See <a href="09-links.html">Links</a>.</p> | ||
| 208 | <p>Incremental Search is in Commands, and on <code class="verbatim">C-s</code> and <code class="verbatim">C-r</code> with a hardware keyboard; see <a href="02-the-editor.html">The editor</a>. <code class="verbatim">auto-fill-mode</code> works as on the Mac.</p> | ||
| 209 | <p>The org-timer commands are in Commands; a running timer shows above the text. See <a href="06-dates-and-clocking.html">Dates and clocking</a>.</p> | ||
| 210 | <p>More ▸ Attachments has the org-attach commands, Attach Photo or Video…, Take Photo… and Scan Document…, which insert the link to the photo, or to the scanned pages as one PDF, at the caret; files shared to orgstar can be attached to an entry. Pasting an image and dropping files on the editor attach them and link them at the caret. Attachments are copied or moved: iOS doesn't let orgstar link a file from another app's storage, so the keys for attaching by hard link or symbolic link say "Attachments can't be linked on iPhone and iPad; Attach File… copies the file." See <a href="04-outlines.html">Outlines</a> and <a href="09-links.html">Links</a>.</p> | ||
| 211 | <p>Archive Subtree in Commands (or <code class="verbatim">C-c C-x C-s</code> with a hardware keyboard) archives the entry at the caret where <code class="verbatim">org-archive-location</code> says, as on the Mac.</p> | ||
| 212 | <p>More ▸ Encryption has the org-crypt commands; see <a href="04-outlines.html">Outlines</a>. A remembered passphrase is used after Face ID, Touch ID or the device passcode.</p> | ||
| 213 | <h3 id="hardware-keyboard">Hardware keyboard</h3> | ||
| 214 | <p>With a hardware keyboard, the editor uses the preset <code class="verbatim">keymap</code> sets in the folder's <code class="verbatim">config.toml</code> (<code class="verbatim">emacs</code>, <code class="verbatim">mac</code> or <code class="verbatim">doom</code>), with the folder's <code class="verbatim">keymap.toml</code> on it. The Doom preset brings Vim keys; see <a href="03-keys.html">Keys</a>. Bindings with <code class="verbatim">⌘</code> stay with iOS, so the Mac preset adds little.</p> | ||
| 215 | <ul> | ||
| 216 | <li>Option works as Meta when it begins a binding (<code class="verbatim">M-RET</code>, <code class="verbatim">M-<left></code>). Otherwise Option types characters as usual.</li> | ||
| 217 | <li>Command shortcuts are the system's.</li> | ||
| 218 | <li>Keys the keymap leaves to the text system stay with iOS. These include the editing keys <code class="verbatim">C-a</code>, <code class="verbatim">C-e</code>, <code class="verbatim">C-k</code> and similar, which iOS handles itself.</li> | ||
| 219 | <li>After a prefix such as <code class="verbatim">C-c</code>, the message line shows <code class="verbatim">C-c-</code> while it waits for the next key. An unbound sequence shows <code class="verbatim">… is undefined</code>.</li> | ||
| 220 | <li>A sequence bound to a command that can't run at the caret, or that the iOS app doesn't have, shows why, as on the Mac: the command's own message (such as <code class="verbatim">Not on a heading</code>), or <code class="verbatim">Not available on iOS yet</code>.</li> | ||
| 221 | </ul> | ||
| 222 | <p>See <a href="03-keys.html">Keys and commands</a> for the Emacs bindings.</p> | ||
| 223 | <h2 id="search">Search</h2> | ||
| 224 | <p>Search finds:</p> | ||
| 225 | <dl> | ||
| 226 | <dt>Files</dt> | ||
| 227 | <dd>up to eight org files whose path matches what you type, ranked as Quick Open ranks them on the Mac.</dd> | ||
| 228 | <dt>Notes</dt> | ||
| 229 | <dd>headings whose title or text contains your words, and files whose text before the first heading does, including unsaved edits in the open file. Under each is the passage the words were found in, with them in bold.</dd> | ||
| 230 | </dl> | ||
| 231 | <p>Tap a result to open it in the reader. A heading result opens at that heading.</p> | ||
| 232 | <h2 id="the-agenda">The agenda</h2> | ||
| 233 | <p>The Agenda tab shows the agenda over all your folders, with the span and start day from the settings (10 days from 3 days ago by default). Each day lists its entries in rows: the time or a status such as <code class="verbatim">Due today</code> or <code class="verbatim">3d late</code> on the left, the category and the keyword above the title. Days without entries are hidden, except today. Today's overdue entries are in a section of their own above today, and a line marks the current time between timed entries. Pull down to refresh.</p> | ||
| 234 | <dl> | ||
| 235 | <dt>Views (top left)</dt> | ||
| 236 | <dd>the built-in views and those in <code class="verbatim">views.toml</code>, Tags and Properties… (a match such as <code class="verbatim">+work-home</code> or <code>TODO="WAIT"</code>), and Search… (a phrase, or snippets such as <code class="verbatim">+invoice -paid</code>); Save as View… keeps the match or search showing as a view in <code class="verbatim">views.toml</code>.</dd> | ||
| 237 | <dt>Folders (top right, with more than one folder)</dt> | ||
| 238 | <dd>shows or hides each folder's files in the agenda, the widgets, the watch and the badge; the shown folders' names appear under the title. A Focus can hide folders too, and mute their reminders (see Hiding folders in <a href="07-agenda.html">The agenda</a>).</dd> | ||
| 239 | <dt>The bar at the bottom</dt> | ||
| 240 | <dd>Earlier, Filter, Today, Go to Date, the span (Day, Week, Month or the configured span, and Log Mode, which adds closed entries and clocked time) and Later.</dd> | ||
| 241 | <dt>Filter</dt> | ||
| 242 | <dd>keep or leave out tags and categories of the entries shown, or type a filter as Org's <code class="verbatim">/</code> takes it: <code class="verbatim">+keep</code> and <code class="verbatim">-drop</code> tags or categories, <code class="verbatim"><0:30</code> for effort, <code class="verbatim">/regexp/</code>. The filter in use shows above the bar.</dd> | ||
| 243 | <dt>+ on a day's header</dt> | ||
| 244 | <dd>captures an entry scheduled on that day (see <a href="08-capture.html">Capture</a>).</dd> | ||
| 245 | <dt>Tap</dt> | ||
| 246 | <dd>an entry to open it in a sheet: its title, TODO state, priority, scheduled date, deadline, tags and notes. Changes use the same commands as the editor and are written to the file together on Done, or dropped on Cancel; Undo and Redo step through them. More ▸ Open in File saves and shows the entry in the reader.</dd> | ||
| 247 | <dt>Swipe left</dt> | ||
| 248 | <dd>on a TODO entry for Done, which sets the first done keyword of its sequence, or Next State; on any entry with a heading for Delete, which asks first.</dd> | ||
| 249 | <dt>Swipe right</dt> | ||
| 250 | <dd>for Tomorrow, Next Week (next Monday) or Pick Date, which move the entry's scheduled date, or its deadline on a deadline row.</dd> | ||
| 251 | <dt>Touch and hold</dt> | ||
| 252 | <dd>an entry for TODO State…, Reschedule, Schedule…, Deadline…, Tags…, Priority…, Clock In, Add to Calendar…, Refile…, Archive…, and Delete…. Delete… removes the heading and every line under it, after asking. Refile… lists each file and the headings in it down to level 3, as the Mac's prompt does; the entry goes to the end of the file, or under the heading, you choose. Search narrows the list by file and heading path.</dd> | ||
| 253 | </dl> | ||
| 254 | <p>Commands from the agenda change the file directly when it isn't open, and through the editor when it is. If the heading changed since the agenda was built, nothing runs.</p> | ||
| 255 | <p>With <code class="verbatim">calendar-events</code> on, the agenda also shows events from the Calendar app, and with <code class="verbatim">agenda-reminders</code> on, reminders from the Reminders app; see Settings below. Tap an event to edit it; an entry's Add to Calendar… adds it to a calendar. See <a href="07-agenda.html">The agenda</a>.</p> | ||
| 256 | <p>See <a href="07-agenda.html">The agenda</a> for the rows, the views and matches, and the differences from the Mac.</p> | ||
| 257 | <h2 id="widgets-and-the-live-activity">Widgets and the Live Activity</h2> | ||
| 258 | <h3 id="widgets">Widgets</h3> | ||
| 259 | <p>orgstar has four widgets. Add them as any widget: touch and hold the Home Screen or the Lock Screen, and choose orgstar in the widget gallery.</p> | ||
| 260 | <table> | ||
| 261 | <thead> | ||
| 262 | <tr><th>Widget</th><th>Sizes</th><th>Shows</th></tr> | ||
| 263 | </thead> | ||
| 264 | <tbody> | ||
| 265 | <tr><td>Today</td><td>Small, medium and large (Home Screen)</td><td>The date, the count of open entries, and what's left of today: 3 rows (small), 4 rows (medium), or 6 rows and tomorrow's entries (large). Medium and large also count overdue entries.</td></tr> | ||
| 266 | <tr><td>Up Next</td><td>Rectangular, inline and circular (Lock Screen)</td><td>The next entry's time or status and title (rectangular, inline), or the count of open entries today (circular, and inline when nothing is left)</td></tr> | ||
| 267 | <tr><td>Habits</td><td>Small, medium and large (Home Screen)</td><td>Each habit (<code class="verbatim">STYLE: habit</code>) in your agenda files that isn't done, with its consistency graph, as the agenda draws it: the last week (small, 3 habits), or the last three weeks and the next one (medium, 4 habits; large, 9), and how many were done today.</td></tr> | ||
| 268 | <tr><td>Capture</td><td>Circular and rectangular (Lock Screen)</td><td>A button that opens the capture sheet with the template you choose when you edit the widget, or the first template.</td></tr> | ||
| 269 | </tbody> | ||
| 270 | </table> | ||
| 271 | <p>What's left of today is today's entries and calendar events that aren't done, without timed ones that have ended (or started, when they have no end), followed by the overdue entries. The open count is today's entries not done, overdue ones included, without calendar events. The widgets use the theme's colours for the status, the keyword, the priority and the category.</p> | ||
| 272 | <p>Tapping a row in the medium or large Today widget opens that entry; tapping elsewhere opens the agenda. Tapping Up Next opens the next entry, or the agenda when there is none. Tapping a habit opens it.</p> | ||
| 273 | <p>Widgets can't read your folders, so the app writes the next seven days of the agenda (today included) for them to read: while it is open, when files, edits or settings change, when you return to the app, and every hour. Between those times the widgets move on by themselves as timed entries end and at midnight, but they show nothing new until you open orgstar. Until the app has written the agenda once, they say <code class="verbatim">Open orgstar to show your agenda here.</code> The widgets ignore the agenda's filter and show no days without entries. The Habits widget's graphs move on at midnight by themselves.</p> | ||
| 274 | <h3 id="controls">Controls</h3> | ||
| 275 | <p>orgstar has two controls for Control Center, the Lock Screen and the Action button. Add them as any control: in Control Center, touch and hold an empty space and tap Add a Control, then choose orgstar.</p> | ||
| 276 | <dl> | ||
| 277 | <dt>Capture</dt> | ||
| 278 | <dd>opens the capture sheet. Touch and hold it while editing Control Center to choose a template; without one it uses the first.</dd> | ||
| 279 | <dt>Clock</dt> | ||
| 280 | <dd>on while a clock runs, showing its entry. Turning it off clocks out; turning it on clocks in to the entry clocked last (Clock In Last). If a clock was left running elsewhere, orgstar asks in the app how to resolve it.</dd> | ||
| 281 | </dl> | ||
| 282 | <h3 id="the-clock-s-live-activity">The clock's Live Activity</h3> | ||
| 283 | <p>While a clock runs, it shows on the Lock Screen and in the Dynamic Island: the heading, the time so far, and a Clock Out button. Clock Out stops the clock as Clock Out does in the app, and saves the file. Tapping the Live Activity opens the clocked entry.</p> | ||
| 284 | <p>The Live Activity starts when you clock in in the app and ends when the clock stops, however it stops. It needs Live Activities allowed for orgstar in the Settings app (Settings ▸ orgstar ▸ Live Activities).</p> | ||
| 285 | <h3 id="orgstar-links">orgstar:// links</h3> | ||
| 286 | <p>The widgets and the Live Activity open the app with these links, which also work from Shortcuts, Safari or a note:</p> | ||
| 287 | <table> | ||
| 288 | <thead> | ||
| 289 | <tr><th>Link</th><th>Opens</th></tr> | ||
| 290 | </thead> | ||
| 291 | <tbody> | ||
| 292 | <tr><td><code class="verbatim">orgstar://agenda</code></td><td>The Agenda tab</td></tr> | ||
| 293 | <tr><td><code class="verbatim">orgstar://clock</code></td><td>The entry of the running clock</td></tr> | ||
| 294 | <tr><td><code>orgstar://entry?path=/path/file.org&offset=N</code></td><td>The file in the reader, at offset N</td></tr> | ||
| 295 | </tbody> | ||
| 296 | </table> | ||
| 297 | <h2 id="apple-watch">Apple Watch</h2> | ||
| 298 | <p>The watch app shows today's agenda from your iPhone, marks entries done, shows and stops the running clock, and takes dictated captures. It comes with orgstar on iPhone and installs on a paired watch as other watch apps do. It reads nothing itself: your iPhone sends it today's agenda and the clock whenever its widgets update (when files, edits or settings change while orgstar is open, and when you return to it) and whenever the clock starts or stops, and the watch keeps the last one it got. Until it has one, it says <code class="verbatim">Open orgstar on your iPhone to show your agenda here.</code></p> | ||
| 299 | <dl> | ||
| 300 | <dt>Clocked In</dt> | ||
| 301 | <dd>the running clock's heading and its time so far, with Clock Out. Without a running clock, Clock In to <em>heading</em> clocks in to the entry clocked last (<code class="verbatim">org-clock-in-last</code>).</dd> | ||
| 302 | <dt>Capture</dt> | ||
| 303 | <dd>dictate or scribble text, then Done. It goes to orgstar on iPhone, which opens the capture sheet with it as <code class="verbatim">%i</code>, with the first template, as text from the share sheet does; see Capture below.</dd> | ||
| 304 | <dt>Overdue, then today</dt> | ||
| 305 | <dd>as the agenda lists them, with the time or status, the title and the keyword. Tap an open TODO entry to mark it done: it takes its sequence's first done keyword, as the agenda's Done does. The entry shows done at once; the iPhone changes the file, unless the heading changed since the agenda was sent.</dd> | ||
| 306 | </dl> | ||
| 307 | <p>What the watch asks for runs on your iPhone, which iOS wakes for it when orgstar isn't open; while the iPhone is out of reach, the requests wait and run when it is back.</p> | ||
| 308 | <h3 id="complications">Complications</h3> | ||
| 309 | <table> | ||
| 310 | <thead> | ||
| 311 | <tr><th>Complication</th><th>Families</th><th>Shows</th></tr> | ||
| 312 | </thead> | ||
| 313 | <tbody> | ||
| 314 | <tr><td>Up Next</td><td>Rectangular, inline, circular and corner</td><td>The next entry's time or status and title (rectangular, inline, corner), or the count of open TODO entries today (circular, and corner)</td></tr> | ||
| 315 | <tr><td>Clock</td><td>Rectangular, inline and circular</td><td>The running clock's time so far and heading, or <code class="verbatim">Not clocked in</code></td></tr> | ||
| 316 | </tbody> | ||
| 317 | </table> | ||
| 318 | <p>They read the agenda the watch app last got, and move on by themselves as timed entries end and at midnight.</p> | ||
| 319 | <h2 id="capture">Capture</h2> | ||
| 320 | <p>Tap Capture (the pencil icon) in the Agenda or Folders tab.</p> | ||
| 321 | <ol> | ||
| 322 | <li>Choose a template. The first template is selected.</li> | ||
| 323 | <li>Answer the template's questions (<code class="verbatim">%^{…}</code>, <code class="verbatim">%^g</code>, <code class="verbatim">%^t</code> and the like), then tap Continue. A template without questions skips this step.</li> | ||
| 324 | <li>Edit the text. The caret is where <code class="verbatim">%?</code> was. When the text has a heading, the rows below it set the entry's State (its TODO keyword), Priority, Scheduled and Deadline dates (Today, Tomorrow, In a Week, or Pick Date…, with an optional time; Remove takes the date off) and Tags (the target file's and the workspace's, or new ones). They change the text as the editor's commands would, without logging a reschedule.</li> | ||
| 325 | <li>Tap File.</li> | ||
| 326 | </ol> | ||
| 327 | <p>Templates come from <code class="verbatim">capture.toml</code> in the configuration folder (see Settings below). Without one, the two default templates apply. A template with <code class="verbatim">immediate-finish</code> files as soon as its questions are answered, and one with <code class="verbatim">jump-to-captured</code> opens the captured entry. <code class="verbatim">%^g</code> offers the target file's tags as choices.</p> | ||
| 328 | <p><code class="verbatim">org-protocol://store-link</code> links add the URL to the stored links that Insert Link… offers, and copy it. <code class="verbatim">org-protocol://capture</code> links opened on the device open the capture sheet with the link's template, URL, title and text. When the link names a template key that <code class="verbatim">capture.toml</code> doesn't have, the sheet starts on the first template and shows <code class="verbatim">No capture template "x"</code> with the key.</p> | ||
| 329 | <h3 id="from-the-share-sheet">From the share sheet</h3> | ||
| 330 | <p>orgstar appears in the share sheet of other apps for a web link or text.</p> | ||
| 331 | <ol> | ||
| 332 | <li>Share a page or text and choose orgstar.</li> | ||
| 333 | <li>Choose a template, edit the link's title, and add text.</li> | ||
| 334 | <li>Tap Capture.</li> | ||
| 335 | </ol> | ||
| 336 | <p>The share extension doesn't file the entry itself. It leaves it for the app, which opens its capture sheet with the link and text the next time it becomes active. Several shared items open one after another. If the extension shows "orgstar's shared folder isn't available", the app and its extension can't share data, and Capture is disabled.</p> | ||
| 337 | <h3 id="from-shortcuts">From Shortcuts</h3> | ||
| 338 | <p>Shortcuts has a Capture to orgstar action, and Siri responds to "Capture to orgstar". The action takes:</p> | ||
| 339 | <dl> | ||
| 340 | <dt>Text</dt> | ||
| 341 | <dd>the text to capture, available to the template as <code class="verbatim">%i</code>.</dd> | ||
| 342 | <dt>Template Key</dt> | ||
| 343 | <dd>a key from <code class="verbatim">capture.toml</code>; empty uses the first template.</dd> | ||
| 344 | </dl> | ||
| 345 | <p>The action files the entry without showing the capture sheet, and saves the file at once. Questions in the template take their default answers, and <code class="verbatim">%c</code> (the clipboard) is empty, because reading the clipboard would ask for permission on every run. The action returns "Captured with" and the template's name.</p> | ||
| 346 | <p>See <a href="08-capture.html">Capture</a> for the template format.</p> | ||
| 347 | <h2 id="clocking">Clocking</h2> | ||
| 348 | <p>Clock in from the editor (More ▸ Clock In, or Clock In in Commands) or from an agenda entry's menu. While a clock runs, a bar above the tab bar shows the entry and the time so far as <code class="verbatim">H:MM</code>, updated every 30 seconds, and a Live Activity shows it on the Lock Screen and in the Dynamic Island (see <a href="#widgets-and-the-live-activity">Widgets and the Live Activity</a>). Tap the bar for:</p> | ||
| 349 | <ul> | ||
| 350 | <li>Clock Out</li> | ||
| 351 | <li>Cancel Clock</li> | ||
| 352 | <li>Go to Clocked Entry</li> | ||
| 353 | <li>Recent Entries</li> | ||
| 354 | <li>Clock Report</li> | ||
| 355 | </ul> | ||
| 356 | <p>Recent Entries, in the bar and in the editor's More menu, lists the recently clocked entries; tap one to clock in to it. It also has Clock In to Recent Entry… and Go to Recent Clocked Entry…, and is disabled until you have clocked in once. Commands has Clock In to Recent Entry…, Clock In to Last Entry, Go to Recent Clocked Entry…, Mark as Default Clock Task and Resolve Open Clocks….</p> | ||
| 357 | <p>Clock questions open in a sheet: the task selection and the resolution keys as lists to tap, and minutes or a date and time as a field. Cancel answers nothing, as <code class="verbatim">q</code> does. Clocking in with no clock running first asks about open clocks in your folders, from the editor, an agenda entry's Clock In or a capture template with <code class="verbatim">clock-in</code>; Resolve Open Clocks… asks about every open clock. Both work as on the Mac.</p> | ||
| 358 | <p>With <code class="verbatim">org-clock-idle-time</code> set, returning to the app while a clock runs asks what to do with the time away, if it was longer than that many minutes: iOS has no idle time, so time in other apps or with the device locked stands in for it. Time working in another orgstar window doesn't count. See <a href="06-dates-and-clocking.html">Dates and clocking</a>. <code class="verbatim">org-clock-history-length</code> applies too.</p> | ||
| 359 | <p>Clock Report shows the time per day and heading for the files you choose. It starts with the files that contain clock lines. Turn on Limit dates to choose a range. The share button sends the report as text.</p> | ||
| 360 | <p>See <a href="06-dates-and-clocking.html">Dates and clocking</a>.</p> | ||
| 361 | <h2 id="reminders">Reminders</h2> | ||
| 362 | <p>With <code class="verbatim">reminders</code> on, orgstar schedules a notification before each timed agenda entry in the next week, <code class="verbatim">appt-message-warning-time</code> minutes ahead (or the entry's <code class="verbatim">APPT_WARNTIME</code>). Tap a notification to open its entry. Notifications show while the app is open too.</p> | ||
| 363 | <p>iOS lets an app schedule at most 64 notifications, and orgstar schedules more only while it runs. It updates them when files or settings change, when you return to the app, and every hour while it is open. The agenda's status line says how far ahead reminders are set ("Reminders are set through …"), or that notifications are off for orgstar in the system Settings app.</p> | ||
| 364 | <p>The app icon's badge counts the entries in the agenda's Overdue section that aren't done: past their scheduled day or their deadline, habits left out. An entry past both counts once. orgstar sets each of the next six midnights' counts ahead, so the badge stays right while the app is closed. If notifications were allowed before orgstar asked for badges, tap Show Overdue Count on Icon under Badge in orgstar's Settings; it adds Badges to orgstar's notification settings and opens them when they're still off. Turn the badge off there, under Badges.</p> | ||
| 365 | <h2 id="export">Export</h2> | ||
| 366 | <p>Export (in the reader's toolbar and the editor's More menu) offers HTML, Markdown, PDF, Word, Rich Text (RTF), Plain Text, ODT, iCalendar, LaTeX and Plain Text (ASCII), and Copy as Rich Text. Each opens the share sheet with a file named after the org file, which you can send to another app or keep with Save to Files. The export reads the file's setup files and follows its export keywords, as the Mac's export does. For a file the LaTeX or ASCII export can't write as Emacs would, the share sheet stops and "Can't export to LaTeX: " or "Can't export to plain text: " and the reason show at the bottom of the screen.</p> | ||
| 367 | <p>PDF export follows <code class="verbatim">pdf-margin</code>, <code class="verbatim">pdf-font</code> and <code class="verbatim">pdf-page-numbers</code> in <code class="verbatim">config.toml</code>, and Word files get heading styles and the file's images, as on the Mac. PDF through LaTeX isn't available on iOS.</p> | ||
| 368 | <p>The Export menu also has Export Agenda Files to iCalendar, which writes an <code class="verbatim">.ics</code> beside each agenda file, and Combine Agenda Files into iCalendar, which shares one calendar of them all. Commands has these, Copy as Rich Text, and Export to HTML and Open, which shows the HTML export in Quick Look.</p> | ||
| 369 | <p>Publishing works from Commands as on the Mac, with the <code class="verbatim">[[publish]]</code> projects in <code class="verbatim">config.toml</code>. A project that publishes outside your folders asks for a folder the first time, and uses it from then on. See <a href="12-export.html">Export</a>.</p> | ||
| 370 | <h2 id="code-blocks-and-tables">Code blocks and tables</h2> | ||
| 371 | <p><code class="verbatim">C-c C-c</code> on a source block asks whether to run it (yes, no, or always for this block), as on the Mac.</p> | ||
| 372 | <p>On iOS, only Emacs Lisp, JavaScript, calc, sqlite, dot and mermaid blocks run. orgstar evaluates Emacs Lisp with its own interpreter, which covers a subset of the language, JavaScript in JavaScriptCore, as <code class="verbatim">node</code> would run it, sessions included, calc with its own Calc, sqlite with the SQLite library, as <code class="verbatim">sqlite3</code> would, and dot and mermaid with Graphviz and mermaid built in, as SVG or PNG; see <a href="11-code-blocks.html">Code blocks</a>. Other results:</p> | ||
| 373 | <ul> | ||
| 374 | <li>A block in another language: "<em>language</em> blocks need the Mac to run."</li> | ||
| 375 | <li>Emacs Lisp the interpreter doesn't have: "This block uses Emacs Lisp that runs only in Emacs, on the Mac."</li> | ||
| 376 | <li>JavaScript that uses something only node has, such as <code class="verbatim">Buffer</code>: "This block uses <em>name</em>, which runs only in node."</li> | ||
| 377 | <li>A calc or sqlite block orgstar can't run as Emacs would: "This calc block can't be calculated here: <em>reason</em>." or "This sqlite block can't run here: <em>reason</em>."</li> | ||
| 378 | </ul> | ||
| 379 | <p>Table formulas that orgstar computes itself work on iOS. In a table whose formulas need Emacs, orgstar applies the formulas up to the first one that needs it and stops there, as Emacs does when a formula fails: the fields written before it stay and the rest are unchanged. The message is "The table was recalculated up to <em>formula</em>, which needs Emacs on the Mac", with the formula's left-hand side and the reason. When nothing was written, it is "This table needs Emacs, which runs on the Mac", with the reason, and the table is unchanged.</p> | ||
| 380 | <p>Tangling (<code class="verbatim">C-c C-v t</code>, in Commands) works on iOS and writes the tangled files next to the org file, or where <code class="verbatim">:tangle</code> says.</p> | ||
| 381 | <p>See <a href="11-code-blocks.html">Code blocks</a> and <a href="10-tables.html">Tables</a>.</p> | ||
| 382 | <h2 id="conflicts-and-versions">Conflicts and versions</h2> | ||
| 383 | <p>When a file changes on disk while you have unsaved edits, orgstar merges the change into your edits. When the changes overlap, the conflict sheet opens. It shows the difference (lines marked - are on disk, + in your version) and offers:</p> | ||
| 384 | <dl> | ||
| 385 | <dt>Keep Mine</dt> | ||
| 386 | <dd>write your version over the disk version.</dd> | ||
| 387 | <dt>Use Disk Version</dt> | ||
| 388 | <dd>replace your edits with the disk version.</dd> | ||
| 389 | <dt>Merge with Markers</dt> | ||
| 390 | <dd>put both versions in the editor, with conflicting lines between <code class="verbatim"><<<<<<<</code> and <code class="verbatim">>>>>>>></code> markers, to fix and save.</dd> | ||
| 391 | <dt>Later</dt> | ||
| 392 | <dd>decide later. The Conflict button in the toolbar opens the sheet again. Nothing is saved until you decide.</dd> | ||
| 393 | </dl> | ||
| 394 | <p>The version you don't keep goes to the recovery folder.</p> | ||
| 395 | <p>More ▸ Sync Conflict Copies lists Syncthing's conflict copies of the file (<code class="verbatim">name.sync-conflict-…</code>), each compared with the file, with Keep File, Merge and Use Copy. The copy goes to the recovery folder and is removed. When a file with conflict copies opens in the editor, a message says how many there are.</p> | ||
| 396 | <p>More ▸ Recovered Versions lists the versions of the file kept in the recovery folder, newest first, each compared with the editor's text. Restore puts a version's text in the editor as an edit you can undo.</p> | ||
| 397 | <p>See <a href="15-alongside-emacs.html">Working alongside Emacs and other tools</a> for how merging and recovery work.</p> | ||
| 398 | <h2 id="settings">Settings</h2> | ||
| 399 | <p>The iOS app reads its settings from a configuration folder: a folder holding <code class="verbatim">config.toml</code> and <code class="verbatim">capture.toml</code>, such as a copy of the Mac's <code class="verbatim">~/.config/orgstar</code> synced through iCloud Drive or another app.</p> | ||
| 400 | <ol> | ||
| 401 | <li>Open the Settings tab.</li> | ||
| 402 | <li>Tap Choose Folder… and choose the folder. If it has no <code class="verbatim">config.toml</code>, orgstar writes one with every setting at its default, each with a comment, as the Mac does.</li> | ||
| 403 | </ol> | ||
| 404 | <p>Changes to the files apply as they sync, and again each time you return to the app. Problems in the files show in red under the folder. "No config.toml in <em>folder</em>; the defaults apply" means the folder has no <code class="verbatim">config.toml</code>, for example because it was removed after you chose the folder.</p> | ||
| 405 | <p>Edit config.toml opens the folder's <code class="verbatim">config.toml</code> as plain text, with smart quotes and dashes off. Save, or going back, writes it and applies it at once; problems show in red below the text.</p> | ||
| 406 | <p>Stop Using This Folder returns every setting to its default.</p> | ||
| 407 | <p>Import from Emacs reads an Emacs or Doom configuration folder, such as a synced <code class="verbatim">~/.config/doom</code> or <code class="verbatim">~/.emacs.d</code>, as the Mac's import does (see <a href="13-configuration.html">Configuration</a>):</p> | ||
| 408 | <ol> | ||
| 409 | <li>Tap Import from Emacs, then Choose Folder…, and choose the folder holding <code class="verbatim">init.el</code>, <code class="verbatim">config.el</code> or <code class="verbatim">config.org</code>.</li> | ||
| 410 | <li>The screen lists the settings, capture templates, key bindings, structure templates and agenda views it found, each with the line it came from, all selected. Clear what you don't want.</li> | ||
| 411 | <li>Tap Import. The screen then summarizes what was imported and any problems.</li> | ||
| 412 | </ol> | ||
| 413 | <p>With a configuration folder, settings and structure templates are written to its <code class="verbatim">config.toml</code>, and capture templates, key bindings and agenda views to its <code class="verbatim">capture.toml</code>, <code class="verbatim">keymap.toml</code> and <code class="verbatim">views.toml</code>, so the Mac reads them too. Without one, settings are kept on the device.</p> | ||
| 414 | <p>Folders from <code class="verbatim">org-directory</code> and <code class="verbatim">org-agenda-files</code> name the Mac's paths, so the screen lists them under Folders on this device. Tap each one and choose the folder on this device that holds the same files, such as its synced copy in iCloud Drive. Import adds the chosen folders to the Folders tab; folders not chosen aren't added, and the summary says so. <code class="verbatim">org-agenda-files</code> entries in a chosen folder point to the same files in the folder chosen for it, and entries in folders not chosen are left out. Relative entries are kept as written and count from the first folder, as Emacs counts them from <code class="verbatim">org-directory</code>; they add no folder of their own. With a configuration folder, <code class="verbatim">config.toml</code> keeps the Mac's entries as well, beside the device's; each device skips the files it doesn't have.</p> | ||
| 415 | <p>The Agenda, TODO Dependencies, Calendar and Reminders sections are the only places the app changes a setting itself, besides Import from Emacs:</p> | ||
| 416 | <dl> | ||
| 417 | <dt>Show days without entries</dt> | ||
| 418 | <dd>turns <code class="verbatim">org-agenda-show-all-dates</code> on or off.</dd> | ||
| 419 | <dt>Habits only today</dt> | ||
| 420 | <dd>turns <code class="verbatim">org-habit-show-habits-only-for-today</code> on or off.</dd> | ||
| 421 | <dt>Exclude archived tasks</dt> | ||
| 422 | <dd>turns <code class="verbatim">agenda-exclude-archives</code> on or off: the agenda leaves out the files your agenda files archive to.</dd> | ||
| 423 | <dt>Blocked entries</dt> | ||
| 424 | <dd>Dimmed, Hidden or Shown as usual (<code class="verbatim">org-agenda-dim-blocked-tasks</code>).</dd> | ||
| 425 | <dt>TODO Dependencies</dt> | ||
| 426 | <dd>Not done before TODO children (<code class="verbatim">org-enforce-todo-dependencies</code>) and Not done with unchecked boxes (<code class="verbatim">org-enforce-todo-checkbox-dependencies</code>).</dd> | ||
| 427 | <dt>Show Calendar Events</dt> | ||
| 428 | <dd>turns on <code class="verbatim">calendar-events</code>, and asks for access to your calendars. iOS asks for full access, as Calendar has no read-only level; orgstar changes a calendar only when you edit an event or add an entry. While access is missing the section shows Allow Access to Calendars…; if you declined, allow it in the Settings app under Privacy & Security ▸ Calendars.</dd> | ||
| 429 | <dt>The calendars</dt> | ||
| 430 | <dd>tap one to show or hide its events (<code class="verbatim">calendar-event-calendars</code>). With every calendar checked the setting is empty, so calendars added later show too.</dd> | ||
| 431 | <dt>Show Reminders</dt> | ||
| 432 | <dd>turns on <code class="verbatim">agenda-reminders</code> and asks for access to your reminders; Allow Access to Reminders… shows while it is missing. Tap a list to show or hide its reminders (<code class="verbatim">agenda-reminder-lists</code>).</dd> | ||
| 433 | </dl> | ||
| 434 | <p>These write <code class="verbatim">config.toml</code> in the configuration folder, as the Mac's Settings window does, so the Mac sees the change too. Without a configuration folder they are kept on the device.</p> | ||
| 435 | <p>The In use section shows the TODO keywords, the agenda span and start (for example <code class="verbatim">10 days, starting today</code>), the reminder lead time, the capture template keys, the light and dark themes, and the theme file's name when there is one, and the font with its size. When <code class="verbatim">font</code> names a family that isn't installed on the device, Font shows the system's font with a note, as <code class="verbatim">System monospaced, 13 pt (JetBrains Mono isn't installed)</code>.</p> | ||
| 436 | <p>About orgstar, at the bottom, shows the version, What's New (the sheet that opens once after an update with what changed) and links to the manual, the release notes, the website, the issue tracker (which needs a gitbay account), support by email at <code class="verbatim">help@krz.sh</code> with the version and device filled in, the App Store review page, the source code, the license, third-party notices and the privacy policy.</p> | ||
| 437 | <p>These settings from <code class="verbatim">config.toml</code> apply on iOS:</p> | ||
| 438 | <ul> | ||
| 439 | <li><code class="verbatim">org-todo-keywords</code>, <code class="verbatim">org-list-allow-alphabetical</code></li> | ||
| 440 | <li><code class="verbatim">org-tags-column</code>, <code class="verbatim">org-insert-heading-respect-content</code>, <code class="verbatim">org-M-RET-may-split-line</code>, <code class="verbatim">fill-column</code></li> | ||
| 441 | <li><code class="verbatim">org-hide-emphasis-markers</code> and <code class="verbatim">org-pretty-entities</code>, for what hidden markup shows and for how tag and table alignment and filling measure text, as on the Mac</li> | ||
| 442 | <li><code class="verbatim">pdf-margin</code>, <code class="verbatim">pdf-font</code>, <code class="verbatim">pdf-page-numbers</code></li> | ||
| 443 | <li><code class="verbatim">show-markup</code>, <code class="verbatim">org-startup-indented</code>, <code class="verbatim">org-hide-leading-stars</code>, <code class="verbatim">org-startup-with-inline-images</code>, <code class="verbatim">org-startup-with-latex-preview</code>, <code class="verbatim">org-startup-align-all-tables</code>, <code class="verbatim">org-startup-truncated</code>, <code class="verbatim">org-cycle-hide-drawer-startup</code>, <code class="verbatim">org-cycle-hide-block-startup</code></li> | ||
| 444 | <li><code class="verbatim">[theme]</code> (<code class="verbatim">font</code>, <code class="verbatim">body-font</code>, <code class="verbatim">font-size</code>, <code class="verbatim">line-spacing</code>, <code class="verbatim">text-width</code>, <code class="verbatim">heading-size-step</code>, <code class="verbatim">theme-file</code> and colours), <code class="verbatim">[theme.light]</code>, <code class="verbatim">[theme.dark]</code>, <code class="verbatim">[theme.todo]</code>, <code class="verbatim">[theme.category]</code></li> | ||
| 445 | <li><code class="verbatim">org-log-done</code>, <code class="verbatim">org-log-reschedule</code>, <code class="verbatim">org-log-redeadline</code>, <code class="verbatim">org-log-into-drawer</code></li> | ||
| 446 | <li><code class="verbatim">org-enforce-todo-dependencies</code>, <code class="verbatim">org-enforce-todo-checkbox-dependencies</code>, <code class="verbatim">org-track-ordered-property-with-tag</code>, <code class="verbatim">org-agenda-dim-blocked-tasks</code></li> | ||
| 447 | <li><code class="verbatim">org-roam-directory</code>, <code class="verbatim">org-roam-dailies-directory</code>, <code class="verbatim">org-roam-dailies-file</code>, <code class="verbatim">org-roam-dailies-head</code>, <code class="verbatim">org-roam-dailies-entry</code></li> | ||
| 448 | <li><code class="verbatim">org-crypt-tag-matcher</code>, <code class="verbatim">org-attach-id-dir</code>, <code class="verbatim">org-attach-use-inheritance</code>, <code class="verbatim">org-yank-image-save-method</code>, <code class="verbatim">org-timer-format</code>, <code class="verbatim">org-timer-default-timer</code></li> | ||
| 449 | <li><code class="verbatim">org-archive-location</code>, <code class="verbatim">[org-structure-template-alist]</code></li> | ||
| 450 | <li><code class="verbatim">org-use-tag-inheritance</code>, <code class="verbatim">org-tags-exclude-from-inheritance</code>, <code class="verbatim">org-tag-alist</code></li> | ||
| 451 | <li><code class="verbatim">org-use-speed-commands</code>, with a hardware keyboard</li> | ||
| 452 | <li><code class="verbatim">electric-pair-mode</code>, <code class="verbatim">spell-check</code>, <code class="verbatim">auto-fill-mode</code></li> | ||
| 453 | <li><code class="verbatim">org-agenda-span</code>, <code class="verbatim">org-agenda-start-day</code>, <code class="verbatim">org-agenda-start-on-weekday</code>, <code class="verbatim">org-deadline-warning-days</code>, <code class="verbatim">agenda-include-subfolders</code>, <code class="verbatim">agenda-exclude-archives</code>, <code class="verbatim">org-agenda-show-all-dates</code>, <code class="verbatim">org-agenda-skip-scheduled-if-done</code>, <code class="verbatim">org-agenda-skip-deadline-if-done</code>, <code class="verbatim">org-habit-show-habits-only-for-today</code>, <code class="verbatim">org-agenda-search-view-always-boolean</code>, <code class="verbatim">org-agenda-search-view-force-full-words</code>, <code class="verbatim">org-agenda-log-mode-items</code>, the <code class="verbatim">org-agenda-todo-ignore-</code> settings, <code class="verbatim">org-agenda-tags-todo-honor-ignore-options</code></li> | ||
| 454 | <li><code class="verbatim">calendar-events</code>, <code class="verbatim">calendar-event-calendars</code>, <code class="verbatim">agenda-reminders</code>, <code class="verbatim">agenda-reminder-lists</code></li> | ||
| 455 | <li><code class="verbatim">reminders</code>, <code class="verbatim">appt-message-warning-time</code></li> | ||
| 456 | <li><code class="verbatim">org-clock-history-length</code>, <code class="verbatim">org-clock-into-drawer</code>, <code class="verbatim">org-clock-rounding-minutes</code>, <code class="verbatim">org-clock-out-remove-zero-time-clocks</code>, <code class="verbatim">org-clock-in-switch-to-state</code>, <code class="verbatim">org-clock-out-when-done</code>, <code class="verbatim">org-clock-idle-time</code></li> | ||
| 457 | <li><code class="verbatim">org-icalendar-combined-agenda-file</code> (its name) and the other <code class="verbatim">org-icalendar-</code> settings, <code class="verbatim">[[publish]]</code></li> | ||
| 458 | </ul> | ||
| 459 | <p><code class="verbatim">capture.toml</code> and <code class="verbatim">views.toml</code> in the folder apply too. <code class="verbatim">keymap</code> and <code class="verbatim">keymap.toml</code> apply with a hardware keyboard. Other settings, including <code class="verbatim">save</code>, don't apply on iOS. See <a href="13-configuration.html">Configuration</a>.</p> | ||
| 460 | <h2 id="spotlight-and-quick-look">Spotlight and Quick Look</h2> | ||
| 461 | <p>orgstar adds the org files in your folders to Spotlight with their title (<code class="verbatim">#+TITLE</code>, else the file name), author, description, tags, headings and text. A file is indexed again when it changes. Tap a Spotlight result to open the file in orgstar's reader.</p> | ||
| 462 | <p>Quick Look in the Files app shows org files as the HTML export renders them.</p> | ||
| 463 | <h2 id="what-the-mac-has-that-ios-doesn-t">What the Mac has that iOS doesn't</h2> | ||
| 464 | <ul> | ||
| 465 | <li>In the download version: running code blocks in languages other than Emacs Lisp, JavaScript, calc, sqlite, dot and mermaid, Emacs Lisp beyond orgstar's interpreter, JavaScript that needs node, and tables that need Emacs.</li> | ||
| 466 | <li>In the download version, LaTeX-made PDF export.</li> | ||
| 467 | <li>Idle detection from keyboard and mouse input; iOS uses the time away from the app instead.</li> | ||
| 468 | <li>In the download version, attaching by hard link or symbolic link.</li> | ||
| 469 | <li>The Columns inspector, the buffer list and tab bar, and resizing panes by dragging their divider. The board and column view are there (see <a href="07-agenda.html">The agenda</a> and <a href="04-outlines.html">Outlines</a>).</li> | ||
| 470 | <li>The global capture hotkey and the Settings window.</li> | ||
| 471 | <li>Explicit saving.</li> | ||
| 472 | </ul> | ||
| 473 | <p>Commands the iOS app can't carry out show a message instead, such as "Not available on iOS yet" or "<em>Command</em> isn't available on iPhone and iPad." Only tables that need Emacs say that Emacs is needed. Commands that only appear on the Mac aren't listed in Commands. Refile… in Commands (or <code class="verbatim">C-c C-w</code> with a hardware keyboard) refiles the entry at the caret, choosing the target as the agenda's Refile… does.</p> | ||
| 474 | </main> | ||
| 475 | <footer class="site"> | ||
| 476 | © 2026 Christian Cleberg · <a href="https://krz.sh/apps/orgstar/">krz.sh/apps/orgstar</a> · <a href="/orgstar/third-party.html">third-party notices</a> | ||
| 477 | </footer> | ||
| 478 | </body> | ||
| 479 | </html>\ No newline at end of file | ||
guide/15-alongside-emacs.html added +292
| @@ -0,0 +1,292 @@ | |||
| 1 | <!DOCTYPE html> | ||
| 2 | <html lang="en"> | ||
| 3 | <head> | ||
| 4 | <meta charset="utf-8"> | ||
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
| 6 | <title>Working alongside Emacs and other tools · orgstar</title> | ||
| 7 | <meta name="description" content="How orgstar reads and writes files shared with Emacs and sync tools, merges outside changes, keeps recovery versions, calls Emacs, and differs from…"> | ||
| 8 | <link rel="icon" href="../favicon.svg" type="image/svg+xml"> | ||
| 9 | <link rel="stylesheet" href="../theme.css"> | ||
| 10 | <link rel="stylesheet" href="../syntax.css"> | ||
| 11 | <link rel="stylesheet" href="../style.css"> | ||
| 12 | </head> | ||
| 13 | <body> | ||
| 14 | <header class="site"> | ||
| 15 | <a class="site-title" href="../index.html">orgstar</a> | ||
| 16 | <nav> | ||
| 17 | <a href="../install.html">Install</a> | ||
| 18 | <a href="../quickstart.html">Quick start</a> | ||
| 19 | <a href="index.html">Manual</a> | ||
| 20 | </nav> | ||
| 21 | </header> | ||
| 22 | <main> | ||
| 23 | <h1>Working alongside Emacs and other tools</h1> | ||
| 24 | <p class="lede">orgstar works on plain org files in ordinary folders, so Emacs, other apps and sync tools can work on the same files.</p> | ||
| 25 | <nav class="toc" aria-label="On this page"> | ||
| 26 | <h2>On this page</h2> | ||
| 27 | <ul> | ||
| 28 | <li><a href="#how-orgstar-treats-files">How orgstar treats files</a> | ||
| 29 | <ul> | ||
| 30 | <li><a href="#bytes-on-disk">Bytes on disk</a></li> | ||
| 31 | <li><a href="#encodings">Encodings</a></li> | ||
| 32 | <li><a href="#how-a-save-works">How a save works</a></li> | ||
| 33 | <li><a href="#automatic-and-explicit-saving">Automatic and explicit saving</a></li> | ||
| 34 | </ul></li> | ||
| 35 | <li><a href="#changes-made-outside-orgstar">Changes made outside orgstar</a> | ||
| 36 | <ul> | ||
| 37 | <li><a href="#the-conflict-sheet">The conflict sheet</a></li> | ||
| 38 | </ul></li> | ||
| 39 | <li><a href="#sync-tools">Sync tools</a> | ||
| 40 | <ul> | ||
| 41 | <li><a href="#icloud-drive">iCloud Drive</a></li> | ||
| 42 | <li><a href="#syncthing">Syncthing</a></li> | ||
| 43 | <li><a href="#dropbox-and-other-tools">Dropbox and other tools</a></li> | ||
| 44 | <li><a href="#files-orgstar-ignores">Files orgstar ignores</a></li> | ||
| 45 | </ul></li> | ||
| 46 | <li><a href="#recovery-versions">Recovery versions</a></li> | ||
| 47 | <li><a href="#features-that-use-emacs-on-the-mac">Features that use Emacs on the Mac</a> | ||
| 48 | <ul> | ||
| 49 | <li><a href="#how-emacs-is-found">How Emacs is found</a></li> | ||
| 50 | <li><a href="#what-emacs-sees">What Emacs sees</a></li> | ||
| 51 | </ul></li> | ||
| 52 | <li><a href="#quick-look">Quick Look</a></li> | ||
| 53 | <li><a href="#spotlight">Spotlight</a></li> | ||
| 54 | <li><a href="#finder">Finder</a></li> | ||
| 55 | <li><a href="#org-protocol-and-shortcuts">org-protocol and Shortcuts</a></li> | ||
| 56 | <li><a href="#compatibility-notes">Compatibility notes</a> | ||
| 57 | <ul> | ||
| 58 | <li><a href="#defaults-that-differ-from-emacs">Defaults that differ from Emacs</a></li> | ||
| 59 | <li><a href="#how-the-agenda-looks">How the agenda looks</a></li> | ||
| 60 | <li><a href="#known-differences-from-emacs-org">Known differences from Emacs Org</a></li> | ||
| 61 | </ul></li> | ||
| 62 | </ul> | ||
| 63 | </nav> | ||
| 64 | <h2 id="how-orgstar-treats-files">How orgstar treats files</h2> | ||
| 65 | <h3 id="bytes-on-disk">Bytes on disk</h3> | ||
| 66 | <p>orgstar 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:</p> | ||
| 67 | <ul> | ||
| 68 | <li>A file with no changes is never rewritten.</li> | ||
| 69 | <li>Untouched lines keep their bytes, including trailing whitespace, tabs, and the presence or absence of a final newline.</li> | ||
| 70 | <li>Line endings are kept as they are. A file with CRLF line endings keeps them, and on the Mac the modeline shows <code class="verbatim">CRLF</code> for such a file. orgstar doesn't convert line endings; new lines that orgstar's commands insert end with LF.</li> | ||
| 71 | </ul> | ||
| 72 | <h3 id="encodings">Encodings</h3> | ||
| 73 | <p>orgstar edits UTF-8 files, with or without a byte order mark. A file that starts with a BOM keeps it.</p> | ||
| 74 | <p>A 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.</p> | ||
| 75 | <h3 id="how-a-save-works">How a save works</h3> | ||
| 76 | <p>Saving replaces the file through a temporary file in the same folder (named <code class="verbatim">.name.org.orgstar-…</code>), under the system's file coordination, so iCloud and other coordinating apps see a complete file. The steps are:</p> | ||
| 77 | <ol> | ||
| 78 | <li>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).</li> | ||
| 79 | <li>Read the file again. If it changed in the meantime, start over, up to three times.</li> | ||
| 80 | <li>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.</li> | ||
| 81 | <li>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.</li> | ||
| 82 | </ol> | ||
| 83 | <p>Emacs 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.</p> | ||
| 84 | <p>If the file keeps changing through all three attempts, the save fails with an error and your edits stay unsaved.</p> | ||
| 85 | <h3 id="automatic-and-explicit-saving">Automatic and explicit saving</h3> | ||
| 86 | <p>With <code class="verbatim">save = "automatic"</code> (the default), orgstar saves a file one second after you stop typing. With <code class="verbatim">"explicit"</code>, only <code class="verbatim">⌘S</code> (Save) and <code class="verbatim">⌥⌘S</code> (Save All) save. See <a href="13-configuration.html">Configuration</a>. The iOS app always saves automatically.</p> | ||
| 87 | <h2 id="changes-made-outside-orgstar">Changes made outside orgstar</h2> | ||
| 88 | <p>orgstar 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:</p> | ||
| 89 | <ul> | ||
| 90 | <li>If you have no unsaved edits in it, orgstar reloads it. Undo history for the file is cleared.</li> | ||
| 91 | <li>If you have unsaved edits, orgstar merges the disk version into them and saves the result.</li> | ||
| 92 | <li>If the changes conflict, nothing is saved and the conflict sheet opens.</li> | ||
| 93 | </ul> | ||
| 94 | <p>The 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.</p> | ||
| 95 | <p>After a reload or merge, orgstar also reads the file's setup files again.</p> | ||
| 96 | <h3 id="the-conflict-sheet">The conflict sheet</h3> | ||
| 97 | <p>The sheet shows what differs, with lines marked - on disk and + in your version, and offers:</p> | ||
| 98 | <table> | ||
| 99 | <thead> | ||
| 100 | <tr><th>Button</th><th>Effect</th></tr> | ||
| 101 | </thead> | ||
| 102 | <tbody> | ||
| 103 | <tr><td>Keep Mine</td><td>Writes your version over the disk version. The disk version goes to the recovery folder.</td></tr> | ||
| 104 | <tr><td>Use Disk Version</td><td>Loads the disk version. Your version goes to the recovery folder.</td></tr> | ||
| 105 | <tr><td>Merge with Markers</td><td>Puts both sets of changes in the buffer, with conflicting lines between <code class="verbatim"><<<<<<< yours</code> and <code class="verbatim">>>>>>>> disk</code> markers, as <code class="verbatim">git merge</code> leaves them. Edit and save. Your version as it was goes to the recovery folder.</td></tr> | ||
| 106 | <tr><td>Decide Later</td><td>Closes the sheet. Automatic saving stops for the file until you decide; the Conflict button in the toolbar opens the sheet again.</td></tr> | ||
| 107 | </tbody> | ||
| 108 | </table> | ||
| 109 | <p>On the Mac, File ▸ Revert to File on Disk loads the disk version at any time; unsaved changes go to the recovery folder.</p> | ||
| 110 | <h2 id="sync-tools">Sync tools</h2> | ||
| 111 | <h3 id="icloud-drive">iCloud Drive</h3> | ||
| 112 | <p>orgstar reads and writes files under file coordination, which is how iCloud expects apps to work. Files iCloud hasn't downloaded yet (<code class="verbatim">.name.org.icloud</code> 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.</p> | ||
| 113 | <h3 id="syncthing">Syncthing</h3> | ||
| 114 | <p>Syncthing writes files without file coordination. orgstar sees its changes through file watching and merges them as described above.</p> | ||
| 115 | <ul> | ||
| 116 | <li>Syncthing's temporary files (<code class="verbatim">.syncthing.*</code>) are ignored.</li> | ||
| 117 | <li>Its folders <code class="verbatim">.stfolder</code> and <code class="verbatim">.stversions</code> are in the default <code class="verbatim">ignored-folders</code>.</li> | ||
| 118 | <li>Conflict copies (<code class="verbatim">name.sync-conflict-YYYYMMDD-HHMMSS-ID.org</code>) are listed in the sidebar but never indexed, so they don't appear in the agenda, search or ID links.</li> | ||
| 119 | </ul> | ||
| 120 | <p>When a file with conflict copies opens, a message says how many there are. File ▸ Resolve Sync Conflicts… (More ▸ Sync Conflict Copies on iOS) lists each copy against the file, with lines marked - in the file and + in the copy:</p> | ||
| 121 | <table> | ||
| 122 | <thead> | ||
| 123 | <tr><th>Button</th><th>Effect</th></tr> | ||
| 124 | </thead> | ||
| 125 | <tbody> | ||
| 126 | <tr><td>Keep File</td><td>Leaves the file as it is.</td></tr> | ||
| 127 | <tr><td>Use Copy</td><td>Replaces the buffer's text with the copy's, as an edit you can undo.</td></tr> | ||
| 128 | <tr><td>Merge with Markers</td><td>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.</td></tr> | ||
| 129 | </tbody> | ||
| 130 | </table> | ||
| 131 | <p>Each choice then moves the copy to the recovery folder and deletes it from the folder.</p> | ||
| 132 | <h3 id="dropbox-and-other-tools">Dropbox and other tools</h3> | ||
| 133 | <p>Any 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.</p> | ||
| 134 | <h3 id="files-orgstar-ignores">Files orgstar ignores</h3> | ||
| 135 | <p>When scanning folders, orgstar skips Emacs lock files (<code class="verbatim">.#name</code>), backups (<code class="verbatim">name~</code>) and auto-save files (<code class="verbatim">#name#</code>), its own temporary and backup files (names containing <code class="verbatim">.orgstar-</code>), <code class="verbatim">.DS_Store</code>, <code class="verbatim">.localized</code>, and the folders in <code class="verbatim">ignored-folders</code>. With <code class="verbatim">show-hidden-files = false</code>, every dotfile and dot folder is skipped. orgstar doesn't create or honour Emacs lock files.</p> | ||
| 136 | <h2 id="recovery-versions">Recovery versions</h2> | ||
| 137 | <p>Every 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:</p> | ||
| 138 | <ul> | ||
| 139 | <li>on the Mac, <code class="verbatim">~/Library/Application Support/Orgstar/Recovery</code> (or <code class="verbatim">$ORGSTAR_DATA_DIR/Recovery</code>),</li> | ||
| 140 | <li>in the Mac App Store version, <code class="verbatim">~/Library/Containers/sh.krz.orgstar/Data/Library/Application Support/Orgstar/Recovery</code>,</li> | ||
| 141 | <li>on iOS, the app's own Application Support folder.</li> | ||
| 142 | </ul> | ||
| 143 | <p>Each 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:</p> | ||
| 144 | <table> | ||
| 145 | <thead> | ||
| 146 | <tr><th>Label</th><th>Kept when</th></tr> | ||
| 147 | </thead> | ||
| 148 | <tbody> | ||
| 149 | <tr><td><code class="verbatim">external</code></td><td>A version written by another program was replaced or merged</td></tr> | ||
| 150 | <tr><td><code class="verbatim">local</code></td><td>orgstar's version was replaced, or set aside by Use Disk Version, Merge with Markers or Restore</td></tr> | ||
| 151 | <tr><td><code class="verbatim">sync-conflict</code></td><td>A Syncthing conflict copy was resolved</td></tr> | ||
| 152 | <tr><td><code class="verbatim">snapshot</code></td><td>A save changed the file and the last snapshot was more than an hour before</td></tr> | ||
| 153 | </tbody> | ||
| 154 | </table> | ||
| 155 | <p>File ▸ Recovery Versions… (More ▸ Recovered Versions on iOS) lists the open file's kept versions, newest first, each compared with the buffer (lines marked - in the buffer, + in the kept version). 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.</p> | ||
| 156 | <h2 id="features-that-use-emacs-on-the-mac">Features that use Emacs on the Mac</h2> | ||
| 157 | <p>Some features run Emacs in batch mode on the Mac. Everything else works without Emacs installed. The <a href="../install.html">Mac App Store version</a> never runs Emacs and does without these features.</p> | ||
| 158 | <table> | ||
| 159 | <thead> | ||
| 160 | <tr><th>Feature</th><th>What runs</th></tr> | ||
| 161 | </thead> | ||
| 162 | <tbody> | ||
| 163 | <tr><td>Emacs Lisp source blocks (<code class="verbatim">emacs-lisp</code>, <code class="verbatim">elisp</code>)</td><td>The block, in <code class="verbatim">emacs -Q --batch</code></td></tr> | ||
| 164 | <tr><td>Table formulas outside what orgstar computes itself</td><td><code class="verbatim">org-table-recalculate</code> on a copy of the file; the table's new text replaces the old one if the table didn't change meanwhile</td></tr> | ||
| 165 | <tr><td>Lisp table formulas that orgstar's Emacs Lisp interpreter can't evaluate</td><td>The same; orgstar first asks whether to run Lisp (yes, no, always)</td></tr> | ||
| 166 | <tr><td>Export to PDF, and LaTeX and plain text orgstar can't write itself</td><td><code class="verbatim">org-latex-export-to-pdf</code>, <code class="verbatim">org-latex-export-to-latex</code> or <code class="verbatim">org-ascii-export-to-ascii</code></td></tr> | ||
| 167 | </tbody> | ||
| 168 | </table> | ||
| 169 | <p>HTML, Markdown, ODT, LaTeX and ASCII export don't use Emacs. See <a href="11-code-blocks.html">Code blocks</a>, <a href="10-tables.html">Tables</a> and <a href="12-export.html">Export</a>.</p> | ||
| 170 | <h3 id="how-emacs-is-found">How Emacs is found</h3> | ||
| 171 | <p>orgstar uses the first of these that is an executable file:</p> | ||
| 172 | <ol> | ||
| 173 | <li>the path in the environment variable <code class="verbatim">ORGSTAR_EMACS</code>,</li> | ||
| 174 | <li><code class="verbatim">/opt/homebrew/bin/emacs</code>,</li> | ||
| 175 | <li><code class="verbatim">/usr/local/bin/emacs</code>,</li> | ||
| 176 | <li><code class="verbatim">/Applications/Emacs.app/Contents/MacOS/Emacs</code>,</li> | ||
| 177 | <li><code class="verbatim">/run/current-system/sw/bin/emacs</code>,</li> | ||
| 178 | <li><code class="verbatim">/usr/bin/emacs</code>.</li> | ||
| 179 | </ol> | ||
| 180 | <p>An app started from the Dock doesn't see your shell's <code class="verbatim">PATH</code>, which is why orgstar looks in fixed places. Without Emacs, these features report "Emacs isn't installed, so …" and change nothing.</p> | ||
| 181 | <h3 id="what-emacs-sees">What Emacs sees</h3> | ||
| 182 | <ul> | ||
| 183 | <li>Emacs runs with <code class="verbatim">-Q</code>: your <code class="verbatim">init.el</code>, packages and customizations aren't loaded. Org and the exporters are the versions bundled with that Emacs.</li> | ||
| 184 | <li>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.</li> | ||
| 185 | <li>File-local variables marked safe apply (<code class="verbatim">enable-local-variables</code> is <code class="verbatim">:safe</code>).</li> | ||
| 186 | <li>Export doesn't run source blocks (<code class="verbatim">org-export-use-babel</code> is <code class="verbatim">nil</code>). The exported file is written next to the org file, as Emacs writes it, or moved to the place you chose.</li> | ||
| 187 | <li>For export and table recalculation, Emacs gets your <code class="verbatim">PATH</code> with <code class="verbatim">/opt/homebrew/bin</code>, <code class="verbatim">/usr/local/bin</code>, <code class="verbatim">/Library/TeX/texbin</code>, <code class="verbatim">/usr/bin</code> and <code class="verbatim">/bin</code> added, as source blocks do, so the programs it starts, such as <code class="verbatim">pdflatex</code>, are found when orgstar was opened from the Dock.</li> | ||
| 188 | <li>PDF export needs a LaTeX installation that Org's LaTeX exporter can run.</li> | ||
| 189 | <li>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. <code class="verbatim">⌘.</code> (Cancel Running Task) stops a running block, export or table recalculation sooner.</li> | ||
| 190 | </ul> | ||
| 191 | <h2 id="quick-look">Quick Look</h2> | ||
| 192 | <p>orgstar includes a Quick Look extension for org files (<code class="verbatim">.org</code> and <code class="verbatim">.org_archive</code>). 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 <code class="verbatim">#+SETUPFILE</code> keywords applied. The preview reads only UTF-8 files.</p> | ||
| 193 | <p>Inside 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.</p> | ||
| 194 | <h2 id="spotlight">Spotlight</h2> | ||
| 195 | <p>On the Mac, orgstar includes a Spotlight importer for org files. Spotlight indexes each file's text, its title (<code class="verbatim">#+TITLE</code>, else the file name), <code class="verbatim">#+AUTHOR</code>, <code class="verbatim">#+DESCRIPTION</code>, and its tags (<code class="verbatim">#+FILETAGS</code> and heading tags) and headings as keywords. The importer reads only UTF-8 files.</p> | ||
| 196 | <p>On iOS, the app adds the files in your folders to Spotlight itself; see <a href="14-ios.html">iPhone and iPad</a>.</p> | ||
| 197 | <h2 id="finder">Finder</h2> | ||
| 198 | <p>orgstar declares the <code class="verbatim">org.orgmode.org</code> file type for the extensions <code class="verbatim">.org</code> and <code class="verbatim">.org_archive</code>, 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 <code class="verbatim">open -a orgstar file.org</code> 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.</p> | ||
| 199 | <h2 id="org-protocol-and-shortcuts">org-protocol and Shortcuts</h2> | ||
| 200 | <p>orgstar registers the <code class="verbatim">org-protocol:</code> URL scheme on the Mac and iOS, and handles two sub-protocols, in both the <code class="verbatim">?key=value</code> form and the older <code class="verbatim">:/a/b/c</code> form:</p> | ||
| 201 | <ul> | ||
| 202 | <li><code class="verbatim">org-protocol://capture</code> opens Capture with the link's template, URL, title and body.</li> | ||
| 203 | <li><code class="verbatim">org-protocol://store-link</code> stores the link for <code class="verbatim">C-c C-l</code> and copies it to the clipboard.</li> | ||
| 204 | </ul> | ||
| 205 | <p>Other sub-protocols, such as <code class="verbatim">open-source</code>, show "orgstar handles org-protocol capture and store-link".</p> | ||
| 206 | <p>The Shortcuts action Capture to orgstar, on the Mac and iOS, files text with a capture template without opening the capture window. See <a href="08-capture.html">Capture</a>.</p> | ||
| 207 | <h2 id="compatibility-notes">Compatibility notes</h2> | ||
| 208 | <h3 id="defaults-that-differ-from-emacs">Defaults that differ from Emacs</h3> | ||
| 209 | <p>orgstar'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 <code class="verbatim">config.toml</code> to match your Emacs, or use Import from Emacs; see <a href="13-configuration.html">Configuration</a>.</p> | ||
| 210 | <table> | ||
| 211 | <thead> | ||
| 212 | <tr><th>Setting</th><th>orgstar default</th><th>Plain Emacs default</th></tr> | ||
| 213 | </thead> | ||
| 214 | <tbody> | ||
| 215 | <tr><td><code class="verbatim">fill-column</code></td><td>80</td><td>70</td></tr> | ||
| 216 | <tr><td><code class="verbatim">org-M-RET-may-split-line</code></td><td><code class="verbatim">false</code></td><td><code class="verbatim">t</code></td></tr> | ||
| 217 | <tr><td><code class="verbatim">org-list-allow-alphabetical</code></td><td><code class="verbatim">true</code></td><td><code class="verbatim">nil</code></td></tr> | ||
| 218 | <tr><td><code class="verbatim">org-hide-emphasis-markers</code></td><td><code class="verbatim">true</code></td><td><code class="verbatim">nil</code></td></tr> | ||
| 219 | <tr><td><code class="verbatim">org-pretty-entities</code></td><td><code class="verbatim">true</code></td><td><code class="verbatim">nil</code></td></tr> | ||
| 220 | <tr><td><code class="verbatim">org-startup-indented</code></td><td><code class="verbatim">true</code></td><td><code class="verbatim">nil</code></td></tr> | ||
| 221 | <tr><td><code class="verbatim">org-startup-truncated</code></td><td><code class="verbatim">false</code></td><td><code class="verbatim">t</code></td></tr> | ||
| 222 | <tr><td><code class="verbatim">electric-pair-mode</code></td><td><code class="verbatim">true</code></td><td>off</td></tr> | ||
| 223 | <tr><td><code class="verbatim">org-agenda-span</code></td><td>10 days</td><td>a week</td></tr> | ||
| 224 | <tr><td><code class="verbatim">org-agenda-start-day</code></td><td><code class="verbatim">"+0d"</code></td><td>today</td></tr> | ||
| 225 | <tr><td><code class="verbatim">org-agenda-show-all-dates</code></td><td><code class="verbatim">false</code></td><td><code class="verbatim">t</code></td></tr> | ||
| 226 | </tbody> | ||
| 227 | </table> | ||
| 228 | <p><code class="verbatim">org-hide-emphasis-markers</code> and <code class="verbatim">org-pretty-entities</code> 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.</p> | ||
| 229 | <p>These behave as Emacs's defaults and can't be changed: <code class="verbatim">org-log-repeat</code> is <code class="verbatim">time</code>, fast TODO selection is on when keywords have keys, priorities are <code class="verbatim">A</code> to <code class="verbatim">C</code> with <code class="verbatim">B</code> as default unless <code class="verbatim">#+PRIORITIES</code> says otherwise, and <code class="verbatim">org-use-sub-superscripts</code> is <code class="verbatim">{}</code> for display (only <code class="verbatim">x_{1}</code> and <code class="verbatim">x^{2}</code> are lowered and raised).</p> | ||
| 230 | <h3 id="how-the-agenda-looks">How the agenda looks</h3> | ||
| 231 | <p>The agenda selects the same entries as Org's, but shows them its own way (see <a href="07-agenda.html">The agenda</a>):</p> | ||
| 232 | <ul> | ||
| 233 | <li>Rows have their own layout: the time or a status such as <code class="verbatim">Due in 2d</code> on the left, the category above the title, and the keyword and priority as badges. <code class="verbatim">org-agenda-prefix-format</code> doesn't change it; only <code class="verbatim">%t</code> in its <code class="verbatim">agenda</code> entry still decides whether a time in the heading text leaves the title.</li> | ||
| 234 | <li>Days without entries are hidden unless <code class="verbatim">org-agenda-show-all-dates</code> is <code class="verbatim">true</code>.</li> | ||
| 235 | <li>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.</li> | ||
| 236 | <li>The time grid isn't shown. The now line is, between today's timed entries.</li> | ||
| 237 | </ul> | ||
| 238 | <h3 id="known-differences-from-emacs-org">Known differences from Emacs Org</h3> | ||
| 239 | <p>orgstar refuses some things with a message rather than doing something different from Emacs. These are the ones found in the current version.</p> | ||
| 240 | <p>Code blocks (see <a href="11-code-blocks.html">Code blocks</a>):</p> | ||
| 241 | <ul> | ||
| 242 | <li><code class="verbatim">:cmdline</code> is supported only for shells, <code class="verbatim">dot</code>, <code class="verbatim">plantuml</code>, <code class="verbatim">mermaid</code> and C, C++, D, Java, Fortran and Clojure.</li> | ||
| 243 | <li><code class="verbatim">:post</code> isn't supported; <code class="verbatim">:prologue</code> and <code class="verbatim">:epilogue</code> aren't for <code class="verbatim">dot</code>, <code class="verbatim">plantuml</code> and <code class="verbatim">mermaid</code>; <code class="verbatim">:stdin</code> and <code class="verbatim">:shebang</code> only for shells.</li> | ||
| 244 | <li><code class="verbatim">:session</code> is supported only for shells and Python. C, C++, D, Java, Fortran and Clojure ignore it, as in Org.</li> | ||
| 245 | <li>Clojure runs with babashka or the Clojure CLI only; other <code class="verbatim">:backend</code> values are refused.</li> | ||
| 246 | <li>R blocks return their standard output, whatever <code class="verbatim">:results</code> says; ob-R returns the value with <code class="verbatim">:results value</code>.</li> | ||
| 247 | <li>Header arguments, <code class="verbatim">:var</code> values and <code class="verbatim">:cache</code> 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."</li> | ||
| 248 | <li>Noweb references that run a block aren't supported.</li> | ||
| 249 | <li>Tangling refuses <code class="verbatim">:var</code> that would run a block, and tables and lists in <code class="verbatim">:var</code> for some languages.</li> | ||
| 250 | <li>On iOS and in the Mac App Store version, only Emacs Lisp blocks run, in orgstar's own interpreter.</li> | ||
| 251 | </ul> | ||
| 252 | <p>Links (see <a href="09-links.html">Links</a>):</p> | ||
| 253 | <ul> | ||
| 254 | <li><code class="verbatim">shell:</code> links aren't run. <code class="verbatim">elisp:</code> links run a form after asking, in Emacs on the Mac when it is installed, otherwise in orgstar's interpreter; command names aren't run.</li> | ||
| 255 | </ul> | ||
| 256 | <p>Capture templates (see <a href="08-capture.html">Capture</a>):</p> | ||
| 257 | <ul> | ||
| 258 | <li><code class="verbatim">%(</code> escapes, which run Emacs Lisp, aren't supported.</li> | ||
| 259 | <li><code class="verbatim">%[file]</code> escapes aren't supported.</li> | ||
| 260 | </ul> | ||
| 261 | <p>Tables and dynamic blocks (see <a href="10-tables.html">Tables</a> and <a href="06-dates-and-clocking.html">Dates and clocking</a>):</p> | ||
| 262 | <ul> | ||
| 263 | <li>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.</li> | ||
| 264 | <li>Clock tables support the scopes <code class="verbatim">nil</code>, <code class="verbatim">file</code>, <code class="verbatim">subtree</code> and <code class="verbatim">treeN</code>; other scopes, <code class="verbatim">:match</code> and <code class="verbatim">:step</code> aren't supported.</li> | ||
| 265 | <li>Dynamic blocks other than <code class="verbatim">clocktable</code>, <code class="verbatim">columnview</code> and denote-org's aren't supported. Column views of other files aren't supported.</li> | ||
| 266 | </ul> | ||
| 267 | <p>Other:</p> | ||
| 268 | <ul> | ||
| 269 | <li><code class="verbatim">C-c C-q</code> before the first heading (setting file tags) isn't supported.</li> | ||
| 270 | <li>The date prompt also reads <code class="verbatim">today</code>, <code class="verbatim">tomorrow</code>, <code class="verbatim">yesterday</code>, <code class="verbatim">next week</code> and <code class="verbatim">last week</code>, which Org's prompt ignores.</li> | ||
| 271 | <li>Priority ranges that aren't letters or numbers are refused.</li> | ||
| 272 | <li><code class="verbatim">#+SETUPFILE</code> URLs aren't fetched.</li> | ||
| 273 | <li>Most <code class="verbatim">#+STARTUP</code> options for footnotes, entities, numbering and odd levels are accepted and ignored; see <a href="13-configuration.html">Configuration</a>.</li> | ||
| 274 | <li>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.</li> | ||
| 275 | <li>Incremental search doesn't save the mark where it began, and has no <code class="verbatim">M-e</code> editing, <code class="verbatim">C-w</code> or <code class="verbatim">C-y</code> yanking into the string, or search ring beyond the last search.</li> | ||
| 276 | <li><code class="verbatim">auto-fill-mode</code> fills on a typed space only, not on <code class="verbatim">RET</code>.</li> | ||
| 277 | <li>The agenda's text search (see <a href="07-agenda.html">The agenda</a>) covers the agenda files only: <code class="verbatim">org-agenda-text-search-extra-files</code> and <code class="verbatim">org-agenda-search-view-max-outline-level</code> aren't supported. It runs from the view menu rather than the dispatcher's <code class="verbatim">s</code> and <code class="verbatim">S</code>, and the search view's <code class="verbatim">[</code>, <code class="verbatim">]</code>, <code class="verbatim">{</code> and <code class="verbatim">}</code> keys, which add words and regexps to the search, aren't supported.</li> | ||
| 278 | <li>In regexps, <code class="verbatim">\<</code>, <code class="verbatim">\></code> and <code class="verbatim">\b</code> 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).</li> | ||
| 279 | <li>org-roam: nodes come from orgstar's index, not org-roam's database, so <code class="verbatim">ROAM_ALIASES</code>, <code class="verbatim">ROAM_REFS</code>, <code class="verbatim">ROAM_EXCLUDE</code>, and node tags in the chooser aren't supported; the graph is orgstar's own (see <a href="09-links.html">Links</a>), not org-roam-ui's. Insert Node Link… and Find Node… make a new node from a title that isn't found with org-roam's default template only, and file it at once rather than in a capture buffer. Daily notes use the first of <code class="verbatim">org-roam-dailies-capture-templates</code>, without choosing among several, and the date prompt prefers future dates, where org-roam prefers past ones. Capturing to a daily note files the entry at once rather than in a capture buffer.</li> | ||
| 280 | <li>org-timer: <code class="verbatim">org-timer-display</code> is always the mode line. The timer's <code class="verbatim">C-u</code> forms are separate commands bound to <code class="verbatim">C-u C-c C-x 0</code>, <code class="verbatim">C-u C-u C-c C-x 0</code> and <code class="verbatim">C-u C-c C-x ,</code>; Set Countdown Timer… has no prefix-argument forms.</li> | ||
| 281 | <li>Radio lists are Org 9.8's <code class="verbatim">#+ATTR_ORG: :radio</code> checkbox lists. The <code class="verbatim">#+ORGLST</code> radio lists of Org 9.1 and earlier, removed in Org 9.2, aren't supported, nor is <code class="verbatim">org-list-checkbox-radio-mode</code>.</li> | ||
| 282 | <li>org-attach: <code class="verbatim">org-attach-method</code> is always <code class="verbatim">cp</code> for Attach File… (the other methods have their own commands), <code class="verbatim">org-attach-auto-tag</code> is always <code class="verbatim">ATTACH</code>, <code class="verbatim">org-attach-preferred-new-method</code> is always <code class="verbatim">id</code>, and <code class="verbatim">org-attach-id-to-path-function-list</code> is Org's default. The dispatcher's <code class="verbatim">b</code>, <code class="verbatim">O</code> and <code class="verbatim">F</code> keys and <code class="verbatim">org-attach-archive-delete</code> aren't supported. Delete All Attachments… asks once and deletes the folder with what's in it.</li> | ||
| 283 | <li>org-crypt works with symmetric encryption only (<code class="verbatim">org-crypt-key</code> nil); public keys and <code class="verbatim">org-crypt-use-before-save-magic</code> aren't supported. <code class="verbatim">org-crypt-tag-matcher</code> is a single tag.</li> | ||
| 284 | <li><code class="verbatim">org-track-ordered-property-with-tag</code> isn't supported; Toggle ORDERED Property sets only the property.</li> | ||
| 285 | <li>When TODO dependencies refuse a change on a <code class="verbatim">COMMENT</code> heading, the heading keeps <code class="verbatim">COMMENT</code>. Org removes it before the check and doesn't put it back.</li> | ||
| 286 | </ul> | ||
| 287 | </main> | ||
| 288 | <footer class="site"> | ||
| 289 | © 2026 Christian Cleberg · <a href="https://krz.sh/apps/orgstar/">krz.sh/apps/orgstar</a> · <a href="/orgstar/third-party.html">third-party notices</a> | ||
| 290 | </footer> | ||
| 291 | </body> | ||
| 292 | </html>\ No newline at end of file | ||
guide/index.html added +107
| @@ -0,0 +1,107 @@ | |||
| 1 | <!DOCTYPE html> | ||
| 2 | <html lang="en"> | ||
| 3 | <head> | ||
| 4 | <meta charset="utf-8"> | ||
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
| 6 | <title>Manual · orgstar</title> | ||
| 7 | <meta name="description" content=""> | ||
| 8 | <link rel="icon" href="../favicon.svg" type="image/svg+xml"> | ||
| 9 | <link rel="stylesheet" href="../theme.css"> | ||
| 10 | <link rel="stylesheet" href="../syntax.css"> | ||
| 11 | <link rel="stylesheet" href="../style.css"> | ||
| 12 | </head> | ||
| 13 | <body> | ||
| 14 | <header class="site"> | ||
| 15 | <a class="site-title" href="../index.html">orgstar</a> | ||
| 16 | <nav> | ||
| 17 | <a href="../install.html">Install</a> | ||
| 18 | <a href="../quickstart.html">Quick start</a> | ||
| 19 | <a href="#">Manual</a> | ||
| 20 | </nav> | ||
| 21 | </header> | ||
| 22 | <main> | ||
| 23 | <h1>Manual</h1> | ||
| 24 | |||
| 25 | <ul class="post-list"> | ||
| 26 | <li> | ||
| 27 | <a href="../guide/01-files-and-folders.html">Files, folders and buffers</a> | ||
| 28 | <p class="excerpt">Adding folders, opening files, working with buffers, searching, saving, and how orgstar handles changes made outside it.</p> | ||
| 29 | <span class="reading-time">21 min read</span> | ||
| 30 | </li> | ||
| 31 | <li> | ||
| 32 | <a href="../guide/02-the-editor.html">The editor</a> | ||
| 33 | <p class="excerpt">How the editor displays org text, folds it, reports state in the modeline and echo area, completes, checks spelling, pairs brackets, wraps lines and undoes.</p> | ||
| 34 | <span class="reading-time">25 min read</span> | ||
| 35 | </li> | ||
| 36 | <li> | ||
| 37 | <a href="../guide/03-keys.html">Keys and commands</a> | ||
| 38 | <p class="excerpt">The three key presets, prefix keys and key hints, the echo area, the command palette, Option as Meta, keymap.toml, Vim editing in the Doom preset, and every binding.</p> | ||
| 39 | <span class="reading-time">69 min read</span> | ||
| 40 | </li> | ||
| 41 | <li> | ||
| 42 | <a href="../guide/04-outlines.html">Outlines and structure</a> | ||
| 43 | <p class="excerpt">Headings, subtrees, plain lists, checkboxes, blocks, drawers, properties, column view, footnotes, refiling and archiving.</p> | ||
| 44 | <span class="reading-time">37 min read</span> | ||
| 45 | </li> | ||
| 46 | <li> | ||
| 47 | <a href="../guide/05-todos-and-tags.html">TODOs and tags</a> | ||
| 48 | <p class="excerpt">TODO keywords, state logging, priorities, tags and progress cookies in orgstar.</p> | ||
| 49 | <span class="reading-time">14 min read</span> | ||
| 50 | </li> | ||
| 51 | <li> | ||
| 52 | <a href="../guide/06-dates-and-clocking.html">Dates, scheduling and clocking</a> | ||
| 53 | <p class="excerpt">Timestamps, the date prompt, SCHEDULED and DEADLINE, repeating tasks, effort, clocking, clock tables, habits and reminders in orgstar.</p> | ||
| 54 | <span class="reading-time">28 min read</span> | ||
| 55 | </li> | ||
| 56 | <li> | ||
| 57 | <a href="../guide/07-agenda.html">The agenda</a> | ||
| 58 | <p class="excerpt">The agenda window, its rows, calendar events, the TODO list, tag and property matches, saved views, filters, reminders and the board.</p> | ||
| 59 | <span class="reading-time">43 min read</span> | ||
| 60 | </li> | ||
| 61 | <li> | ||
| 62 | <a href="../guide/08-capture.html">Capture</a> | ||
| 63 | <p class="excerpt">Capture templates, the capture window, date trees, org-protocol, Shortcuts and the iOS share sheet.</p> | ||
| 64 | <span class="reading-time">20 min read</span> | ||
| 65 | </li> | ||
| 66 | <li> | ||
| 67 | <a href="../guide/09-links.html">Links</a> | ||
| 68 | <p class="excerpt">Link syntax, the link types orgstar follows, storing and inserting links, IDs, backlinks and inline images.</p> | ||
| 69 | <span class="reading-time">25 min read</span> | ||
| 70 | </li> | ||
| 71 | <li> | ||
| 72 | <a href="../guide/10-tables.html">Tables</a> | ||
| 73 | <p class="excerpt">Creating and editing Org tables, column widths, import and export, and spreadsheet formulas.</p> | ||
| 74 | <span class="reading-time">34 min read</span> | ||
| 75 | </li> | ||
| 76 | <li> | ||
| 77 | <a href="../guide/11-code-blocks.html">Code blocks</a> | ||
| 78 | <p class="excerpt">Source blocks in orgstar: highlighting, editing, running with Babel, results, header arguments, noweb and tangling.</p> | ||
| 79 | <span class="reading-time">40 min read</span> | ||
| 80 | </li> | ||
| 81 | <li> | ||
| 82 | <a href="../guide/12-export.html">Export</a> | ||
| 83 | <p class="excerpt">Exporting Org files from orgstar to HTML, Markdown, PDF, Word, RTF, plain text, ODT, iCalendar, LaTeX and ASCII, and to PDF through LaTeX with Emacs; copying as rich text.</p> | ||
| 84 | <span class="reading-time">33 min read</span> | ||
| 85 | </li> | ||
| 86 | <li> | ||
| 87 | <a href="../guide/13-configuration.html">Configuration</a> | ||
| 88 | <p class="excerpt">The Settings window, the files in ~/.config/orgstar, in-file settings, importing from Emacs, themes and fonts.</p> | ||
| 89 | <span class="reading-time">43 min read</span> | ||
| 90 | </li> | ||
| 91 | <li> | ||
| 92 | <a href="../guide/14-ios.html">iPhone and iPad</a> | ||
| 93 | <p class="excerpt">The iOS app: folders, reading and editing, search, the agenda, widgets, capture, clocking, reminders, export and settings.</p> | ||
| 94 | <span class="reading-time">36 min read</span> | ||
| 95 | </li> | ||
| 96 | <li> | ||
| 97 | <a href="../guide/15-alongside-emacs.html">Working alongside Emacs and other tools</a> | ||
| 98 | <p class="excerpt">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.</p> | ||
| 99 | <span class="reading-time">16 min read</span> | ||
| 100 | </li> | ||
| 101 | </ul> | ||
| 102 | </main> | ||
| 103 | <footer class="site"> | ||
| 104 | © 2026 Christian Cleberg · <a href="https://krz.sh/apps/orgstar/">krz.sh/apps/orgstar</a> · <a href="/orgstar/third-party.html">third-party notices</a> | ||
| 105 | </footer> | ||
| 106 | </body> | ||
| 107 | </html>\ No newline at end of file | ||
index.html added +62
| @@ -0,0 +1,62 @@ | |||
| 1 | <!DOCTYPE html> | ||
| 2 | <html lang="en"> | ||
| 3 | <head> | ||
| 4 | <meta charset="utf-8"> | ||
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
| 6 | <title>orgstar · orgstar</title> | ||
| 7 | <meta name="description" content="A native macOS and iOS editor for org-mode files."> | ||
| 8 | <link rel="icon" href="favicon.svg" type="image/svg+xml"> | ||
| 9 | <link rel="stylesheet" href="theme.css"> | ||
| 10 | <link rel="stylesheet" href="syntax.css"> | ||
| 11 | <link rel="stylesheet" href="style.css"> | ||
| 12 | </head> | ||
| 13 | <body> | ||
| 14 | <header class="site"> | ||
| 15 | <a class="site-title" href="index.html">orgstar</a> | ||
| 16 | <nav> | ||
| 17 | <a href="install.html">Install</a> | ||
| 18 | <a href="quickstart.html">Quick start</a> | ||
| 19 | <a href="guide/index.html">Manual</a> | ||
| 20 | </nav> | ||
| 21 | </header> | ||
| 22 | <main> | ||
| 23 | <h1>orgstar</h1> | ||
| 24 | <p class="lede">orgstar edits org files in place, alongside Emacs and the sync tools you already use.</p> | ||
| 25 | <p>orgstar is an editor for <a href="https://orgmode.org">Org mode</a> files on the Mac, with an app for iPhone and iPad. It reads and writes the same plain-text files Emacs does, behaves the way Org does where the two overlap, and leaves every byte you didn't change as it was.</p> | ||
| 26 | <p>On the Mac you get the editor with Emacs, Mac or Doom (Vim) keys, the agenda and a board view, capture templates, clocking, tables with formulas, code blocks and tangling, and export to HTML and Markdown (and, in the download version, to other formats through Emacs, if it is installed). The iOS app has the editor, agenda, capture, search, clocking, reminders, export and tangling.</p> | ||
| 27 | <h2 id="start-here">Start here</h2> | ||
| 28 | <ul> | ||
| 29 | <li><a href="install.html">Install</a>: the Mac app from the Mac App Store, with Homebrew or as a download, the iOS app from the App Store, or either from source.</li> | ||
| 30 | <li><a href="quickstart.html">Quick start</a>: add a folder, open a file, and the first keys to learn.</li> | ||
| 31 | <li>The manual, below: every feature, chapter by chapter.</li> | ||
| 32 | </ul> | ||
| 33 | <h2 id="the-manual">The manual</h2> | ||
| 34 | <ol> | ||
| 35 | <li><a href="guide/01-files-and-folders.html">Files, folders and buffers</a></li> | ||
| 36 | <li><a href="guide/02-the-editor.html">The editor</a></li> | ||
| 37 | <li><a href="guide/03-keys.html">Keys and commands</a></li> | ||
| 38 | <li><a href="guide/04-outlines.html">Outlines and structure</a></li> | ||
| 39 | <li><a href="guide/05-todos-and-tags.html">TODOs and tags</a></li> | ||
| 40 | <li><a href="guide/06-dates-and-clocking.html">Dates, scheduling and clocking</a></li> | ||
| 41 | <li><a href="guide/07-agenda.html">The agenda</a></li> | ||
| 42 | <li><a href="guide/08-capture.html">Capture</a></li> | ||
| 43 | <li><a href="guide/09-links.html">Links</a></li> | ||
| 44 | <li><a href="guide/10-tables.html">Tables</a></li> | ||
| 45 | <li><a href="guide/11-code-blocks.html">Code blocks</a></li> | ||
| 46 | <li><a href="guide/12-export.html">Export</a></li> | ||
| 47 | <li><a href="guide/13-configuration.html">Configuration</a></li> | ||
| 48 | <li><a href="guide/14-ios.html">iPhone and iPad</a></li> | ||
| 49 | <li><a href="guide/15-alongside-emacs.html">Working alongside Emacs and other tools</a></li> | ||
| 50 | </ol> | ||
| 51 | <h2 id="principles">Principles</h2> | ||
| 52 | <ul> | ||
| 53 | <li><strong>The files are the source of truth.</strong> There is no database of your notes. orgstar keeps an index for search and the agenda, rebuilt from the files whenever they change.</li> | ||
| 54 | <li><strong>Only your edits are written.</strong> Saving rewrites the bytes you changed and nothing else: indentation, line endings, encoding marks and unusual spacing elsewhere stay.</li> | ||
| 55 | <li><strong>Org's behaviour, not a lookalike.</strong> Commands follow what Org 9.8 does, and are checked against Emacs in the test suite. Where orgstar can't do something the way Org would, it says so and leaves the file alone rather than guessing.</li> | ||
| 56 | </ul> | ||
| 57 | </main> | ||
| 58 | <footer class="site"> | ||
| 59 | © 2026 Christian Cleberg · <a href="https://krz.sh/apps/orgstar/">krz.sh/apps/orgstar</a> · <a href="/orgstar/third-party.html">third-party notices</a> | ||
| 60 | </footer> | ||
| 61 | </body> | ||
| 62 | </html>\ No newline at end of file | ||
install.html added +131
| @@ -0,0 +1,131 @@ | |||
| 1 | <!DOCTYPE html> | ||
| 2 | <html lang="en"> | ||
| 3 | <head> | ||
| 4 | <meta charset="utf-8"> | ||
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
| 6 | <title>Install · orgstar</title> | ||
| 7 | <meta name="description" content="Installing orgstar on the Mac from the Mac App Store, with Homebrew or a download, and on iPhone and iPad from the App Store."> | ||
| 8 | <link rel="icon" href="favicon.svg" type="image/svg+xml"> | ||
| 9 | <link rel="stylesheet" href="theme.css"> | ||
| 10 | <link rel="stylesheet" href="syntax.css"> | ||
| 11 | <link rel="stylesheet" href="style.css"> | ||
| 12 | </head> | ||
| 13 | <body> | ||
| 14 | <header class="site"> | ||
| 15 | <a class="site-title" href="index.html">orgstar</a> | ||
| 16 | <nav> | ||
| 17 | <a href="#">Install</a> | ||
| 18 | <a href="quickstart.html">Quick start</a> | ||
| 19 | <a href="guide/index.html">Manual</a> | ||
| 20 | </nav> | ||
| 21 | </header> | ||
| 22 | <main> | ||
| 23 | <h1>Install</h1> | ||
| 24 | <p class="lede">The Mac app comes from the Mac App Store, or as a notarized download and a Homebrew cask; the iOS app is on the App Store.</p> | ||
| 25 | <nav class="toc" aria-label="On this page"> | ||
| 26 | <h2>On this page</h2> | ||
| 27 | <ul> | ||
| 28 | <li><a href="#requirements">Requirements</a></li> | ||
| 29 | <li><a href="#the-mac-app">The Mac app</a> | ||
| 30 | <ul> | ||
| 31 | <li><a href="#from-the-mac-app-store">From the Mac App Store</a></li> | ||
| 32 | <li><a href="#with-homebrew">With Homebrew</a></li> | ||
| 33 | <li><a href="#as-a-download">As a download</a></li> | ||
| 34 | </ul></li> | ||
| 35 | <li><a href="#the-mac-app-store-version">The Mac App Store version</a> | ||
| 36 | <ul> | ||
| 37 | <li><a href="#what-it-does-differently">What it does differently</a></li> | ||
| 38 | <li><a href="#folders-and-files">Folders and files</a></li> | ||
| 39 | <li><a href="#settings">Settings</a></li> | ||
| 40 | </ul></li> | ||
| 41 | <li><a href="#switching-between-the-two-mac-versions">Switching between the two Mac versions</a></li> | ||
| 42 | <li><a href="#the-ios-app">The iOS app</a></li> | ||
| 43 | <li><a href="#updating">Updating</a></li> | ||
| 44 | <li><a href="#uninstalling">Uninstalling</a></li> | ||
| 45 | </ul> | ||
| 46 | </nav> | ||
| 47 | <h2 id="requirements">Requirements</h2> | ||
| 48 | <ul> | ||
| 49 | <li>macOS 26 or later.</li> | ||
| 50 | <li>Optional, for the download version: GNU Emacs, for the features that hand work to it (Emacs Lisp code blocks that need full Emacs, Lisp table formulas the built-in interpreter can't run, and export to PDF through LaTeX). See <a href="guide/15-alongside-emacs.html">Working alongside Emacs and other tools</a>.</li> | ||
| 51 | </ul> | ||
| 52 | <h2 id="the-mac-app">The Mac app</h2> | ||
| 53 | <p>There are two versions of the Mac app. Both edit the same files in the same way; they differ in where they come from, how orgstar+ is bought, and what they can run.</p> | ||
| 54 | <ul> | ||
| 55 | <li>The Mac App Store version runs in the App Sandbox and starts no other programs. Emacs Lisp blocks run in orgstar's own interpreter, JavaScript blocks in JavaScriptCore, and calc, sqlite, dot and mermaid blocks built in, as on iOS; other languages, Emacs and gnuplot are not used. orgstar+ is an in-app purchase shared with the iPhone and iPad app.</li> | ||
| 56 | <li>The download version, from Homebrew or files.krz.sh, is signed with a Developer ID and notarized. It runs code blocks with the programs installed on the Mac, hands some tables and exports to Emacs, and updates itself.</li> | ||
| 57 | </ul> | ||
| 58 | <h3 id="from-the-mac-app-store">From the Mac App Store</h3> | ||
| 59 | <p>Get orgstar from the <a href="https://apps.apple.com/us/app/orgstar-org-mode-agenda/id6821552018">Mac App Store</a>. The Mac App Store keeps it up to date.</p> | ||
| 60 | <p>Settings ▸ orgstar+ has the monthly, yearly and lifetime plans and Restore Purchases. A purchase made with the same Apple Account on iPhone or iPad unlocks orgstar+ on the Mac too, and the other way round. The same tab has tips, which unlock nothing.</p> | ||
| 61 | <h3 id="with-homebrew">With Homebrew</h3> | ||
| 62 | <pre><code class="language-sh highlight"><span class="source shell bash"><span class="meta function-call shell"><span class="variable function shell">brew</span></span><span class="meta function-call arguments shell"> tap krz/tap https://gitbay.org/krz/homebrew-tap.git</span> | ||
| 63 | <span class="meta function-call shell"><span class="variable function shell">brew</span></span><span class="meta function-call arguments shell"> install<span class="variable parameter option shell"><span class="punctuation definition parameter shell"> --</span>cask</span> orgstar</span></span></code></pre> | ||
| 64 | <h3 id="as-a-download">As a download</h3> | ||
| 65 | <p>Download the newest <code class="verbatim">orgstar-<version>.dmg</code> from <a href="https://files.krz.sh/orgstar/">files.krz.sh/orgstar</a>, open it, and drag orgstar to Applications. The app is universal (Apple silicon and Intel), signed with a Developer ID and notarized by Apple, so it opens without warnings.</p> | ||
| 66 | <p>Once the app has been launched, Finder opens <code class="verbatim">.org</code> files with it, Quick Look shows them formatted, and Spotlight indexes their headings and text. The same is true of the Mac App Store version.</p> | ||
| 67 | <h2 id="the-mac-app-store-version">The Mac App Store version</h2> | ||
| 68 | <h3 id="what-it-does-differently">What it does differently</h3> | ||
| 69 | <table> | ||
| 70 | <thead> | ||
| 71 | <tr><th>Feature</th><th>Mac App Store version</th><th>Download version</th></tr> | ||
| 72 | </thead> | ||
| 73 | <tbody> | ||
| 74 | <tr><td>Code blocks</td><td>Emacs Lisp, JavaScript, calc, sqlite, dot and mermaid, each built in</td><td>Every language installed; Emacs Lisp in Emacs and JavaScript in node, or built in without them</td></tr> | ||
| 75 | <tr><td>Sessions, graphics</td><td>JavaScript sessions; dot and mermaid as SVG or PNG</td><td>Yes</td></tr> | ||
| 76 | <tr><td>Tangling</td><td>Yes</td><td>Yes</td></tr> | ||
| 77 | <tr><td>Table formulas</td><td>Those orgstar computes itself</td><td>The rest in Emacs as well</td></tr> | ||
| 78 | <tr><td>Plots</td><td>Drawn with Swift Charts, following a subset of gnuplot's <code class="verbatim">set</code></td><td>gnuplot when installed, else Swift Charts</td></tr> | ||
| 79 | <tr><td>Export</td><td>HTML, Markdown, PDF, Word, RTF, plain text, ODT, iCalendar, LaTeX, ASCII; publishing</td><td>Also PDF through LaTeX, in Emacs</td></tr> | ||
| 80 | <tr><td>Settings</td><td>In the app's container, or a folder you choose</td><td><code class="verbatim">~/.config/orgstar</code></td></tr> | ||
| 81 | <tr><td>Files outside your folders</td><td>After you grant access to their folder</td><td>Directly</td></tr> | ||
| 82 | <tr><td>Attachments</td><td>Copied, or moved from inside your folders</td><td>Copied, moved, linked or symlinked</td></tr> | ||
| 83 | <tr><td>Updates</td><td>The Mac App Store</td><td>Built in, or Homebrew</td></tr> | ||
| 84 | <tr><td>orgstar+</td><td>In-app purchase, shared with iPhone and iPad</td><td>License key</td></tr> | ||
| 85 | </tbody> | ||
| 86 | </table> | ||
| 87 | <p>A block in another language reports "<em>language</em> blocks don't run in this version of orgstar." An Emacs Lisp block that uses more than the interpreter has reports "This block uses Emacs Lisp that runs only in Emacs." A JavaScript block that uses something only node has reports "This block uses <em>name</em>, which runs only in node." A table whose formulas need Emacs is recalculated up to the first formula that needs it, which the message names with the reason; the fields before it stay and the rest are unchanged. The Emacs exports are not in the File ▸ Export menu, the export dialog or the command palette; a key bound to Export to PDF with Emacs exports to PDF without LaTeX. LaTeX and ASCII export are orgstar's own and are in both versions; a file they can't write as Emacs would reports "Can't export to LaTeX" or "Can't export to plain text", with the reason.</p> | ||
| 88 | <h3 id="folders-and-files">Folders and files</h3> | ||
| 89 | <p>The App Store version can open only the folders and files you give it:</p> | ||
| 90 | <ul> | ||
| 91 | <li>Folders you add (File ▸ Add Folder…, or the welcome sheet) and files you open from Finder. orgstar remembers them across launches.</li> | ||
| 92 | <li>When something needs a file outside them, such as an <code class="verbatim">#+INCLUDE:</code> or <code class="verbatim">#+SETUPFILE:</code>, a tangle target, an export file, an image in a PDF, Word or RTF export, a <code class="verbatim">file:</code> link, a <code class="verbatim">:file</code> result, a publishing folder, a capture target, an archive file, or the folder for org-roam nodes, daily notes or Denote notes, orgstar asks once. Grant Access… opens a folder picker at that folder; choose it, and orgstar uses that folder and everything in it from then on. An export also offers Save Elsewhere….</li> | ||
| 93 | <li>A folder that can no longer be opened, for example one on a disk that isn't connected, is listed under Can't Open in the sidebar, with Grant Access… to choose it again.</li> | ||
| 94 | <li><code class="verbatim">~</code> in paths and settings means your home folder, as in the download version.</li> | ||
| 95 | <li>Import from Emacs opens a picker at the configuration it finds and asks for each folder it adds to the sidebar. For a Doom configuration, Choose Doom Folder… reads Doom's own org defaults from its installation folder.</li> | ||
| 96 | </ul> | ||
| 97 | <h3 id="settings">Settings</h3> | ||
| 98 | <p>The App Store version keeps its settings in its container, <code class="verbatim">~/Library/Containers/sh.krz.orgstar/Data/.config/orgstar/</code>. To keep them in <code class="verbatim">~/.config/orgstar/</code> instead, for example to share them with the download version, the iOS app or your dotfiles, click Settings ▸ General ▸ Choose Configuration Folder… and choose that folder. If it has no <code class="verbatim">config.toml</code>, orgstar writes one with the current settings. Use Default Folder goes back to the container.</p> | ||
| 99 | <h2 id="switching-between-the-two-mac-versions">Switching between the two Mac versions</h2> | ||
| 100 | <p>Both versions are called orgstar and have the same bundle identifier. Keep only one of them: quit orgstar and delete <code class="verbatim">orgstar.app</code> from Applications, or run <code class="verbatim">brew uninstall --cask orgstar</code>, before installing the other. The App Store doesn't replace the download version: it installs beside it as <code class="verbatim">orgstar 2.app</code>. With both on the Mac, Finder, Quick Look, Spotlight, widgets and <code class="verbatim">org-protocol://</code> links each use one of them, as macOS picks.</p> | ||
| 101 | <p>The two don't share their sidebar folders, open files, recovery versions or orgstar+:</p> | ||
| 102 | <ul> | ||
| 103 | <li>After switching, add your folders again with File ▸ Add Folder….</li> | ||
| 104 | <li>The App Store version's purchase doesn't unlock the download version, and a license key doesn't unlock the App Store version.</li> | ||
| 105 | <li>Recovery versions stay with the version that made them. The App Store version keeps them in <code class="verbatim">~/Library/Containers/sh.krz.orgstar/Data/Library/Application Support/Orgstar/Recovery/</code>.</li> | ||
| 106 | </ul> | ||
| 107 | <p>Settings move this way:</p> | ||
| 108 | <ul> | ||
| 109 | <li>From the download version to the App Store version: your settings stay in <code class="verbatim">~/.config/orgstar/</code>. Choose that folder with Choose Configuration Folder… (see <em>Settings</em> above).</li> | ||
| 110 | <li>From the App Store version to the download version: if you chose <code class="verbatim">~/.config/orgstar/</code>, there is nothing to move. Otherwise copy the files out of the container; <code class="verbatim">cp -i</code> asks before replacing a file that is already there:</li> | ||
| 111 | </ul> | ||
| 112 | <pre><code class="language-sh highlight"><span class="source shell bash"><span class="meta function-call shell"><span class="variable function shell">mkdir</span></span><span class="meta function-call arguments shell"><span class="variable parameter option shell"><span class="punctuation definition parameter shell"> -</span>p</span> <span class="meta group expansion tilde"><span class="variable language tilde shell">~</span></span>/.config/orgstar</span> | ||
| 113 | <span class="meta function-call shell"><span class="variable function shell">cp</span></span><span class="meta function-call arguments shell"><span class="variable parameter option shell"><span class="punctuation definition parameter shell"> -</span>i</span> <span class="meta group expansion tilde"><span class="variable language tilde shell">~</span></span>/Library/Containers/sh.krz.orgstar/Data/.config/orgstar/<span class="keyword operator regexp quantifier shell">*</span>.toml <span class="meta group expansion tilde"><span class="variable language tilde shell">~</span></span>/.config/orgstar/</span></span></code></pre> | ||
| 114 | <h2 id="the-ios-app">The iOS app</h2> | ||
| 115 | <p>The iPhone and iPad app (iOS 26 or later) is on the <a href="https://apps.apple.com/us/app/orgstar-org-mode-agenda/id6821552018">App Store</a>. The Apple Watch app comes with it. The App Store keeps it up to date.</p> | ||
| 116 | <p>See <a href="guide/14-ios.html">iPhone and iPad</a> for what it does.</p> | ||
| 117 | <h2 id="updating">Updating</h2> | ||
| 118 | <p>The Mac App Store updates the App Store version. The rest of this section is about the download version.</p> | ||
| 119 | <p>orgstar checks for a new release once a day, after asking on its second launch whether it may; orgstar ▸ Check for Updates… checks now, and Settings ▸ General has the switch. An update downloads, is checked against the key the releases are signed with, and installs when you agree. With Homebrew, <code class="verbatim">brew upgrade --cask orgstar</code> works too; the cask leaves updating to the app otherwise. From source, pull and build again (a build without a Developer ID never checks):</p> | ||
| 120 | <pre><code class="language-sh highlight"><span class="source shell bash"><span class="meta function-call shell"><span class="variable function shell">git</span></span><span class="meta function-call arguments shell"> pull</span> | ||
| 121 | <span class="meta function-call shell"><span class="variable function shell">scripts/build-app.sh</span></span></span></code></pre> | ||
| 122 | <p>Your settings live in <code class="verbatim">~/.config/orgstar/</code> and survive rebuilds.</p> | ||
| 123 | <p>After an update that has notes, orgstar shows what changed once, the next time it opens. Help ▸ What's New in orgstar shows them again, in both versions.</p> | ||
| 124 | <h2 id="uninstalling">Uninstalling</h2> | ||
| 125 | <p>Delete <code class="verbatim">orgstar.app</code>, or run <code class="verbatim">brew uninstall --cask orgstar</code>. To remove your settings as well, delete <code class="verbatim">~/.config/orgstar/</code> (<code class="verbatim">brew uninstall --zap --cask orgstar</code> does both). The App Store version keeps its settings, index and recovery versions in <code class="verbatim">~/Library/Containers/sh.krz.orgstar/</code>, and the widgets' data in <code class="verbatim">~/Library/Group Containers/group.sh.krz.orgstar/</code>. Your org files are never stored inside the app.</p> | ||
| 126 | </main> | ||
| 127 | <footer class="site"> | ||
| 128 | © 2026 Christian Cleberg · <a href="https://krz.sh/apps/orgstar/">krz.sh/apps/orgstar</a> · <a href="/orgstar/third-party.html">third-party notices</a> | ||
| 129 | </footer> | ||
| 130 | </body> | ||
| 131 | </html>\ No newline at end of file | ||
quickstart.html added +94
| @@ -0,0 +1,94 @@ | |||
| 1 | <!DOCTYPE html> | ||
| 2 | <html lang="en"> | ||
| 3 | <head> | ||
| 4 | <meta charset="utf-8"> | ||
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
| 6 | <title>Quick start · orgstar</title> | ||
| 7 | <meta name="description" content="From a fresh install to editing, scheduling and seeing your agenda."> | ||
| 8 | <link rel="icon" href="favicon.svg" type="image/svg+xml"> | ||
| 9 | <link rel="stylesheet" href="theme.css"> | ||
| 10 | <link rel="stylesheet" href="syntax.css"> | ||
| 11 | <link rel="stylesheet" href="style.css"> | ||
| 12 | </head> | ||
| 13 | <body> | ||
| 14 | <header class="site"> | ||
| 15 | <a class="site-title" href="index.html">orgstar</a> | ||
| 16 | <nav> | ||
| 17 | <a href="install.html">Install</a> | ||
| 18 | <a href="#">Quick start</a> | ||
| 19 | <a href="guide/index.html">Manual</a> | ||
| 20 | </nav> | ||
| 21 | </header> | ||
| 22 | <main> | ||
| 23 | <h1>Quick start</h1> | ||
| 24 | <p class="lede">Add a folder of org files, open one, and learn the handful of keys you need first.</p> | ||
| 25 | <nav class="toc" aria-label="On this page"> | ||
| 26 | <h2>On this page</h2> | ||
| 27 | <ul> | ||
| 28 | <li><a href="#add-a-folder">Add a folder</a></li> | ||
| 29 | <li><a href="#choose-your-keys">Choose your keys</a></li> | ||
| 30 | <li><a href="#open-a-file">Open a file</a></li> | ||
| 31 | <li><a href="#write-an-outline">Write an outline</a></li> | ||
| 32 | <li><a href="#see-your-agenda">See your agenda</a></li> | ||
| 33 | <li><a href="#capture-a-thought">Capture a thought</a></li> | ||
| 34 | <li><a href="#search">Search</a></li> | ||
| 35 | <li><a href="#next">Next</a></li> | ||
| 36 | </ul> | ||
| 37 | </nav> | ||
| 38 | <h2 id="add-a-folder">Add a folder</h2> | ||
| 39 | <p>The first time orgstar opens with no folder, a welcome sheet offers to choose a folder, to make one (<code class="verbatim">org</code> in iCloud Drive, with a <code class="verbatim">notes.org</code> to start on; in the Mac App Store version, a folder you choose or make in iCloud Drive), and the keys to use. Get Started… in the empty window opens it again.</p> | ||
| 40 | <p>Otherwise, choose File ▸ Add Folder… (<code class="verbatim">⇧⌘O</code>) and pick the folder that holds your org files. It appears in the sidebar, and orgstar indexes every org file under it for search, the agenda and links. You can add several folders. Nothing is copied or moved.</p> | ||
| 41 | <p>If you don't have org files yet, add an empty folder and create <code class="verbatim">notes.org</code> in it from Finder or the sidebar.</p> | ||
| 42 | <h2 id="choose-your-keys">Choose your keys</h2> | ||
| 43 | <p>Open orgstar ▸ Settings… (<code class="verbatim">⌘,</code>) and pick <strong>Keys</strong> under General:</p> | ||
| 44 | <ul> | ||
| 45 | <li><strong>Emacs</strong>: Org's own bindings, <code class="verbatim">C-c C-t</code> and friends. The default.</li> | ||
| 46 | <li><strong>Mac</strong>: standard Mac editing keys, with Org commands on <code class="verbatim">⌃⌘</code> combinations.</li> | ||
| 47 | <li><strong>Doom (Vim keys)</strong>: modal editing as in Doom Emacs, with <code class="verbatim">SPC</code> as the leader.</li> | ||
| 48 | </ul> | ||
| 49 | <p><a href="guide/03-keys.html">Keys and commands</a> lists every binding in each preset. If you already use Emacs, Settings ▸ General ▸ Import from Emacs… reads your configuration: TODO keywords, agenda files, capture templates and more (see <a href="guide/13-configuration.html">Configuration</a>).</p> | ||
| 50 | <h2 id="open-a-file">Open a file</h2> | ||
| 51 | <p><code class="verbatim">⌘P</code> (Quick Open) finds a file by name; the sidebar works too. Open files become buffers: the tab bar and Switch to Buffer move between them.</p> | ||
| 52 | <h2 id="write-an-outline">Write an outline</h2> | ||
| 53 | <p>Type a heading and some text:</p> | ||
| 54 | <pre><code class="language-org highlight"><span class="text org"><span class="markup heading org"><span class="punctuation definition heading org">*</span> Projects | ||
| 55 | </span><span class="markup heading org"><span class="punctuation definition heading org">**</span> <span class="keyword other todo org">TODO</span> Write the report | ||
| 56 | </span>SCHEDULED: <span class="constant other timestamp org"><2026-10-09 Fri></span> | ||
| 57 | Draft the summary first. | ||
| 58 | <span class="markup heading org"><span class="punctuation definition heading org">**</span> Reading list | ||
| 59 | </span><span class="punctuation definition list org">- </span><span class="constant language checkbox org">[ ]</span> The Org manual | ||
| 60 | <span class="punctuation definition list org">- </span><span class="constant language checkbox org">[ ]</span> This manual</span></code></pre> | ||
| 61 | <p>With the Emacs keys:</p> | ||
| 62 | <table> | ||
| 63 | <thead> | ||
| 64 | <tr><th>Key</th><th>What it does</th></tr> | ||
| 65 | </thead> | ||
| 66 | <tbody> | ||
| 67 | <tr><td><code class="verbatim">TAB</code> on a heading</td><td>Fold or unfold it (cycles through folded, children, everything).</td></tr> | ||
| 68 | <tr><td><code class="verbatim">S-TAB</code></td><td>Cycle the whole file the same way.</td></tr> | ||
| 69 | <tr><td><code class="verbatim">M-RET</code></td><td>New heading (or list item) at the same level.</td></tr> | ||
| 70 | <tr><td><code class="verbatim">M-<left></code> / <code class="verbatim">M-<right></code></td><td>Promote or demote the heading.</td></tr> | ||
| 71 | <tr><td><code class="verbatim">C-c C-t</code></td><td>Cycle the TODO state.</td></tr> | ||
| 72 | <tr><td><code class="verbatim">C-c C-s</code> / <code class="verbatim">C-c C-d</code></td><td>Schedule, or set a deadline, with the date picker.</td></tr> | ||
| 73 | <tr><td><code class="verbatim">C-c C-c</code></td><td>Context action: toggle a checkbox, align a table, run a code block.</td></tr> | ||
| 74 | </tbody> | ||
| 75 | </table> | ||
| 76 | <p>With the Mac preset, the Org commands are on <code class="verbatim">⌃⌘</code> keys (<code class="verbatim">⌃⌘T</code> cycles TODO, <code class="verbatim">⌃⌘S</code> schedules, <code class="verbatim">⌃⌘X</code> is the context action); with Doom, they're under <code class="verbatim">SPC m</code> (<code class="verbatim">SPC m t</code>, <code class="verbatim">SPC m d s</code>).</p> | ||
| 77 | <p>The <a href="guide/02-the-editor.html">editor chapter</a> covers how Org markup is shown and hidden, and <a href="guide/04-outlines.html">Outlines and structure</a> covers headings and lists.</p> | ||
| 78 | <h2 id="see-your-agenda">See your agenda</h2> | ||
| 79 | <p>Window ▸ Agenda (<code class="verbatim">⇧⌘A</code>) shows what is scheduled or due across every indexed file, day by day, and the TODO list. Select an item to jump to it. See <a href="guide/07-agenda.html">The agenda</a>.</p> | ||
| 80 | <h2 id="capture-a-thought">Capture a thought</h2> | ||
| 81 | <p><code class="verbatim">⇧⌘N</code> opens capture from anywhere in the app. Until you define your own templates (in <code class="verbatim">capture.toml</code> in the <a href="guide/13-configuration.html">configuration folder</a>, or imported from Emacs), there are two: <code class="verbatim">t</code> files a TODO and <code class="verbatim">n</code> a note, each under an <code class="verbatim">Inbox</code> heading in <code class="verbatim">todo.org</code> or <code class="verbatim">notes.org</code> in your first folder. See <a href="guide/08-capture.html">Capture</a>.</p> | ||
| 82 | <h2 id="search">Search</h2> | ||
| 83 | <p><code class="verbatim">⇧⌘F</code> searches the headings and text of every indexed file. Each result shows the passage it matched; click it to open the file there.</p> | ||
| 84 | <h2 id="next">Next</h2> | ||
| 85 | <ul> | ||
| 86 | <li>The command palette (<code class="verbatim">⇧⌘P</code>) lists every command with its key.</li> | ||
| 87 | <li>The <a href="index.html">chapter list</a> goes through every feature.</li> | ||
| 88 | </ul> | ||
| 89 | </main> | ||
| 90 | <footer class="site"> | ||
| 91 | © 2026 Christian Cleberg · <a href="https://krz.sh/apps/orgstar/">krz.sh/apps/orgstar</a> · <a href="/orgstar/third-party.html">third-party notices</a> | ||
| 92 | </footer> | ||
| 93 | </body> | ||
| 94 | </html>\ No newline at end of file | ||
style.css added +6
| @@ -0,0 +1,6 @@ | |||
| 1 | /* Code blocks dark in both colour schemes, matching base16-ocean.dark. */ | ||
| 2 | :root { | ||
| 3 | --orgo-code-bg: #2b303b; | ||
| 4 | --orgo-code-fg: #c0c5ce; | ||
| 5 | --orgo-code-rule: #1f232b; | ||
| 6 | } | ||
syntax.css added +160
| @@ -0,0 +1,160 @@ | |||
| 1 | /* | ||
| 2 | * theme "Base16 Ocean Dark" generated by syntect | ||
| 3 | */ | ||
| 4 | |||
| 5 | .code { | ||
| 6 | color: #c0c5ce; | ||
| 7 | background-color: #2b303b; | ||
| 8 | } | ||
| 9 | |||
| 10 | .variable.parameter.function { | ||
| 11 | color: #c0c5ce; | ||
| 12 | } | ||
| 13 | .comment, .punctuation.definition.comment { | ||
| 14 | color: #65737e; | ||
| 15 | } | ||
| 16 | .punctuation.definition.string, .punctuation.definition.variable, .punctuation.definition.string, .punctuation.definition.parameters, .punctuation.definition.string, .punctuation.definition.array { | ||
| 17 | color: #c0c5ce; | ||
| 18 | } | ||
| 19 | .none { | ||
| 20 | color: #c0c5ce; | ||
| 21 | } | ||
| 22 | .keyword.operator { | ||
| 23 | color: #c0c5ce; | ||
| 24 | } | ||
| 25 | .keyword { | ||
| 26 | color: #b48ead; | ||
| 27 | } | ||
| 28 | .variable, .variable.other.dollar.only.js { | ||
| 29 | color: #bf616a; | ||
| 30 | } | ||
| 31 | .entity.name.function, .meta.require, .support.function.any-method, .variable.function { | ||
| 32 | color: #8fa1b3; | ||
| 33 | } | ||
| 34 | .support.class, .entity.name.class, .entity.name.type.class { | ||
| 35 | color: #ebcb8b; | ||
| 36 | } | ||
| 37 | .meta.class { | ||
| 38 | color: #eff1f5; | ||
| 39 | } | ||
| 40 | .keyword.other.special-method { | ||
| 41 | color: #8fa1b3; | ||
| 42 | } | ||
| 43 | .storage { | ||
| 44 | color: #b48ead; | ||
| 45 | } | ||
| 46 | .support.function { | ||
| 47 | color: #96b5b4; | ||
| 48 | } | ||
| 49 | .string, .constant.other.symbol, .entity.other.inherited-class { | ||
| 50 | color: #a3be8c; | ||
| 51 | } | ||
| 52 | .constant.numeric { | ||
| 53 | color: #d08770; | ||
| 54 | } | ||
| 55 | .none { | ||
| 56 | color: #d08770; | ||
| 57 | } | ||
| 58 | .none { | ||
| 59 | color: #d08770; | ||
| 60 | } | ||
| 61 | .constant { | ||
| 62 | color: #d08770; | ||
| 63 | } | ||
| 64 | .entity.name.tag { | ||
| 65 | color: #bf616a; | ||
| 66 | } | ||
| 67 | .entity.other.attribute-name { | ||
| 68 | color: #d08770; | ||
| 69 | } | ||
| 70 | .entity.other.attribute-name.id, .punctuation.definition.entity { | ||
| 71 | color: #8fa1b3; | ||
| 72 | } | ||
| 73 | .meta.selector { | ||
| 74 | color: #b48ead; | ||
| 75 | } | ||
| 76 | .none { | ||
| 77 | color: #d08770; | ||
| 78 | } | ||
| 79 | .markup.heading .punctuation.definition.heading, .entity.name.section { | ||
| 80 | color: #8fa1b3; | ||
| 81 | } | ||
| 82 | .keyword.other.unit { | ||
| 83 | color: #d08770; | ||
| 84 | } | ||
| 85 | .markup.bold, .punctuation.definition.bold { | ||
| 86 | color: #ebcb8b; | ||
| 87 | font-weight: bold; | ||
| 88 | } | ||
| 89 | .markup.italic, .punctuation.definition.italic { | ||
| 90 | color: #b48ead; | ||
| 91 | font-style: italic; | ||
| 92 | } | ||
| 93 | .markup.raw.inline { | ||
| 94 | color: #a3be8c; | ||
| 95 | } | ||
| 96 | .string.other.link { | ||
| 97 | color: #bf616a; | ||
| 98 | } | ||
| 99 | .meta.link { | ||
| 100 | color: #d08770; | ||
| 101 | } | ||
| 102 | .meta.image { | ||
| 103 | color: #d08770; | ||
| 104 | } | ||
| 105 | .markup.list { | ||
| 106 | color: #bf616a; | ||
| 107 | } | ||
| 108 | .markup.quote { | ||
| 109 | color: #d08770; | ||
| 110 | } | ||
| 111 | .meta.separator { | ||
| 112 | color: #c0c5ce; | ||
| 113 | background-color: #4f5b66; | ||
| 114 | } | ||
| 115 | .markup.inserted, .markup.inserted.git_gutter { | ||
| 116 | color: #a3be8c; | ||
| 117 | } | ||
| 118 | .markup.deleted, .markup.deleted.git_gutter { | ||
| 119 | color: #bf616a; | ||
| 120 | } | ||
| 121 | .markup.changed, .markup.changed.git_gutter { | ||
| 122 | color: #b48ead; | ||
| 123 | } | ||
| 124 | .markup.ignored, .markup.ignored.git_gutter { | ||
| 125 | color: #4f5b66; | ||
| 126 | } | ||
| 127 | .markup.untracked, .markup.untracked.git_gutter { | ||
| 128 | color: #4f5b66; | ||
| 129 | } | ||
| 130 | .constant.other.color { | ||
| 131 | color: #96b5b4; | ||
| 132 | } | ||
| 133 | .string.regexp { | ||
| 134 | color: #96b5b4; | ||
| 135 | } | ||
| 136 | .constant.character.escape { | ||
| 137 | color: #96b5b4; | ||
| 138 | } | ||
| 139 | .punctuation.section.embedded, .variable.interpolation { | ||
| 140 | color: #ab7967; | ||
| 141 | } | ||
| 142 | .invalid.illegal { | ||
| 143 | color: #2b303b; | ||
| 144 | background-color: #bf616a; | ||
| 145 | } | ||
| 146 | .markup.deleted.git_gutter { | ||
| 147 | color: #f92672; | ||
| 148 | } | ||
| 149 | .markup.inserted.git_gutter { | ||
| 150 | color: #a6e22e; | ||
| 151 | } | ||
| 152 | .markup.changed.git_gutter { | ||
| 153 | color: #967efb; | ||
| 154 | } | ||
| 155 | .markup.ignored.git_gutter { | ||
| 156 | color: #565656; | ||
| 157 | } | ||
| 158 | .markup.untracked.git_gutter { | ||
| 159 | color: #565656; | ||
| 160 | } | ||
theme.css added +248
| @@ -0,0 +1,248 @@ | |||
| 1 | /* orgo built-in theme: docs | ||
| 2 | * | ||
| 3 | * A documentation site: a guide read in order, with a contents block that matters, code | ||
| 4 | * blocks that carry as much of the meaning as the prose, and a `#+LEDE:` line under the | ||
| 5 | * title. Cooler and more technical than `blog`, narrower and more designed than `wiki`. | ||
| 6 | * | ||
| 7 | * Every colour is a custom property on :root, so a stylesheet of your own loaded after | ||
| 8 | * this one can retheme the site by redefining a handful of values. */ | ||
| 9 | |||
| 10 | :root { | ||
| 11 | --orgo-ink: #1c1f24; | ||
| 12 | --orgo-muted: #5b6472; | ||
| 13 | --orgo-rule: #dfe3e8; | ||
| 14 | --orgo-accent: #0b5fa5; | ||
| 15 | --orgo-surface: #f6f8fa; | ||
| 16 | --orgo-bg: #ffffff; | ||
| 17 | --orgo-measure: 42rem; | ||
| 18 | --orgo-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; | ||
| 19 | --orgo-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace; | ||
| 20 | /* These three colour code *blocks* only; inline code follows the page. A block keeps | ||
| 21 | a light surface in both colour schemes, because syntax.css is coloured by | ||
| 22 | `highlight.theme` and that default (InspiredGitHub) is light. To let blocks follow | ||
| 23 | prefers-color-scheme, set `highlight.theme_dark` to a dark theme and override these | ||
| 24 | three in a dark query of your own. */ | ||
| 25 | --orgo-todo: #b02a37; | ||
| 26 | --orgo-done: #2c7a4b; | ||
| 27 | --orgo-code-bg: #f6f8fa; | ||
| 28 | --orgo-code-fg: #323232; | ||
| 29 | --orgo-code-rule: #e3e7ec; | ||
| 30 | } | ||
| 31 | |||
| 32 | @media (prefers-color-scheme: dark) { | ||
| 33 | :root { | ||
| 34 | --orgo-ink: #dee3ea; | ||
| 35 | --orgo-muted: #9aa4b2; | ||
| 36 | --orgo-rule: #2b3138; | ||
| 37 | --orgo-accent: #79b8ff; | ||
| 38 | --orgo-surface: #171a1f; | ||
| 39 | --orgo-todo: #f0909a; | ||
| 40 | --orgo-done: #74c795; | ||
| 41 | --orgo-bg: #0f1216; | ||
| 42 | } | ||
| 43 | } | ||
| 44 | |||
| 45 | * { box-sizing: border-box; } | ||
| 46 | |||
| 47 | body { | ||
| 48 | margin: 0; | ||
| 49 | background: var(--orgo-bg); | ||
| 50 | color: var(--orgo-ink); | ||
| 51 | font: 16px/1.65 var(--orgo-font); | ||
| 52 | /* A bare URL or a long identifier must wrap, not widen the page on a phone. */ | ||
| 53 | overflow-wrap: break-word; | ||
| 54 | } | ||
| 55 | |||
| 56 | /* Header ------------------------------------------------------------------- */ | ||
| 57 | |||
| 58 | body > header { | ||
| 59 | position: sticky; | ||
| 60 | top: 0; | ||
| 61 | z-index: 1; | ||
| 62 | background: var(--orgo-bg); | ||
| 63 | border-bottom: 1px solid var(--orgo-rule); | ||
| 64 | padding: 1rem 1.5rem; | ||
| 65 | display: flex; | ||
| 66 | flex-wrap: wrap; | ||
| 67 | gap: .5rem 1.5rem; | ||
| 68 | align-items: baseline; | ||
| 69 | } | ||
| 70 | |||
| 71 | .site-title { | ||
| 72 | font-weight: 700; | ||
| 73 | font-size: 1.05rem; | ||
| 74 | color: var(--orgo-ink); | ||
| 75 | text-decoration: none; | ||
| 76 | } | ||
| 77 | |||
| 78 | body > header nav { display: flex; flex-wrap: wrap; gap: 1.25rem; } | ||
| 79 | body > header nav a { | ||
| 80 | color: var(--orgo-muted); | ||
| 81 | text-decoration: none; | ||
| 82 | padding-bottom: .15rem; | ||
| 83 | border-bottom: 2px solid transparent; | ||
| 84 | } | ||
| 85 | body > header nav a:hover { color: var(--orgo-ink); border-bottom-color: var(--orgo-accent); } | ||
| 86 | |||
| 87 | /* Page body ---------------------------------------------------------------- */ | ||
| 88 | |||
| 89 | main { | ||
| 90 | max-width: var(--orgo-measure); | ||
| 91 | margin: 0 auto; | ||
| 92 | padding: 2.5rem 1.5rem 5rem; | ||
| 93 | } | ||
| 94 | |||
| 95 | h1 { font-size: 2rem; line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 .5rem; } | ||
| 96 | h2 { font-size: 1.35rem; letter-spacing: -0.01em; margin: 2.75rem 0 .75rem; } | ||
| 97 | h3 { font-size: 1.1rem; margin: 2rem 0 .5rem; } | ||
| 98 | h4, h5, h6 { font-size: 1rem; margin: 1.5rem 0 .5rem; } | ||
| 99 | |||
| 100 | [class^="section-number-"] { color: var(--orgo-muted); font-weight: 400; } | ||
| 101 | |||
| 102 | a { color: var(--orgo-accent); } | ||
| 103 | |||
| 104 | /* `#+LEDE:` reaches the layout as page.keywords.lede; page.date as the byline. */ | ||
| 105 | p.lede { font-size: 1.1rem; color: var(--orgo-muted); margin-top: 0; } | ||
| 106 | p.page-date { color: var(--orgo-muted); font-size: .9rem; } | ||
| 107 | |||
| 108 | img, video { max-width: 100%; height: auto; } | ||
| 109 | |||
| 110 | figure { margin: 1.75rem 0; } | ||
| 111 | figcaption { color: var(--orgo-muted); font-size: .9rem; margin-top: .4rem; } | ||
| 112 | .figure-number, .table-number { font-weight: 600; } | ||
| 113 | |||
| 114 | /* A quote block reads as a note or a caution in a documentation site. */ | ||
| 115 | blockquote { | ||
| 116 | margin: 1.5rem 0; | ||
| 117 | padding: .75rem 1rem; | ||
| 118 | background: var(--orgo-surface); | ||
| 119 | border-left: 3px solid var(--orgo-accent); | ||
| 120 | border-radius: 0 4px 4px 0; | ||
| 121 | color: var(--orgo-muted); | ||
| 122 | } | ||
| 123 | blockquote > :first-child { margin-top: 0; } | ||
| 124 | blockquote > :last-child { margin-bottom: 0; } | ||
| 125 | |||
| 126 | hr { border: 0; border-top: 1px solid var(--orgo-rule); margin: 2.5rem 0; } | ||
| 127 | |||
| 128 | .center { text-align: center; } | ||
| 129 | .verse { font-family: var(--orgo-mono); white-space: pre-wrap; } | ||
| 130 | |||
| 131 | dt { font-weight: 600; margin-top: .75rem; font-family: var(--orgo-mono); font-size: .95rem; } | ||
| 132 | dd { margin: 0 0 0 1.5rem; } | ||
| 133 | |||
| 134 | /* Code --------------------------------------------------------------------- */ | ||
| 135 | |||
| 136 | /* Inline code is prose furniture, so it follows the page rather than the code blocks. */ | ||
| 137 | code { | ||
| 138 | font: .875em/1.5 var(--orgo-mono); | ||
| 139 | background: var(--orgo-surface); | ||
| 140 | color: inherit; | ||
| 141 | padding: .1em .35em; | ||
| 142 | border-radius: 3px; | ||
| 143 | } | ||
| 144 | |||
| 145 | pre { | ||
| 146 | background: var(--orgo-code-bg); | ||
| 147 | color: var(--orgo-code-fg); | ||
| 148 | border: 1px solid var(--orgo-code-rule); | ||
| 149 | border-radius: 6px; | ||
| 150 | padding: .9rem 1.1rem; | ||
| 151 | font-size: .9rem; | ||
| 152 | line-height: 1.55; | ||
| 153 | overflow-x: auto; | ||
| 154 | } | ||
| 155 | |||
| 156 | pre code { background: none; color: inherit; padding: 0; } | ||
| 157 | |||
| 158 | /* Tables ------------------------------------------------------------------- */ | ||
| 159 | |||
| 160 | table { | ||
| 161 | border-collapse: collapse; | ||
| 162 | width: 100%; | ||
| 163 | margin: 1.5rem 0; | ||
| 164 | display: block; | ||
| 165 | overflow-x: auto; | ||
| 166 | } | ||
| 167 | caption { text-align: left; color: var(--orgo-muted); font-size: .9rem; padding-bottom: .4rem; } | ||
| 168 | th, td { text-align: left; padding: .5rem .75rem; border-bottom: 1px solid var(--orgo-rule); } | ||
| 169 | th { | ||
| 170 | font-size: .8rem; | ||
| 171 | text-transform: uppercase; | ||
| 172 | letter-spacing: .05em; | ||
| 173 | color: var(--orgo-muted); | ||
| 174 | } | ||
| 175 | |||
| 176 | /* Org-specific markup ------------------------------------------------------ */ | ||
| 177 | |||
| 178 | .tag { | ||
| 179 | font: .72rem/1.6 var(--orgo-mono); | ||
| 180 | color: var(--orgo-muted); | ||
| 181 | background: var(--orgo-surface); | ||
| 182 | border: 1px solid var(--orgo-rule); | ||
| 183 | border-radius: 999px; | ||
| 184 | padding: .05em .6em; | ||
| 185 | vertical-align: middle; | ||
| 186 | } | ||
| 187 | |||
| 188 | .todo, .done { font: .72rem/1.6 var(--orgo-mono); letter-spacing: .04em; } | ||
| 189 | .todo { color: var(--orgo-todo); } | ||
| 190 | .done { color: var(--orgo-done); } | ||
| 191 | .priority { color: var(--orgo-muted); font-family: var(--orgo-mono); font-size: .8em; } | ||
| 192 | |||
| 193 | time.timestamp { color: var(--orgo-muted); font-family: var(--orgo-mono); font-size: .9em; } | ||
| 194 | |||
| 195 | li.on, li.trans { color: var(--orgo-muted); } | ||
| 196 | li.on { text-decoration: line-through; } | ||
| 197 | |||
| 198 | .footnotes { margin-top: 3rem; font-size: .9rem; color: var(--orgo-muted); } | ||
| 199 | .footnote-ref a { text-decoration: none; } | ||
| 200 | |||
| 201 | /* Table of contents: a card, because in a guide it is navigation ----------- */ | ||
| 202 | |||
| 203 | nav.toc { | ||
| 204 | background: var(--orgo-surface); | ||
| 205 | border: 1px solid var(--orgo-rule); | ||
| 206 | border-radius: 6px; | ||
| 207 | padding: .75rem 1.25rem 1rem; | ||
| 208 | margin: 1.75rem 0 2.5rem; | ||
| 209 | } | ||
| 210 | nav.toc h2 { | ||
| 211 | font-size: .8rem; | ||
| 212 | text-transform: uppercase; | ||
| 213 | letter-spacing: .06em; | ||
| 214 | color: var(--orgo-muted); | ||
| 215 | margin: .25rem 0 .5rem; | ||
| 216 | } | ||
| 217 | nav.toc ul { margin: 0; padding-left: 1.1rem; } | ||
| 218 | nav.toc li { margin: .15rem 0; } | ||
| 219 | |||
| 220 | /* Listing pages: a guide's contents page, a tag index ---------------------- */ | ||
| 221 | |||
| 222 | ul.post-list { list-style: none; padding: 0; } | ||
| 223 | ul.post-list > li { padding: 1rem 0; border-bottom: 1px solid var(--orgo-rule); } | ||
| 224 | ul.post-list a { font-weight: 600; font-size: 1.05rem; } | ||
| 225 | ul.post-list time { color: var(--orgo-muted); font-size: .9rem; } | ||
| 226 | p.excerpt { margin: .35rem 0 .2rem; color: var(--orgo-muted); } | ||
| 227 | span.reading-time { font-size: .85rem; color: var(--orgo-muted); } | ||
| 228 | |||
| 229 | ul.tag-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem 1.25rem; } | ||
| 230 | |||
| 231 | nav.pagination { | ||
| 232 | display: flex; | ||
| 233 | gap: 1rem; | ||
| 234 | align-items: baseline; | ||
| 235 | margin-top: 2.5rem; | ||
| 236 | color: var(--orgo-muted); | ||
| 237 | font-size: .9rem; | ||
| 238 | } | ||
| 239 | |||
| 240 | /* Footer ------------------------------------------------------------------- */ | ||
| 241 | |||
| 242 | body > footer { | ||
| 243 | border-top: 1px solid var(--orgo-rule); | ||
| 244 | padding: 1.5rem; | ||
| 245 | color: var(--orgo-muted); | ||
| 246 | font-size: .9rem; | ||
| 247 | text-align: center; | ||
| 248 | } | ||
third-party.html added +60
| @@ -0,0 +1,60 @@ | |||
| 1 | <!DOCTYPE html> | ||
| 2 | <html lang="en"> | ||
| 3 | <head> | ||
| 4 | <meta charset="utf-8"> | ||
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
| 6 | <title>third-party · orgstar</title> | ||
| 7 | <meta name="description" content="orgstar is proprietary (see ). It builds on these projects, under their own licenses."> | ||
| 8 | <link rel="icon" href="favicon.svg" type="image/svg+xml"> | ||
| 9 | <link rel="stylesheet" href="theme.css"> | ||
| 10 | <link rel="stylesheet" href="syntax.css"> | ||
| 11 | <link rel="stylesheet" href="style.css"> | ||
| 12 | </head> | ||
| 13 | <body> | ||
| 14 | <header class="site"> | ||
| 15 | <a class="site-title" href="index.html">orgstar</a> | ||
| 16 | <nav> | ||
| 17 | <a href="install.html">Install</a> | ||
| 18 | <a href="quickstart.html">Quick start</a> | ||
| 19 | <a href="guide/index.html">Manual</a> | ||
| 20 | </nav> | ||
| 21 | </header> | ||
| 22 | <main> | ||
| 23 | <h1>third-party</h1> | ||
| 24 | <h2 id="third-party-code">Third-party code</h2> | ||
| 25 | <p>orgstar is proprietary (see <a href="LICENSE">LICENSE</a>). It builds on these projects, under their own licenses.</p> | ||
| 26 | <table> | ||
| 27 | <thead> | ||
| 28 | <tr><th>Project</th><th>Use</th><th>License</th></tr> | ||
| 29 | </thead> | ||
| 30 | <tbody> | ||
| 31 | <tr><td><a href="https://github.com/groue/GRDB.swift">GRDB.swift</a></td><td>Index database</td><td>MIT</td></tr> | ||
| 32 | <tr><td><a href="https://github.com/tree-sitter/tree-sitter">tree-sitter</a>, <a href="https://github.com/tree-sitter/swift-tree-sitter">swift-tree-sitter</a></td><td>Src block parsing</td><td>MIT</td></tr> | ||
| 33 | <tr><td>tree-sitter grammars: <a href="https://github.com/tree-sitter/tree-sitter-bash">bash</a>, <a href="https://github.com/tree-sitter/tree-sitter-c">c</a>, <a href="https://github.com/tree-sitter/tree-sitter-cpp">cpp</a>, <a href="https://github.com/tree-sitter/tree-sitter-go">go</a>, <a href="https://github.com/tree-sitter/tree-sitter-haskell">haskell</a>, <a href="https://github.com/tree-sitter/tree-sitter-java">java</a>, <a href="https://github.com/tree-sitter/tree-sitter-javascript">javascript</a>, <a href="https://github.com/tree-sitter/tree-sitter-json">json</a>, <a href="https://github.com/tree-sitter/tree-sitter-python">python</a>, <a href="https://github.com/tree-sitter/tree-sitter-ruby">ruby</a>, <a href="https://github.com/tree-sitter/tree-sitter-rust">rust</a></td><td>Highlighting; parsers, scanners and queries</td><td>MIT</td></tr> | ||
| 34 | <tr><td><a href="https://github.com/tree-sitter-grammars/tree-sitter-lua">tree-sitter-lua</a>, <a href="https://github.com/tree-sitter-grammars/tree-sitter-yaml">tree-sitter-yaml</a></td><td>Highlighting</td><td>MIT</td></tr> | ||
| 35 | <tr><td><a href="https://github.com/r-lib/tree-sitter-r">tree-sitter-r</a></td><td>Highlighting</td><td>MIT</td></tr> | ||
| 36 | <tr><td><a href="https://github.com/6cdh/tree-sitter-scheme">tree-sitter-scheme</a></td><td>Highlighting</td><td>MIT</td></tr> | ||
| 37 | <tr><td><a href="https://github.com/nodejs/node">Node.js</a></td><td><code class="verbatim">util.inspect</code> and <code class="verbatim">util.format</code>, ported to run in JavaScriptCore (in <code class="verbatim">Sources/OrgApp/JavaScriptBlocks.swift</code>)</td><td>MIT</td></tr> | ||
| 38 | <tr><td><a href="https://github.com/mathjax/MathJax">MathJax</a> 3.2.2</td><td>Math in PDF export (<code class="verbatim">es5/tex-svg-full.js</code> from the npm package, in <code class="verbatim">Sources/OrgMathJax/MathJax</code> with its license)</td><td>Apache-2.0</td></tr> | ||
| 39 | <tr><td><a href="https://github.com/mdaines/viz-js">Viz.js</a> 3.31.0</td><td>dot blocks without <code class="verbatim">dot</code> (<code class="verbatim">dist/viz-global.js</code> from the npm package <code class="verbatim">@viz-js/viz</code>, in <code class="verbatim">Sources/OrgMathJax/Diagrams</code> with its license); it contains <a href="https://www.graphviz.org">Graphviz</a> and <a href="https://libexpat.github.io">Expat</a> compiled to WebAssembly</td><td>MIT; Graphviz EPL-2.0; Expat MIT</td></tr> | ||
| 40 | <tr><td><a href="https://github.com/mermaid-js/mermaid">mermaid</a> 12.3.0</td><td>mermaid blocks without <code class="verbatim">mmdc</code> (<code class="verbatim">dist/mermaid.min.js</code> from the npm package, in <code class="verbatim">Sources/OrgMathJax/Diagrams</code> with its license)</td><td>MIT</td></tr> | ||
| 41 | <tr><td><a href="https://github.com/Wilfred/tree-sitter-elisp">tree-sitter-elisp</a></td><td>Highlighting (vendored in <code class="verbatim">Sources/TreeSitterElisp</code>)</td><td>MIT</td></tr> | ||
| 42 | <tr><td><a href="https://github.com/sogaiu/tree-sitter-clojure">tree-sitter-clojure</a></td><td>Highlighting (vendored in <code class="verbatim">Sources/TreeSitterClojure</code>)</td><td>CC0-1.0</td></tr> | ||
| 43 | <tr><td><a href="https://ethanschoonover.com/solarized/">Solarized</a></td><td>Colors of the Solarized themes</td><td>MIT</td></tr> | ||
| 44 | <tr><td><a href="https://github.com/morhetz/gruvbox">Gruvbox</a></td><td>Colors of the Gruvbox themes</td><td>MIT</td></tr> | ||
| 45 | <tr><td><a href="https://protesilaos.com/emacs/modus-themes">Modus themes</a></td><td>Colors of Modus Operandi and Modus Vivendi (color values only, no code)</td><td>GPL-3.0-or-later</td></tr> | ||
| 46 | <tr><td><a href="https://github.com/catppuccin/catppuccin">Catppuccin</a></td><td>Colors of Catppuccin Latte and Mocha</td><td>MIT</td></tr> | ||
| 47 | <tr><td><a href="https://github.com/chriskempson/tomorrow-theme">Tomorrow</a></td><td>Colors of the Tomorrow theme</td><td>MIT</td></tr> | ||
| 48 | <tr><td><a href="https://www.nordtheme.com">Nord</a></td><td>Colors of the Nord theme</td><td>MIT</td></tr> | ||
| 49 | <tr><td><a href="https://draculatheme.com">Dracula</a></td><td>Colors of the Dracula theme</td><td>MIT</td></tr> | ||
| 50 | <tr><td><a href="https://github.com/folke/tokyonight.nvim">Tokyo Night</a></td><td>Colors of the Tokyo Night theme</td><td>Apache-2.0</td></tr> | ||
| 51 | <tr><td><a href="https://github.com/doomemacs/themes">doom-themes</a></td><td>Colors of doom-one</td><td>MIT</td></tr> | ||
| 52 | </tbody> | ||
| 53 | </table> | ||
| 54 | <p>The JavaScript, Lua, Python and YAML scanners are copied into <code class="verbatim">Sources/TreeSitterScanners</code> with their licenses. Highlight queries are embedded in <code class="verbatim">Sources/OrgHighlight/Queries.swift</code> by <code class="verbatim">scripts/update-highlight-queries.sh</code>. The theme colors are in <code class="verbatim">Sources/OrgPresentation/Palettes.swift</code>; a few light-theme colors are darkened from upstream for contrast, as noted there.</p> | ||
| 55 | </main> | ||
| 56 | <footer class="site"> | ||
| 57 | © 2026 Christian Cleberg · <a href="https://krz.sh/apps/orgstar/">krz.sh/apps/orgstar</a> · <a href="/orgstar/third-party.html">third-party notices</a> | ||
| 58 | </footer> | ||
| 59 | </body> | ||
| 60 | </html>\ No newline at end of file | ||