Solved! helm-descbinds solved the problem.
Thank you for your help.
I was trying to work out if I could build a simple script to narrow down key bindings, somewhat similar to IDO. I know of Icicle, but for some reason I didn't like it.
During my search I ran into many problems and beging to think that the only way out is to run:
and then try to parse Help buffer.
Is there a way to get pre-parsed flat list of biding? I got lost trying to understand the keymap structure.
I guess recursively parsing the keymap structure is too much work. Is there a simple solution?
This is example of my early progress.
After a while of trying, looks like getting the info from Help buffer didnt work. I got some strange structures with the string and when I tried to use print, it didn't print what I wanted. Perhaps I will have to parse the keymap?
After playing with keymap for a while, I think this is the way to go. More in my github link.
My last attempt.
;;; run in ielm like this: (my-list-bindings 11) ;;; n=11 for global (defun my-list-bindings (n) "almost clean way of listing key bindings" (map-keymap (lambda (x y) (print "!!!!!!!!!!!!!!!!!!!!!") (princ x) (if (eq x 'menu-bar) (print "*** skipping menu bar ***") (print y))) (elt (current-active-maps) n )))