Emacs Head is an Homebrew Formula based on the original Homebrew Emacs one.
This formula currently supports:
- GNU Emacs 26.3
- GNU Emacs 27.2 (or emacs-27 branch)
- GNU Emacs 28.2 (or emacs-28 branch)
- GNU Emacs 29.4 (or emacs-29 branch)
- GNU Emacs 30.0.92 (emacs-30 branch)
- GNU Emacs HEAD (currently 31.0.50)
You can install this formula using:
brew tap daviderestivo/emacs-head
brew install emacs-head@26 --with-cocoa
brew tap daviderestivo/emacs-head
brew install emacs-head@27 --with-cocoa
If you wish to install the latest commit of the emacs-27 branch then:
brew tap daviderestivo/emacs-head
brew install --HEAD emacs-head@27 --with-cocoa
brew tap daviderestivo/emacs-head
brew install emacs-head@28 --with-cocoa
If you wish to install the latest commit of the emacs-28 branch then:
brew tap daviderestivo/emacs-head
brew install --HEAD emacs-head@28 --with-cocoa
brew tap daviderestivo/emacs-head
brew install emacs-head --with-cocoa
If you wish to install the latest commit of the emacs-29 branch then:
brew tap daviderestivo/emacs-head
brew install --HEAD emacs-head --with-cocoa
brew tap daviderestivo/emacs-head
brew install emacs-head@30 --with-cocoa
brew tap daviderestivo/emacs-head
brew install emacs-head@31 --with-cocoa
GUI Theme: atom-one-dark-theme
Modeline Theme: smart-mode-line-atom-one-dark-theme
The following compilation options are available:
Option | Description |
---|---|
--with-crash-debug | Append `-g3` to CFLAGS to enable crash debugging |
--with-cocoa | Build a cocoa version of GNU Emacs |
--with-ctags | Don’t remove the ctags executable that GNU Emacs provides |
--with-dbus | Build with dbus support |
--without-gnutls | Disable gnutls support |
--with-imagemagick | Build with imagemagick support |
--without-librsvg | Disable librsvg support |
--with-mailutils | Build with mailutils support |
--with-multicolor-fonts | Enable multicolor fonts support on macOS (only on emacs-head@26) |
--without-modules | Disable dynamic modules support |
--with-no-frame-refocus | Disables frame re-focus (ie. closing one frame does not refocus another one). Not required in emacs-head@30 and emacs-head@31 |
--without-libxml2 | Disable libxml2 support |
--with-pdumper | Enable pdumper support (not available on emacs-head@26) |
--with-xwidgets | Enable xwidgets support (not available on emacs-head@26) |
--with-native-comp | Enable elisp native compilation support (not available on emacs-head@26 and emacs-head@27) |
--with-native-full-aot | Enable elisp ahead-of-time native compilation support (not available on emacs-head@26 and emacs-head@27) |
--with-tree-sitter | Enable Tree-sitter support (only on emacs-head@29 and emacs-head@30) |
--with-poll | Use poll() instead of select() to support > 1024 file descriptors |
--with-mps | Use the Memory Pool System garbage collection library (only on emacs-head@31) |
For the terminal version only of GNU Emacs please omit --with-cocoa
.
By default:
- gnutls
- librsvg
- libxml2
- dynamic modules
are enabled. If you want to disable them please use the above --without-*
options.
This patch is enabled by default and can’t be disabled. It adds a
hook, ns-system-appearance-change-functions
, that is called once the
system appearance is changed. Functions added to this hook will be
called with one argument, a symbol that is either light or dark. This
mainly allows loading a different theme to better match the system
appearance.
(defun my/apply-theme (appearance)
"Load theme, taking current system APPEARANCE into consideration."
(mapc #'disable-theme custom-enabled-themes)
(pcase appearance
('light (load-theme 'tango t))
('dark (load-theme 'tango-dark t))))
(add-hook 'ns-system-appearance-change-functions #'my/apply-theme)
Note that this hook is also run once when Emacs is initialized, so simply adding the above to your init.el will allow matching the system appearance upon startup. You can also determine what the current system appearance is by inspecting the value of the ns-system-appearance variable.
The hook is NOT run in TTY Emacs sessions.
Note: portable dumper is not supported on emacs-head@26, and won’t work with native-comp support.
To enable this feature please use --with-pdumper
.
For a pdumper configuration example, you could take inspiration from Galactic Emacs: pdumper-init.el and pdumper-config.el configuration files.
Note: xwidgets feature is not supported on emacs-head@26.
This formula supports native macOS X Cocoa Xwidgets via embedding a
native webkit window. To enable this feature please use
--with-xwidgets
.
Note: native-comp feature is not supported on emacs-head@26 and emacs-head@27.
This formula supports native Elisp code compilation. In order to enable it please follow the below instructions:
brew install emacs-head@28 --with-cocoa --with-native-comp
NATIVE_FULL_AOT
is disabled by default to improve build time. Only few
lisp source files will be compiled during the build, all of the
remaining ones will be dynamically compiled in the background once the
Emacs application is launched for the first time. If you wish to
enable native full AoT, please use --with-native-full-aot
option
together with --with-native-comp
.
More details about native Elisp code compilation can be found in the below links:
- Bringing GNU Emacs to Native Code (Slides)
- Bringing GNU Emacs to Native Code (YouTube Video)
- gccemacs
Additional useful links:
Note: MPS is only supported on emacs-head@31
This formula supports the MPS garbage collector which theoretically can improve performance. It is a stable system that has been in use for years. However, in emacs this is an experimental feature.
More details about MPS can be found in the below links:
Option | Description | Image | URL |
---|---|---|---|
--with-modern-icon-sjrmanning | Use a modern style icon by Sjrmannings | Link | |
--with-modern-icon-asingh4242 | Use a modern style icon by Asingh4242 | Link | |
--with-modern-icon-paper-icons | Use a modern style icon by Sam Hewitt | Link | |
--with-modern-icon-azhilin | Use a modern style icon by Andrew Zhilin | Link | |
--with-modern-icon-mzaplotnik | Use a modern style icon by Matjaz Zaplotnik | Link | |
--with-modern-icon-bananxan | Use a modern style icon by BananXan | Link | |
--with-modern-icon-vscode | Use a modern style icon by Valentin Degenne | Link | |
--with-modern-icon-sexy-v1 | Use a modern style icon by Emacs is Sexy | Link | |
--with-modern-icon-sexy-v2 | Use a modern style icon by Emacs is Sexy | Link | |
--with-modern-icon-cg433n | Use a modern style icon by Cg433n | Link | |
--with-modern-icon-purple | Use a modern style icon by Nicolas Petton | Link | |
--with-modern-icon-yellow | Use a modern style icon by Unknown | Link | |
--with-modern-icon-orange | Use a modern style icon by Omar Jair Purata Funes | Link | |
--with-modern-icon-papirus | Use a modern style icon by Papirus Development Team | Link | |
--with-modern-icon-pen | Use a modern style icon by Kentaro Ohkouchi | Link | |
--with-modern-icon-pen-3d | Use a modern style icon by Unknown | Link | |
--with-modern-icon-pen-lds56 | Use a modern style icon by lds56 | Link | |
--with-modern-icon-pen-black | Use a modern style icon by Cayetano Santos | Link | |
--with-modern-icon-black-variant | Use a modern style icon by BlackVariant (Patrick) | Link | |
--with-modern-icon-purple-flat | Use a modern style icon by Jeremiah Foster | Link | |
--with-modern-icon-spacemacs | Use a modern style icon by Nasser Alshammari | Link | |
--with-modern-icon-alecive-flatwoken | Use a modern style icon by Alessandro Roncone | Link | |
--with-modern-icon-elrumo1 | Use a modern style icon by Elias Ruiz Monserrat | Link | |
--with-modern-icon-elrumo2 | Use a modern style icon by Elias Ruiz Monserrat | Link | |
--with-modern-icon-savchenkovaleriy-vector-flat | Use a modern Vector flat style icon by Valeriy Savchenko | Link | |
--with-modern-icon-savchenkovaleriy-3d-flat | Use a modern 3D flat style icon by Valeriy Savchenko | Link | |
--with-modern-icon-savchenkovaleriy-3d-curvy | Use a modern 3D curvy style icon by Valeriy Savchenko | Link | |
--with-modern-icon-bokehlicia-captiva | Use a modern style icon by Bokehlicia | Link | |
--with-modern-icon-c9rgreen-sonoma | Use a modern style icon by Christopher Green | Link | |
--with-modern-icon-nuvola | Use a modern style icon by David Vignoni | Link | |
--with-modern-icon-black-gnu-head | Use a modern style icon by Aha-Soft | Link | |
--with-modern-icon-dragon | Use a modern style icon by Will B Chang | Link | |
--with-modern-icon-black-dragon | Use a modern style icon by XYang and kongds | Link | |
--with-modern-icon-emacs-icon1 | Use a modern style icon by Jasonm23 | Link | |
--with-modern-icon-emacs-icon2 | Use a modern style icon by Jasonm23 | Link | |
--with-modern-icon-emacs-icon3 | Use a modern style icon by Jasonm23 | Link | |
--with-modern-icon-emacs-icon4 | Use a modern style icon by Jasonm23 | Link | |
--with-modern-icon-emacs-icon5 | Use a modern style icon by Jasonm23 | Link | |
--with-modern-icon-emacs-icon6 | Use a modern style icon by Jasonm23 | Link | |
--with-modern-icon-emacs-icon7 | Use a modern style icon by Jasonm23 | Link | |
--with-modern-icon-emacs-icon8 | Use a modern style icon by Jasonm23 | Link | |
--with-modern-icon-emacs-icon9 | Use a modern style icon by Jasonm23 | Link | |
--with-modern-icon-emacs-card-blue-deep | Use a modern style icon by Jasonm23 | Link | |
--with-modern-icon-emacs-card-british-racing-green | Use a modern style icon by Jasonm23 | Link | |
--with-modern-icon-emacs-card-carmine | Use a modern style icon by Jasonm23 | Link | |
--with-modern-icon-emacs-card-green | Use a modern style icon by Jasonm23 | Link | |
--with-modern-icon-doom | Use a modern style icon by Eccentric J | Link | |
--with-modern-icon-doom3 | Use a modern style icon by Eccentric J | Link | |
--with-modern-icon-doom-cacodemon | Use a modern style icon by Christian Westrom | Link | |
--with-retro-icon-emacs-logo | Use a retro style icon by Luis Fernandes | Link | |
--with-retro-icon-gnu-head | Use a retro style icon by Aurélio A. Heckert | Link | |
--with-retro-icon-gnu-meditate-levitate | Use a retro style icon by Nevrax Design Team | Link | |
--with-retro-icon-sink-bw | Use a retro style icon by Unknown | Link | |
--with-retro-icon-sink | Use a retro style icon by Erik Mugele | Link | |
--with-GoldenYak | Use a Infinite Yak icon by Jasonm23 | Link | |
--with-infinity-yak-adacious | Use a Infinite Yak icon by Jasonm23 | Link | |
--with-infinity-yak-akadabra | Use a Infinite Yak icon by Jasonm23 | Link | |
--with-infinity-yak-alaka | Use a Infinite Yak icon by Jasonm23 | Link | |
--with-infinity-yak-amoto | Use a Infinite Yak icon by Jasonm23 | Link | |
--with-infinity-yak-amura | Use a Infinite Yak icon by Jasonm23 | Link | |
--with-infinity-yak-andwhite | Use a Infinite Yak icon by Jasonm23 | Link | |
--with-infinity-yak-astra | Use a Infinite Yak icon by Jasonm23 | Link | |
--with-infinity-yak-noir | Use a Infinite Yak icon by Jasonm23 | Link | |
--with-infinity-yak-onfire | Use a Infinite Yak icon by Jasonm23 | Link | |
--with-infinity-yak-onthewater | Use a Infinite Yak icon by Jasonm23 | Link | |
--with-infinity-yak-satori | Use a Infinite Yak icon by Jasonm23 | Link | |
--with-infinity-yak-shack | Use a Infinite Yak icon by Jasonm23 | Link | |
--with-infinity-yak-topia | Use a Infinite Yak icon by Jasonm23 | Link | |
--with-skamacs-icon | Use a modern style icon by Compufox | Link |
Since the option --with-cocoa
is not available anymore in the latest
GNU Emacs homebrew-core formula (see pull request), I decided to build
my own formula.
‘Kitchen Sink’ OS Announced
Coding has begun on a new operating system code named ‘Kitchen Sink’. The new OS will be based entirely on GNU Emacs. One programmer explained, “Since many hackers spend a vast amount of their time in Emacs, why not just make it the operating system?” When asked about the name, he responded, “Well, it has been often said that Emacs has everything except a kitchen sink. Now it will.” — James Baughn
(https://web.archive.org/web/20180814225320/http://humorix.org/10016)
If you are interested in collaborating please open a Pull Request.