From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: esabof@gmail.com Newsgroups: gmane.emacs.help Subject: Re: command-history for commands bound to keys. Date: Sun, 2 Feb 2014 07:46:28 -0800 (PST) Message-ID: <11e461d4-338b-40ee-a4bd-2f581fdc59c4@googlegroups.com> References: <128ffbcb-7d55-479c-b70c-2ea378e9c04d@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1391356209 12523 80.91.229.3 (2 Feb 2014 15:50:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 2 Feb 2014 15:50:09 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Feb 02 16:50:18 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W9zJJ-0008Lc-Ky for geh-help-gnu-emacs@m.gmane.org; Sun, 02 Feb 2014 16:50:17 +0100 Original-Received: from localhost ([::1]:41688 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9zJJ-0006TZ-59 for geh-help-gnu-emacs@m.gmane.org; Sun, 02 Feb 2014 10:50:17 -0500 X-Received: by 10.66.166.199 with SMTP id zi7mr13265041pab.30.1391355988805; Sun, 02 Feb 2014 07:46:28 -0800 (PST) X-Received: by 10.140.48.200 with SMTP id o66mr2333qga.15.1391355988745; Sun, 02 Feb 2014 07:46:28 -0800 (PST) Original-Path: usenet.stanford.edu!uq10no8406774igb.0!news-out.google.com!y18ni189qap.1!nntp.google.com!k15no11618372qaq.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2.125.179.120; posting-account=hvyt3AoAAAAdOSTOoji20fUtIaG9BH0F Original-NNTP-Posting-Host: 2.125.179.120 User-Agent: G2/1.0 Injection-Date: Sun, 02 Feb 2014 15:46:28 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:203615 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:95884 Archived-At: > > http://www.emacswiki.org/emacs/CommandLogMode > > or > > http://www.emacswiki.org/emacs/InteractionLogMode > And also: (defvar es-full-command-history (make-ring 100)) (defun es-full-command-history-register () (unless (or (memq this-command '(self-insert-command handle-select-window)) (and (symbolp this-command) (get this-command 'scroll-command))) (ring-insert es-full-command-history (cons (key-description (this-command-keys)) this-command)))) (defun es-full-command-history (&rest ignore) (interactive) (with-current-buffer (get-buffer-create "*all-commands-history*") (let ((inhibit-read-only t)) (erase-buffer) (cl-dolist (elem (ring-elements es-full-command-history)) (pp elem (current-buffer))) (goto-char (point-min)) (switch-to-buffer (current-buffer)) (special-mode) (setq-local revert-buffer-function 'es-full-command-history)))) (add-hook 'post-command-hook 'es-full-command-history-register) Evgeni