Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
To note, an argument of nil to switch-to-buffer switches to the previous buffer that you selected in the current frame. This is slightly different as your function seems to only consider the current window history. Is that what you intended?
It works for me when I take out the \nP at the end of the interactive string. Thanks again for this, I didn't think to just sort the buffer content itself. Though just to clarify, when would binding be a keymap?
I just meant that it would be easier to look at particular modes in the output if it was in alphabetical order. Though it seems the keybindings I search for don't return a gigantic list anyway, so it's not a big deal.
Thanks! This seems to cover a good range of bindings. My only issue is that the modes aren't sorted (which makes the ones I care about hard to see). I tried to implement that but it turns out that I don't know how to sort association lists. How would one implement that?
That command looks nice, thanks. I tried it as M-x apropos-command mode-map$ and it gave me the list of all mode maps that were loaded at one point in the current Emacs session. Though I'm not sure how to parse this in a way that I could easily search for a specific key combination.