docs/manual/guide/01-files-and-folders.org

b5820b07eaf9ca46abf11db39a77e87f57a97324
orgstar/docs/manual/guide/01-files-and-folders.org

348 lines · 31713 bytes

  1#+TITLE: Files, folders and buffers
  2#+DESCRIPTION: Adding folders, opening files, working with buffers, searching, saving, and how orgstar handles changes made outside it.
  3#+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.
  4
  5* The window
  6
  7orgstar has one main window, titled with the name of the buffer it shows. From left to right it holds:
  8
  9- the *sidebar*, listing the folders you added and the files in them;
 10- the *outline pane*, listing the headings of the open file, with the *backlinks pane* under it;
 11- the *editor*, with the optional tab bar above it and the modeline and echo area below it;
 12- the *inspector*, hidden by default, showing column view and clocked time.
 13
 14#+CAPTION: The main window: the sidebar, the outline pane with the backlinks pane under it, and the editor with the modeline.
 15[[file:../images/mac-window.png]]
 16
 17The toolbar holds a button that shows or hides the outline pane; Capture, Agenda and Commands (the command palette) buttons; a button that shows or hides the inspector; a progress indicator while orgstar indexes your folders, the running clock (see [[file:06-dates-and-clocking.org][Dates and clocking]]), a =Conflict= button when the open file has a conflict (see /Conflicts/ below), and the search field. View ▸ Customize Toolbar… adds, removes and moves the buttons.
 18
 19Help ▸ orgstar Manual opens this manual on the web, and Help ▸ Keys its key reference.
 20
 21The window title is the buffer name (see /Buffer names/ below). When the open file is not UTF-8, the subtitle reads =Read-only: not UTF-8=. The close button shows the unsaved-changes dot while any open buffer has unsaved edits.
 22
 23With 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 =⌘P=.
 24
 25The Agenda, Board, Clock Report and Capture windows are separate; they are covered in [[file:07-agenda.org][Agenda]], [[file:06-dates-and-clocking.org][Dates and clocking]] and [[file:08-capture.org][Capture]]. Closing the main window quits orgstar when no other window is open.
 26
 27** Menus and the command palette
 28
 29Most commands are in the menu bar. The =Org= menu lists every org command, each with the keys that run it in the current keymap; it is disabled when no file is open.
 30
 31File ▸ Command Palette… (=⇧⌘P=; =M-x= in the Emacs and Doom presets; =SPC := 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 =Return= to run the top match or click one. =Escape= closes it. Text movement and editing commands (forward character, kill line and so on) are not listed; they are only on keys.
 32
 33Several 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.
 34
 35** Showing and hiding panes
 36
 37| Menu item                                | Shortcut | Palette title                    |
 38|------------------------------------------+----------+----------------------------------|
 39| View ▸ Show Outline                      | =⌥⌘O=    | Show or Hide Outline             |
 40| View ▸ Show Backlinks                    |          | Show or Hide Backlinks           |
 41| View ▸ Show Inspector                    | =⌥⌘I=    | Show or Hide Inspector           |
 42| View ▸ Show Tab Bar                      |          | Show or Hide Tab Bar             |
 43
 44The toolbar's outline button does the same as View ▸ Show 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 [[file:07-agenda.org][The agenda]].
 45
 46orgstar 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). VoiceOver reads the divider as Outline width, which it adjusts in steps of 20 points.
 47
 48* Folders
 49
 50orgstar 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.
 51
 52** Adding a folder
 53
 54Choose File ▸ Add Folder… (=⇧⌘O=), or click =+= at the bottom of the sidebar, and pick a folder. You can also drag folders from the Finder onto the sidebar. The first time orgstar opens with no folder, a welcome sheet offers the same, or a new =org= folder in iCloud Drive with a =notes.org= 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.
 55
 56orgstar 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 =Can't find the folder PATH.= Adding a folder that is already in the sidebar does nothing.
 57
 58orgstar keeps the list of folders, the index and recovery versions in =~/Library/Application Support/Orgstar=; the Mac App Store version keeps them in =~/Library/Containers/sh.krz.orgstar/Data/Library/Application Support/Orgstar=.
 59
 60** Removing a folder
 61
 62Click =−= at the bottom of the sidebar and choose the folder, or right-click the folder's header and choose Remove from Sidebar…. Confirm with =Remove=. The folder and its files stay on disk; only orgstar's index entries for them are removed.
 63
 64** What the sidebar lists
 65
 66Each 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.
 67
 68The sidebar lists every file in the folder, not only org files, with an icon for its kind:
 69
 70| Icon                  | File                                                       |
 71|-----------------------+------------------------------------------------------------|
 72| document              | =.org=                                                     |
 73| archive box           | =.org_archive=                                             |
 74| orange warning sign   | a Syncthing conflict copy (see /Syncthing conflict copies/ below) |
 75| photo                 | an image                                                   |
 76| rich document         | a PDF                                                      |
 77| play button           | audio or video                                             |
 78| =</>=                 | source code or a script                                    |
 79| plain document        | other text                                                 |
 80| cloud with arrow      | an iCloud file still downloading (see /iCloud/ below)       |
 81
 82Some files are never listed or indexed:
 83
 84- Emacs backups (names ending in =~=), auto-save files (names starting with =#=) and lock files (=.#name=);
 85- Syncthing's temporary files (=.syncthing.*=);
 86- orgstar's own temporary files (names containing =.orgstar-=);
 87- =.DS_Store= and =.localized=;
 88- anything inside these folders: =.git=, =.hg=, =.svn=, =.jj=, =.bzr=, =.stfolder=, =.stversions=, =.Trash=, =.Spotlight-V100=, =.fseventsd=, =.build=, =.venv=, =.cache=, =.tox=, =.mypy_cache=, =.pytest_cache=, =.gradle=, =.next=, =.terraform= and =node_modules=.
 89
 90Other 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 =ignored-folders= in =config.toml= to folder names separated by spaces; there is no control for it in Settings. See [[file:13-configuration.org][Configuration]].
 91
 92#+BEGIN_SRC toml
 93[orgstar]
 94show-hidden-files = true
 95ignored-folders = ".git .hg node_modules build"
 96#+END_SRC
 97
 98Only org files (=.org= and =.org_archive=) are read by the index. Other files are listed and can be opened, but their contents are not searched.
 99
100** Creating, renaming and trashing files
101
102Right-click a file or folder in the sidebar for:
103
104- New File… — creates a file in that folder (for a file, in the folder holding it). A name without an extension gets =.org=. A name like =projects/house= creates the =projects= folder too. Names can't start with =/= or contain =..=. The new file opens.
105- Rename… — renames the file or folder in place. The new name can't contain =/=. 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.
106- Show in Finder.
107- 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.
108
109Right-click a root's header for New File…, Expand or Collapse, Show in Finder and Remove from Sidebar….
110
111File ▸ New File from Template… makes a new file from a template in =snippets.toml=, in a folder and with a name you choose; see [[file:02-the-editor.org][The editor]].
112
113* Opening files
114
115Click a file in the sidebar to open it. Other ways:
116
117- *Quick Open*: File ▸ Quick Open… (=⌘P=; =C-x C-f= in the Emacs and Doom presets; =SPC SPC=, =SPC .= or =SPC f f= 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; =↑= and =↓=, or =C-p= and =C-n=, move the selection. Press =Return= to open the selected match or click any match; =Escape= closes the list. Syncthing conflict copies are left out.
118- *Finder*: open an org file from Finder, with =open file.org= 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.
119- *Links*: following a =file:= link or an ID link opens the target file; see [[file:09-links.org][Links]].
120- *Doom ex command*: =:e FILE= opens =FILE=, relative to the current file's folder; =~= is expanded. A file that doesn't exist is reported as =No file FILE=.
121
122A 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 [[file:../install.org][Install]]). 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 /Saving/ below).
123
124orgstar 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.
125
126** Files that aren't org
127
128How a file opens depends on what it is:
129
130- *Org files* (=.org=, =.org_archive=) open in the editor with org editing.
131- *Text files* 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 =Not an org file=, and the outline pane shows "No outline" when you turn it on. Files in these languages get syntax highlighting: shell (=.sh=, =.bash=, =.zsh=, =.zshrc=, =.bashrc=, =.profile=), Python, Emacs Lisp, C, C++, R, JavaScript, Java, Scheme, Clojure, Haskell, Rust, Go, Ruby, JSON, YAML, TOML and Lua.
132- *Everything else* (images, PDFs, audio, video, archives, binary files) shows a Quick Look preview in place of the editor, with =Open with Default App= and =Show in Finder= buttons below it. The preview is not a buffer.
133
134Text files from Finder use orgstar only if you choose it with Open With, since orgstar is not their default app.
135
136* Buffers
137
138Each 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 =find-buffer-visiting= does.
139
140A 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.
141
142** Buffer commands
143
144| Command             | Menu, or palette                 | Mac               | Emacs preset                 | Doom (normal state)                       |
145|---------------------+----------------------------------+-------------------+------------------------------+-------------------------------------------|
146| Switch to Buffer…   | Window ▸ Switch to Buffer…       |                   | =C-x b=, =C-x C-b=           | =SPC b b=, =SPC b B=, =SPC ,=, =:b=, =:ls= |
147| Next Buffer         | Window ▸ Next Buffer             | =⇧⌘]=, =⌃Tab=     | =⇧⌘]=, =C-x <right>=          | =SPC b n=, =SPC b ]=, =] b=, =:bn=          |
148| Previous Buffer     | Window ▸ Previous Buffer         | =⇧⌘[=, =⌃⇧Tab=    | =⇧⌘[=, =C-x <left>=           | =SPC b p=, =SPC b [=, =[ b=, =:bp=          |
149| Last Buffer         | palette                          |                   |                              | =SPC `=                                   |
150| Close Buffer        | File ▸ Close Buffer              | =⌘W=              | =⌘W=, =C-x k=                 | =SPC b k=, =SPC b d=, =:bd=                 |
151| Close Other Buffers | palette                          |                   |                              | =SPC b O=                                 |
152| Close All Buffers   | palette                          |                   |                              | =SPC b K=                                 |
153
154Menu shortcuts (=⇧⌘]=, =⌘W= and the others) work in every preset. The Doom preset also has the Emacs preset's =C-x= keys in every state. The Mac preset's =⌃Tab= and =⌃⇧Tab= are in addition to the menu shortcuts.
155
156Switch 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, =Tab= to complete the top choice, =Return= to switch, =Escape= to cancel.
157
158Close Buffer closes the current buffer and shows the buffer you showed before it. With no buffer open, =⌘W= 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) =⌘W= closes that window. File ▸ Close Window (=⇧⌘W=) closes the window in front.
159
160When you close buffers with unsaved edits, what happens depends on the save mode (see /Saving/ below): in automatic mode they are saved first; in explicit mode orgstar asks =Save=, =Don't Save= or =Cancel= (=Save All= for several files). A buffer whose save fails or conflicts stays open.
161
162** Buffer names
163
164A 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 =post-forward-angle-brackets=:
165
166#+BEGIN_SRC text
167notes.org<work>
168notes.org<home>
169notes.org<archive/2024>
170#+END_SRC
171
172These names show in the window title, the tab bar and Switch to Buffer.
173
174** The tab bar
175
176View ▸ 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 =tab-bar= in =config.toml=.
177
178- Click a tab to show its buffer. Hover to see the file's full path.
179- Click =×= 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 =×= while the buffer has unsaved edits; clicking it also closes the buffer, with the same unsaved-changes handling as Close Buffer.
180
181* Searching your notes
182
183The search field in the toolbar searches every org file in your folders. Click it or choose Edit ▸ Search Notes (=⇧⌘F=; =SPC /= or =SPC s p= in Doom normal state) and type.
184
185While 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 =#+TITLE= 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.
186
187How matching works:
188
189- orgstar searches heading titles, the text under each heading and the text before a file's first heading, in =.org= and =.org_archive= files. Files that aren't org are not searched. Syncthing conflict copies are not searched.
190- Each word you type matches words that start with it, ignoring case and accents: =proj= finds =project= and =projection=.
191- Every word must match within the same heading, or within the text before the first heading.
192- Up to 50 results show, best matches first.
193- Open buffers with unsaved edits are searched as they are in the buffer, not as they are on disk.
194
195To find text inside the open file, use Edit ▸ Find (see [[file:02-the-editor.org][The editor]]).
196
197* The outline pane
198
199The outline pane lists the headings of the open org file, indented by level. Headings without a title show as =(untitled)=. 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".
200
201The outline follows your edits after a short pause in typing.
202
203** Backlinks
204
205Under 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) (=Links to This File=) and to the heading at the caret (=Links to= 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 Backlinks. Which links count is covered in [[file:09-links.org][Links]].
206
207** Inspector
208
209View ▸ Show Inspector (=⌥⌘I=) opens the inspector, a pane on the right with column view and clocked time for the file or the current subtree. See [[file:04-outlines.org][Outlines]] and [[file:06-dates-and-clocking.org][Dates and clocking]].
210
211* Saving
212
213Settings ▸ General ▸ Save files has two modes; the =config.toml= setting is =save= in =[orgstar]=.
214
215- *Automatically, when typing stops* (=automatic=, the default). Each buffer saves one second after its last change, including buffers that are not showing. Quitting and closing buffers save without asking.
216- *Only with File ▸ Save (⌘S)* (=explicit=). Nothing is written until you save. Closing a buffer or quitting with unsaved edits asks first.
217
218| Command  | Menu                 | Shortcut | Emacs preset | Doom                                 |
219|----------+----------------------+----------+--------------+--------------------------------------|
220| Save     | File ▸ Save          | =⌘S=     | =C-x C-s=    | =SPC f s=, =SPC b s=, =:w=; =:wq= and =:x= save and close the window |
221| Save All | File ▸ Save All      | =⌥⌘S=    | =C-x s=      | =SPC b S=                            |
222
223Save is disabled for a read-only file. Save All is disabled when nothing is unsaved.
224
225The modeline shows a dot while the current buffer has unsaved edits. Buffers with unsaved edits show a dot in the tab bar.
226
227** How a save works
228
229orgstar does not assume it is the only program writing your files. Emacs, Syncthing, iCloud and Git may change them too. Each save:
230
2311. 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 /External changes/ below). If they conflict with yours, nothing is written and the buffer has a conflict.
2322. 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.
2333. 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.
234
235Every version a save displaces goes to recovery first (see /Recovery versions/ below). Reads and writes go through macOS file coordination, so iCloud and other coordinating programs see a consistent file.
236
237A 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.
238
239* External changes
240
241orgstar watches the files in your folders. When a file with an open buffer changes on disk:
242
243- If the buffer has no unsaved edits, it reloads. The caret and folds stay where they were, mapped through the change.
244- 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.
245- If both sides changed the same lines differently, the buffer has a conflict.
246
247Reloading or merging clears the buffer's undo history.
248
249If an open file is deleted on disk, its buffer stays open with its text. Saving it writes the file again.
250
251To 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; =:e= in Doom). Your edits go to recovery.
252
253** Conflicts
254
255When a buffer conflicts with its file, automatic saving stops for that buffer, the =Conflict= button appears in the toolbar, and the conflict sheet opens. The sheet shows the differences: lines marked =-= are on disk, lines marked =+= are in your version, with three lines of context around each change. Removed lines are tinted in the theme's =todo= color and added lines in its =done= color. With Differentiate Without Color on in the system's accessibility settings, each changed line is also labelled Removed or Added; with Increase Contrast on, the tint is stronger and a bar marks each changed line. VoiceOver reads each changed line with Removed or Added before it. Choose:
256
257| Button             | What it does                                                                                                     |
258|--------------------+------------------------------------------------------------------------------------------------------------------|
259| Keep Mine          | Writes your version over the file. The disk version goes to recovery. This is the default button.               |
260| Use Disk Version   | Loads the file as it is on disk. Your version goes to recovery.                                                  |
261| Merge with Markers | Puts both sets of changes in the buffer, as =git merge= leaves a conflict: non-conflicting changes merged, conflicting lines between markers. Your version as it was goes to recovery. |
262| Cancel             | Closes the sheet. The conflict stays; click =Conflict= in the toolbar to reopen it.                              |
263
264After Merge with Markers the buffer holds blocks like this, which you edit and save:
265
266#+BEGIN_SRC text
267<<<<<<< yours
268- [ ] Call the plumber on Monday
269=======
270- [X] Call the plumber
271>>>>>>> disk
272#+END_SRC
273
274While a conflict is unresolved, saving that buffer does nothing except reopen the sheet.
275
276** Syncthing conflict copies
277
278When two devices change a file before Syncthing syncs them, Syncthing keeps one version as a conflict copy beside the file, named like =notes.sync-conflict-20260301-142233-ABCDEF7.org=. 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.
279
280When 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 =-= are in the file (as the buffer holds it) and lines marked =+= are in the copy. Then choose:
281
282| Button             | What it does                                                                       |
283|--------------------+------------------------------------------------------------------------------------|
284| Keep File          | Leaves the buffer as it is.                                                        |
285| Use Copy           | Replaces the buffer's text with the copy's.                                        |
286| Merge with Markers | 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. |
287
288Each 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.
289
290** Recovery versions
291
292Whenever 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 =~/Library/Application Support/Orgstar/Recovery= (in the Mac App Store version, the same folder inside its container).
293
294Choose File ▸ History… to see the open file's versions, newest first, each with its date and why it was kept:
295
296| Label                   | Meaning                                         |
297|-------------------------+-------------------------------------------------|
298| Your version, replaced  | Your buffer, before it was replaced             |
299| Disk version, replaced  | The file on disk, before orgstar wrote over it  |
300| Sync conflict copy      | A Syncthing conflict copy you resolved          |
301| Snapshot, before a save | The file as it was before a save                |
302
303In the download version, when the file is in a git repository, the list also has the commits that changed it, found with =git log --follow= so they reach past a rename, among the kept versions by date. A commit shows its subject, its short hash and its author.
304
305Select a version to see how it differs from the buffer (=-= in the buffer, =+= in the selected version). =Restore= puts that version's text in the buffer as one edit, which undo reverses; the buffer as it was goes to recovery first. Restoring a commit changes only the buffer: nothing is checked out, and the file is written by the next save as usual. =Show in Finder= reveals a kept file. For a file with no versions the sheet says so.
306
307** Committing to git
308
309The download version can commit your changes in a folder that is a git repository. It is off for every folder. In Settings ▸ Git, choose for each folder in the sidebar:
310
311| Choice                | What happens                                                                                     |
312|-----------------------+--------------------------------------------------------------------------------------------------|
313| Off                   | Nothing. The default.                                                                            |
314| Commit                | A minute after the last save in the folder, and when orgstar quits, orgstar commits the files it saved. |
315| Commit, Pull and Push | Before committing, =git pull --ff-only=; after the commit, =git push=.                          |
316
317Only the files orgstar wrote since the last commit are committed: files saved from a buffer, and files changed by refiling, archiving, capture and agenda commands. Other changes in the repository, staged or not, stay as they are, so your own work in progress is never committed. orgstar remembers these files until they are committed; files written before a crash are not committed. An encrypted =.org.gpg= file is committed as it is on disk, like any other file. A file that is ignored by =.gitignore=, or that is the same as in the last commit, is left out.
318
319The commit uses your git identity and configuration, including signing and hooks. Its message is =Update= followed by the file names, or =Update N files= with the paths in the body when there are more than three. The echo area says what was committed and pushed.
320
321orgstar runs the git it finds in =/opt/homebrew/bin=, =/usr/local/bin=, =/run/current-system/sw/bin= or on the =PATH= (=/usr/bin/git= only with the developer tools installed), or the one =ORGSTAR_GIT= names. It never asks for anything: a remote that needs a password or a host key confirmation fails, and the echo area says git couldn't sign in. Use an SSH key in the agent or a credential helper such as the keychain. Each git command is stopped after 30 seconds, or 60 for pull and push (15 when quitting).
322
323orgstar never merges, rebases or resolves a conflict:
324
325- When the pull can't fast-forward, because the remote and your repository both have commits or the remote changed a file you have changed, orgstar still commits locally, doesn't push, and says so. Pull and resolve it in a terminal (for example =git pull --rebase=).
326- While a merge, rebase, cherry-pick, revert or bisect is in progress, or another git command holds the index, orgstar doesn't run git in that repository. The files wait and are committed after the next save once it is finished.
327- A push runs only after the pull succeeded and something was committed.
328
329The Mac App Store version can't run git and has no Git pane.
330
331** iCloud
332
333Files 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.
334
335* Encodings and line endings
336
337orgstar edits UTF-8 files, with or without a byte order mark.
338
339- 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 =Read-only: not UTF-8=, the modeline shows =Read-only=, and commands that would change it report =This file is read-only.= orgstar never writes such a file, and refiling or archiving into it is refused.
340- A file with a UTF-8 byte order mark keeps it when saved; the modeline shows =BOM=.
341- A file containing CRLF line endings shows =CRLF= in the modeline. Existing line endings are kept.
342- LaTeX export, and =#+INCLUDE= 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.
343
344orgstar does not convert between encodings or line endings.
345
346* On iOS
347
348The 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; the iOS app doesn't list git commits or commit to git. Files are watched through file presenters rather than FSEvents. See [[file:14-ios.org][iOS]].
Keyboard shortcuts

Global

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

Repository & editor

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