Open with Compilable Subdocuments doesn't

I think I’ve found my first Scrivener bug - after umpteen years of use and a published 400-page book that was written in Scrivener. I’m kinda proud of myself.

It’s going to be hard to reproduce though. Hardly a fatal error. What happens is this:

I have a folder in the binder with subdocuments, none of which has Include in Compile checked. The folder itself does have this checked. Yet when I collapse the folder and select it, and then click the Scrivenings Group Mode, all the subdocuments are included on the screen. This remains the case even if I go through the menus: Documents > Open > With Compilable Subdocuments.

The same thing happens if the folder is not collapsed and I highlight it.

Perhaps I’m confused, but what I expect to see, and what I generally do see, is that the Scrivenings includes only those documents that have the checkbox checked.

This is a quirk in how two features combine. With Compilable Subdocuments will display all valid subdocuments (and with parents if they are valid) using a Multiple Selection. In your particular case, only one file ends up being valid, hence there can be no “multiple” selection because only one single item is the result—and that item happens to be the folder itself—hence it shows the contents of the folder in the view. If that doesn’t make sense, try another experiment. This time set the folder to not include, and select one single file in the folder to be included. Now the result of the command will produce a single valid result, the one subdocument that is included. The result is not a corkboard with one card on it, but the contents of the one valid file in the text editor.

To put it another way, I’m not sure if there is a good way around this quirk, because a multiple selection with only one single entry in it is a bit of an oxymoron. The definition of a multiple selection is more than one item in the selection. When a multiple selection is reduced to one item, it reverts to showing that one item as per normal—as if you had clicked on it in the binder all by itself. Try selecting two text files and then Cmd-clicking on one of them to remove it from the selection; the text editor for the remaining file is presented. That’s the same thing that is happening above, only you are reducing the selection to one via a different route.

To clear up a few points:

Yeah that won’t make a difference in how this feature works. All it does it take the current selection (which might itself be a multiple selection, or just one folder) and reduce that selection by eliminating all items not included in the compile, and adding all subdocuments that are. Current selection can come from either split, or the binder, depending upon where the application focus is.

This is how the program will always work, unless you specifically tell it to not do so. Again it doesn’t matter if it is collapsed in the binder or not. There are two ways to filter the result: the menu command, or Option-clicking on a container.

Actually, there is a bug here - if you Opt-click on the folder, you get the expected behaviour (just the folder text loads in scrivenings), but if you use Documents > Open > With Compilable Subdocuments), nothing happens. The behaviour should be the same as Opt-clicking.

I have fixed this for the next update, thanks!

All the best,

Ah, okay that makes sense! I didn’t test against the Opt-click.

Thanks, Keith. As I said, this is the first thing that has gone wrong for me in many years of daily use of Scrivener. Kudos to you for a solid piece of work!