Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

displaying recent keystrokes in emacs

Tags:

emacs

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.

like image 824
gknauth Avatar asked Feb 12 '13 13:02

gknauth


2 Answers

Type C-hl, which invokes view-lossage.

like image 99
choroba Avatar answered Oct 19 '22 08:10

choroba


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.

like image 7
Anton Kovalenko Avatar answered Oct 19 '22 08:10

Anton Kovalenko