Can you please give a example of usage of the option
gpg (other than displaying a key in a local keyring)?
The manual page explains the usage rather clearly:
--locate-keys Locate the keys given as arguments. This command basically uses the same algorithm as used when locating keys for encryption or signing and may thus be used to see what keys gpg might use. In particular external methods as defined by --auto-key-locate may be used to locate a key. Only public keys are listed.
With other words,
--locate-keys can be used to test what key would be used for a given identifier. Unlike
--list-keys, it only lists non-revoked and unexpired keys: all those are keys that GnuPG would consider for example when encrypting messages. Consider it as
--list-keys with key lookup semantics of
--recipient when used with
This pretty much resembles "displaying a key in a local keyring", but with some additional restrictions.