How do I recover the most recent keystrokes I just typed in Emacs? I'm a long-time Emacs user (30 years), but every so often I mistype a key sequence, something strange happens, and I want to know what sequence of chars I typed, compared with what I thought I typed. I know there's a command that shows a couple dozen of the most recent chars I typed, but I can't remember what it is, and I can't seem to find it either. For example, sometimes in dired-mode
, I move the cursor to a file, and I type !
to run a command on that file, but I type some other sequence by mistake, and suddenly I see I've selected all files in the dired
buffer—all files are marked with *
. I'm trying to debug my typing in this situation.
Type C-hl, which invokes view-lossage
.
Use M-x view-lossage
RET.
view-lossage is an interactive compiled Lisp function in `help.el'. It is bound to C-h l, <f1> l, <help> l.
(view-lossage)
Display last 300 input keystrokes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With