If I can find out which keys I used most, I may create a macro for it; if I can find out which function I used most yet not binded, I can bind it to a key. This may improve efficiency. Is there a way to get these statistics knowledge?
Asked
Active
Viewed 379 times
3 Answers
6
smex
users
If you use smex
, the smex-show-unbound-commands
command does exactly that; show the commands that you use frequently using M-x
(the suggested smex
binding) but have yet to be bound to a key binding.

Kaushal Modi
- 25,203
- 3
- 74
- 179
-
Ha, added the same answer at the same time. I'l just +1 yours and drop mine. – glucas Dec 29 '14 at 15:29
-
@glucas: good karma for good sportsmanship! – Dan Dec 29 '14 at 15:31
4
You can view the last 300 keystrokes with C-h l
calling the view-lossage
function. Inspect the displayed buffer to see what 300 keys you last hit.
If you call describe-function
then view-lossage
you will see that you can also use the open-dribble-file
function to start writing (record) all characters you type to a file.

Nsukami _
- 6,341
- 2
- 22
- 35
-
(-1) 1. 300 is **hard-coded** (in function `recent-keys`). It is not just a default value. 2. `C-h l` does **not** tell you anything about "*what keys you hit the most*". It tells you only what the last 300 keys you used were. – Drew Dec 29 '14 at 16:52
-
-
-
http://stackoverflow.com/questions/9761401/for-emacs-how-to-store-what-view-lossage-collects-into-an-external-file may also be of interest. – phils Dec 31 '14 at 08:04