Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alphapapa/with-emacs.sh
Script to easily run Emacs with specified configurations
https://github.com/alphapapa/with-emacs.sh
emacs
Last synced: 14 days ago
JSON representation
Script to easily run Emacs with specified configurations
- Host: GitHub
- URL: https://github.com/alphapapa/with-emacs.sh
- Owner: alphapapa
- License: gpl-3.0
- Created: 2020-01-01T01:22:41.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-07-19T19:25:15.000Z (7 months ago)
- Last Synced: 2025-01-12T09:05:27.215Z (21 days ago)
- Topics: emacs
- Language: Shell
- Homepage:
- Size: 42 KB
- Stars: 167
- Watchers: 9
- Forks: 14
- Open Issues: 4
-
Metadata Files:
- Readme: README.org
- License: LICENSE
Awesome Lists containing this project
README
#+TITLE: with-emacs.sh
#+PROPERTY: LOGGING nil
# Note: This readme works with the org-make-toc package, which automatically updates the table of contents.
This script makes it easy to run Emacs with alternative configurations (i.e. not =~/.emacs.d=). For example, to run Emacs with a configuration stored in =~/new-emacs.d=, simply run:
#+BEGIN_SRC shell
$ with-emacs.sh --dir ~/new-emacs.d
#+END_SRCIt can also use temporary, "sandbox" directories that are automatically created and then removed after Emacs exits: just run =with-emacs.sh= without specifying a directory.
It's helpful for developing packages, troubleshooting configuration problems, trying out alternative configurations, etc.
* Contents :noexport:
:PROPERTIES:
:TOC: this
:END:
- [[#installation][Installation]]
- [[#usage][Usage]]
- [[#changelog][Changelog]]* Installation
:PROPERTIES:
:TOC: 0
:END:Copy =with-emacs.sh= into your =PATH= (or don't, and run it from wherever you want).
* Usage
:PROPERTIES:
:TOC: 0
:END:#+BEGIN_EXAMPLE
with-emacs.sh [OPTIONS] [EMACS-ARGS]Run Emacs with a specified configuration directory. If no directory
is specified, a temporary one is made with "mktemp -d" and removed
when Emacs exits.Options
--debug Show debug information and don't remove temp directory.
-h, --help This.
-- Optionally used to separate script arguments from
Emacs arguments.-d, --dir DIR Use DIR as user-emacs-directory.
-e, --emacs PATH Run Emacs executable at PATH.-i, --install PACKAGE Install PACKAGE.
-O, --no-org-repo Don't use the orgmode.org ELPA repo.
-P, --no-package Don't initialize the package system.
-R, --no-refresh-packages Don't refresh package lists.
#+END_EXAMPLE* Changelog
:PROPERTIES:
:TOC: 0
:END:** 0.1.3
*Fixes*
+ Remove obsolete ~orgmode.org~ ELPA repo (which could cause obsolete versions of Org to be installed accidentally).** 0.1.2
*Changes*
+ Use ~#!/usr/bin/env bash~. (Thanks to [[https://github.com/benoitj][Benoit Joly]].)** 0.1.1
*Fixes*
+ Argument =-e= / =--emacs=.** 0.1
First tagged version. Renamed from =emacs-sandbox.sh=.
* Credits
:PROPERTIES:
:TOC: ignore
:END:Inspired by and some code copied from [[https://github.com/melpa/melpa][MELPA]]'s Makefile.
* Alternatives
+ [[https://github.com/plexus/chemacs2][Chemacs2]] is a system of three Elisp files designed to replace your =~/.emacs.d= and switch between "profiles" stored in other directories. It requires a configuration file pointing to the profiles' directories. It offers some additional functionality, like setting environment variables per-profile.
- In contrast, =with-emacs.sh= does not replace anything, and it requires no configuration; just run it with a directory of your choice. It's just a Bash script, so if you want to set an environment variable, use standard tools, like =env=.* Development
:PROPERTIES:
:TOC: ignore
:END:Bug reports, feature requests, suggestions — /oh my/!
* License
:PROPERTIES:
:TOC: ignore
:END:GPLv3
# Local Variables:
# eval: (require 'org-make-toc)
# before-save-hook: org-make-toc
# org-export-with-properties: ()
# org-export-with-title: t
# End: