Possibly overkill answer: Jon Ingold’s Multi-examine extension used to be pretty cool for this kind of thing, and let you define a group definition for a kind, which would automatically be used if the player tried to examine multiple objects of that kind.
It looks like it doesn’t compile under current Inform, but if there’s a lot of interest in this, it might be worthwhile someone finding the necessary bugfixes to make it go again.
The reason why the last command doesn’t work is because the parser is trying to find a match for “all painting” and there isn’t one. You can fix that with Understand “all painting” as the paintings-set, but that will fix only that specific situation. (The player is just as likely to type “everything” or “each of them” or “gnome and castle”. The convention is that if the parser asks to choose one, it accepts only one of the given set so I’m not sure how big of a problem this is.)
I don’t think this is true – “x all painting” gives a different error, “There are none at all available!” (And “x all” gives “You must supply a second noun.”) I think, and someone else certainly knows whether this is true, that “Sorry, you can only have one” is a library message specifically for responding “all” to disambiguation requests. I put in an “after reading a command” to echo which command was being read, and when you type “x painting/all” no command is echoed after “all,” indicating that it’s not even trying to process that as a command.
Would it be simpler to use “Understand ‘paintings’ as paintings-set when examining” instead of creating a multi-examine action? I tried that first, but the problem is that it then redirects ALL actions on “paintings” to the paintings-set. Even adding “does the player mean…” lines didn’t help.
After seeing that horrible repeating “you must supply a second noun,” I’m sort of going sour on the multi-examine idea…
Now I’m thinking of a number of games I’ve played where I inadvertently discovered an object because of a disambiguation question (or even a misunderstood noun description). Wouldn’t it be nice to have a way to force the player to view the most general level of the object detail hierarchy before doing anything with more fiddly things deeper in? That’s partly the point of this example anyway - you don’t want to view an automatically-generated list of the paintings before seeing the paintings-set description.