From: Robert Thorpe <rt@robertthorpeconsulting.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>, Jean Louis <bugs@gnu.support>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Time of last command invoked
Date: Sun, 28 Feb 2021 06:17:18 +0000 [thread overview]
Message-ID: <87im6cu369.fsf@robertthorpeconsulting.com> (raw)
In-Reply-To: <jwvblc58rdr.fsf-monnier+emacs@gnu.org> (message from Stefan Monnier on Sat, 27 Feb 2021 10:31:48 -0500)
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.
For just M-x it wouldn't be so difficult. That would just mean
replacing execute-extended-command with something that records the time
somewhere. The problem is that other keys.
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.
BR,
Robert Thorpe
next prev parent reply other threads:[~2021-02-28 6:17 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-26 14:20 Time of last command invoked Jean Louis
2021-02-26 21:56 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-02-27 6:21 ` Jean Louis
2021-03-02 3:07 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-03-07 9:26 ` Jean Louis
2021-03-07 9:47 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-02-27 15:31 ` Stefan Monnier
2021-02-28 6:17 ` Robert Thorpe [this message]
2021-02-28 7:22 ` Jean Louis
2021-02-28 15:25 ` Stefan Monnier
2021-03-01 6:45 ` Jean Louis
2021-03-02 3:02 ` Emanuel Berg via Users list for the GNU Emacs text editor
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=87im6cu369.fsf@robertthorpeconsulting.com \
--to=rt@robertthorpeconsulting.com \
--cc=bugs@gnu.support \
--cc=help-gnu-emacs@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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.