Skip to content

Latest commit

 

History

History
332 lines (280 loc) · 31 KB

README.org

File metadata and controls

332 lines (280 loc) · 31 KB

Banner

Emacs Head

GNU General Public License Version 3.0

Emacs 26 CI Status Badge Emacs 27 CI Status Badge Emacs 28 CI Status Badge Emacs 29 CI Status Badge Emacs 30 CI Status Badge Emacs 31 CI Status Badge

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)

Installation

You can install this formula using:

GNU Emacs 26

brew tap daviderestivo/emacs-head
brew install emacs-head@26 --with-cocoa

GNU Emacs 27

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

GNU Emacs 28

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

GNU Emacs 29 (default)

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

GNU Emacs 30

brew tap daviderestivo/emacs-head
brew install emacs-head@30 --with-cocoa

GNU Emacs 31

brew tap daviderestivo/emacs-head
brew install emacs-head@31 --with-cocoa

Screenshots

GNU Emacs running in terminal mode (28.x)

/images/emacs-head-terminal.png

GNU Emacs running in GUI mode (28.x)

GUI Theme: atom-one-dark-theme

Modeline Theme: smart-mode-line-atom-one-dark-theme

/images/emacs-head-cocoa.png

Compilation options

The following compilation options are available:

OptionDescription
--with-crash-debugAppend `-g3` to CFLAGS to enable crash debugging
--with-cocoaBuild a cocoa version of GNU Emacs
--with-ctagsDon’t remove the ctags executable that GNU Emacs provides
--with-dbusBuild with dbus support
--without-gnutlsDisable gnutls support
--with-imagemagickBuild with imagemagick support
--without-librsvgDisable librsvg support
--with-mailutilsBuild with mailutils support
--with-multicolor-fontsEnable multicolor fonts support on macOS (only on emacs-head@26)
--without-modulesDisable dynamic modules support
--with-no-frame-refocusDisables frame re-focus (ie. closing one frame does not refocus another one). Not required in emacs-head@30 and emacs-head@31
--without-libxml2Disable libxml2 support
--with-pdumperEnable pdumper support (not available on emacs-head@26)
--with-xwidgetsEnable xwidgets support (not available on emacs-head@26)
--with-native-compEnable elisp native compilation support (not available on emacs-head@26 and emacs-head@27)
--with-native-full-aotEnable elisp ahead-of-time native compilation support (not available on emacs-head@26 and emacs-head@27)
--with-tree-sitterEnable Tree-sitter support (only on emacs-head@29 and emacs-head@30)
--with-pollUse poll() instead of select() to support > 1024 file descriptors
--with-mpsUse 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.

System appearance change support

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.

Pdumper support

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.

Xwidgets support

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.

Native-comp support

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:

Additional useful links:

MPS garbage collector

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:

Available icons

OptionDescriptionImageURL
--with-modern-icon-sjrmanningUse a modern style icon by Sjrmannings/icons/modern-icon-sjrmanning.pngLink
--with-modern-icon-asingh4242Use a modern style icon by Asingh4242/icons/modern-icon-asingh4242.pngLink
--with-modern-icon-paper-iconsUse a modern style icon by Sam Hewitt/icons/modern-icon-paper-icons.pngLink
--with-modern-icon-azhilinUse a modern style icon by Andrew Zhilin/icons/modern-icon-azhilin.pngLink
--with-modern-icon-mzaplotnikUse a modern style icon by Matjaz Zaplotnik/icons/modern-icon-mzaplotnik.pngLink
--with-modern-icon-bananxanUse a modern style icon by BananXan/icons/modern-icon-bananxan.pngLink
--with-modern-icon-vscodeUse a modern style icon by Valentin Degenne/icons/modern-icon-vscode.pngLink
--with-modern-icon-sexy-v1Use a modern style icon by Emacs is Sexy/icons/modern-icon-sexy-v1.pngLink
--with-modern-icon-sexy-v2Use a modern style icon by Emacs is Sexy/icons/modern-icon-sexy-v2.pngLink
--with-modern-icon-cg433nUse a modern style icon by Cg433n/icons/modern-icon-cg433n.pngLink
--with-modern-icon-purpleUse a modern style icon by Nicolas Petton/icons/modern-icon-purple.pngLink
--with-modern-icon-yellowUse a modern style icon by Unknown/icons/modern-icon-yellow.pngLink
--with-modern-icon-orangeUse a modern style icon by Omar Jair Purata Funes/icons/modern-icon-orange.pngLink
--with-modern-icon-papirusUse a modern style icon by Papirus Development Team/icons/modern-icon-papirus.pngLink
--with-modern-icon-penUse a modern style icon by Kentaro Ohkouchi/icons/modern-icon-pen.pngLink
--with-modern-icon-pen-3dUse a modern style icon by Unknown/icons/modern-icon-pen-3d.pngLink
--with-modern-icon-pen-lds56Use a modern style icon by lds56/icons/modern-icon-pen-lds56.pngLink
--with-modern-icon-pen-blackUse a modern style icon by Cayetano Santos/icons/modern-icon-pen-black.pngLink
--with-modern-icon-black-variantUse a modern style icon by BlackVariant (Patrick)/icons/modern-icon-black-variant.pngLink
--with-modern-icon-purple-flatUse a modern style icon by Jeremiah Foster/icons/modern-icon-purple-flat.pngLink
--with-modern-icon-spacemacsUse a modern style icon by Nasser Alshammari/icons/modern-icon-spacemacs.pngLink
--with-modern-icon-alecive-flatwokenUse a modern style icon by Alessandro Roncone/icons/modern-icon-alecive-flatwoken.pngLink
--with-modern-icon-elrumo1Use a modern style icon by Elias Ruiz Monserrat/icons/modern-icon-elrumo1.pngLink
--with-modern-icon-elrumo2Use a modern style icon by Elias Ruiz Monserrat/icons/modern-icon-elrumo2.pngLink
--with-modern-icon-savchenkovaleriy-vector-flatUse a modern Vector flat style icon by Valeriy Savchenko/icons/modern-icon-savchenkovaleriy-vector-flat.pngLink
--with-modern-icon-savchenkovaleriy-3d-flatUse a modern 3D flat style icon by Valeriy Savchenko/icons/modern-icon-savchenkovaleriy-3d-flat.pngLink
--with-modern-icon-savchenkovaleriy-3d-curvyUse a modern 3D curvy style icon by Valeriy Savchenko/icons/modern-icon-savchenkovaleriy-3d-curvy.pngLink
--with-modern-icon-bokehlicia-captivaUse a modern style icon by Bokehlicia/icons/modern-icon-bokehlicia-captiva.pngLink
--with-modern-icon-c9rgreen-sonomaUse a modern style icon by Christopher Green/icons/modern-icon-c9rgreen-sonoma.pngLink
--with-modern-icon-nuvolaUse a modern style icon by David Vignoni/icons/modern-icon-nuvola.pngLink
--with-modern-icon-black-gnu-headUse a modern style icon by Aha-Soft/icons/modern-icon-black-gnu-head.pngLink
--with-modern-icon-dragonUse a modern style icon by Will B Chang/icons/modern-icon-dragon.pngLink
--with-modern-icon-black-dragonUse a modern style icon by XYang and kongds/icons/modern-icon-black-dragon.pngLink
--with-modern-icon-emacs-icon1Use a modern style icon by Jasonm23/icons/modern-icon-emacs-icon1.pngLink
--with-modern-icon-emacs-icon2Use a modern style icon by Jasonm23/icons/modern-icon-emacs-icon2.pngLink
--with-modern-icon-emacs-icon3Use a modern style icon by Jasonm23/icons/modern-icon-emacs-icon3.pngLink
--with-modern-icon-emacs-icon4Use a modern style icon by Jasonm23/icons/modern-icon-emacs-icon4.pngLink
--with-modern-icon-emacs-icon5Use a modern style icon by Jasonm23/icons/modern-icon-emacs-icon5.pngLink
--with-modern-icon-emacs-icon6Use a modern style icon by Jasonm23/icons/modern-icon-emacs-icon6.pngLink
--with-modern-icon-emacs-icon7Use a modern style icon by Jasonm23/icons/modern-icon-emacs-icon7.pngLink
--with-modern-icon-emacs-icon8Use a modern style icon by Jasonm23/icons/modern-icon-emacs-icon8.pngLink
--with-modern-icon-emacs-icon9Use a modern style icon by Jasonm23/icons/modern-icon-emacs-icon9.pngLink
--with-modern-icon-emacs-card-blue-deepUse a modern style icon by Jasonm23/icons/modern-icon-emacs-card-blue-deep.pngLink
--with-modern-icon-emacs-card-british-racing-greenUse a modern style icon by Jasonm23/icons/modern-icon-emacs-card-british-racing-green.pngLink
--with-modern-icon-emacs-card-carmineUse a modern style icon by Jasonm23/icons/modern-icon-emacs-card-carmine.pngLink
--with-modern-icon-emacs-card-greenUse a modern style icon by Jasonm23/icons/modern-icon-emacs-card-green.pngLink
--with-modern-icon-doomUse a modern style icon by Eccentric J/icons/modern-icon-doom.pngLink
--with-modern-icon-doom3Use a modern style icon by Eccentric J/icons/modern-icon-doom3.pngLink
--with-modern-icon-doom-cacodemonUse a modern style icon by Christian Westrom/icons/modern-icon-doom-cacodemon.pngLink
--with-retro-icon-emacs-logoUse a retro style icon by Luis Fernandes/icons/retro-icon-emacs-logo.pngLink
--with-retro-icon-gnu-headUse a retro style icon by Aurélio A. Heckert/icons/retro-icon-gnu-head.pngLink
--with-retro-icon-gnu-meditate-levitateUse a retro style icon by Nevrax Design Team/icons/retro-icon-gnu-meditate-levitate.pngLink
--with-retro-icon-sink-bwUse a retro style icon by Unknown/icons/retro-icon-sink-bw.pngLink
--with-retro-icon-sinkUse a retro style icon by Erik Mugele/icons/retro-icon-sink.pngLink
--with-GoldenYakUse a Infinite Yak icon by Jasonm23/icons/GoldenYak.pngLink
--with-infinity-yak-adaciousUse a Infinite Yak icon by Jasonm23/icons/infinity-yak-adacious.pngLink
--with-infinity-yak-akadabraUse a Infinite Yak icon by Jasonm23/icons/infinity-yak-akadabra.pngLink
--with-infinity-yak-alakaUse a Infinite Yak icon by Jasonm23/icons/infinity-yak-alaka.pngLink
--with-infinity-yak-amotoUse a Infinite Yak icon by Jasonm23/icons/infinity-yak-amoto.pngLink
--with-infinity-yak-amuraUse a Infinite Yak icon by Jasonm23/icons/infinity-yak-amura.pngLink
--with-infinity-yak-andwhiteUse a Infinite Yak icon by Jasonm23/icons/infinity-yak-andwhite.pngLink
--with-infinity-yak-astraUse a Infinite Yak icon by Jasonm23/icons/infinity-yak-astra.pngLink
--with-infinity-yak-noirUse a Infinite Yak icon by Jasonm23/icons/infinity-yak-noir.pngLink
--with-infinity-yak-onfireUse a Infinite Yak icon by Jasonm23/icons/infinity-yak-onfire.pngLink
--with-infinity-yak-onthewaterUse a Infinite Yak icon by Jasonm23/icons/infinity-yak-onthewater.pngLink
--with-infinity-yak-satoriUse a Infinite Yak icon by Jasonm23/icons/infinity-yak-satori.pngLink
--with-infinity-yak-shackUse a Infinite Yak icon by Jasonm23/icons/infinity-yak-shack.pngLink
--with-infinity-yak-topiaUse a Infinite Yak icon by Jasonm23/icons/infinity-yak-topia.pngLink
--with-skamacs-iconUse a modern style icon by Compufox/icons/skamacs-icon.pngLink

Why yet another Homebrew GNU Emacs formula?

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.

About the logo

‘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)

Collaborating

If you are interested in collaborating please open a Pull Request.