From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: Time of last command invoked Date: Sun, 28 Feb 2021 10:25:23 -0500 Message-ID: References: <87im6cu369.fsf@robertthorpeconsulting.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10064"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: Robert Thorpe Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 28 18:54:49 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lGQHJ-0002Ug-4K for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 28 Feb 2021 18:54:49 +0100 Original-Received: from localhost ([::1]:44414 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lGQHI-0005g4-5f for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 28 Feb 2021 12:54:48 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37536) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lGQEA-0002pl-LE for help-gnu-emacs@gnu.org; Sun, 28 Feb 2021 12:51:34 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:34448) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lGQE8-00038G-6e for help-gnu-emacs@gnu.org; Sun, 28 Feb 2021 12:51:33 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 4F084440653; Sun, 28 Feb 2021 10:25:25 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 0E2F744020C; Sun, 28 Feb 2021 10:25:24 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1614525924; bh=vQibzU9HHMh5F1HrZuuW/zwWOxGZri6kAE7D8+sdV3g=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=h/W4U1wZRVFLqHWYkMDlxiCIbXGS+pmCj82sLyLAvvzrIZvasC1aStdUsC12JYcnH FINLSrR8w+q4Hkx6LmZR9SC4ceBg5etsPGa2aX8zjq6iygIxSIHntrdPAI/NRYvkSI QBj+OaCyrWxtfc86/qYwTPTzIxP3b8/MWnYcpe6nI8lwc0q5MfNAdB//ruuOwG/ISz 6JiT5lnFETlW/Cx8sZ456KFZmZSslSUKWPzQX96DtAS0aKYu3+NM65kar6WiMo0AVt BbQlqqwaBEOQLgRhSB/AvC0agxMZ+qFJnCXKonkICSdkbv6w+MEwrcguDLP/hNLyWJ e1cLRB9ZdLAKw== Original-Received: from alfajor (unknown [216.154.41.47]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 1A25612033B; Sun, 28 Feb 2021 10:25:24 -0500 (EST) In-Reply-To: (Jean Louis's message of "Sun, 28 Feb 2021 10:22:22 +0300") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:128315 Archived-At: > 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. BTW, it's not hard to do what you want: Use a `post-command-hook` or `pre-command-hook` where you record the current time the `this-command` and/or the `(this-command-keys)`. Stefan