* Printing current time using characters
@ 2022-12-04 3:11 Heime
0 siblings, 0 replies; only message in thread
From: Heime @ 2022-12-04 3:11 UTC (permalink / raw)
To: Heime via Users list for the GNU Emacs text editor
I would like to get the time, then insert the equivalent using characters.
Suppose the time is 14:42:17, I want to have the following
H_H_ ; Hours (12 hours)
M_M_M_M_M_M_M_M_ ; Minutes in 5 minute steps
M_M_ ; Minutes on remainder
S_S_S_ ; Seconds in 5 second steps
S_S_ ; Seconds on remainder
I have the following three functions to print "H_", "M_" and "S_".
(defun ticker-hour ()
"TODO."
(interactive)
(insert (propertize "H"
'font-lock-face '(:background "red"
:foreground "white")))
(insert "_"))
and the same for minutes and seconds using the two corresponding functions
"ticker-minute" and "ticker-second".
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-12-04 3:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-04 3:11 Printing current time using characters Heime
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.