You can use do-all-symbols .
See here for a similar question. The accepted answer also contains some information about the packages. It's comfortable.
Something like this in code. Define useful-symbol-p as you like:
(let ((lst ())) (do-all-symbols (s lst) (when (useful-symbol-p s) (push s lst))) lst)
msandiford
source share