chars aren't strings and alist-get is cleaner than (cdr (assoc))

master
Brady McDonough 3 years ago
parent fa2c6c899b
commit e5207ef018

@ -50,13 +50,10 @@
;;; -*- lexical-binding: t -*-
;; TODOS:
;; ERROR: Attempting to draw the buffer spams *Messages* with "invalid face reference/attribute" errors
;; This appears to not be caused by my code? The invalid reference is to 't and quote and the invalid
;; attribute is :inherit 'warning.
;; Eliminating the reference to the 'warning face in my code does not eliminate the error, and
;; customize-faces properly displays tacc-graph-break as inheriting the 'warning face
;; ERROR: mapconcat doesn't seem to respect lexical binding which leaves me unable to use a closure for a ticker
;; For now the code which relies on this will be noop'd
;; ERROR: tacc-tick is returning a (wrong-number-of-arguments) error.
;; ERROR: timer displays current time just fine, countdown is inverted, tag doesn't print
;; Optional
(require 'icicles nil t)
@ -360,7 +357,7 @@ Note, if there is no tacc-buffer then you shouldn't be touching tacc-info"
(start-ts (tacc-start-ts state work-ts break-ts))
(est (tacc-est-ts state cycle work-ts break-ts))
(countdown (time-subtract est now)))
(tacc-timer-buffer-update state now )
(tacc-timer-buffer-update state now ) ;; HERE
(if tacc-play-sound-file
(cond ((tacc-chime-p countdown)
(funcall tacc-play-sound-file tacc-sound-chime))
@ -391,7 +388,7 @@ Note, if there is no tacc-buffer then you shouldn't be touching tacc-info"
(cdr break-ts)
(cdr end-ts)))
(state . work)
(tag . ,(cdr tag)))
(tag . ,tag))
(cdr stack)))
(if break-ts
(push `((ts . ,(cdr break-ts))
@ -500,10 +497,10 @@ Note, if there is no tacc-buffer then you shouldn't be touching tacc-info"
(defun tacc-clock-glyph (state)
"Returns the correct play or pause glyph for each state"
(cond ((eq state 'work) tacc-run-glyph)
((eq state 'break) tacc-run-glyph)
((eq state 'pause) tacc-pause-glyph)
((eq state 'stop) tacc-pause-glyph)))
(string (cond ((eq state 'work) tacc-run-glyph)
((eq state 'break) tacc-run-glyph)
((eq state 'pause) tacc-pause-glyph)
((eq state 'stop) tacc-pause-glyph))))
(defun tacc-clock-render (state start est now)
"Draw the clock"

Loading…
Cancel
Save