How to view history of various commands in Emacs

試著忘記壹切 提交于 2019-12-04 16:20:16

问题


Commands entered after pressing M-x can be viewed using the up/down arrow keys.

How can I get a list of all the commands including menu bar invocation, commands triggered using mouse clicks, etc. in Emacs?


回答1:


I've used mwe-log-commands to make screencasts. It shows events and the commands they trigger as you work in Emacs.


command-log-mode

I've just forked it and made it into a proper minor-mode and global-minor-mode along with some other improvements as command-log-mode.

Give it a shot and file issues against me if the documentation is unclear or if you find any bugs.




回答2:


For a complete list of history, type C-h l (lowercase "L").

Note: this list is complete in the sense that it keeps all events and commands that happened recently, but it's not complete in the sense that it only keeps track of the last 300 or so events (and corresponding commands).




回答3:


So you want the history of of all commands, regardless of where they are executed? I don't know if emacs provides this by default, but you can add your own function to post-command-hook which is executed after every command, so you can use it to collect all the executed commands.



来源:https://stackoverflow.com/questions/9602640/how-to-view-history-of-various-commands-in-emacs

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!