"Auto-save after" and "Suggest completions as you type"

Posts: 238
Joined: Wed Feb 10, 2016 6:55 pm
Platform: Mac + iOS

Tue Feb 27, 2018 1:21 am Post

Scrivener 3.0.1 (966), macOS 10.12.6
Preferences > General > Saving > Auto-save after
Preferences > Corrections > Auto-Completion > Suggest completions.....

I was testing (procrastinating) "Suggest completions...." today and found that no matter what "Auto-save after" is set to, mine was at the default 2 secs, auto-save doesn't occur after the "Suggest completions..." dropdown has been triggered in the editor and remains in place. I only tested it for several minutes, beyond that??? I don't know if this behavior is normal, intended (or unavoidable) or a bug.

It's possible that someone could walk away after the dropdown has been triggered and suffer unintended consequences because they either hadn't tripped an auto-save or hadn't manually saved during the session.
Scrivener user who occasionally tries to help/pay it forward.

User avatar
Posts: 21210
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Santiago de Compostela, Galiza

Tue Feb 27, 2018 2:52 pm Post

Do you mean while the auto-completion menu is open? If so that appears to be consistent with how this tool works in other text kit software as well:

  1. I tested in EagleFiler, which doesn’t have a “dot” to indicate unsaved content, but does have auto-save on notes.
  2. If I add a new note and type in “now then,” and pause a second, then Quick Look the newly created file from Finder, I’ll find “now then,” in the preview.
  3. Back in EagleFiler, I hit return and type in “cont” then Opt-Esc to trigger completion.
  4. Without dismissing the menu, I trigger Quick Look on the file after waiting 15 seconds. The content remains “now then,”.

Moments later the fact that I’ve switched to Finder registers in EagleFiler and it automatically accepts the completion in the background—I can see the menu drop away—and then the QL update becomes “now then, continue”.

So it seems that device halts background processes—which makes sense, since some background processes might alter the contents of the editor and cause the function the menu is providing to become invalid at the current cursor.

Not saying it is impossible to fix, but it does look unlikely given that.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

User avatar
Site Admin
Posts: 19430
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall

Tue Feb 27, 2018 3:15 pm Post

Yes, unfortunately the completions menu - which is handled by Apple code blocks everything, including all timers running in the app (such as the one used for auto-save). There is no way around it sine the blocking is coming from Apple's macOS code.

All the best,
"You can't waltz in here, use my toaster, and start spouting universal truths without qualification."

Posts: 238
Joined: Wed Feb 10, 2016 6:55 pm
Platform: Mac + iOS

Tue Feb 27, 2018 5:52 pm Post

Thank you for the explanations.

@AmberV, yes I meant with the menu open.
Scrivener user who occasionally tries to help/pay it forward.