Restore Merge Warning?

I must have accidentally turned off the Documents>Merge warning dialog box, because now Scrivener merges without asking confirmation.

How do I turn it back on? I’ve searched the app and the manual; no joy.

Thanks for your help.

Scrivener 3.2.2 (14632), macOS 11.6 (20G165)…

I’m not sure of the circumstances where a warning tripped by a Document Merge would pop up. I can’t recall it ever occurring for me (a Project Merge has) but could be a faulty memory.

I just failed to trip a warning for a simple document merge before and after resetting warnings using the below command, but perhaps the merge wasn’t complex enough as it was lacking in significant metadata. (And, as I recall, you use the scriptwriting feature; I’m not sure if that’s a factor.)

Regardless, in case you’ve not seen the option to “Reset All Warnings”––––Preferences > General > Warnings––––it’d be something you could try.

Manual description at B.2.11:

Reset All Warnings When you first start using Scrivener, actions which have a destructive or unusual nature (such as importing in such a way that original formatting might be lost) will produce a warning dialogue. You can often choose to disable these as you see them from within the warnings themselves. The Reset All Warnings button will clear all of these dismissals and make them appear again the next time it is appropriate.

Click this button to reset all of the various warnings that can be permanently dismissed, throughout the software, so that they will be shown again.

Thanks for this suggestion. I tried it, but Reset All Warnings did not bring back the Merge warning.

I found a tutorial on YouTube that shows the Merge warning in context. It should show up whenever I merge documents.

Here’s a screen image of the dialog box:

2021-10-11_10-43-32.462

Here’s a link ot the tutorial:

Maybe someone from L&L like @AmberV or @kewms knows the answer? I appreciate the help.

I just tried merging larger groups in the tutorial project as a test, and it looks like the definition of “several” is six. Any amount under that will not produce a warning.

Thanks very much. Is there any way to adjust the threshold number?

No, it’s just a threshold warning to catch larger accidents, kind of like how if you have a certain number tabs open in a browser and it asks about closing the window, but less than that it doesn’t. I think Finder has similar threshold warnings as well, like if you try to open several hundred PDF files at once.

Got it. Thanks for the info.

Scrivener itself won’t do it, but probably you could use Keyboard Maestro or similar to create a “backup and merge” shortcut.

Thanks – that’s what I’m working on now. :slightly_smiling_face:

Wow, I’d love to see that! I’ve done some helpful things with KM, but I don’t think it’s the Swiss army knife it’s made out to be.

Do you visit the KM discord? There are some amazing KM wizards there.

Here’s my Keyboard Maestro macro for Merging. It adds a confirmation dialog, then backs up the project right before the Merge.

The KM macro file is disabled and filed in an example set for safety. To implement, drag/copy it to your Scrivener macro folder and check the trigger checkbox.

File:
Scrivener 3 - Merge and Backup.kmmacros.zip (1.8 KB)

Preview:

Nice, and I learned something! Thank you. The OP wanted a warning in all cases of trying to do a merge, and the macro does that.

However, if a person like myself doesn’t want unnecessary warnings – or in case there is no limit (#1 below) I have quibbles:

  1. Testing a merge of up to 64 documents, I didn’t reach a threshold. Maybe there is no limit in Mac Scrivener 3.
  2. The macro does a backup for no reason, particularly if there is no limit, but also in the case where Scrivener refuses to do the merge – unless it aborts at that point, which I haven’t heard is the case.

My skepticism was due to an imagined solution with a check on how many documents are selected before trying the merge, and I don’t see how Keyboard Maestro can do that. If it could, it would be closer to Swiss army knife status than I think.

Not quite following. Amber said the threshold for the built-in warning is 6+ items. So 1-5 items, no warning. 6-n items, you get a warning. If you tried to merge 64 documents and got no warning, you probably checked the “Do not show this message again” box in the warning at some point.

The reason for the backup is in case you made a mistake and want to revert the merge. Undo doesn’t work on merging. The backup gives you a copy of the project pre-merge, so you can get the separate documents and restore them to your project.

I think there may be a few options for counting the number of selected documents using KM. Scrivener may have the selected count exposed to either KM or Applescript. (Remember, KM can use AppleScript, shell scripts and JavaScript.)

In a pinch, you could adapt this macro:

Which accumulates copied items one at a time into separate clipboards for pasting in order. You could rework it to return the number of clipboards, and thereby the number of selected items.

As I mentioned, head over to the Keyboard Maestro Discord to see some amazingly well-engineered solutions done with KM.

All very good points. All the guys here teach me humility every day.

All the guys here teach me humility every day.

Me, too. And the KM wizards make me humble as well – I learn so much from them. Just trying to share the knowledge.