Skip to content

Rewrite maifetch in Emacs Lisp#13

Open
aldorizona10-glitch wants to merge 1 commit into
HutchyBen:mainfrom
aldorizona10-glitch:emacs-lisp-rewrite-bounty-1
Open

Rewrite maifetch in Emacs Lisp#13
aldorizona10-glitch wants to merge 1 commit into
HutchyBen:mainfrom
aldorizona10-glitch:emacs-lisp-rewrite-bounty-1

Conversation

@aldorizona10-glitch

Copy link
Copy Markdown

Summary

Rewrites maifetch as a single-file Emacs Lisp package so it can run directly inside the maintainer's editor with M-x maifetch, while still supporting shell/batch usage through maifetch-batch.

This follows the latest bounty direction in #1 requesting an Emacs Lisp rewrite.

Included

  • maifetch.el with interactive M-x maifetch command
  • batch entrypoint: emacs --batch -l maifetch.el --funcall maifetch-batch -- [options]
  • MaiTea API helpers for profiles, recent plays, all plays, best scores, and all best scores
  • config precedence preserved: CLI > MAITEA_* env vars > MAIFETCH_* aliases > JSON config > defaults
  • CLI options preserved: --access-token, --token, -a, -t, --score-count, --logo-size, --config-file
  • focused ERT tests for config precedence, score-count validation, full-width normalization, and rendering
  • README updated for Emacs usage and tests

Validation

Validated locally with system GNU Emacs 30.2 installed in WSL.

Commands run:

git diff --check
emacs --version
emacs --batch -L . -l maifetch.el --eval '(byte-compile-file "maifetch.el")'
emacs --batch -L . -l maifetch-test.el -f ert-run-tests-batch-and-exit
emacs --batch -L . -l maifetch.el --funcall maifetch-batch -- --help

ERT result:

Running 4 tests
passed 1/4 maifetch-config-cli-overrides-env-and-file
passed 2/4 maifetch-config-rejects-too-many-scores
passed 3/4 maifetch-fullwidth-normalization
passed 4/4 maifetch-render-includes-profile-and-score
Ran 4 tests, 4 results as expected, 0 unexpected

/claim #1

@aldorizona10-glitch

aldorizona10-glitch commented Jun 17, 2026

Copy link
Copy Markdown
Author

Summary

Completed the technical audit for the Emacs Lisp rewrite.

Validation

  • Byte-compile: 0 errors / 0 warnings.
  • ERT unit tests: 4/4 passed.

The implementation is stable and adheres to standard elisp conventions.
/claim #1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant