Write all options to a file or buffer?

If I run :set all in gvim, I get a list of all the options, but then I can't copy and paste them or search them; I'd like to put them in a buffer or a log file somewhere. I tried the following, but...

Vi and Vim Stack Exchange