Additional cleanup
This commit is contained in:
parent
1e09abf098
commit
a09cefd186
|
@ -1,7 +1,7 @@
|
||||||
#+AUTHOR: Seth Morabito
|
#+AUTHOR: Seth Morabito
|
||||||
#+EMAIL: web@loomcom.com
|
#+EMAIL: web@loomcom.com
|
||||||
#+TITLE: GNU Emacs Configuration File
|
#+TITLE: GNU Emacs Configuration File
|
||||||
#+OPTIONS: toc:nil ':t
|
#+OPTIONS: toc:nil ':nil
|
||||||
#+STARTUP: showall
|
#+STARTUP: showall
|
||||||
|
|
||||||
* Table of Contents
|
* Table of Contents
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
- [[#appearance][Appearance]]
|
- [[#appearance][Appearance]]
|
||||||
- [[#package-management][Package Management]]
|
- [[#package-management][Package Management]]
|
||||||
- [[#development][Development and Languages]]
|
- [[#development][Development and Languages]]
|
||||||
- [[#misc-hacks][Miscellaneous Hacks]]
|
- [[#email][Email]]
|
||||||
|
|
||||||
* Introduction
|
* Introduction
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
|
@ -83,12 +83,17 @@ messages, the splash screen, tool bar, and tooltips.
|
||||||
(setq warning-minimum-level :emergency
|
(setq warning-minimum-level :emergency
|
||||||
inhibit-startup-message t
|
inhibit-startup-message t
|
||||||
inhibit-splash-screen t)
|
inhibit-splash-screen t)
|
||||||
(menu-bar-mode -1)
|
|
||||||
(when window-system
|
(when window-system
|
||||||
(progn
|
(progn
|
||||||
(tool-bar-mode -1)
|
(tool-bar-mode -1)
|
||||||
(tooltip-mode -1)
|
(tooltip-mode -1)))
|
||||||
(scroll-bar-mode -1)))
|
#+END_SRC
|
||||||
|
|
||||||
|
That said, I do often want a menu and a scroll bar, so those can stay on.
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(menu-bar-mode t)
|
||||||
|
(when (fboundp #'scroll-bar-mode) (scroll-bar-mode t))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Local lisp directory
|
** Local lisp directory
|
||||||
|
@ -121,7 +126,7 @@ Next, stretch the cursor to fill a full glyph cell
|
||||||
(setq-default x-stretch-cursor t)
|
(setq-default x-stretch-cursor t)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
On macOS, I turn off ~--dired~, because ~ls~ does not support it there!
|
On macOS, I turn off =--dired=, because =ls= does not support it there!
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(when (string= system-type "darwin")
|
(when (string= system-type "darwin")
|
||||||
|
@ -389,8 +394,8 @@ So instead, I wrap in a lambda that ignores errors (Inspired by:
|
||||||
|
|
||||||
** A Resize Helper
|
** A Resize Helper
|
||||||
|
|
||||||
I like a standard editor size of 88 by 66 characters (If you know why,
|
I like a standard editor size of 88 by 66 characters (If you know why, you
|
||||||
you win a cookie!) This helper will set that size automatically.
|
win a cookie!) This helper will set that size automatically.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(defun set-frame-standard-size () (interactive)
|
(defun set-frame-standard-size () (interactive)
|
||||||
|
@ -436,23 +441,23 @@ changed on disk, automatically reload it.
|
||||||
(global-auto-revert-mode t)
|
(global-auto-revert-mode t)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
I'm really not smart sometimes, so I need emacs to warn me when I try
|
I'm really not smart sometimes, so I need emacs to warn me when I try to
|
||||||
to quit it.
|
quit it.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(setq confirm-kill-emacs 'yes-or-no-p)
|
(setq confirm-kill-emacs 'yes-or-no-p)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
Remote X11 seems to have problems with delete for me (mostly XQuartz,
|
Remote X11 seems to have problems with delete for me (mostly XQuartz, I
|
||||||
I believe), so I force erase to be backspace.
|
believe), so I force erase to be backspace.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(when (eq window-system 'x)
|
(when (eq window-system 'x)
|
||||||
(normal-erase-is-backspace-mode 1))
|
(normal-erase-is-backspace-mode 1))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
When functions are redefined with =defadvice=, a warning is
|
When functions are redefined with =defadvice=, a warning is emitted. This is
|
||||||
emitted. This is annoying, so I disable these warnings.
|
annoying, so I disable these warnings.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(setq ad-redefinition-action 'accept)
|
(setq ad-redefinition-action 'accept)
|
||||||
|
@ -471,11 +476,10 @@ Tell Python mode to use Python 3
|
||||||
|
|
||||||
** Default Face
|
** Default Face
|
||||||
|
|
||||||
Not all fonts are installed on all systems where I use Emacs. This
|
Not all fonts are installed on all systems where I use Emacs. This code
|
||||||
code will iterate over a list of fonts, in order of my personal
|
will iterate over a list of fonts, in order of my personal preference, and
|
||||||
preference, and set the default face to the first one available. Of
|
set the default face to the first one available. Of course, if Emacs is
|
||||||
course, if Emacs is not running in a windowing system, this is
|
not running in a windowing system, this is ignored.
|
||||||
ignored.
|
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(when window-system
|
(when window-system
|
||||||
|
@ -814,6 +818,18 @@ which replaces Helm / Ivy.
|
||||||
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
** Git Integration
|
||||||
|
|
||||||
|
Magit and git-gutter are both essential, I can't live without them.
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(use-package magit
|
||||||
|
:ensure t)
|
||||||
|
|
||||||
|
(use-package git-gutter
|
||||||
|
:ensure t)
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
** Org Mode
|
** Org Mode
|
||||||
|
|
||||||
Next is =org-mode=, which I use constantly, day in and day out.
|
Next is =org-mode=, which I use constantly, day in and day out.
|
||||||
|
@ -1139,7 +1155,7 @@ with nicer looking defaults using Unicode.
|
||||||
|
|
||||||
** Perspective
|
** Perspective
|
||||||
|
|
||||||
~perspective.el~ is a tool that allows grouping of buffers into separate
|
=perspective.el= is a tool that allows grouping of buffers into separate
|
||||||
"perspectives", like workgroups in other editors.
|
"perspectives", like workgroups in other editors.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
@ -1153,6 +1169,10 @@ with nicer looking defaults using Unicode.
|
||||||
|
|
||||||
** Support for Encrypted Authinfo
|
** Support for Encrypted Authinfo
|
||||||
|
|
||||||
|
Various workflows require accessing authentication credentials stored in
|
||||||
|
an encrypted file named =~/.authinfo.gpg=. The =auth-source= package lets
|
||||||
|
me get quick access to those credentials.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package auth-source
|
(use-package auth-source
|
||||||
:ensure t
|
:ensure t
|
||||||
|
@ -1162,26 +1182,18 @@ with nicer looking defaults using Unicode.
|
||||||
|
|
||||||
** Tera Mode
|
** Tera Mode
|
||||||
|
|
||||||
Tera is a templating language used by [[https://www.getzola.org/][Zola]].
|
Tera is a templating language used by [[https://www.getzola.org/][Zola]], which I use for my website and
|
||||||
|
blog. This mode helps with editing those templates.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package tera-mode
|
(use-package tera-mode
|
||||||
:load-path "lisp/tera-mode")
|
:load-path "lisp/tera-mode")
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Mastodon
|
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(use-package mastodon
|
|
||||||
:ensure t
|
|
||||||
:config (setq mastodon-instance-url "https://mastodon.sdf.org"
|
|
||||||
mastodon-active-user "twylo"))
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
** Sly
|
** Sly
|
||||||
|
|
||||||
Sly is a Common Lisp IDE that is a fork of SLIME, with some
|
Sly is a Common Lisp IDE that is a fork of SLIME, with some additional
|
||||||
additional features.
|
features.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package sly
|
(use-package sly
|
||||||
|
@ -1195,26 +1207,17 @@ additional features.
|
||||||
|
|
||||||
** GraphViz (dot) Mode
|
** GraphViz (dot) Mode
|
||||||
|
|
||||||
|
If you don't know GraphViz, you should. It's a very useful language for
|
||||||
|
generating visual flowcharts and graphs.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package graphviz-dot-mode
|
(use-package graphviz-dot-mode
|
||||||
:ensure t)
|
:ensure t)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Git Integration
|
|
||||||
|
|
||||||
Magit is essential, I can't live without it.
|
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(use-package magit
|
|
||||||
:ensure t)
|
|
||||||
|
|
||||||
(use-package git-gutter
|
|
||||||
:ensure t)
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
** YAML
|
** YAML
|
||||||
|
|
||||||
YAML mode is useful for editing Docker files.
|
YAML mode is useful for editing Docker files, among many other things.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package yaml-mode
|
(use-package yaml-mode
|
||||||
|
|
Loading…
Reference in New Issue