unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Colin Baxter <m43cap@yandex.com>
Cc: 50216@debbugs.gnu.org
Subject: bug#50216: 27.2; timeclock gives incorrect time in mode-line
Date: Fri, 27 Aug 2021 03:13:32 +0200	[thread overview]
Message-ID: <8735qvu1tv.fsf@gnus.org> (raw)
In-Reply-To: <877dg7u2ee.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 27 Aug 2021 03:01:13 +0200")

Lars Ingebrigtsen <larsi@gnus.org> writes:

> I haven't really started debugging in, but the issue seems to be
> `timeclock-find-discrep' using some data that was computed before
> timeclock-workday was set...

Yup, that was it -- I made it flush the data on workday changes, and now
it displays correctly for me in the timelog test case -- that is, when
doing timelog-in, it'll use the current timelog-workday setting and
compute stuff correctly.

Note, however, that initial display when doing

(timeclock-mode-line-display 1)
(setq timeclock-workday (* 12 60 60))

will be incorrect -- because setting a variable like this won't trigger
mode-line updates.  (Until a minute has passed and it updates the line.)
So I've noted in the timeclock-mode-line-display doc string that this
shouldn't be done.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2021-08-27  1:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-26 19:11 bug#50216: 27.2; timeclock gives incorrect time in mode-line Colin Baxter
2021-08-27  1:01 ` Lars Ingebrigtsen
2021-08-27  1:13   ` Lars Ingebrigtsen [this message]
2021-08-27  6:53     ` Colin Baxter

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8735qvu1tv.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=50216@debbugs.gnu.org \
    --cc=m43cap@yandex.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).