Menu items for recovery, sync conflicts, revert and spell check !332
4 files changed, +18 −9
Layout: unified · split
Sources/Orgstar/OrgstarApp.swift +9
| @@ -401,6 +401,13 @@ struct OrgstarApp: App { | |||
| 401 | Button(command.title) { commands.run(command.id) } | 401 | Button(command.title) { commands.run(command.id) } |
| 402 | } | 402 | } |
| 403 | } | 403 | } |
| 404 | Divider() | ||
| 405 | Button("Revert to File on Disk") { commands.run("app.revert") } | ||
| 406 | .disabled(session.path == nil) | ||
| 407 | Button("Resolve Sync Conflicts…") { commands.run("app.sync-conflicts") } | ||
| 408 | .disabled(session.path == nil) | ||
| 409 | Button("Recovery Versions…") { commands.run("app.recovery") } | ||
| 410 | .disabled(session.path == nil) | ||
| 404 | } | 411 | } |
| 405 | CommandGroup(replacing: .saveItem) { | 412 | CommandGroup(replacing: .saveItem) { |
| 406 | Button("Close Buffer") { | 413 | Button("Close Buffer") { |
| @@ -444,6 +451,8 @@ struct OrgstarApp: App { | |||
| 444 | MarkupToggle() | 451 | MarkupToggle() |
| 445 | Button("Truncate or Wrap Long Lines") { commands.run("editor.toggle-truncate-lines") } | 452 | Button("Truncate or Wrap Long Lines") { commands.run("editor.toggle-truncate-lines") } |
| 446 | Button("Turn Auto Fill On or Off") { commands.run("editor.toggle-auto-fill") } | 453 | Button("Turn Auto Fill On or Off") { commands.run("editor.toggle-auto-fill") } |
| 454 | Button("Check Spelling While Typing") { commands.editor?.run("editor.toggle-spell-check") } | ||
| 455 | .disabled(commands.editor == nil) | ||
| 447 | } | 456 | } |
| 448 | CommandGroup(after: .pasteboard) { | 457 | CommandGroup(after: .pasteboard) { |
| 449 | Divider() | 458 | Divider() |
docs/manual/guide/01-files-and-folders.org +4 −4
| @@ -25,7 +25,7 @@ Most commands are in the menu bar. The =Org= menu lists every org command, each | |||
| 25 | 25 | ||
| 26 | File ▸ 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. | 26 | File ▸ 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. |
| 27 | 27 | ||
| 28 | Several commands in this chapter are only in the palette, not in a menu: Close Other Buffers, Close All Buffers, Last Buffer, Show or Hide Tab Bar, Revert to File on Disk, Resolve Sync Conflicts… and Recovery Versions…. | 28 | 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. |
| 29 | 29 | ||
| 30 | ** Showing and hiding panes | 30 | ** Showing and hiding panes |
| 31 | 31 | ||
| @@ -241,7 +241,7 @@ Reloading or merging clears the buffer's undo history. | |||
| 241 | 241 | ||
| 242 | If an open file is deleted on disk, its buffer stays open with its text. Saving it writes the file again. | 242 | If an open file is deleted on disk, its buffer stays open with its text. Saving it writes the file again. |
| 243 | 243 | ||
| 244 | To throw away your unsaved edits and load the file as it is on disk, run Revert to File on Disk from the palette (=:e= in Doom). Your edits go to recovery. | 244 | 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; =:e= in Doom). Your edits go to recovery. |
| 245 | 245 | ||
| 246 | ** Conflicts | 246 | ** Conflicts |
| 247 | 247 | ||
| @@ -270,7 +270,7 @@ While a conflict is unresolved, saving that buffer does nothing except reopen th | |||
| 270 | 270 | ||
| 271 | When 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. | 271 | When 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. |
| 272 | 272 | ||
| 273 | When you open a file that has conflict copies, the echo area says how many there are. Run Resolve Sync Conflicts… from the palette 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: | 273 | 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 =-= are in the file (as the buffer holds it) and lines marked =+= are in the copy. Then choose: |
| 274 | 274 | ||
| 275 | | Button | What it does | | 275 | | Button | What it does | |
| 276 | |--------------------+------------------------------------------------------------------------------------| | 276 | |--------------------+------------------------------------------------------------------------------------| |
| @@ -284,7 +284,7 @@ Each choice moves the copy to recovery and deletes it from the folder. The buffe | |||
| 284 | 284 | ||
| 285 | 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. orgstar keeps the last 20 versions per file in =~/Library/Application Support/Orgstar/Recovery=. | 285 | 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. orgstar keeps the last 20 versions per file in =~/Library/Application Support/Orgstar/Recovery=. |
| 286 | 286 | ||
| 287 | Run Recovery Versions… from the palette to see the open file's versions, newest first, each with its date and why it was kept: | 287 | Choose File ▸ Recovery Versions… to see the open file's versions, newest first, each with its date and why it was kept: |
| 288 | 288 | ||
| 289 | | Label | Meaning | | 289 | | Label | Meaning | |
| 290 | |-------------------------+-------------------------------------------------| | 290 | |-------------------------+-------------------------------------------------| |
docs/manual/guide/02-the-editor.org +2 −2
| @@ -278,7 +278,7 @@ Electric pairs are on by default and work in org files only. Set =electric-pair- | |||
| 278 | 278 | ||
| 279 | * Spell checking | 279 | * Spell checking |
| 280 | 280 | ||
| 281 | Spell checking is off by default. Turn it on for the current buffer with Check Spelling While Typing from the palette (=SPC t s= 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 =spell-check = true= in =config.toml=. | 281 | Spell checking is off by default. Turn it on for the current buffer with View ▸ Check Spelling While Typing (also in the palette; =SPC t s= 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 =spell-check = true= in =config.toml=. |
| 282 | 282 | ||
| 283 | 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. | 283 | 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. |
| 284 | 284 | ||
| @@ -311,7 +311,7 @@ Wrapping is display only. To rewrap the text of a paragraph, use Org ▸ Fill Pa | |||
| 311 | | Auto fill | View ▸ Turn Auto Fill On or Off | palette | off | =auto-fill-mode= | current buffer | | 311 | | Auto fill | View ▸ Turn Auto Fill On or Off | palette | off | =auto-fill-mode= | current buffer | |
| 312 | | Inline images | Org ▸ Show or Hide Inline Images | =C-c C-x C-v= (Emacs, Doom) | off | =org-startup-with-inline-images= | current buffer | | 312 | | Inline images | Org ▸ Show or Hide Inline Images | =C-c C-x C-v= (Emacs, Doom) | off | =org-startup-with-inline-images= | current buffer | |
| 313 | | LaTeX previews | palette | =C-c C-x C-l= (Emacs, Doom) | off | =org-startup-with-latex-preview= | current buffer | | 313 | | LaTeX previews | palette | =C-c C-x C-l= (Emacs, Doom) | off | =org-startup-with-latex-preview= | current buffer | |
| 314 | | Spell checking | palette | =SPC t s= (Doom) | off | =spell-check= | current buffer | | 314 | | Spell checking | View ▸ Check Spelling While Typing | =SPC t s= (Doom) | off | =spell-check= | current buffer | |
| 315 | | Truncate long lines | View ▸ Truncate or Wrap Long Lines | =C-x x t= (Emacs), =SPC t w= (Doom) | off | =org-startup-truncated= | current buffer | | 315 | | Truncate long lines | View ▸ Truncate or Wrap Long Lines | =C-x x t= (Emacs), =SPC t w= (Doom) | off | =org-startup-truncated= | current buffer | |
| 316 | 316 | ||
| 317 | Toggles that apply to the current buffer last until it closes; the =config.toml= setting decides how each file starts. Changing those settings, and =org-startup-indented= and =org-hide-leading-stars=, affects files opened afterwards, not buffers already open. | 317 | Toggles that apply to the current buffer last until it closes; the =config.toml= setting decides how each file starts. Changing those settings, and =org-startup-indented= and =org-hide-leading-stars=, affects files opened afterwards, not buffers already open. |
docs/manual/guide/15-alongside-emacs.org +3 −3
| @@ -58,7 +58,7 @@ The sheet shows what differs, with lines marked - on disk and + in your version, | |||
| 58 | | Merge with Markers | Puts both sets of changes in the buffer, with conflicting lines between =<<<<<<< yours= and =>>>>>>> disk= markers, as =git merge= leaves them. Edit and save. Your version as it was goes to the recovery folder. | | 58 | | Merge with Markers | Puts both sets of changes in the buffer, with conflicting lines between =<<<<<<< yours= and =>>>>>>> disk= markers, as =git merge= leaves them. Edit and save. Your version as it was goes to the recovery folder. | |
| 59 | | Decide Later | Closes the sheet. Automatic saving stops for the file until you decide; the Conflict button in the toolbar opens the sheet again. | | 59 | | Decide Later | Closes the sheet. Automatic saving stops for the file until you decide; the Conflict button in the toolbar opens the sheet again. | |
| 60 | 60 | ||
| 61 | On the Mac, Revert to File on Disk (in the command palette) loads the disk version at any time; unsaved changes go to the recovery folder. | 61 | On the Mac, File ▸ Revert to File on Disk loads the disk version at any time; unsaved changes go to the recovery folder. |
| 62 | 62 | ||
| 63 | * Sync tools | 63 | * Sync tools |
| 64 | 64 | ||
| @@ -74,7 +74,7 @@ Syncthing writes files without file coordination. orgstar sees its changes throu | |||
| 74 | - Its folders =.stfolder= and =.stversions= are in the default =ignored-folders=. | 74 | - Its folders =.stfolder= and =.stversions= are in the default =ignored-folders=. |
| 75 | - Conflict copies (=name.sync-conflict-YYYYMMDD-HHMMSS-ID.org=) are listed in the sidebar but never indexed, so they don't appear in the agenda, search or ID links. | 75 | - Conflict copies (=name.sync-conflict-YYYYMMDD-HHMMSS-ID.org=) are listed in the sidebar but never indexed, so they don't appear in the agenda, search or ID links. |
| 76 | 76 | ||
| 77 | When a file with conflict copies opens, a message says how many there are. Resolve Sync Conflicts… in the command palette (More ▸ Sync Conflict Copies on iOS) lists each copy against the file, with lines marked - in the file and + in the copy: | 77 | 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: |
| 78 | 78 | ||
| 79 | | Button | Effect | | 79 | | Button | Effect | |
| 80 | |--------------------+--------------------------------------------------------------------------------------------| | 80 | |--------------------+--------------------------------------------------------------------------------------------| |
| @@ -107,7 +107,7 @@ Each file has a subfolder named from a hash of its path, holding its last 20 kep | |||
| 107 | | =local= | orgstar's version was replaced, or set aside by Use Disk Version, Merge with Markers or Restore | | 107 | | =local= | orgstar's version was replaced, or set aside by Use Disk Version, Merge with Markers or Restore | |
| 108 | | =sync-conflict= | A Syncthing conflict copy was resolved | | 108 | | =sync-conflict= | A Syncthing conflict copy was resolved | |
| 109 | 109 | ||
| 110 | Recovery Versions… in the command palette (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. | 110 | 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. |
| 111 | 111 | ||
| 112 | * Features that use Emacs on the Mac | 112 | * Features that use Emacs on the Mac |
| 113 | 113 | ||