Also, there don't appear to be any built-in functions or regexps for
dealing with "hidden" buffers, I'm assuming:
(not (string-prefix-p " " (buffer-name buffer)))
is okay?
That crossed my mind too. So I had started looking for its existing implementation, and found this in buff-menu.el inside list-buffers--refresh function:
(string= (substring name 0 1) " ")
I was wondering if that should be wrapped into a function like buffer-internal-p (based on the many docstrings like below in buff-menu.el: "By default, the Buffer Menu lists all buffers except those whose names start with a space (which are for internal use)."). Having a function like this would be better than having that logic implemented in different ways in the emacs core.
I just don't know the best place to put this function definition. Eli?