Skip to content

Scripts to hit the ground running with Emacs, org-mode, and ESS for Reproducible Science on your Linux distribution

License

Notifications You must be signed in to change notification settings

phrb/deploy-org

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deploy Emacs, Org, and ESS

https://img.shields.io/badge/License-CC%20BY%204.0-lightgrey.svg

https://github.com/phrb/deploy-org/actions/workflows/ubuntu_20042_lts.yml/badge.svg https://github.com/phrb/deploy-org/actions/workflows/ubuntu_2104.yml/badge.svg https://github.com/phrb/deploy-org/actions/workflows/debian_109.yml/badge.svg https://github.com/phrb/deploy-org/actions/workflows/debian_11.yml/badge.svg

Use the Emacs configuration files in this repository to deploy Emacs, org, and ESS in your system. Tested in different Linux distributions using Docker.

Quickstart

To install this configuration in your system directly, backup your init.el file, then run:

git clone https://github.com/phrb/deploy-org.git
cd deploy-org
sudo ./install/install.sh -i
./install/install.sh -e -t

You should check the Emacs and org versions, and you should see a PDF file produced. message, indicating that org succesfully compiled the test file org/journal/journal.org to pdf. Tests are implemented in the install/install.sh script.

The install/install.sh script will attempt to identify your system and run the correct shell script for it. If it fails for your system, please submit an issue.

Install Script and Docker

The script’s options are:

./install/install.sh -h
Usage: ./install/install.sh [OPTION]
	-i, --install	Install dependencies (requires sudo privileges)
	-e, --emacs	Copy "init.el" to user home [/home/phrb/.emacs.d/]
	-t, --test	Test user configuration [/home/phrb/.emacs.d/init.el]
	-h, --help	Print this message

You can check the status on your machine of each supported system using Docker. To check the status for Ubuntu 20.04.2 LTS, for example, run:

cd docker/ubuntu_20042_lts
sudo docker build .

Contributing

To contribute, please fork the repository, create a new branch with your changes, and submit a pull request to the main branch.

Adding Support for a New Distribution

First, check the values of the NAME, VERSION, and PRETTY_NAME listed on the /etc/os-release file of the distribution you want to add support to:

OS_NAME=$(cat /etc/os-release | grep "^NAME=" | cut -d= -f2 | cut -d'"' -f2)
OS_VERSION=$(cat /etc/os-release | grep "^VERSION=" | cut -d= -f2 | cut -d'"' -f2)
OS_PRETTY=$(cat /etc/os-release | grep "^PRETTY_NAME=" | cut -d= -f2 | cut -d'"' -f2)

echo "[$OS_NAME] [$OS_VERSION] [$OS_PRETTY]"

Add these variables to the case structure in the check_os_eval function in the setup_os.sh script. Use the PRETTY_NAME, or any other variable in /etc/os-release, only if VERSION is empty. This way, the script can launch the proper function in a user’s system.

Write a function with the configuration for the target distribution. If it’s a Debian- or Ubuntu-based system, chances are the Ubuntu functions in setup_os.sh will just work. For example, these are the functions for Ubuntu 21.04, Debian 10.9, and Debian 11:

function ubuntu_2104() {
    ubuntu_20042_lts
}

function debian_109() {
    ubuntu_20042_lts
}

function debian_11() {
    ubuntu_20042_lts
}

Add your function call to the case structure.

Now, write a Dockerfile for your distribution and a corresponding GitHub action. Use the examples in the docker and workflows directories as starting points.

Make sure that the tests for your distribution pass, and that your changes don’t break support for any other distribution.

Finally, submit a pull request with the Support New Distribution template.

Updating init.org

Make your changes to init.org, tangle blocks to init.el with C-c C-v C-t, and make sure that your changes don’t break support for all distributions.

Finally, submit a pull request with the Update init.org template.

Linux Distributions we Wish to Support

Didn’t see yours, or one you want? Submit an issue!

  • [ ] Mint
  • [ ] Fedora
  • [ ] NixOS
  • [ ] Guix
  • [ ] Kubuntu
  • [ ] Older Ubuntu versions
  • [ ] Manjaro
  • [ ] Arch

About

Scripts to hit the ground running with Emacs, org-mode, and ESS for Reproducible Science on your Linux distribution

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published