all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Log all my issued commands and keyboard operations.
@ 2023-05-20 14:02 Hongyi Zhao
  2023-05-20 14:16 ` Daniel Fleischer
  0 siblings, 1 reply; 14+ messages in thread
From: Hongyi Zhao @ 2023-05-20 14:02 UTC (permalink / raw)
  To: help-gnu-emacs

Hi here,

I'm not sure whether there is a convenient way for me to log all my
issued commands and keyboard operations in Emacs. Any tips will be
appreciated.

Regards,
Zhao
-- 
Assoc. Prof. Hongsheng Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Vocational University of Technology and Engineering
No. 473, Quannan West Street, Xindu District, Xingtai, Hebei province



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

* Re: Log all my issued commands and keyboard operations.
  2023-05-20 14:02 Log all my issued commands and keyboard operations Hongyi Zhao
@ 2023-05-20 14:16 ` Daniel Fleischer
  2023-05-20 22:53   ` Hongyi Zhao
  0 siblings, 1 reply; 14+ messages in thread
From: Daniel Fleischer @ 2023-05-20 14:16 UTC (permalink / raw)
  To: help-gnu-emacs

Hongyi Zhao [2023-05-20 Sat 22:02] wrote:

> I'm not sure whether there is a convenient way for me to log all my
> issued commands and keyboard operations in Emacs. Any tips will be
> appreciated.

Command `view-lossage'. 

-- 
Daniel Fleischer




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

* Re: Log all my issued commands and keyboard operations.
  2023-05-20 14:16 ` Daniel Fleischer
@ 2023-05-20 22:53   ` Hongyi Zhao
  2023-05-20 23:40     ` Michael Heerdegen
  2023-05-21  7:14     ` Daniel Fleischer
  0 siblings, 2 replies; 14+ messages in thread
From: Hongyi Zhao @ 2023-05-20 22:53 UTC (permalink / raw)
  To: Daniel Fleischer; +Cc: help-gnu-emacs

On Sat, May 20, 2023 at 10:16 PM Daniel Fleischer <danflscr@gmail.com> wrote:
>
> Hongyi Zhao [2023-05-20 Sat 22:02] wrote:
>
> > I'm not sure whether there is a convenient way for me to log all my
> > issued commands and keyboard operations in Emacs. Any tips will be
> > appreciated.
>
> Command `view-lossage'.

After I issue `M-x describe-char RET`, `M-x view-lossage RET' doesn't show it.

>
> --
> Daniel Fleischer

Best Regards,
Zhao



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

* Re: Log all my issued commands and keyboard operations.
  2023-05-20 22:53   ` Hongyi Zhao
@ 2023-05-20 23:40     ` Michael Heerdegen
  2023-05-20 23:55       ` Hongyi Zhao
  2023-05-21  7:14     ` Daniel Fleischer
  1 sibling, 1 reply; 14+ messages in thread
From: Michael Heerdegen @ 2023-05-20 23:40 UTC (permalink / raw)
  To: help-gnu-emacs

Hongyi Zhao <hongyi.zhao@gmail.com> writes:

> > Command `view-lossage'.
>
> After I issue `M-x describe-char RET`, `M-x view-lossage RET' doesn't
> show it.

What's "it" in this case?

M.




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

* Re: Log all my issued commands and keyboard operations.
  2023-05-20 23:40     ` Michael Heerdegen
@ 2023-05-20 23:55       ` Hongyi Zhao
  2023-05-21  0:06         ` Michael Heerdegen
  0 siblings, 1 reply; 14+ messages in thread
From: Hongyi Zhao @ 2023-05-20 23:55 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: help-gnu-emacs

On Sun, May 21, 2023 at 7:41 AM Michael Heerdegen
<michael_heerdegen@web.de> wrote:
>
> Hongyi Zhao <hongyi.zhao@gmail.com> writes:
>
> > > Command `view-lossage'.
> >
> > After I issue `M-x describe-char RET`, `M-x view-lossage RET' doesn't
> > show it.
>
> What's "it" in this case?

`M-x describe-char`

>
> M.

Zhao



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

* Re: Log all my issued commands and keyboard operations.
  2023-05-20 23:55       ` Hongyi Zhao
@ 2023-05-21  0:06         ` Michael Heerdegen
  2023-05-21  0:11           ` Hongyi Zhao
  0 siblings, 1 reply; 14+ messages in thread
From: Michael Heerdegen @ 2023-05-21  0:06 UTC (permalink / raw)
  To: help-gnu-emacs

Hongyi Zhao <hongyi.zhao@gmail.com> writes:

> `M-x describe-char`

So this is not what you want:

 M-x	  ;; execute-extended-command
 d	  ;; self-insert-command
 e	  ;; self-insert-command
 s	  ;; self-insert-command
 c	  ;; self-insert-command
 r	  ;; self-insert-command
 i	  ;; self-insert-command
 b	  ;; self-insert-command
 e	  ;; self-insert-command
 -	  ;; self-insert-command
 c	  ;; self-insert-command
 h	  ;; self-insert-command
 a	  ;; self-insert-command
 r	  ;; self-insert-command
 <return> ;; minibuffer-complete-and-exit

you want an extra line for the command instead?  Or something else?  Or
do you see something different in the lossage?

Michael.




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

* Re: Log all my issued commands and keyboard operations.
  2023-05-21  0:06         ` Michael Heerdegen
@ 2023-05-21  0:11           ` Hongyi Zhao
  2023-05-21  0:37             ` Michael Heerdegen
  0 siblings, 1 reply; 14+ messages in thread
From: Hongyi Zhao @ 2023-05-21  0:11 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: help-gnu-emacs

On Sun, May 21, 2023 at 8:07 AM Michael Heerdegen
<michael_heerdegen@web.de> wrote:
>
> Hongyi Zhao <hongyi.zhao@gmail.com> writes:
>
> > `M-x describe-char`
>
> So this is not what you want:
>
>  M-x      ;; execute-extended-command

I want to see something as follows:

M-x describe-char  ;; execute-extended-command

>  d        ;; self-insert-command
>  e        ;; self-insert-command
>  s        ;; self-insert-command
>  c        ;; self-insert-command
>  r        ;; self-insert-command
>  i        ;; self-insert-command
>  b        ;; self-insert-command
>  e        ;; self-insert-command
>  -        ;; self-insert-command
>  c        ;; self-insert-command
>  h        ;; self-insert-command
>  a        ;; self-insert-command
>  r        ;; self-insert-command
>  <return> ;; minibuffer-complete-and-exit
>
> you want an extra line for the command instead?  Or something else?  Or
> do you see something different in the lossage?
>
> Michael.

Zhao



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

* Re: Log all my issued commands and keyboard operations.
  2023-05-21  0:11           ` Hongyi Zhao
@ 2023-05-21  0:37             ` Michael Heerdegen
  2023-05-21  0:56               ` Hongyi Zhao
  2023-05-21  2:16               ` [External] : " Drew Adams
  0 siblings, 2 replies; 14+ messages in thread
From: Michael Heerdegen @ 2023-05-21  0:37 UTC (permalink / raw)
  To: help-gnu-emacs

Hongyi Zhao <hongyi.zhao@gmail.com> writes:

> I want to see something as follows:
>
> M-x describe-char  ;; execute-extended-command

Not in vanilla Emacs, but there are packages which graphically prepare
the output similar to that - with slightly different features -
e.g. "command-log-mode" or "interaction-log".

Michael.




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

* Re: Log all my issued commands and keyboard operations.
  2023-05-21  0:37             ` Michael Heerdegen
@ 2023-05-21  0:56               ` Hongyi Zhao
  2023-05-21  2:16               ` [External] : " Drew Adams
  1 sibling, 0 replies; 14+ messages in thread
From: Hongyi Zhao @ 2023-05-21  0:56 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: help-gnu-emacs

On Sun, May 21, 2023 at 8:37 AM Michael Heerdegen
<michael_heerdegen@web.de> wrote:
>
> Hongyi Zhao <hongyi.zhao@gmail.com> writes:
>
> > I want to see something as follows:
> >
> > M-x describe-char  ;; execute-extended-command
>
> Not in vanilla Emacs, but there are packages which graphically prepare
> the output similar to that - with slightly different features -
> e.g. "command-log-mode" or "interaction-log".

Thank you for your comments. I've installed all the following related packages:

(use-package keycast
  :config
  (keycast-header-line-mode)
  )

(use-package interaction-log
  :config
  (interaction-log-mode)
  :bind
  ("C-h C-l" .  (lambda () (interactive) (display-buffer ilog-buffer-name)))
  )

(use-package command-log-mode
  :config
  (global-command-log-mode)
  )

(use-package keyfreq
  :config
  ;; How to exclude commands?
  (setq keyfreq-excluded-commands
    '(self-insert-command
          forward-char
          backward-char
          previous-line
          next-line))

  (keyfreq-mode)
  (keyfreq-autosave-mode)
  )

> Michael.

Zhao



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

* RE: [External] : Re: Log all my issued commands and keyboard operations.
  2023-05-21  0:37             ` Michael Heerdegen
  2023-05-21  0:56               ` Hongyi Zhao
@ 2023-05-21  2:16               ` Drew Adams
  2023-05-21  2:23                 ` Jude DaShiell
  1 sibling, 1 reply; 14+ messages in thread
From: Drew Adams @ 2023-05-21  2:16 UTC (permalink / raw)
  To: Michael Heerdegen, help-gnu-emacs@gnu.org

> > I want to see something as follows:
> >
> > M-x describe-char  ;; execute-extended-command
> 
> Not in vanilla Emacs, but there are packages which graphically prepare
> the output similar to that - with slightly different features -
> e.g. "command-log-mode" or "interaction-log".

`showkey-log-mode' does it.

https://www.emacswiki.org/emacs/ShowKey

https://www.emacswiki.org/emacs/download/showkey.el
___

 showkey-log-mode is an interactive Lisp function in 'showkey.el'.

 (showkey-log-mode &optional ARG)

 Global minor mode that logs the keys you use.
 See options `showkey-log-erase-keys', `showkey-log-ignored-events',
 and `showkey-log-frame-alist' for customization.

 Note that keys such as `C-g' that quit, and keys that raise an error,
 are not logged.

See also minor mode `showkey-tooltip-mode'.




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

* RE: [External] : Re: Log all my issued commands and keyboard operations.
  2023-05-21  2:16               ` [External] : " Drew Adams
@ 2023-05-21  2:23                 ` Jude DaShiell
  2023-05-25  7:47                   ` Gregor Zattler
  0 siblings, 1 reply; 14+ messages in thread
From: Jude DaShiell @ 2023-05-21  2:23 UTC (permalink / raw)
  To: Drew Adams, Michael Heerdegen, help-gnu-emacs@gnu.org

Not exactly what the O-P wanted however:
emacs file.txt 2>&1|tee -a emacs.log
might help a little.  It's external to emacs.


-- 
Jude <jdashiel at panix dot com>
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo.
Please use in that order."
Ed Howdershelt 1940.

On Sun, 21 May 2023, Drew Adams wrote:

> > > I want to see something as follows:
> > >
> > > M-x describe-char  ;; execute-extended-command
> >
> > Not in vanilla Emacs, but there are packages which graphically prepare
> > the output similar to that - with slightly different features -
> > e.g. "command-log-mode" or "interaction-log".
>
> `showkey-log-mode' does it.
>
> https://www.emacswiki.org/emacs/ShowKey
>
> https://www.emacswiki.org/emacs/download/showkey.el
> ___
>
>  showkey-log-mode is an interactive Lisp function in 'showkey.el'.
>
>  (showkey-log-mode &optional ARG)
>
>  Global minor mode that logs the keys you use.
>  See options `showkey-log-erase-keys', `showkey-log-ignored-events',
>  and `showkey-log-frame-alist' for customization.
>
>  Note that keys such as `C-g' that quit, and keys that raise an error,
>  are not logged.
>
> See also minor mode `showkey-tooltip-mode'.
>
>
>



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

* Re: Log all my issued commands and keyboard operations.
  2023-05-20 22:53   ` Hongyi Zhao
  2023-05-20 23:40     ` Michael Heerdegen
@ 2023-05-21  7:14     ` Daniel Fleischer
  2023-05-21 18:24       ` [External] : " Drew Adams
  1 sibling, 1 reply; 14+ messages in thread
From: Daniel Fleischer @ 2023-05-21  7:14 UTC (permalink / raw)
  To: help-gnu-emacs

Hongyi Zhao [2023-05-21 Sun 06:53] wrote:

> After I issue `M-x describe-char RET`, `M-x view-lossage RET' doesn't
> show it.

Try to examine the `command-history' variable; it's a list of all the
commands you ran. 

-- 
Daniel Fleischer




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

* RE: [External] : Re: Log all my issued commands and keyboard operations.
  2023-05-21  7:14     ` Daniel Fleischer
@ 2023-05-21 18:24       ` Drew Adams
  0 siblings, 0 replies; 14+ messages in thread
From: Drew Adams @ 2023-05-21 18:24 UTC (permalink / raw)
  To: Daniel Fleischer, help-gnu-emacs@gnu.org

> Try to examine the `command-history' variable;
> it's a list of all the commands you ran.

No, it's not, at all.  It's a minibuffer history
variable.
______

`C-h v' tells you:

command-history is a variable defined in ‘C source code’.

Its value is
((describe-variable 'command-history)
 (kill-buffer "test-foo"))

List of recent commands that read arguments from terminal.
Each command is represented as a form to evaluate.

Maximum length of the history list is determined by the value
of ‘history-length’, which see.
______

And (emacs) `Repetition' tells you:

The list of previous minibuffer-using commands is stored as a Lisp
list in the variable ‘command-history’.  Each element is a Lisp
expression that describes one command and its arguments.  Lisp programs
can re-execute a command by calling ‘eval’ with the ‘command-history’
element.
______

And (elisp) `Command History' tells you:

This variable’s value is a list of recent complex commands, each
     represented as a form to evaluate.  It continues to accumulate all
     complex commands for the duration of the editing session, but when
     it reaches the maximum size (*note Minibuffer History::), the
     oldest elements are deleted as new ones are added.

          command-history
          ⇒ ((switch-to-buffer "chistory.texi")
              (describe-key "^X^[")
              (visit-tags-table "~/emacs/src/")
              (find-tag "repeat-complex-command"))

   This history list is actually a special case of minibuffer history
(*note Minibuffer History::), with one special twist: the elements are
expressions rather than strings.

   There are a number of commands devoted to the editing and recall of
previous commands.  The commands ‘repeat-complex-command’, and
‘list-command-history’ are described in the user manual (*note
(emacs)Repetition::).  Within the minibuffer, the usual minibuffer
history commands are available.



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

* RE: [External] : Re: Log all my issued commands and keyboard operations.
  2023-05-21  2:23                 ` Jude DaShiell
@ 2023-05-25  7:47                   ` Gregor Zattler
  0 siblings, 0 replies; 14+ messages in thread
From: Gregor Zattler @ 2023-05-25  7:47 UTC (permalink / raw)
  To: Jude DaShiell, help-gnu-emacs@gnu.org

Hi Jude,
* Jude DaShiell <jdashiel@panix.com> [2023-05-20; 22:23 -04]:
> Not exactly what the O-P wanted however:
> emacs file.txt 2>&1|tee -a emacs.log
> might help a little.  It's external to emacs.

Did not work for me.  I did

emacs -nw -Q file.txt 2>&1|tee -a emacs.log

typed a bit of nonsense, activated a mark, jumped to
bob, killed everything, saved the empty file.txt, quit
emacs and emacs.log was empty.

Ciao; Gregor



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

end of thread, other threads:[~2023-05-25  7:47 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-20 14:02 Log all my issued commands and keyboard operations Hongyi Zhao
2023-05-20 14:16 ` Daniel Fleischer
2023-05-20 22:53   ` Hongyi Zhao
2023-05-20 23:40     ` Michael Heerdegen
2023-05-20 23:55       ` Hongyi Zhao
2023-05-21  0:06         ` Michael Heerdegen
2023-05-21  0:11           ` Hongyi Zhao
2023-05-21  0:37             ` Michael Heerdegen
2023-05-21  0:56               ` Hongyi Zhao
2023-05-21  2:16               ` [External] : " Drew Adams
2023-05-21  2:23                 ` Jude DaShiell
2023-05-25  7:47                   ` Gregor Zattler
2023-05-21  7:14     ` Daniel Fleischer
2023-05-21 18:24       ` [External] : " Drew Adams

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.