help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Time of last command invoked


From: Jean Louis
Subject: Re: Time of last command invoked
Date: Sun, 28 Feb 2021 10:22:22 +0300
User-agent: Mutt/2.0 (3d08634) (2020-11-07)

* Robert Thorpe <rt@robertthorpeconsulting.com> [2021-02-28 09:18]:
> Stefan Monnier <monnier@iro.umontreal.ca> writes:
> 
> >>> Is there some internal log in Emacs that keeps the date and
> >>> time of last command invoked by a key or M-x?
> >> That would imply a huge overhead.
> >
> > Not really, no.
> > We already keep a log of the keys and commands (as used for `C-h l`),
> > so it's a small matter of adding timestamps in there.
> >
> > But given the way this is currently implemented, it would have to be
> > done in the C code, I think.
> 
> I think this depends on what Jean Louis wants.  There are different
> possible interpretations.

It is very personal, just to review when did I do some of my last
works after untracked pauses of time. So even logging one key or
some common command gives me that information.

> If it means a function that's activated directly then it seems possible.
> Every key that doesn't do "self-insert-command" could be remapped to a
> different command.  That command could record the key pressed before
> handing over to the usual command.  That would be tricky though, and
> would break some Emacs features like C-h k.  It would be a lot of work
> and I don't think it would be worth it.
 
There are also those advise functions. I have not express myself
well first time as first I was thinking maybe each command like in
lossage would have somewhere its timestamp which is maybe hidden and
I could just access it and find out my times of work. It would be
possible before exit from Emacs to make a report of full work and
statistics. It is for self observation.

Working in the area with frequent power outages is difficult. Then
some information about my last work helps me find out other pieces
of information and analyze what I was doing at what time.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]