From e5207ef01887c6ca8f57da3690e49723b4b94e35 Mon Sep 17 00:00:00 2001 From: Brady McDonough Date: Thu, 2 Feb 2023 22:11:38 -0700 Subject: [PATCH] chars aren't strings and alist-get is cleaner than (cdr (assoc)) --- tacc.el | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/tacc.el b/tacc.el index 1a54e79..f228576 100644 --- a/tacc.el +++ b/tacc.el @@ -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"