Implement researched Guix package outcome for #42: [Guix packaging] larsbrinkhoff/emacs-cl #606
Labels
No labels
accessibility
bug
category:ai-tool
category:browser
category:command-line-tool
category:compiler-toolchain
category:desktop-application
category:developer-tool
category:editor-extension
category:emulator
category:font
category:game
category:input-accessibility
category:library-framework
category:mud-client
category:multimedia
category:networking-client
category:programming-language
category:roguelike
category:storage-media-tool
category:system-tool
category:terminal-application
complexity:high
complexity:low
complexity:medium
difficulty:blocked
difficulty:easy
difficulty:hard
difficulty:moderate
documentation
duplicate
enhancement
good first issue
gooflow:guix-package-high
gooflow:guix-package-moderate
gooflow:guix-package-quality-gates
gooflow:guix-research-disposition
gooflow:guix-runtime-evidence-refresh
help wanted
invalid
kind:disposition
kind:packaging
needs:license-investigation
priority:quick
question
ready-for-agent
state:available-elsewhere
state:blocked
state:deferred
state:out-of-scope
state:ready
state:research
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
tay/guix-channel#606
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
This delivery ticket was created from research issue #42 ([Guix packaging] larsbrinkhoff/emacs-cl).
The host-validated research finding follows:
Research evidence: the authoritative upstream is https://github.com/larsbrinkhoff/emacs-cl at fixed commit 19e950e73a336aad476b0d051819a682863a2eff, the 2016-03-11 master tip (no release tags); use Guix version 0-19e950e. The upstream README.md describes Common Lisp implemented in Emacs Lisp, and the pinned tree has 36 implementation .el files under src/, load-cl.el as the loader, batch.el and interaction.el for batch/interactive use, src/tests.el plus src/tests.lisp as the local test harness, and no network or generated foreign-language dependency. COPYING is the complete GNU General Public License version 2 text, so the package license is GPL-2.0-only. The existing tay/packages/larsbrinkhoff-a-f.scm entry larsbrinkhoff-emacs-cl-source already records this exact codeload source, commit, GPL-2.0-only-equivalent Guix license:gpl2, and base32 hash 1jp5zwdjdgkxl7ghyzk3xxm7dsr9k8q3pcdp4446qdyx3ca233p7; reuse that immutable source rather than adding another fetch. This is source-buildable with Guix emacs-build-system, but the upstream src/Makefile only names obsolete emacs20/emacs21/XEmacs executables and must not be used as the Guix test/build driver. No equivalent package with the same upstream origin exists in the inspected local channel or the searched Guix package set: the channel has only the non-buildable larsbrinkhoff-emacs-cl-source snapshot, while Guix emacs-slime/emacs-sly are front ends for an external Common Lisp and clisp is a separate Common Lisp implementation. Delivery brief: add a new module tay/packages/emacs-cl.scm exporting emacs-cl, import guix build-system emacs, guix gexp, guix packages, guix licenses, and tay packages larsbrinkhoff-a-f, set version/source from larsbrinkhoff-emacs-cl-source, use emacs-build-system with #:lisp-directory "src", and declare no propagated or external Common Lisp inputs; emacs-minimal is the build-system byte-compilation input and the source itself supplies the runtime. Because the source directory has no root cl.el matching emacs-build-system’s package-description inference and has no autoload declarations, delete or bypass ensure-package-description, make-autoloads, and validate-compiled-autoloads phases; retain the normal install/build phases so all src/*.el files are installed and byte-compiled, with the default test-file exclusion keeping tests.el out of the runtime output. Add the standard leave-lisp-directory phase before install-license-files (or an equivalent explicit copy) so ../COPYING is installed with the output. Do not install src/emacs-cl unchanged: it hard-codes /home/lars/src/emacs-cl and is not a valid store runtime. The requested Emacs extension needs no command wrapper; load-cl.el must remain co-located with the installed implementation files because it prepends file-name-directory load-file-name and loads the fixed sibling list. If a batch CLI is later included, it must be a generated store-aware wrapper that invokes a declared Emacs runtime with the installed load-cl.el and batch.el, never the upstream script. Isolated smoke-proof plan for implementation: set an explicit emacs-build-system #:test-command that runs from src with emacs --batch -Q -L . -l load-cl.el -l tests.el -f test-cl, capture its summary, and fail unless PASS is nonzero and FAIL evaluation, FAIL compilation, and FAIL execution are all zero; then let the build-system byte-compile the installed .el files. In a fresh batch Emacs, add the built output’s site-lisp/cl-0-19e950e directory to -L, load load-cl.el once, and assert that the loader succeeds and the emacs-cl interactive function and emacs-cl-eval-interactively are bound; also verify the output contains the expected implementation .el files and COPYING while omitting tests.lisp and the broken launcher. Finally run the requested acceptance commands guix lint -L. emacs-cl and guix build -L. emacs-cl on the completed definition. No package proof is claimed by this research; the current result is implementation-ready because the canonical source, fixed revision, legal status, source-build path, package shape, runtime behavior, equivalent-package disposition, and an isolated compatibility smoke plan are all concrete.
Acceptance criteria
Imported from GitHub issue/PR. Originally posted by htayj on 2026-08-25T12:49:56Z.
Goocastle implementation and independent audit found this delivery is blocked on the channel's supported Emacs 30.2, not merely missing package metadata.
The implementation commit
8c4a761addedemacs-cl, an upstream test command, and an isolated loader smoke proof.guix build -L . --no-grafts --no-substitutes emacs-clrepeatedly failed in the upstream suite after loading the 2004 source: the initialcl-mapcar-manysymbol was absent; subsequent compatibility shims exposed old global API assumptions (function-information,SYMBOL-FUNCTION, keyword argument handling), and ultimately Emacs 30 compiler-macro collisions (cl--block-wrapper, wrong-number-of-arguments / invalid-function).An audit attempt to override modern Emacs macro-expansion internals was intentionally stopped: that would not be a bounded, trustworthy package adaptation. No package commit was merged or pushed, and the required isolated smoke proof never passed.
This requires an upstream-compatible Emacs port or an explicitly supported older Emacs package before delivery can safely resume. The Goocastle runner improvement for bounded agent phases and structured escalation is tracked as htayj/goocastle#299.
Imported from GitHub comment. Originally posted by htayj on 2026-08-25T21:29:01Z.
Delivered in signed, Guix-authenticated commit
145a1535a14643b4d65e50e0589085d7e41da2a6, resolving the previously recorded Emacs30 incompatibility.Pinned GPL2-only source
19e950e73a336aad476b0d051819a682863a2eff, emacs-cl0-19e950e. Compatibility uses local symbol renames/representation adaptation, not overriding Emacs compiler or macroexpansion globals. Full upstream suite retained and fail-closed.Main OMP proof: local daemon build and --check reproducibility, offline lint, source inventory and make check-emacs-cl passed. Output
/gnu/store/rwywwif2v5fsdip622i0fdvxhdq9a0iz-emacs-cl-0-19e950e. Upstream180 passes,0 evaluation/compilation/execution failures. Relative patch-path lint warnings and obsolete Emacs alias warnings remain disclosed.Installed offline fresh HOME/XDG smoke passed arithmetic, DEFUN, keyword argument order, LOOP, PARSE-INTEGER, FORMAT, bignums, compilation, closures, mixed nested backquotes, condition handling and bounded batch-debugger EOF exit. Store fingerprint/modes unchanged. Independent reviewer retracted a speculative nested-backquote finding after CLHS derivation; original proven implementation retained and the added mixed-case test passed with the correct multiple-value envelope.
__omp_shell("Actual Common Lisp result")
PNG SHA256
c1c356bd59567fdf78db45cbdd498b6b43296dbc3f7b065d782c6e321b91eb3a: actual installed evaluator defines DOUBLE and calls it on21, returning(42)(list of Common Lisp values). Stderr deprecation warnings were retained separately, not suppressed in normal proof. OMP execution only; no profile or live editor changed.