summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* chore: bump version to 0.7.0v0.7.0Craig Jennings2026-05-052-2/+2
| | | | | Header version in chime.el and the Eask manifest both move from 0.6.0 to 0.7.0 for the v0.7.0 release.
* fix: skip declined events in tooltip, modeline, and notificationsCraig Jennings2026-05-052-1/+166
| | | | | | | | | | | | | | | | | | org-gcal writes `:STATUS: declined' on calendar entries the user has declined, and chime was happily showing them in the tooltip, modeline, and notification stream — which defeats the whole point of declining a meeting. I added `chime-declined-events-predicate', mirroring the shape of `chime-done-keywords-predicate', and put it on the default `chime-predicate-blacklist'. The match is on the literal lowercase value because that's what real org-gcal exports use; uppercase or other values pass through. Users who want declined events back can pop the predicate off the blacklist. Tests cover all four STATUS values seen in real org-gcal data (accepted, declined, needs-action, tentative), plus the no-property, empty-property, todo-keyword-still-attached, gibberish-value, case-sensitivity, and default-blacklist-membership cases.
* test: tag integration suite :slow and unstick test-allCraig Jennings2026-05-054-1/+16
| | | | | | | | | | | | | | | I tagged the 15 end-to-end tests across `test-integration-chime-mode.el`, `test-integration-recurring-events-tooltip.el`, and `test-integration-startup.el` with `:tags '(:slow)`. The default `make test` now runs only the 652 fast unit tests; `make test-all` runs the full 667. While verifying, I hit a pre-existing bug in `tests/Makefile` where `test-all`'s `--eval '(ert-run-tests-batch-and-exit)'` came back from eask's argv passthrough with its quotes stripped, which broke shell parsing. Passing the explicit `t` selector dodges whatever eask does to no-arg single-quoted forms. The bug only mattered once integration tests were `:slow` — before that, `test-all` overlapped fully with `test-unit` plus `test-integration`, so nothing actually depended on it working.
* build: fail compile on byte-compile warningsCraig Jennings2026-05-051-3/+3
| | | | | | I set `byte-compile-error-on-warn` to t in the root `compile' target. The warning backlog is clear, so any new warning should break the build instead of slipping by silently.
* chore: drop non-standard keywords from chime.el headerCraig Jennings2026-05-051-1/+1
| | | | | | Eask flagged `agenda`, `chime`, and `sound` as unknown finder keywords. The Eask manifest already lists the canonical set (notification, alert, org, org-agenda, calendar), so I trimmed the in-file header to match.
* fix: remove unused `title` lexical in chime--process-notificationsCraig Jennings2026-05-051-2/+1
| | | | | | | `make compile' flagged it. The variable was bound but never referenced in the bundled-notification branch, so I dropped the `let' binding. Whether the bundled notification should actually carry that title is a separate concern, not this fix.
* fix: trim chime--find-soonest-modeline-event docstring to <=80 colsCraig Jennings2026-05-051-2/+3
| | | | | | `make compile' flagged the summary line at 86 chars. I split it across two lines, with the lookahead clause and the return-value sentence on the lines after.
* build: add eask manifest and setup/compile/coverage targetsCraig Jennings2026-05-055-91/+278
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I switched the test runner from `~/.emacs.d/elpa`-grep to eask. With this, `make setup` installs every dep into a project-local `.eask/`, so test runs don't depend on whatever's in my global elpa. It also lets us catch missing Package-Requires entries before MELPA submission. New targets: - `make setup` — runs `eask install-deps --dev` - `make compile` — byte-compiles chime.el and surfaces warnings that checkdoc and elisp-lint don't catch - `make coverage` — runs the unit suite under undercover and writes a simplecov JSON to `.coverage/simplecov.json` - `make test-all` — runs every test, including `:slow` tagged - `-include makefile-local` in both Makefiles, for per-machine knobs I added `ERT_FAST_SELECTOR` so `make test`, `test-unit`, `test-integration`, and `test-file` exclude tests tagged `:slow`. When we tag end-to-end integration tests as `:slow`, they'll stay out of the fast feedback loop until someone explicitly asks for them via `make test-all`. Eask treats CWD as its workspace. So all eask invocations now run from project root, with `(cd "tests/")' as the first `--eval' to restore Emacs's default-directory. That preserves the relative loads the existing test files and test-bootstrap.el rely on, without touching either. I updated `.gitignore` for `.eask/`, `.coverage/`, and the optional `makefile-local` files.
* refactor: rewrite chime--time-left without threading-pcaseCraig Jennings2026-05-051-7/+9
| | | | | | | | Edebug's defun parser rejects the `(-> seconds (pcase ...) ...)' form, so undercover can't instrument chime.el and `make coverage' produces nothing. The let-bound rewrite is equivalent and parses cleanly. I left an inline note so the form doesn't get folded back later.
* adding to gitignoreCraig Jennings2026-04-241-0/+1
|
* refactor: move 12 internal helpers from chime- to chime-- prefixCraig Jennings2026-04-228-157/+157
| | | | | | | | | | Before MELPA submission, tighten the public API surface. Single-dash chime-foo is the convention for user-facing commands and predicates that external code can bind. Anything that is not meant to be bound externally should use the double-dash chime--foo prefix so byte-compile warnings, docstrings, and MELPA package inspection all point in the same direction. Twelve helpers in chime.el had single-dash names but no user-facing role. They are not mentioned in README, they carry no interactive declaration, and their docstrings do not promise a behavior contract. Rename them: chime-get-minutes-into-day, chime-get-hours-minutes-from-time, chime-set-hours-minutes-for-time, chime-current-time-matches-time-of-day-string, chime-current-time-is-day-wide-time, chime-day-wide-notifications, chime-display-as-day-wide-event, chime-event-has-any-day-wide-timestamp, chime-event-within-advance-notice-window, chime-event-has-any-passed-time, chime-event-is-today, chime-environment-regex. The public API surface is now intentional. It covers chime-mode, chime-validate-configuration, chime-refresh-modeline, chime-done-keywords-predicate, and the chime-debug-* interactive commands in chime-debug.el. Breaking change. No alias shims because there are no downstream users yet.
* test: add unit tests for chime--day-label-for-event-timeCraig Jennings2026-04-221-0/+71
| | | | | | | | | | Seven pure-function tests appended to the group-events-by-day file, covering Normal and Boundary cases. Normal: event on the same calendar day as NOW returns "Today, ...". Event on the same calendar day as TOMORROW returns "Tomorrow, ...". Event three days out returns a weekday label and is neither Today nor Tomorrow. Boundary: event at 00:00 on the NOW calendar day is Today. Event at 00:00 on the TOMORROW calendar day is Tomorrow. Event two calendar days out is not Tomorrow, gets a weekday label. Event on the previous calendar day is neither Today nor Tomorrow. Since NOW and TOMORROW are function arguments, the tests use encode-time to build stable calendar values and skip the clock-mocking dance.
* refactor: extract chime--day-label-for-event-time from ↵Craig Jennings2026-04-221-29/+30
| | | | | | | | chime--group-events-by-day The date-string computation mixed the today/tomorrow/weekday label selection in with the grouping loop and carried its own pre-decoded copies of NOW and TOMORROW through five let-bindings before it could decide which branch to take. Lift the selection into chime--day-label-for-event-time (event-time now tomorrow). The outer function becomes pure grouping, the label logic gets its own test target, and future label tweaks (localized strings, a "Yesterday" branch for overdue items) edit one helper. The outer function drops from 36 to 15 lines. The redundant (when event-decoded) guard is replaced by (when event-time) because decode-time always returns a struct for valid time values.
* test: pin group-events-by-day clock and add midnight edge casesCraig Jennings2026-04-221-94/+123
| | | | | | | | | | The Normal and Boundary tests built events as fixed-minute offsets from real current-time. On late-night runs the +60 minute event in single-day crossed midnight and the test failed because events 1-2 landed "Today" while event 3 landed "Tomorrow". The intent of these Normal tests is routine grouping, not midnight behavior, so they should be deterministic. Pin the clock with with-test-time using the established let-bind pattern. with-test-time re-evaluates BASE-TIME inside the mocked current-time lambda, so passing test-time-today-at directly would recurse, because the helper itself calls current-time. Add two new Boundary tests that explicitly exercise the day-crossing logic at 23:50. One event at +5 minutes stays in Today and one at +20 minutes crosses into Tomorrow. These are the first tests in the file that actually target midnight behavior. Drop stale "REFACTORED: Uses dynamic timestamps" annotations from docstrings since the behavior is documented at the file level.
* test: add unit tests for async result helpersCraig Jennings2026-04-221-0/+147
| | | | | | | | Eight tests in a new file covering Normal and Boundary cases for both new helpers. chime--record-async-failure increments the consecutive-failure counter, sets chime-modeline-string to the standard error tooltip, triggers the threshold warning when the counter hits chime-max-consecutive-failures, and leaves chime-modeline-string alone when chime-modeline-no-events-text is nil. chime--handle-async-success resets the counter from non-zero to zero, invokes the callback with the events list, works with an empty events list, and is a no-op on the counter when it already starts at zero.
* refactor: extract async result helpers from chime--fetch-and-processCraig Jennings2026-04-221-27/+26
| | | | | | chime--fetch-and-process inlined two near-identical 7-line failure-handling blocks inside the async callback. They differed only in the log prefix ("Async error" for errors surfaced by the async process, "Error processing events" for errors thrown by the callback). Lift the shared body into chime--record-async-failure (err prefix) so the sequence lives in one place, and lift the success path into chime--handle-async-success (callback events) so the callback lambda becomes pure dispatch. The outer function drops from 44 lines to 22.
* fix: load convert-org-contacts-birthdays from load-pathCraig Jennings2026-04-211-3/+1
| | | | | | The previous form computed the file path at compile time via (file-name-directory (or load-file-name buffer-file-name)). Under emacs --batch byte-compile, both load-file-name and buffer-file-name are nil, so the inner expand-file-name call signaled "Wrong type argument: stringp, nil" and blocked validate-el.sh from accepting any edit to chime-org-contacts.el. convert-org-contacts-birthdays.el lives next to chime-org-contacts.el, so it is already on the load-path whenever chime-org-contacts is loadable. Drop the explicit path argument and let require resolve via load-path.
* test: add unit tests for chime--render-modeline-stringCraig Jennings2026-04-211-0/+52
| | | | | | | | | | Five tests covering Normal and Boundary cases. Normal: SOONEST branch applies chime-modeline-format to the event-text. Normal: no SOONEST plus UPCOMING binds mouse-1 (open calendar) and mouse-3 (jump to event). Normal: no SOONEST and no UPCOMING binds only mouse-1, and the tooltip is the no-events message. Boundary: returns nil when no SOONEST and chime-modeline-no-events-text is nil. Boundary: SOONEST branch renders regardless of whether chime-modeline-no-events-text is set. The orchestrator chime--update-modeline already exercises these paths via test-chime-update-modeline.el. These direct unit tests give the helper its own coverage.
* refactor: extract chime--render-modeline-string from chime--update-modelineCraig Jennings2026-04-211-25/+30
| | | | | | | | chime--update-modeline grew to mix orchestration with the modeline-string formation logic. Extract the formation block into its own helper so the orchestrator reads as pure orchestration: build upcoming, find soonest, render, force update. The helper handles both branches. When a soonest event is in the modeline window, format and propertize via chime--propertize-modeline-string. Otherwise, when chime-modeline-no-events-text is set, propertize that with the appropriate tooltip and click handlers (mouse-1 always, mouse-3 only when there are upcoming events to jump to). The orchestrator drops from 45 to 25 lines.
* fix(hooks): run validate-el test phase from tests/ directoryCraig Jennings2026-04-211-1/+4
| | | | | | Test files start with (require 'test-bootstrap (expand-file-name "test-bootstrap.el")). The expand-file-name call resolves against default-directory, which in batch mode is the directory the shell was in when emacs started. The hook ran emacs from the project root, so the require looked for the bootstrap at the project root and could not find it. Every Edit or Write to a test file failed the hook. The fix is to cd into PROJECT_ROOT/tests inside the subshell before launching emacs, so the bootstrap require resolves to tests/test-bootstrap.el where the file actually lives.
* docs: expand custom predicate examples in READMECraig Jennings2026-04-201-7/+22
| | | | | | | Fill out the custom-predicate-filtering section with the two motivating examples from the surrounding prose (specific-file whitelist, weekend work silencer) plus a priority-A whitelist, and tighten the defensive handling of buffer-file-name for indirect buffers.
* chore: ignore .stignore (syncthing)Craig Jennings2026-04-201-0/+1
|
* restructure: move docs/ to .ai/ + sync latest templateCraig Jennings2026-04-201-1/+1
| | | | | Per claude-templates c36fd14. Claude tooling moves to hidden .ai/; project-level docs/ reserved for real documentation.
* chore(claude): sync validate-el.sh JSON channel + pairwise rule from rulesetsCraig Jennings2026-04-192-9/+44
|
* chore: sync testing rules — pyramid, overmocking, ↵Craig Jennings2026-04-192-0/+130
| | | | refactor-for-testability, interactive/internal split
* chore: sync elisp-testing.md (testutil pattern generalized)Craig Jennings2026-04-191-3/+3
|
* chore: sync bundle — add commits.md rule, attribution suppressionCraig Jennings2026-04-192-0/+70
| | | | | | - New .claude/rules/commits.md: no AI attribution, conventional prefixes. - settings.json: attribution.commit and attribution.pr empty strings. - CLAUDE.md template refreshed to reference commits.md.
* chore: add Claude Code ruleset via ~/code/rulesets install-elispCraig Jennings2026-04-198-0/+564
| | | | | | | | | | | | | | | | | | Installs the Elisp ruleset from the rulesets repo: - CLAUDE.md (project instructions template) - .claude/rules/ (testing, verification, elisp, elisp-testing) - .claude/hooks/validate-el.sh (check-parens + byte-compile + run matching tests on every .el edit via PostToolUse) - .claude/settings.json (permission allowlist + hook wiring) - githooks/pre-commit (secret scan + staged-file paren check) core.hooksPath set to githooks/ so the pre-commit activates automatically. Hooks use \$CLAUDE_PROJECT_DIR with a script-relative fallback, so a fresh clone works without path edits. .gitignore extended with personal-override entries (settings.local.json, .cache/) and byte-compile artifacts (*.elc, *.eln).
* Improve README quick start, manual install, and filtering docsCraig Jennings2026-04-041-59/+60
| | | | | | | | Rewrote Quick Start to show minimal config (just chime-mode 1) with defaults overview and modeline interaction guide. Expanded manual install with git clone steps. Fixed TOC nav links, made tag filter examples consistent, added custom predicate motivation, removed redundant Basic Event subsection.
* Add personality and reorganize READMECraig Jennings2026-04-041-264/+135
| | | | | | | Add Douglas Adams epigraph, funny event names throughout, voice in installation and history sections. Consolidate org-contacts into new Integrations section with org-gcal guide. Trim verbose all-day events interaction examples. Add severity, sound format, and icon docs.
* Fix TOC formatting in TESTING.orgCraig Jennings2026-04-041-3/+1
|
* Add table of contents to TESTING.orgCraig Jennings2026-04-041-0/+4
|
* Rewrite TESTING.org with current test infrastructureCraig Jennings2026-04-041-176/+275
| | | | | | Replaced stale 339-test/23-file doc with current state (645 tests, 53 files). Documents test-bootstrap.el, testutil libraries, Makefile consolidation, and all convenience macros.
* Remove duplicate COPYING fileCraig Jennings2026-04-041-674/+0
| | | | | LICENSE and COPYING were identical. Keep LICENSE since README links to it and GitHub recognizes it automatically.
* Consolidate Makefiles and update TESTING.orgCraig Jennings2026-04-042-129/+73
| | | | | | Root Makefile now delegates to tests/Makefile. Fixed stale UNIT_TESTS/INTEGRATION_TESTS definitions, added test-name target, switched to per-file test execution for better isolation.
* Add tests for chime-environment-regexCraig Jennings2026-04-041-0/+62
| | | | | Verify the regex matches all default variable names, picks up additional user-configured regexes, and handles empty additional list.
* Decompose chime--debug-notification-filtering into step functionsCraig Jennings2026-04-041-71/+71
| | | | | | | | | The 120-line diagnostic function is now a 30-line coordinator calling four focused helpers: - chime--debug-filter-check-timestamp - chime--debug-filter-check-time-match - chime--debug-filter-check-interval - chime--debug-filter-check-pipeline
* Remove unused chime--today functionCraig Jennings2026-04-042-88/+0
| | | | Defined and tested but never called from any production code.
* Bundle multiple day-wide events into a single notificationCraig Jennings2026-04-042-2/+67
| | | | | | | | | | When all-day event alert times trigger, multiple events (overdue tasks, birthdays, holidays) previously fired individual notifications — one sound and one popup each. With 8-10 events this was overwhelming. Now multiple day-wide events are bundled into a single notification with all messages joined by newlines. Single events still notify normally without bundling.
* Restructure README and address review commentsCraig Jennings2026-04-043-151/+828
| | | | | | | | | | | | | | - Remove About section (merged into intro) - Rename Credits to History, fold Migration under it - Fold Manual Check and Known Limitations under Usage - Fold Full Example Configuration under Configuration - Add straight.el and quelpa install methods - Move requirements into Installation with auto-deps note - Add notification daemon check to troubleshooting - Add Development subsection with clone/lint/issues info - Add LICENSE file (GPL-3.0) - Update nav bar to match new structure - Fix startup integration test for new modeline error state
* Add horizontal nav bar and Made for GNU Emacs badge to READMECraig Jennings2026-04-042-20/+5
| | | | | Replace vertical table of contents with horizontal section links matching wttrin README style. Add Made for GNU Emacs badge.
* Show modeline icon immediately on chime-mode enableCraig Jennings2026-04-042-11/+92
| | | | | | | | | Previously chime-modeline-string was nil until the first async check completed (~10-15 seconds after startup). Now the icon appears instantly with a "waiting for first event check" tooltip. On validation or async failure, the icon stays visible and the tooltip updates to show the error state instead of going blank.
* Default modeline lighter to empty stringCraig Jennings2026-04-042-12/+10
| | | | | | The bell emoji lighter was redundant alongside the alarm clock event display in global-mode-string. One icon is enough. Users who want a separate mode indicator can set chime-modeline-lighter.
* Improve defaults: 2-hour modeline window, notify at event timeCraig Jennings2026-04-042-9/+12
| | | | | | | | | | Bump chime-modeline-lookahead-minutes from 60 to 120 so events within the next 2 hours show in the modeline. The old 60-minute default hid events most users would expect to see. Add (0 . high) to default chime-alert-intervals so users get a notification at event time in addition to 10 minutes before. The single-notification default meant a missed alert had no backup.
* Clean up README prose: remove AI-isms, fix typoCraig Jennings2026-04-041-20/+18
| | | | | | | | Remove promotional language (pleasant, extensive, comprehensive), flatten rule-of-three constructions, replace "interplay" heading, simplify tactical/strategic framing, drop redundant blacklist justification. Fix "begain" typo in credits. Trim duplicated Testing/Development pointers.
* Update README for accuracy and completenessCraig Jennings2026-04-041-41/+126
| | | | | | | | | | | | | | | | Fix stale content: - Tooltip lookahead default: 8760 hours -> 168 (1 week) - Test count: 505 -> 600+ - Emacs version: 26.1+ -> 27.1+ (matches Package-Requires) - Troubleshooting: fix stale convert-contacts-to-file reference to match current in-place conversion workflow Add missing documentation: - Custom predicate filtering with examples - chime-max-consecutive-failures, chime-validation-max-retries - chime-extra-alert-plist, chime-additional-environment-regexes - chime-refresh-modeline command - Debug mode section in Troubleshooting with all diagnostic commands
* Add comments for non-obvious code patternsCraig Jennings2026-04-041-7/+15
| | | | | | | | Clarify: dash cartesian product pipeline in chime--notifications, butlast 2 dropping USEC/PSEC from time values, Emacs time type guard, upcoming-events item structure, rx macroexpand for async env injection, backquoted lambda subprocess boundary, and org-end-of-meta-data nil argument meaning.
* Remove dead code and reduce default tooltip lookahead to 1 weekCraig Jennings2026-04-043-38/+6
| | | | | | | | | | | Remove chime--agenda-buffer-name (unused variable) and chime--extract-birthday-year (superseded by chime--parse-birthday). Reduce chime-tooltip-lookahead-hours from 8760 (1 year) to 168 (1 week). The 1-year default caused org-agenda-list to scan a 365-day span every check cycle, which is slow for large org collections. The tooltip only shows 5 events, so a week is sufficient for most users.
* Hoist loop-invariant computations and remove redundant sortCraig Jennings2026-04-041-68/+53
| | | | | | | | | Performance improvements with no behavioral change: - chime--group-events-by-day: hoist decode-time calls before loop - chime-event-has-any-passed-time: compute today-start once, not per timestamp - chime-event-is-today: same pattern - chime--build-upcoming-events-list: remove first sort (discarded by hash dedup) - chime--process-notifications: use -mapcat instead of -map + -flatten
* Nil chime--timer after cancellation in chime--stopCraig Jennings2026-04-042-0/+12
| | | | | The timer variable was left pointing at a cancelled timer object. Now set to nil so state accurately reflects no active timer.