From: Colin Baxter <m43cap@yandex.com>
To: 50216@debbugs.gnu.org
Subject: bug#50216: 27.2; timeclock gives incorrect time in mode-line
Date: Thu, 26 Aug 2021 20:11:40 +0100 [thread overview]
Message-ID: <874kbcvx5f.fsf@yandex.com> (raw)
Using emacs-28.0.50:
A. First Process
1. No timeclock log file
2. emacs -Q
3. In Scratch buffer, evaluate
(display-time)
(timeclock-mode-line-display 1)
(setq timeclock-workday (* 12 60 60))
4. mode-line reads [0:00]
5. M-x timeclock-in <RET>
6. mode-line reads [11:59]
7. Wait a minute or two.
8. M-x timeclock-out <RET>
9. mode-line reads [11:58]
10. Wrote /home/redknight/.emacs.d/timelog
11. Close emacs.
Emacs correctly counts down the set workday of 12:00 hours.
B. Repeat the process.
1. timeclock log file present
2. emacs -Q
3. In Scratch buffer, evaluate
(display-time)
(timeclock-mode-line-display 1)
(setq timeclock-workday (* 12 60 60))
4. mode-line reads [7:58]
5. Mx timeclock-in <RET>
6. mode-line reads <7:57>
7. Wrote /home/redknight/.emacs.d/timelog
8. Wait a minute or two.
9. M-x timeclock-out <RET>
10. mode-line reads [7:55]
11. Wrote /home/redknight/.emacs.d/timelog
12. Close emacs
Emacs incorrectly counts down workday, starting form the default value of 8 hours even though it was set to 12 hours.
C. Repeat process but change order of lisp
1. timeclock log file present
2. emacs -Q
3. In Scratch buffer, evaluate
(display-time)
(setq timeclock-workday (* 12 60 60))
(timeclock-mode-line-display 1)
4. mode-line reads [11:55]
5. Mx timeclock-in <RET>
6. mode-line reads <11:55>
7. Wrote /home/redknight/.emacs.d/timelog
8. Wait a minute or two.
9. M-x timeclock-out <RET>
10. mode-line reads [11:54]
11. Wrote /home/redknight/.emacs.d/timelog
12. Close emacs
By setting workday before mode-line-display, Emacs gives the correct workday, counting down from the set 12 hours.
D. Repeat first process A. but omit (display-time)
1. No timeclock log file
2. emacs -Q
3. In Scratch buffer, evaluate
(timeclock-mode-line-display 1)
Message: "Activate ‘display-time-mode’ or turn off ‘timeclock-use-display-time’ to see timeclock information"
(setq timeclock-workday (* 12 60 60))
4. M-x timeclock-in <RET>
5. mode-line reads [11:59]
6. Wait a minute or two.
7. M-x timeclock-out <RET>
8. mode-line reads [11:56]
9. Wrote /home/redknight/.emacs.d/timelog
10. Close emacs.
Emacs gives the correct workday.
E. Repeat process but change the lisp order
1. No timeclock log file
2. emacs -Q
3. In Scratch buffer, evaluate
(setq timeclock-workday (* 12 60 60))
(timeclock-mode-line-display 1)
Message: "Activate ‘display-time-mode’ or turn off ‘timeclock-use-display-time’ to see timeclock information"
4. M-x timeclock-in <RET>
5. mode-line reads [11:56]
6. Wait a minute or two.
7. M-x timeclock-out <RET>
8. mode-line reads [11:54]
9. Wrote /home/redknight/.emacs.d/timelog
10. Close emacs.
Emacs again gives the correct workday even when the mode-line display occurs after the workday setting.
The issue seem to be the presence or otherwise of (display-time). If it is present then the display of the set workday of 12 hours depends on when timeclock-mode-line is activated. Only if it is activated after setting the workday does the mode-line display correctly. However, if (display-time) is not used then the user gets an "Activate" message.
In GNU Emacs 27.2 (build 1, i686-pc-linux-gnu, X toolkit, cairo version 1.14.8, Xaw3d scroll bars)
of 2021-03-28 built on bluestar
Windowing system distributor 'The X.Org Foundation', version 11.0.11902000
System Description: Debian GNU/Linux 9 (stretch)
next reply other threads:[~2021-08-26 19:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-26 19:11 Colin Baxter [this message]
2021-08-27 1:01 ` bug#50216: 27.2; timeclock gives incorrect time in mode-line Lars Ingebrigtsen
2021-08-27 1:13 ` Lars Ingebrigtsen
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=874kbcvx5f.fsf@yandex.com \
--to=m43cap@yandex.com \
--cc=50216@debbugs.gnu.org \
/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).