From: esabof@gmail.com
To: help-gnu-emacs@gnu.org
Subject: Re: command-history for commands bound to keys.
Date: Sun, 2 Feb 2014 07:46:28 -0800 (PST) [thread overview]
Message-ID: <11e461d4-338b-40ee-a4bd-2f581fdc59c4@googlegroups.com> (raw)
In-Reply-To: <mailman.13479.1391281498.10748.help-gnu-emacs@gnu.org>
>
> 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
prev parent reply other threads:[~2014-02-02 15:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-31 16:30 command-history for commands bound to keys esabof
2014-01-31 16:50 ` Bastien
2014-01-31 17:47 ` esabof
2014-01-31 21:08 ` Emanuel Berg
2014-01-31 21:14 ` Emanuel Berg
2014-02-01 19:04 ` Michael Heerdegen
[not found] ` <mailman.13479.1391281498.10748.help-gnu-emacs@gnu.org>
2014-02-02 15:46 ` esabof [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11e461d4-338b-40ee-a4bd-2f581fdc59c4@googlegroups.com \
--to=esabof@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.