all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* command-history for commands bound to keys.
@ 2014-01-31 16:30 esabof
  2014-01-31 16:50 ` Bastien
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: esabof @ 2014-01-31 16:30 UTC (permalink / raw)
  To: help-gnu-emacs

Are commands evoked from key-bindings registered in some way?

Evgeni


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: command-history for commands bound to keys.
  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
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Bastien @ 2014-01-31 16:50 UTC (permalink / raw)
  To: esabof; +Cc: help-gnu-emacs

esabof@gmail.com writes:

> Are commands evoked from key-bindings registered in some way?

C-h v command-history RET

But AFAIK there is no special treatment for when a command is
called through a keybinding.

-- 
 Bastien



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: command-history for commands bound to keys.
  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>
  3 siblings, 2 replies; 7+ messages in thread
From: esabof @ 2014-01-31 17:47 UTC (permalink / raw)
  To: help-gnu-emacs

There is a chance that you'll see 2 more similar replies later. Or if you prefer,  earlier.

Pressing C-o doesn't register (open-line) in command-history. Unless you are using the trunk version, and this has been changed.

Evgeni


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: command-history for commands bound to keys.
  2014-01-31 17:47 ` esabof
@ 2014-01-31 21:08   ` Emanuel Berg
  2014-01-31 21:14   ` Emanuel Berg
  1 sibling, 0 replies; 7+ messages in thread
From: Emanuel Berg @ 2014-01-31 21:08 UTC (permalink / raw)
  To: help-gnu-emacs

esabof@gmail.com writes:

> Pressing C-o doesn't register (open-line) in
> command-history. Unless you are using the trunk
> version, and this has been changed.

According to the help, (list-command-history) deals
with "commands typed to minibuffer". So try:

;; hit:
;; M-x open-line RET

(list-command-history)

-- 
underground experts united:
http://user.it.uu.se/~embe8573


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: command-history for commands bound to keys.
  2014-01-31 17:47 ` esabof
  2014-01-31 21:08   ` Emanuel Berg
@ 2014-01-31 21:14   ` Emanuel Berg
  1 sibling, 0 replies; 7+ messages in thread
From: Emanuel Berg @ 2014-01-31 21:14 UTC (permalink / raw)
  To: help-gnu-emacs

esabof@gmail.com writes:

> Pressing C-o doesn't register (open-line) in
> command-history. Unless you are using the trunk
> version, and this has been changed.

Aha, that was the thing you wanted! Then my previous
post is not much help.

You know about `C-h l', of course. Poor man's solution,
no doubt, but otherwise I don't know.

-- 
underground experts united:
http://user.it.uu.se/~embe8573


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: command-history for commands bound to keys.
  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-02-01 19:04 ` Michael Heerdegen
       [not found] ` <mailman.13479.1391281498.10748.help-gnu-emacs@gnu.org>
  3 siblings, 0 replies; 7+ messages in thread
From: Michael Heerdegen @ 2014-02-01 19:04 UTC (permalink / raw)
  To: help-gnu-emacs

esabof@gmail.com writes:

> Are commands evoked from key-bindings registered in some way?

Directly after invocation: see the variables `this-command',
`last-command'.

If you want a history, no, not in vanilla Emacs.  But there are add-on
packages available that log all hit keys and commands,
e.g.

  http://www.emacswiki.org/emacs/CommandLogMode

or

  http://www.emacswiki.org/emacs/InteractionLogMode


HTH,

Michael.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: command-history for commands bound to keys.
       [not found] ` <mailman.13479.1391281498.10748.help-gnu-emacs@gnu.org>
@ 2014-02-02 15:46   ` esabof
  0 siblings, 0 replies; 7+ messages in thread
From: esabof @ 2014-02-02 15:46 UTC (permalink / raw)
  To: help-gnu-emacs

> 
>   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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-02-02 15:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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

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.