/homebrew-emacs-plus

Emacs Plus formulae for the Homebrew package manager

Primary LanguageRuby

Emacs Plus

https://github.com/d12frosted/homebrew-emacs-plus/workflows/CI/badge.svg

Emacs Plus is GNU Emacs formulae based on emacs formulae. The difference is that some of the options available from emacs formulae are enabled by default in emacs-plus and some new additional options are available for user.

Upgrade from Emacs 25.x

With release of Emacs 26.1 many options were removed from the formula, as features behind them are already in released version.

But most of the users might suffer due to removal of --natural-title-bar option. In order to duplicate its behaviour add following lines to your init.el file.

(add-to-list 'default-frame-alist
             '(ns-transparent-titlebar . t))

(add-to-list 'default-frame-alist
             '(ns-appearance . light)) ;; or dark - depending on your theme

In case for some reason you still want to use old Emacs 25 formula, it is available as emacs-plus@25.

$ brew install emacs-plus@25 [all-your-favourite-options]

Install

$ brew tap d12frosted/emacs-plus
$ brew install emacs-plus [options]

By default (without any addition options) this formula install Cocoa version of Emacs with support of gnutls, imagemagick, librsvg, libxml2, dynamic modules and multicolor fonts and Spacemacs icon. Please see the list of available options to disable any bit of default behaviour or add even more stuff.

In order to install without Spacemacs icon you should use following command.

$ brew install emacs-plus --without-spacemacs-icon

macOS Mojave users

If you are using macOS Mojave, please note that most of the experimental options are forbidden on Mojave. This is temporary decision.

Options

To get list of all available options, call brew info emacs-plus. Here is relevant part from output of that command for your convenience.

==> Options
--with-ctags
  Don't remove the ctags executable that Emacs provides
--with-dbus
  Build with dbus support
--with-emacs-icons-project-EmacsIcon1
  Using Emacs icon project EmacsIcon1
--with-emacs-icons-project-EmacsIcon2
  Using Emacs icon project EmacsIcon2
--with-emacs-icons-project-EmacsIcon3
  Using Emacs icon project EmacsIcon3
--with-emacs-icons-project-EmacsIcon4
  Using Emacs icon project EmacsIcon4
--with-emacs-icons-project-EmacsIcon5
  Using Emacs icon project EmacsIcon5
--with-emacs-icons-project-EmacsIcon6
  Using Emacs icon project EmacsIcon6
--with-emacs-icons-project-EmacsIcon7
  Using Emacs icon project EmacsIcon7
--with-emacs-icons-project-EmacsIcon8
  Using Emacs icon project EmacsIcon8
--with-emacs-icons-project-EmacsIcon9
  Using Emacs icon project EmacsIcon9
--with-emacs-icons-project-emacs-card-blue-deep
  Using Emacs icon project emacs-card-blue-deep
--with-emacs-icons-project-emacs-card-british-racing-green
  Using Emacs icon project emacs-card-british-racing-green
--with-emacs-icons-project-emacs-card-carmine
  Using Emacs icon project emacs-card-carmine
--with-emacs-icons-project-emacs-card-green
  Using Emacs icon project emacs-card-green
--with-jansson
  Build with jansson support (--HEAD only)
--with-mailutils
  Build with mailutils support
--with-modern-icon
  Using a modern style Emacs icon by @tpanum
--with-no-frame-refocus
  Disables frame re-focus (ie. closing one frame does not refocus another one)
--with-no-titlebar
  Experimental: build without titlebar
--with-window-role-fix
  Experimental: fix Emacs window role to use AXWindowRole
--with-x11
  Experimental: build with x11 support
--with-xwidgets
  Experimental: build with xwidgets support (--HEAD only)
--without-cocoa
  Build a non-Cocoa version of Emacs
--without-gnutls
  Build without gnutls support
--without-imagemagick@6
  Build without imagemagick@6 support
--without-librsvg
  Build without librsvg support
--without-libxml2
  Build without libxml2 support
--without-little-cms2
  Build without little-cms2 support
--without-modules
  Build without dynamic modules support
--without-multicolor-fonts
  Build without a patch that enables multicolor font support
--without-spacemacs-icon
  Build without Spacemacs icon by Nasser Alshammari
--HEAD
  Install HEAD version

Note that by default emacs-plus builds the Cocoa version of Emacs with gnutls, imagemagick, librsvg and dynamic modules support by default. Also it changes default GNU Emacs icon to Spacemacs icon. If you wish to change defaults, just use --without-FEATURE flag.

Note that --HEAD builds are not really supported. They may fail to install, they may crash at run time. Or even worse, they may work as expected. So use this option at your own risk. And feel free to open up issues you face, just remember that I am not close enough to Emacs development process to provide you much help with any arising issues.

No Titlebar

This patch is enabled with the --with-no-titlebar option. It is meant for use with window tiling applications like chunkwm or amethyst so that the titlebar you will never need to click on won’t take up screen real estate. If you see gaps between your emacs frames and other windows, try this:

(setq frame-resize-pixelwise t)

Portable dumper

The portable dumper is a feature that is available with Emacs 27. In order to get this feature, please use --HEAD option.

Please, take a look at it’s usage in Spacemacs.

Xwidgets (webkit)

The original Emacs xwidgets builds and works on macOS however must be used with x11 and hence not practical option on macOS. This version enables xwidgets on native macOS X Cocoa via embedding a native webkit window.

More details can be seen here Veshboo’s emacs branch.

Emacs configuration

Emacs is a journey. And for some of you these projects might be inspiring.

Known Issues

Please checkout Issues page for a list of all known issues. But here are several you should be aware of.

emacs dependency in other formulas

In some cases (like when installing cask) regular emacs package will be required. In such cases you might want to install all dependencies manually (except for emacs) and then install desired package with --ignore-dependencies option.

$ brew install cask --ignore-dependencies

Screenshots

by @j-martin

Acknowledgements

Many thanks to all contributors, issue reporters and bottle providers (Sudarshan Wadkar, Jon Hermansen).