docs/manual/guide/13-configuration.org

9abba9cfc504b344b7d267978a97f1c925a1d5dd
orgstar/docs/manual/guide/13-configuration.org rendered · source · history · blame · raw

551 lines · 49623 bytes

  1#+TITLE: Configuration
  2#+DESCRIPTION: The Settings window, the files in ~/.config/orgstar, in-file settings, importing from Emacs, themes and fonts.
  3#+LEDE: Every setting lives in a text file you can edit, and most of them also appear in the Settings window.
  4
  5* Where settings live
  6
  7Orgstar keeps its settings in a configuration folder:
  8
  9- =$XDG_CONFIG_HOME/orgstar= when =XDG_CONFIG_HOME= is set and not empty,
 10- otherwise =~/.config/orgstar=.
 11
 12The environment variable =ORGSTAR_CONFIG_DIR= overrides both. If a file is missing from the configuration folder but exists in =~/Library/Application Support/Orgstar= (where earlier versions kept it), Orgstar reads it from there.
 13
 14The folder holds these files:
 15
 16| File                 | What it holds                                                    | Written by Orgstar                    |
 17|----------------------+------------------------------------------------------------------+---------------------------------------|
 18| =config.toml=        | Every setting of the Settings window, and the theme              | Yes, when you change a setting        |
 19| =keymap.toml=        | Your key bindings, on top of the preset                          | Only by Import from Emacs             |
 20| =capture.toml=       | Capture templates                                                | Only by Import from Emacs             |
 21| =views.toml=         | Saved agenda views                                               | No                                    |
 22| =default-theme.toml= | The default theme's colors, for reference                        | Yes, at every launch                  |
 23
 24=config.toml= 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.
 25
 26When you add the folder to a dotfiles repository, keep =default-theme.toml= out of it or ignore its changes: Orgstar rewrites it whenever its contents differ from the built-in theme.
 27
 28** Opening config.toml
 29
 30- Orgstar ▸ Edit Config File (=⌥⌘,=) opens =config.toml= as a buffer in the main window. The command palette has the same command as Edit Config File.
 31- Settings ▸ General has three buttons for the file: Edit in Orgstar, Open with Default App, and Show in Finder.
 32
 33Saving the buffer applies the file, the same as saving it from another editor.
 34
 35** Problems in the files
 36
 37If =config.toml= 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:
 38
 39- =config.toml: unknown setting editor.foo=
 40- =config.toml: org-log-done must be one of nil, time, note=
 41- =config.toml: org-agenda-start-day must look like "-3d" or "+0d"=
 42- =config.toml: theme.light.background must be a color such as "#1f2328"=
 43
 44A file that isn't valid TOML is reported with its parse error, and none of it applies. =keymap.toml=, =capture.toml= and =views.toml= report their problems the same way when they are read.
 45
 46* The Settings window
 47
 48Open it with Orgstar ▸ Settings (=⌘,=). It has five panes. Each control writes the =config.toml= key named in the tables below; the config.toml reference below gives the type and the Emacs variable.
 49
 50** General
 51
 52| Control                                    | Choices                                                                      | Default                         | Key              |
 53|--------------------------------------------+------------------------------------------------------------------------------+---------------------------------+------------------|
 54| config.toml: Edit in Orgstar               | Opens the file in the main window                                            |                                 |                  |
 55| config.toml: Open with Default App         | Opens the file in the app macOS uses for =.toml=                             |                                 |                  |
 56| config.toml: Show in Finder                | Selects the file in Finder                                                   |                                 |                  |
 57| Emacs: Import from Emacs…                  | Opens the import sheet; see Import from Emacs below|                                 |                  |
 58| Save files                                 | Automatically, when typing stops; Only with File ▸ Save (=⌘S=)             | Automatically                   | =save=           |
 59| Keys                                       | Emacs; Mac; Doom (Vim keys)                                                  | Emacs                           | =keymap=         |
 60| Show hidden files and folders              | On or off                                                                    | On                              | =show-hidden-files= |
 61| Option as Meta                             | Left Option; Right Option; Both; Neither                                     | Left Option                     | =option-as-meta= |
 62
 63Automatic saving writes a file one second after you stop typing. The keymap presets and =keymap.toml= are covered in [[file:03-keys.org][Keys and commands]].
 64
 65** Editing
 66
 67| Control                                                    | Choices or range                                       | Default             | Key                                  |
 68|------------------------------------------------------------+--------------------------------------------------------+---------------------+--------------------------------------|
 69| Tags                                                       | Aligned to end at column 77; One space after the title | Aligned (=-77=)     | =org-tags-column=                    |
 70| M-RET adds the new heading after the subtree               | On or off                                              | On                  | =org-insert-heading-respect-content= |
 71| M-RET splits the line at the caret                         | On or off                                              | Off                 | =org-M-RET-may-split-line=           |
 72| Lists can use letters (a. b. c.)                           | On or off                                              | On                  | =org-list-allow-alphabetical=        |
 73| M-q fills to column N                                      | 40 to 200                                              | 80                  | =fill-column=                        |
 74| Emacs hides emphasis markers (org-hide-emphasis-markers)   | On or off                                              | On                  | =org-hide-emphasis-markers=          |
 75| Emacs shows entities as characters (org-pretty-entities)   | On or off                                              | On                  | =org-pretty-entities=                |
 76| Default TODO keywords                                      | Text in =#+TODO= syntax, one sequence per line         | See below           | =org-todo-keywords=                  |
 77
 78The two "Emacs hides" and "Emacs shows" switches describe your Emacs, not Orgstar's display. Tag alignment, table alignment and =M-q= 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.
 79
 80The Tags picker offers two values. =config.toml= accepts any integer; with a value other than =-77= or =0= the picker shows no selection.
 81
 82Default TODO keywords apply to files without a =#+TODO= line. Orgstar reads them at launch, so a change takes effect after you quit and reopen Orgstar.
 83
 84** Appearance
 85
 86| Control                         | Range                                         | Default            | Key                 |
 87|---------------------------------+-----------------------------------------------+--------------------+---------------------|
 88| Font                            | System monospaced, or any installed monospaced family | System monospaced | =font=        |
 89| Size                            | 8 to 36 pt                                    | 13 pt              | =font-size=         |
 90| Line spacing                    | 0 to 16 pt                                    | 2 pt               | =line-spacing=      |
 91| Headings grow by N pt a level   | 0 to 8 pt                                     | 1 pt               | =heading-size-step= |
 92| Colors: Edit in config.toml     | Opens =config.toml=                           |                    |                     |
 93| Colors: Show Default Theme      | Opens =default-theme.toml=                    |                    |                     |
 94
 95See Themes and Fonts below.
 96
 97** Agenda
 98
 99| Control                             | Range                  | Default      | Key                         |
100|-------------------------------------+------------------------+--------------+-----------------------------|
101| Agenda shows N days                 | 1 to 31                | 10           | =org-agenda-span=           |
102| Agenda starts N days before today   | 0 to 14 days before    | 3 days       | =org-agenda-start-day=      |
103| Include files in subfolders         | On or off              | Off          | =agenda-include-subfolders= |
104| Notify before timed agenda entries  | On or off              | On           | =reminders=                 |
105| N minutes before                    | 0 to 120               | 12           | =appt-message-warning-time= |
106
107An entry's =APPT_WARNTIME= property overrides the lead time. The agenda is covered in [[file:07-agenda.org][The agenda]].
108
109** Capture
110
111| Control                                | Default | Key                     |
112|----------------------------------------+---------+-------------------------|
113| ⌃⌥Space opens Capture from any app     | On      | =global-capture-hotkey= |
114
115The footer shows the path of =capture.toml=. Templates are covered in [[file:08-capture.org][Capture]].
116
117** Settings only in config.toml
118
119These settings have no control in the Settings window. Some are in the View menu.
120
121| Key                              | Also in                    |
122|----------------------------------+----------------------------|
123| =org-log-done=                   |                            |
124| =org-log-reschedule=             |                            |
125| =org-log-redeadline=             |                            |
126| =org-log-into-drawer=            |                            |
127| =org-startup-indented=           |                            |
128| =org-hide-leading-stars=         |                            |
129| =org-startup-align-all-tables=   |                            |
130| =org-startup-truncated=          |                            |
131| =org-startup-with-inline-images= |                            |
132| =org-cycle-hide-drawer-startup=  |                            |
133| =org-cycle-hide-block-startup=   |                            |
134| =org-use-speed-commands=         |                            |
135| =spell-check=                    |                            |
136| =electric-pair-mode=             |                            |
137| =display-line-numbers-type=      | View ▸ Show Line Numbers (=⇧⌘L=) |
138| =tab-bar=                        | View ▸ Show Tab Bar        |
139| =show-markup=                    | View ▸ Show Markup (=⇧⌘M=) |
140| =ignored-folders=                |                            |
141| =[org-agenda-prefix-format]=     |                            |
142| =theme-file=                     |                            |
143
144* config.toml reference
145
146Settings that mirror an Emacs variable sit at the top of the file under that variable's name. The agenda prefix formats are in =[org-agenda-prefix-format]=, type and theme in =[theme]=, and the settings Emacs has no variable for in =[orgstar]=.
147
148A key you remove from the file goes back to its default. A key that isn't in the table below is reported as unknown.
149
150** Top level
151
152| Key                                  | Type    | Default | Effect                                                                                                         |
153|--------------------------------------+---------+---------+----------------------------------------------------------------------------------------------------------------|
154| =fill-column=                        | integer | =80=    | The column =M-q= fills to. Mirrors =fill-column=.                                                              |
155| =org-tags-column=                    | integer | =-77=   | Negative: tags end at that column. =0=: one space between title and tags. Mirrors =org-tags-column=.          |
156| =org-insert-heading-respect-content= | boolean | =true=  | =M-RET= adds the new heading after the current subtree. Mirrors =org-insert-heading-respect-content=.        |
157| =org-M-RET-may-split-line=           | boolean | =false= | =M-RET= in the middle of a line splits it at the caret. Mirrors the =default= entry of =org-M-RET-may-split-line=. |
158| =org-list-allow-alphabetical=        | boolean | =true=  | =a.=, =b)=, =A.= are list bullets. Mirrors =org-list-allow-alphabetical=.                                     |
159| =org-hide-emphasis-markers=          | boolean | =true=  | Your Emacs hides =*bold*= and ~=code=~ markers; Orgstar hides them when markup is hidden and measures text without them. Mirrors =org-hide-emphasis-markers=. |
160| =org-pretty-entities=                | boolean | =true=  | Your Emacs shows =\alpha= as α and lowers =x_{1}=; Orgstar does the same when markup is hidden. Mirrors =org-pretty-entities=. |
161| =org-todo-keywords=                  | string  | see below | Keywords for files without =#+TODO=, in =#+TODO= syntax; separate sequences with =\n=. Letters in parentheses turn on fast selection. Read at launch. Mirrors =org-todo-keywords=. |
162| =org-log-done=                       | string  | ="nil"= | =nil=, =time= (a =CLOSED= timestamp) or =note= (=CLOSED= and a note). Mirrors =org-log-done=.                |
163| =org-log-reschedule=                 | string  | ="nil"= | =nil=, =time= or =note=: log changing or removing a =SCHEDULED= date. Mirrors =org-log-reschedule=.          |
164| =org-log-redeadline=                 | string  | ="nil"= | =nil=, =time= or =note=: log changing or removing a =DEADLINE=. Mirrors =org-log-redeadline=.                 |
165| =org-log-into-drawer=                | string  | =""=    | The drawer state notes go in. ="LOGBOOK"= is Emacs's =t=; =""= puts them under the heading. Mirrors =org-log-into-drawer=. |
166| =org-startup-indented=               | boolean | =true=  | Indent bodies under their headings, as =org-indent-mode=. =#+STARTUP: indent= / =noindent= override it. Mirrors =org-startup-indented=. |
167| =org-hide-leading-stars=             | boolean | =false= | Show only a heading's last star, without indentation. =#+STARTUP: hidestars= / =showstars= override it. Mirrors =org-hide-leading-stars=. |
168| =org-startup-align-all-tables=       | boolean | =false= | Align every table when a file opens. =#+STARTUP: align= / =noalign= override it. Mirrors =org-startup-align-all-tables=. |
169| =org-startup-truncated=              | boolean | =false= | Long lines run off the right edge instead of wrapping. Mirrors =org-startup-truncated=.                        |
170| =spell-check=                        | boolean | =false= | Check spelling while typing, outside code, links, dates, tags and keywords.                                     |
171| =electric-pair-mode=                 | boolean | =true=  | Type brackets, =<>= and quotes in pairs. Mirrors =electric-pair-mode=.                                          |
172| =org-startup-with-inline-images=     | boolean | =false= | Show image links as images when a file opens. =#+STARTUP: inlineimages= / =noinlineimages= override it. Mirrors =org-startup-with-inline-images=. |
173| =org-use-speed-commands=             | boolean | =false= | Single keys at the start of a heading line run commands (=n=, =p=, =t=, =c=, …). Mirrors =org-use-speed-commands=. |
174| =org-cycle-hide-drawer-startup=      | boolean | =true=  | Fold drawers when a file opens. =#+STARTUP: hidedrawers= / =nohidedrawers= override it. Mirrors =org-cycle-hide-drawer-startup=. |
175| =org-cycle-hide-block-startup=       | boolean | =false= | Fold blocks when a file opens. =#+STARTUP: hideblocks= / =nohideblocks= override it. Mirrors =org-cycle-hide-block-startup=. |
176| =display-line-numbers-type=          | boolean | =true=  | Line numbers in the editor's gutter. Orgstar numbers lines absolutely; there is no relative or visual mode.    |
177| =org-agenda-span=                    | integer | =10=    | Days the agenda shows. Mirrors =org-agenda-span=.                                                               |
178| =org-agenda-start-day=               | string  | ="-3d"= | The agenda's first day relative to today, as ="-3d"= or ="+0d"=. Only day offsets are accepted. Mirrors =org-agenda-start-day=. |
179| =appt-message-warning-time=          | integer | =12=    | Minutes of warning before timed entries. An entry's =APPT_WARNTIME= property overrides it. Mirrors =appt-message-warning-time=. |
180
181The default =org-todo-keywords= is the first sequence of Doom Emacs's default:
182
183#+BEGIN_SRC toml
184org-todo-keywords = "TODO(t) PROJ(p) LOOP(r) STRT(s) WAIT(w) HOLD(h) IDEA(i) | DONE(d) KILL(k)"
185#+END_SRC
186
187The startup settings (=org-startup-*=, =org-hide-leading-stars=, =org-cycle-hide-*-startup=) apply when a file opens. Files already open keep their state until you open them again.
188
189** [org-agenda-prefix-format]
190
191| Key      | Type   | Default                  | Effect                              |
192|----------+--------+--------------------------+-------------------------------------|
193| =agenda= | string | =" %i %-12:c%?-12t% s"=  | Prefix of lines in the day view     |
194| =todo=   | string | =" %i %-12:c"=           | Prefix of lines in the TODO list    |
195| =tags=   | string | =" %i %-12:c"=           | Prefix of tag and property matches  |
196
197These mirror the entries of =org-agenda-prefix-format=. In the format, =%c= is the category, =%t= the time, =%s= the scheduled or deadline note, =%e= the effort, =%l= the level, =%b= the outline path, and a number such as =%-12= pads. See [[file:07-agenda.org][The agenda]].
198
199** [theme]
200
201| Key                 | Type    | Default | Effect                                                                                       |
202|---------------------+---------+---------+----------------------------------------------------------------------------------------------|
203| =font=              | string  | =""=    | A font family. =""= uses the system's monospaced font.                                       |
204| =font-size=         | integer | =13=    | Points.                                                                                      |
205| =line-spacing=      | integer | =2=     | Points between lines.                                                                        |
206| =heading-size-step= | integer | =1=     | Points a heading is larger than the level below. Level 4 and deeper are body size.           |
207| =theme-file=        | string  | =""=    | A theme in its own file in the configuration folder, applied under the colors in =config.toml=. |
208
209Any other key in =[theme]= is a color; see Themes below.
210
211** [orgstar]
212
213| Key                         | Type    | Default       | Effect                                                                                  |
214|-----------------------------+---------+---------------+-----------------------------------------------------------------------------------------|
215| =save=                      | string  | ="automatic"= | =automatic= (one second after typing stops) or =explicit= (only with =⌘S=).            |
216| =keymap=                    | string  | ="emacs"=     | =emacs=, =mac= or =doom=. Your own bindings go in =keymap.toml=.                       |
217| =option-as-meta=            | string  | ="left"=      | Which Option key is Meta: =left=, =right=, =both= or =none=.                           |
218| =tab-bar=                   | boolean | =false=       | A tab for each open buffer above the editor.                                            |
219| =show-markup=               | boolean | =false=       | Show link brackets and emphasis markers.                                                |
220| =show-hidden-files=         | boolean | =true=        | List dotfiles and dot folders in your folders.                                          |
221| =ignored-folders=           | string  | see below     | Folder names never listed or searched, separated by spaces.                            |
222| =agenda-include-subfolders= | boolean | =false=       | The agenda reads org files in subfolders too.                                           |
223| =reminders=                 | boolean | =true=        | Notify before timed entries.                                                            |
224| =global-capture-hotkey=     | boolean | =true=        | =⌃⌥Space= opens Capture from any app.                                                   |
225
226The default =ignored-folders= is:
227
228#+BEGIN_SRC toml
229ignored-folders = ".Spotlight-V100 .Trash .build .bzr .cache .fseventsd .git .gradle .hg .jj .mypy_cache .next .pytest_cache .stfolder .stversions .svn .terraform .tox .venv node_modules"
230#+END_SRC
231
232** An example
233
234#+BEGIN_SRC toml
235fill-column = 72
236org-tags-column = 0
237org-todo-keywords = "TODO(t) NEXT(n) WAIT(w@/!) | DONE(d!) CANCELED(c@)"
238org-log-done = "time"
239org-log-into-drawer = "LOGBOOK"
240org-startup-truncated = true
241org-agenda-span = 7
242org-agenda-start-day = "+0d"
243
244[theme]
245font = "JetBrains Mono"
246font-size = 14
247link = "#0a7ea4"
248
249[theme.todo]
250WAIT = "#bf8700"
251
252[orgstar]
253keymap = "doom"
254save = "explicit"
255#+END_SRC
256
257** Names from earlier versions
258
259Earlier versions used keys such as =editor.fill-column= and =agenda.span=. Orgstar still reads them. At launch, a file that uses any of them is rewritten with the current names and every setting at its current value; comments you added are not kept. A file that lacks a whole section (such as =[theme]=) gets that section added at the end.
260
261* keymap.toml and capture.toml
262
263=keymap.toml= holds =[[bind]]= tables with =keys=, =command=, and optionally =mode= and =when=. They layer over the preset chosen in Keys. Orgstar reloads the file when it changes. See [[file:03-keys.org][Keys and commands]].
264
265#+BEGIN_SRC toml
266[[bind]]
267keys = "C-c a"
268command = "app.agenda"
269#+END_SRC
270
271=capture.toml= holds =[[template]]= tables. Without the file, Orgstar uses two templates: =t= (Personal todo, under =Inbox= in =todo.org=) and =n= (Personal notes, under =Inbox= in =notes.org=). See [[file:08-capture.org][Capture]].
272
273=views.toml= holds =[[view]]= tables for the agenda; see [[file:07-agenda.org][The agenda]].
274
275* In-file settings
276
277Keyword lines in a file set options for that file, as in Emacs. Orgstar reads them outside blocks; for =#+STARTUP= only lines at the element level count, so a =#+STARTUP= line inside a paragraph or a block doesn't change folding.
278
279** Keywords Orgstar reads
280
281| Keyword                     | Effect                                                                                                                                          |
282|-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------|
283| =#+TODO=, =#+SEQ_TODO=      | A TODO sequence: active keywords, a bar, then done keywords. Without the bar, the last word is the done state. =NAME(k)= gives a fast-selection key, =NAME(k!/@)= logging on entering and leaving. Any TODO line replaces the default keywords. |
284| =#+TYP_TODO=                | A type sequence. As in Org, type sequences come first, then =#+TODO=, then =#+SEQ_TODO=.                                                        |
285| =#+PRIORITIES=              | Three values: highest, lowest, default, as =A C B= or =1 5 3=. The default is =A C B=.                                                           |
286| =#+STARTUP=                 | Startup options; see below.                                                                                                                     |
287| =#+TAGS=                    | Tags for fast tag selection with =C-c C-q=, with keys as =work(w)=, groups in ={ }= and tag groups in =[ ]=. Without =#+TAGS=, =C-c C-q= offers the tags used in the file. |
288| =#+FILETAGS=                | Tags every heading in the file inherits, as =:work:project:=.                                                                                    |
289| =#+PROPERTY=                | A file-wide property, as =#+PROPERTY: header-args :results output=. =NAME+= appends to the value.                                               |
290| =#+CATEGORY=                | The file's category in the agenda. Without it the category is the file name.                                                                    |
291| =#+ARCHIVE=                 | Where =C-c C-x C-a= archives to. The default is =%s_archive::=.                                                                                  |
292| =#+COLUMNS=                 | The default column view format.                                                                                                                 |
293| =#+LINK=                    | A link abbreviation, as =#+LINK: gh https://github.com/%s=.                                                                                      |
294| =#+CONSTANTS=               | Constants for table formulas, as =#+CONSTANTS: c=299792458 pi=3.14=.                                                                             |
295| =#+SETUPFILE=               | A file whose keyword lines count as this file's; see below.                                                                                     |
296| =#+TITLE=, =#+AUTHOR=, =#+DESCRIPTION= | Used by export, Quick Look and Spotlight.                                                                                             |
297| =#+OPTIONS=, =#+MACRO=, =#+INCLUDE=, =#+EXCLUDE_TAGS=, =#+SELECT_TAGS= | Export settings; see [[file:12-export.org][Export]].                                                                   |
298
299#+BEGIN_SRC org
300,#+TODO: TODO(t) NEXT(n) WAIT(w@/!) | DONE(d!) CANCELED(c@)
301,#+PRIORITIES: A E C
302,#+STARTUP: content logdrawer
303,#+FILETAGS: :work:
304,#+CATEGORY: acme
305#+END_SRC
306
307After you change a keyword line, press =C-c C-c= on it to read the file's settings again, as =org-mode-restart= does in Emacs. Changes to =#+TODO=, =#+SEQ_TODO=, =#+TYP_TODO= and =#+PRIORITIES= apply as you type.
308
309** #+STARTUP options
310
311| Option                                        | Effect                                                                   |
312|-----------------------------------------------+--------------------------------------------------------------------------|
313| =overview=, =fold=                            | Only top-level headings show when the file opens.                        |
314| =content=                                     | All headings show, no bodies.                                            |
315| =showall=, =nofold=                           | Everything shows.                                                        |
316| =show2levels= … =show5levels= (any =showNlevels=) | Headings down to level N show.                                       |
317| =showeverything=                              | Everything shows, including drawers and blocks; =VISIBILITY= properties are ignored. |
318| =hidedrawers=, =nohidedrawers=                | Fold or don't fold drawers at startup.                                   |
319| =hideblocks=, =nohideblocks=                  | Fold or don't fold blocks at startup.                                    |
320| =indent=, =noindent=                          | Virtual indentation on or off.                                           |
321| =hidestars=, =showstars=                      | Hide leading stars or show them.                                         |
322| =align=, =noalign=                            | Align every table when the file opens, or don't.                         |
323| =inlineimages=, =noinlineimages=              | Show image links as images, or don't.                                    |
324| =shrink=                                      | Shrink table columns that have a width cookie.                           |
325| =logdone=, =lognotedone=, =nologdone=         | Record a time, a note, or nothing when an entry becomes done.            |
326| =logrepeat=, =lognoterepeat=, =nologrepeat=   | The same, when a repeating entry is completed.                           |
327| =logreschedule=, =lognotereschedule=, =nologreschedule= | The same, when a scheduled date changes.                       |
328| =logredeadline=, =lognoteredeadline=, =nologredeadline= | The same, when a deadline changes.                             |
329| =logdrawer=, =nologdrawer=                    | Notes go in =LOGBOOK=, or under the heading.                             |
330
331After the startup visibility, Orgstar applies each heading's =VISIBILITY= property and folds subtrees tagged =ARCHIVE=, unless =showeverything= is set.
332
333Completion offers every option of =org-startup-options=. Options not in the table above, such as =odd=, =entitiespretty=, =latexpreview=, =constSI= and the footnote options, are accepted and ignored.
334
335** Setup files
336
337=#+SETUPFILE: path= reads the keyword lines of another file and treats them as if they were in this file, before its own lines. This follows =org--collect-keywords-1= in Org:
338
339- A relative path is relative to the folder of the file that names it. =~= expands to your home folder. Quotes around the path are removed.
340- A setup file can name further setup files; each is read once, and a file never reads itself.
341- URLs (anything starting with =scheme://=) aren't fetched.
342- A setup file that can't be read, or isn't UTF-8, is skipped without a message.
343
344Keywords from setup files count for TODO keywords, priorities, =#+STARTUP=, =#+TAGS=, =#+FILETAGS=, =#+PROPERTY=, =#+CATEGORY=, =#+ARCHIVE=, =#+COLUMNS=, =#+LINK=, =#+CONSTANTS= and export. Orgstar reads setup files when a file opens, when you press =C-c C-c= on a keyword line, and when the file changes on disk. If you edit only the setup file, press =C-c C-c= on a keyword line of each open file that uses it.
345
346* Import from Emacs
347
348Import from Emacs reads your Emacs or Doom Emacs configuration and offers to carry its org settings, folders, capture templates and key bindings over. Nothing changes until you choose Import.
349
350** Running it
351
3521. Open Settings ▸ General and click Import from Emacs…, or run Import from Emacs… from the command palette (=⇧⌘P=).
3532. Orgstar looks for a configuration in these places, in order, and reads the first it finds: =$DOOMDIR=, =~/.config/doom=, =~/.doom.d=, =~/.config/emacs=, =~/.emacs.d=, =~/.emacs=. A folder counts when it holds =init.el=, =config.el= or =custom.el=. Doom's own installation folder (one with =lisp/doom.el=) is skipped.
3543. To read another configuration, click Choose… and pick a file or a folder. For a folder, Orgstar reads =init.el=, =config.el= and =custom.el= in it.
3554. The sheet lists what it found under Settings, Folders, Capture templates and Key bindings, each with the line it came from (=config.el:27=, or =Doom default=). Everything is selected; clear what you don't want.
3565. Click Import. The sheet then summarizes what was imported and any problems.
357
358What Import does with each kind of item:
359
360- Settings are written to =config.toml=.
361- Folders are added to the sidebar if they exist and aren't there already.
362- Capture templates are appended to =capture.toml=, except those whose key is already in the file.
363- Key bindings are appended to =keymap.toml=. Running the import again appends them again.
364
365The 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.
366
367A literate configuration (=config.org=) isn't read. Point Choose… at the =config.el= it tangles to.
368
369** Doom Emacs
370
371A configuration counts as Doom when it contains =(doom!=, =(map! = or =(after! =. Orgstar then also reads Doom's own org defaults, from the Doom installation in =$EMACSDIR=, =~/.config/emacs= or =~/.emacs.d=: =modules/lang/org/config.el= and =lisp/doom-emacs.el=. Your configuration overrides them. Doom defaults Orgstar has no use for are counted in the footer rather than listed.
372
373A Doom configuration, or any configuration that enables =evil=, adds =keymap = "doom"=.
374
375** What it reads
376
377Orgstar reads the configuration as Lisp data; it never runs it. It looks at these forms:
378
379| Form                                                                 | What Orgstar takes                                                              |
380|----------------------------------------------------------------------+---------------------------------------------------------------------------------|
381| =setq=, =setq-default=, =setq!=, =setopt=, =csetq=                   | Each variable and value                                                         |
382| =defvar=, =defcustom=                                                | The value, below every other assignment                                         |
383| =custom-set-variables=                                               | Each quoted =(variable value)=                                                  |
384| =after!=, =with-eval-after-load=, =eval-after-load=                  | The forms inside, ranked above plain assignments                                |
385| =use-package=, =use-package!=                                        | Forms in =:config= and =:init=, and pairs in =:custom=                          |
386| =progn=, =when=, =unless=, =if=, =let=, =let*=, =with-no-warnings=   | The forms inside. Conditions aren't evaluated, so every branch is read.         |
387| =map!= (Doom)                                                        | Bindings, with =:leader= (=SPC=), =:localleader= (=SPC m=), =:prefix=, and state keywords such as =:n=, =:i=, =:v=, =:nv= |
388| =define-key=, =keymap-set=, =global-set-key=, =keymap-global-set=    | Bindings                                                                        |
389| =evil-define-key=, =evil-define-key*=                                | Bindings in the =normal=, =insert= or =visual= state                            |
390
391When a variable is set more than once, the last assignment wins, with assignments inside =after!= and similar forms winning over plain ones, and those over Doom's defaults.
392
393Orgstar works out a value when it is a literal, a quoted or backquoted form (with =,= and =,@=), a variable set earlier in the configuration, or a call to =list=, =concat=, =expand-file-name=, =file-name-concat= or =file-name-as-directory= 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.
394
395Only variables whose names start with =org-=, =appt-=, =display-line-numbers=, =fill-column=, =evil-=, =doom-font=, =doom-variable-pitch-font=, =doom-theme= or =calendar-week-start-day= are considered.
396
397** How variables map
398
399| Emacs variable                                                     | Becomes                                                                                       |
400|--------------------------------------------------------------------+-----------------------------------------------------------------------------------------------|
401| =fill-column=, =org-tags-column=, =appt-message-warning-time=      | The same key, when the value is a number                                                      |
402| =org-insert-heading-respect-content=, =org-list-allow-alphabetical=, =org-hide-emphasis-markers=, =org-pretty-entities=, =org-cycle-hide-drawer-startup=, =org-cycle-hide-block-startup=, =org-use-speed-commands=, =org-startup-with-inline-images=, =org-startup-indented=, =org-hide-leading-stars=, =org-startup-align-all-tables=, =org-startup-truncated= | The same key: =nil= or an empty list is =false=, anything else =true= |
403| =org-hide-drawer-startup=, =org-hide-block-startup=                | =org-cycle-hide-drawer-startup=, =org-cycle-hide-block-startup=                               |
404| =org-M-RET-may-split-line=                                         | =org-M-RET-may-split-line=, from the =default= entry of an alist; other per-context entries aren't supported |
405| =org-agenda-prefix-format=                                         | =[org-agenda-prefix-format]=: a string sets all three views; an alist sets =agenda=, =todo= and =tags= |
406| =org-log-done=, =org-log-reschedule=, =org-log-redeadline=         | The same key: =nil=, =time= (also =t=) or =note=                                              |
407| =org-log-into-drawer=                                              | A string as given; =t= becomes ="LOGBOOK"=; =nil= becomes =""=                                 |
408| =display-line-numbers-type=                                        | =true= unless =nil=; =relative= and =visual= become absolute numbers                          |
409| =org-agenda-span=                                                  | A number, or =day= (1), =week= (7), =fortnight= (14), =month= (30), =year= (365)               |
410| =org-agenda-start-day=                                             | A day offset such as ="-3d"=; =nil= becomes ="+0d"=. Other forms aren't supported.            |
411| =org-todo-keywords=                                                | =org-todo-keywords=, one line per sequence. Keywords with spaces are left out; =type= sequences are read as sequences. |
412| =org-directory=                                                    | A folder to add                                                                               |
413| =org-agenda-files=                                                 | A folder for each entry; for a =.org= file, its folder                                        |
414| =org-capture-templates=                                            | Templates for =capture.toml=; see below                                                       |
415| =doom-font=                                                        | =font= and =font-size=, from =(font-spec :family … :size …)= or ="Family-14"=                 |
416| =doom-variable-pitch-font=                                         | Not imported: Orgstar uses one font                                                           |
417| =doom-theme=                                                       | Not imported: set colors under =[theme]=                                                      |
418| =evil-mode= in use, or Doom                                        | =keymap = "doom"=                                                                             |
419
420Any other =org-= or =appt-= variable is listed as having no equivalent.
421
422Capture templates are imported when their type is =entry=, =item=, =checkitem=, =plain= or =table-line=, their template is a string, and their target is =file=, =file+headline=, =file+olp=, =file+olp+datetree=, =file+datetree=, =file+weektree=, =id= or =clock=. The properties =:prepend=, =:immediate-finish=, =:jump-to-captured=, =:clock-in=, =:clock-keep=, =:clock-resume=, =:empty-lines=, =:empty-lines-before=, =:empty-lines-after=, =:tree-type= (=day=, =week=, =month=) and =:table-line-pos= carry over; others are listed as left out. Template groups (a key and a name only) are skipped.
423
424Key bindings are imported when the command is one Orgstar has a counterpart for, such as =org-todo=, =org-schedule=, =org-refile=, =org-capture= or =save-buffer=. Keys must be a string or =(kbd "…")=. In a Doom configuration, bindings without a state go to the =normal= state.
425
426** Limits of the Lisp reader
427
428- Comments (=;=) are skipped. Strings understand =\n=, =\t=, =\"= and line continuations; other escapes give the character itself.
429- =#'= reads as =function=. Other =#= syntax is read as a symbol, so forms using it aren't understood.
430- 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.
431- Macros other than those in the table above are not expanded, and functions are not called. Settings made by code you wrote (a =defun= that calls =setq=, a hook) aren't found.
432
433* Themes
434
435Orgstar has one built-in theme, the default theme, with light and dark colors after GitHub's light and dark themes. You change it by setting colors in =config.toml=, or by keeping a theme in its own file.
436
437Colors are strings in the form ="#rrggbb"= or ="#rrggbbaa"=. They go in these tables:
438
439| Table          | Effect                                                                 |
440|----------------+------------------------------------------------------------------------|
441| =[theme]=      | Sets a color for both light and dark appearance                        |
442| =[theme.light]= | Sets a color for light appearance only                                |
443| =[theme.dark]= | Sets a color for dark appearance only                                  |
444| =[theme.todo]= | Colors TODO keywords by name, in both appearances, as =org-todo-keyword-faces= |
445
446#+BEGIN_SRC toml
447[theme]
448heading-1 = "#005cc5"
449
450[theme.dark]
451background = "#1e1e1e"
452foreground = "#d4d4d4"
453
454[theme.todo]
455WAIT = "#bf8700"
456PROJ = "#8250df"
457#+END_SRC
458
459A keyword without its own color uses =todo= or =done=.
460
461=default-theme.toml= 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 =config.toml=; edits to =default-theme.toml= itself are overwritten at the next launch.
462
463** Theme files
464
465To keep a theme in its own file, put it in the configuration folder with the same tables (=[theme]=, =[theme.light]=, =[theme.dark]=, =[theme.todo]=) and name it in =config.toml=:
466
467#+BEGIN_SRC toml
468[theme]
469theme-file = "solarized.toml"
470#+END_SRC
471
472The colors stack in this order, each over the one before: the default theme, the theme file, then the colors in =config.toml=. Orgstar reloads the theme file when it changes. Only colors are read from a theme file; =font= and the other type keys in its =[theme]= table are ignored.
473
474** Color keys
475
476| Key                     | Colors                                                       |
477|-------------------------+--------------------------------------------------------------|
478| =background=            | the editor's background                                      |
479| =foreground=            | body text                                                    |
480| =cursor=                | the caret                                                    |
481| =selection=             | selected text's background                                   |
482| =heading-1= … =heading-7= | headings of that level                                     |
483| =heading-8=             | level 8 and deeper headings                                  |
484| =todo=                  | TODO keywords not yet done                                   |
485| =done=                  | DONE keywords                                                |
486| =priority=              | =[#A]= cookies                                               |
487| =tags=                  | =:tags:=                                                     |
488| =link=                  | links                                                        |
489| =timestamp=             | timestamps                                                   |
490| =code=                  | =~code~= and inline source                                   |
491| =verbatim=              | ~=verbatim=~                                                 |
492| =inline-background=     | behind =~code~= and ~=verbatim=~                             |
493| =markup=                | link brackets and emphasis markers                           |
494| =comment=               | comments                                                     |
495| =keyword=               | =#+KEYWORD= lines                                            |
496| =metadata=              | planning lines, drawers, properties and clocks               |
497| =special=               | footnotes, statistics cookies, targets, macros and LaTeX     |
498| =block-background=      | the band behind blocks                                       |
499| =block-delimiter=       | =#+begin_= and =#+end_= lines                                |
500| =table=                 | tables                                                       |
501| =line-number=           | line numbers                                                 |
502| =line-number-current=   | the caret's line number                                      |
503| =syntax-keyword=        | code: keywords                                               |
504| =syntax-string=         | code: strings                                                |
505| =syntax-comment=        | code: comments                                               |
506| =syntax-function=       | code: functions                                              |
507| =syntax-type=           | code: types and modules                                      |
508| =syntax-number=         | code: numbers, constants and escapes                         |
509| =syntax-property=       | code: properties, attributes and tags                        |
510| =syntax-label=          | code: labels                                                 |
511| =sidebar-background=    | the folder sidebar and the outline                           |
512| =sidebar-foreground=    | file and heading names there                                 |
513| =sidebar-header=        | folder names there                                           |
514| =modeline-background=   | the modeline and message line                                |
515| =modeline-foreground=   | modeline text                                                |
516| =modeline-highlight=    | the outline path and the clock in the modeline               |
517| =state-normal=          | the NORMAL tag (Doom keys)                                   |
518| =state-insert=          | the INSERT tag                                               |
519| =state-visual=          | the VISUAL and V-LINE tags                                   |
520| =agenda-background=     | the agenda and board                                         |
521| =agenda-date=           | agenda day headers                                           |
522| =agenda-today=          | today's header and the current time                          |
523| =agenda-time=           | times and the time grid                                      |
524| =agenda-category=       | categories                                                   |
525| =agenda-deadline=       | deadlines due                                                |
526| =agenda-upcoming=       | deadlines coming up                                          |
527| =agenda-scheduled=      | scheduled items                                              |
528| =agenda-scheduled-past= | items scheduled on an earlier day                            |
529| =habit-clear=           | habit graph: not due yet                                     |
530| =habit-ready=           | habit graph: due                                             |
531| =habit-alert=           | habit graph: due today, last chance                          |
532| =habit-overdue=         | habit graph: overdue                                         |
533
534The default theme leaves =sidebar-background=, =sidebar-foreground=, =sidebar-header=, =modeline-background=, =modeline-foreground= and =agenda-background= 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.
535
536An unknown color key, a value that isn't a color, or an unknown table such as =[theme.solarized]= is reported as a problem and skipped.
537
538* Appearance
539
540Orgstar 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 =[theme]= rather than =[theme.light]= or =[theme.dark]=.
541
542* Fonts
543
544The editor uses one font for everything: body text, headings, code and tables. Choose it in Settings ▸ Appearance or with =font= under =[theme]=.
545
546- The Font menu lists installed monospaced families. =config.toml= 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 misaligns them.
547- =font-size= is the body size, at least 6 points.
548- Headings are bold. Level 1 is =font-size= plus three times =heading-size-step=, level 2 plus two times, level 3 plus one time; level 4 and deeper are body size. Set =heading-size-step = 0= for one size throughout.
549- =line-spacing= adds space between lines, in points.
550
551On iPhone and iPad, the theme and font settings don't apply; see [[file:14-ios.org][iPhone and iPad]].