Skip to content

Auto-install Emacs 30 in Codespaces - #8

Merged
mahata merged 2 commits into
mainfrom
mahata-cuddly-enigma
Jun 25, 2026
Merged

Auto-install Emacs 30 in Codespaces#8
mahata merged 2 commits into
mainfrom
mahata-cuddly-enigma

Conversation

@mahata

@mahata mahata commented Jun 25, 2026

Copy link
Copy Markdown
Owner

Why

Codespaces VMs run Ubuntu 22.04 or 24.04, whose default apt repos ship older Emacs versions. I want Emacs 30 available automatically whenever a Codespace starts.

What

Adds an install_emacs step to install-codespaces.sh that installs Emacs 30 (emacs-nox) from the ppa:ubuntuhandbook1/emacs PPA, which provides Emacs 30 debs for both 22.04 (Jammy) and 24.04 (Noble). The function ensures software-properties-common is present, adds the PPA, then installs the package.

It is wired into main() via the existing run_step helper, so a PPA hiccup degrades gracefully and does not abort the rest of the install.

Notes

  • emacs-nox (terminal-only) is intentional since Codespaces is headless, avoiding GUI dependencies.
  • Added tests/install_emacs.bats covering PPA addition and package install (sudo/add-apt-repository stubbed), and a short README note.
  • Verified locally: bats tests/ passes 5/5 and shellcheck is clean.

Add an install_emacs step to install-codespaces.sh that pulls Emacs 30
(emacs-nox) from ppa:ubuntuhandbook1/emacs, which ships Emacs 30 debs for
both Ubuntu 22.04 and 24.04. Wired into main() via run_step so a PPA hiccup
does not abort the rest of the install. Adds bats coverage and a README note.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 25, 2026 05:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds automatic installation of Emacs 30 (terminal-only emacs-nox) during Codespaces bootstrap by introducing a new install step in the Codespaces installer, plus Bats coverage and a README note describing the behavior.

Changes:

  • Add an install_emacs step to install-codespaces.sh and wire it into main() via run_step.
  • Add tests/install_emacs.bats to validate the expected commands are invoked (via stubs).
  • Update README Codespaces section to mention Emacs 30 installation via the specified PPA.
Show a summary per file
File Description
install-codespaces.sh Introduces install_emacs() and runs it during Codespaces setup.
tests/install_emacs.bats Adds Bats tests for PPA addition and package installation behavior.
README.md Documents the new Emacs installation behavior for Codespaces.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 3/3 changed files
  • Comments generated: 2
  • Review effort level: Low

Comment thread install-codespaces.sh Outdated
Comment thread tests/install_emacs.bats Outdated
Chain install_emacs commands with && so an intermediate failure (e.g.
add-apt-repository) propagates a non-zero status to run_step instead of
silently falling through to the distro Emacs. Drop the unused hyphenated
add-apt-repository stub from the bats test, which some shells reject in
export -f.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mahata
mahata merged commit db1b5ff into main Jun 25, 2026
3 checks passed
@mahata
mahata deleted the mahata-cuddly-enigma branch June 25, 2026 06:23
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.

2 participants