Emacs¶
Setup¶
Setup on macOS
Emacs Installation¶
On macOS I installed the following (using Homebrew):
GitHub - railwaycat/homebrew-emacsmacport: Emacs mac port formulae for the Homebrew package manager
From the ReadMe:
Homebrew¶
If you'd like to install with Homebrew, please
$ brew tap railwaycat/emacsmacport
and then
$ brew install emacs-mac
if you using cask
brew cask install emacs-mac
or
brew cask install emacs-mac-spacemacs-icon
To disable this tap, please:
$ brew untap railwaycat/emacsmacport
(I think I installed it via brew cask install emacs-mac
)
Upgrade¶
Upgrade with the following homebrew cask command
brew cask upgrade
Setup on Windows
Emacs Installation¶
HN comment - re Emacs & VS Code
Emacs is great in many ways; I'm saying it as an avid user.
For ultimate multi-workplace setup, you can run Emacs in server mode on a cloud instance, and allow network connections to it, or port-forward to its Unix socket via SSH.
Now you can run Emacs in client mode from whatever machine you may have, several of them, or ssh to the cloud box and run Emacs in terminal mode in a crunch. All your sessions will share the same set of files, but workspace layout is per client, so you can work comfortably both from an 11" laptop screen and from a 27" 4K screen.
As said above, you can use tramp to access whatever other remote files accessible via ssh, and also run a decent (though a bit limited) terminal right from Emacs, to say nothing of running REPLs of all kinds directly, and excellent git integration with Magit.
This can even give you a sort of VPN-like access, when the cloud box where the Emacs server runs has access to machines that are not directly accessible to you from the machine you're connecting from.
OTOH VS Code likely can be run in a similar setup.
In general I very much like the modularization of IDEs: instead of a monolith form 1990s you can mix and match your favorite editor with language servers, REPLs, build servers, etc, all separate and in many cases running remotely.
Distributions¶
Emacs Modified¶
"Emacs Modified for macOS and Emacs Modified for Windows are distributions of GNU Emacs bundled with a few select packages for LaTeX users and R developers, most notably AUCTeX and ESS."
Portacle¶
Do you know if installing Portacle will mess with any existing configurations of those things on Linux? In particular Emacs. I have everything backed up but, since I only plan to play with CL, I don't want the headache if it does.
Shinmera on Mar 15, 2018 [-]
It should not touch anything outside of its own directory. If it does, then that's a bug and needs to be fixed.
vindarel on Mar 15, 2018 [-]
test in peace, it doesn't interfere with your emacs config or anything else :)
phoe-krk on Mar 15, 2018 [-]
No, it won't. Portacle is 100% self-contained and does not modify anything outside its home directory.
General Settings¶
Location for Settings¶
~/.emacs.d
emacs directory~/.emacs.d/init.el
emacs initialisation file (config file)
Note on Environment Variables¶
(From the Emacs from scratch post)
Optional: Problem with environment variables
If you got problem with environment variables or commands, for example, Emacs could not recognize brew
or something, you might need to load your .bashrc or .bash_profile manually:
(let ((path (shell-command-to-string ". ~/.bashrc; echo -n $PATH")))
(setenv "PATH" path)
(setq exec-path
(append
(split-string-and-unquote path ":")
exec-path)))
Set Default Directory¶
(setq default-directory "C:/Documents and Settings/USER NAME/Desktop/" )
Auto-insert Closing Bracket¶
(electric-pair-mode 1)
Note on Syntax Highlighting¶
In Emacs, syntax highlighting is performed using the module font-lock. It highlights a buffer in two phases:
- The syntactic phase, where comments and strings are highlighted.
- The keyword phase, where everything else is highlighted. Link - StackOverflow Comment
Themes¶
Theme directories¶
Themes I have installed:¶
- PeachMelpa | oceanic-theme
- GitHub - sellout/emacs-color-theme-solarized: Emacs highlighting using Ethan Schoonover’s Solarized color scheme
Solarized¶
- Solarized for emacs
- requirement for solarized theme: dash
Others¶
- Spacemacs theme
- Gruvbox
- post on Reddit
- Spaceline - á la Spacemacs without Spacemacs
- PeachMelpa | monokai-theme
- PeachMelpa | tangotango-theme
- PeachMelpa | sunburn-theme
- PeachMelpa | sublime-themes
- PeachMelpa | obsidian-theme
GitHub - bbatsov/solarized-emacs- GitHub - cpaulik/emacs-material-theme: Color Theme for emacs based on material design colors
Tools for Themes¶
Useful Links¶
Emacs Gen¶
- PACKAGES - StackExchange post - major mode / minor mode, require vs autoload, arguments
- emacs cheat sheet
- package - Do I still need GNU ELPA if I have MELPA? - Emacs Stack Exchange
Syntax Highlighting (Font Lock)¶
- python - How to change syntax highlighting for mode? - Emacs Stack Exchange
- GitHub - Lindydancer/font-lock-studio: Debugger for Font Lock keywords
Emacs KeyBindings¶
Dired¶
TUTORIAL - WDired -> Writeable dired
Ido, Ivy, Helm¶
- HN post
- Helm
- Ido vs Ivy
- IVY (& Swiper) manual
- Ivy
- Ivy video
- From Helm to Ivy - article 1
- From Helm to Ivy - article 2
- From Helm to Ivy - article 3
Filestash¶
With your data spread over to many different places, vendors and clouds, Filestash unify it all from one single web application.