Emacs Version tested: 26.2.90 (stable) 2019-07-12
Section Last updated: <2019-07-25 Thu 19:21>
- Requires packages
sudo apt-get install libxaw7-dev libxpm-dev libpng12-dev libtiff5-dev libgif-dev libjpeg8-dev libgtk2.0-dev libncurses5-dev libdbus-1-dev libxft-dev texinfo libgnutls-dev libgnutls28-dev libjpeg62-turbo-dev
- Install requirements for emacs xwidgets to work
sudo apt-get install libwebkitgtk-3.0-0 libwebkitgtk-3.0-dev
- Clone from git like so
git clone --depth 1 https://github.com/emacs-mirror/emacs.git
- Compile (Note xwidgets may not work on your machine)
./autogen.sh ./autogen.sh git ./configure --prefix=/opt/emacs --with-xft --with-xwidgets --with-imagemagick make -j32
- Start
src/emacs
- Install
sudo make install
- Update alternatives to use the new emacs & set the priority to 100 so it’s automatically selected
sudo update-alternatives --install /usr/bin/emacs emacs /opt/emacs/bin/emacs 100 sudo update-alternatives --install /usr/bin/emacsclient emacsclient /opt/emacs/bin/emacsclient 100
- Configure the alternatives
sudo update-alternatives --config emacs sudo update-alternatives --config emacsclient
- Manually check alternatives are correctly set
ls -al /etc/alternatives | grep emacs
- Manually check bin directory is correctly set
ls -al /usr/bin | grep emacs
- Start the new emacs
emacs
- Start package listing and accept certificates using ‘a’
M-x package-listing
- Start emacs & install use-package
M-x package-install use-package
- Restart emacs & install pdf-tools
C-x b compile-pdftools (respond with Y) (also M-x pdf-tools-install then exit & restart emacs answer Y to reinstall prompt on restart)
- Restart a number of times until everything is starting correctly.
(Optional fix) Create/update symlinks if they are pointing to an old emacs version
ln -s -f target symlink_name #update existing symlink
This configuration is based on the latest use-package system as created by John Wiegley, who is also steering emacs development. Our configuration also includes a custom dark theme that is completely customisable.
- Clone my repo
git clone https://github.com/map7/emacs-config.git ~/.emacs.d
- Run installation script
cd ~/.emacs.d ./install
- Start emacs
emacs
- List packages (Note: M-x is emacs way of saying Alt + x)
M-x list-packages
- Install use-package with
M-x package-install use-package
Then restart emacs and it should start building the packages, if it asks you to build pdf-tools say yes and in the compile buffer it will show the results. If this compile is needed then after the compile is finished you will need to restart emacs again for the final run of packages.
A nice iconised based modeline. Used to save horizontal modeline space.
The package all-the-icons is needed. This package has been added to the init.el file and should be automatically installed.
The next step must be done manually. You will need to download and install the fonts and icons from the following link: all-the-icons.el/fonts
Clone
cd ~/src git clone https://github.com/domtronn/all-the-icons.el.git
copy fonts into (for all users)
sudo cp all-the-icons.el/fonts/*ttf /usr/local/share/fonts
or (for a specific user)
cp all-the-icons.el/fonts/*ttf ~/.fonts
manually rebuild the font cache
fc-cache -fv
To manually invoke the iconised modeline theme:
M-x dark-lord-modeline
Install my sub modules
git submodule init
Based upon Cask & Pallet.
Install cask
curl -fsSkL https://raw.github.com/cask/cask/master/go | python
Add path to your ~/.zshenv or ~/.bashrc file
# Add Cask to the path export PATH="$HOME/.cask/bin:$PATH"
Run cask which will install the pallet package management tool
cd ~/.emacs.d cask install
Optional - Initialise your cask file from within emacs
M-x pallet-init
Copy the xinitrc.sample
cp xinitrc.sample ~/.xinitrc
Link it to .xsession to work with a desktop manager like lightdm as the default session.
ln -s ~/.xinitrc ~/.xsession
To autostart things like dropbox or spideroak you need to put them into a file called ~/.emacs.autostart.el and this will automatically load.
Here is an example of starting dropbox & spideroak
;; Autostart Dropbox (call-process-shell-command "(sleep 10s && ~/.dropbox-dist/dropboxd) &" nil 0) (call-process-shell-command "(sleep 10s && SpiderOakONE) &" nil 0)
Create a ~/.emacs.randr.el file and put the following
(setq exwm-randr-workspace-output-plist '(0 "LVDS1" 1 "LVDS1" 2 "DP2")) (add-hook 'exwm-randr-screen-change-hook (lambda () (start-process-shell-command "xrandr" nil "xrandr --output DP2 --right-of LVDS1 --output DP2 --mode 1920x1080"))) (exwm-randr-enable)
Remember to change the LVDS1 & DP2 to your screens which you can find out by typing in xrandr at the command line and looking for the active screens.
Installing
npm install -g coffeelint eslint gem install scss_lint rubocop
Add this to your ~/.emacs.d/.emacs.custom.el file.
(custom-set-variables '(flycheck-ruby-rubocop-executable "/usr/local/rbenv/shims/rubocop" ) '(flycheck-javascript-eslint-executable "/opt/node-v5.5.0-linux-x64/bin/eslint") '(flycheck-coffee-coffeelint-executable "/opt/node-v5.5.0-linux-x64/bin/coffeelint") '(flycheck-coffeelintrc "~/coffeelint.json"))
Make the config file for coffeelint
coffeelint --makeconfig > coffeelint.json
ag - Compile the silver searcher, first check if you already have the ‘ag’ command
flyspell - install ‘ispell’
ripgrep - install ‘ripgrep’
If you want to use the paradox package list instead of the normal boring listing then you have to make a file ~/.emacs.paradox.el and add the following
(setq paradox-github-token TOKEN)
Where TOKEN is your github token.
For ruby mode I use enh-ruby-mode, which is just a symlink of ruby-mode snippets. I’ve also added all the rails snippets to this as well.
Add the following to your crontab
# Export all my timesheets to a csv file 00 5 * * * map7 /usr/bin/emacs -batch -l ~/.emacs.d/init.el -eval "(org-clock-csv-batch (org-agenda-files nil t))" > /home/map7/timesheets.csv
http://crypt.codemancers.com/posts/2013-09-26-setting-up-emacs-as-development-environment-on-osx/
Try to invalidate the project cache, first sit in a file within a project dir
C-c p i
Added
- sunshine - weather
- symon - system monitor, replaces gkrellm
- ox-reveal - reveal.js presentation tool
Added
- Installation
Updated
- CustomConfiguration
- Cask
- Modeline