(Emacs)~cleaning up descriptions/errors
~ Links were misaligned ~ Descriptions ~ Titles ~ :display blocks - environment section as systemd gets path variables in .zprofile
This commit is contained in:
@@ -5,14 +5,12 @@
|
|||||||
#+options: toc:nil
|
#+options: toc:nil
|
||||||
|
|
||||||
#+begin_center
|
#+begin_center
|
||||||
My configuration for vanilla Emacs
|
My configuration for (a very specific form of) Emacs
|
||||||
#+end_center
|
#+end_center
|
||||||
#+latex: \clearpage
|
#+latex: \clearpage
|
||||||
#+toc: headlines
|
#+toc: headlines
|
||||||
|
|
||||||
* Basics
|
* Basics
|
||||||
Let's setup some basic functionality.
|
|
||||||
|
|
||||||
Firstly, set full name and mail address for use in a variety of
|
Firstly, set full name and mail address for use in a variety of
|
||||||
applications, including encryption.
|
applications, including encryption.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
@@ -24,7 +22,6 @@ Let's set all yes or no questions to single letter responses.
|
|||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(fset 'yes-or-no-p 'y-or-n-p)
|
(fset 'yes-or-no-p 'y-or-n-p)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
Set the encoding to UTF-8-Unix by default.
|
Set the encoding to UTF-8-Unix by default.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package emacs
|
(use-package emacs
|
||||||
@@ -57,29 +54,9 @@ custom-file to exist in the var-directory
|
|||||||
:config
|
:config
|
||||||
(global-auto-revert-mode 1))
|
(global-auto-revert-mode 1))
|
||||||
#+end_src
|
#+end_src
|
||||||
** Environment variables
|
|
||||||
- Setting the path variable cos it can get annoying sometimes.
|
|
||||||
- Setting the ssh agent
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(use-package env
|
|
||||||
:defer 1
|
|
||||||
:straight nil
|
|
||||||
:config
|
|
||||||
(setenv
|
|
||||||
"PATH" ;
|
|
||||||
(concat
|
|
||||||
(expand-file-name "~/.local/bin:")
|
|
||||||
(getenv "PATH")))
|
|
||||||
|
|
||||||
(setenv
|
|
||||||
"SSH_AUTH_SOCK"
|
|
||||||
(shell-command-to-string "echo -n \"${XDG_RUNTIME_DIR}/ssh-agent.socket\"")))
|
|
||||||
#+end_src
|
|
||||||
* Custom Functions
|
* Custom Functions
|
||||||
These are general custom functions I have defined for various
|
Functions that don't require a packages to work other than Emacs,
|
||||||
purposes. These encapsulate functionality that could apply to
|
which means I can define them early and use them later.
|
||||||
multiple packages/situations, otherwise I would've defined it in the
|
|
||||||
place it's required.
|
|
||||||
** Toggle buffer
|
** Toggle buffer
|
||||||
Like VSCode's toggling feature for just the terminal, but now for
|
Like VSCode's toggling feature for just the terminal, but now for
|
||||||
anything I want.
|
anything I want.
|
||||||
@@ -192,11 +169,11 @@ any buffers in ~+oreo/keep-buffer~ and kills the rest.
|
|||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
* Aesthetics
|
* Aesthetics
|
||||||
Load my custom "personal-primary-theme" theme which is stored in the
|
Load my custom "personal-primary" theme which is stored in the Emacs
|
||||||
Emacs lisp folder (look at [[file:elisp/personal-primary-theme.el][this file]]).
|
lisp folder (look at [[file:elisp/personal-primary-theme.el][this file]]).
|
||||||
|
|
||||||
I have an older version of this theme that uses a homogeneous colour
|
I have an older version of this theme that uses a homogeneous colour
|
||||||
theme [[file:elisp/personal-theme.el][(this file]])
|
scheme ([[file:elisp/personal-theme.el][this file]])
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package custom
|
(use-package custom
|
||||||
:demand t
|
:demand t
|
||||||
@@ -802,9 +779,10 @@ that makes it easy to manage the various buffers created by packages.
|
|||||||
(setq arg (cdr arg)))
|
(setq arg (cdr arg)))
|
||||||
forms)))))
|
forms)))))
|
||||||
#+end_src
|
#+end_src
|
||||||
*** Setup default display records
|
*** Setup some display records
|
||||||
Using the ~:display~ keyword, setup up some ~display-buffer-alist~
|
Using the ~:display~ keyword, setup up some ~display-buffer-alist~
|
||||||
records.
|
records. This is mostly for packages that aren't really configured
|
||||||
|
(like [[info:woman][woman]]) or packages that were configured before (like [[Ivy][Ivy]]).
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package window
|
(use-package window
|
||||||
:straight nil
|
:straight nil
|
||||||
@@ -818,10 +796,6 @@ records.
|
|||||||
(display-buffer-at-bottom)
|
(display-buffer-at-bottom)
|
||||||
(window-height . 0.25))
|
(window-height . 0.25))
|
||||||
|
|
||||||
("\\*compilation\\*"
|
|
||||||
(display-buffer-at-bottom)
|
|
||||||
(window-height . 0.25))
|
|
||||||
|
|
||||||
("\\*\\(Ido \\)?Completions\\*"
|
("\\*\\(Ido \\)?Completions\\*"
|
||||||
(display-buffer-in-side-window)
|
(display-buffer-in-side-window)
|
||||||
(window-height . 0.25)
|
(window-height . 0.25)
|
||||||
@@ -1697,7 +1671,7 @@ expression it tries to evaluate it by testing against these conditions
|
|||||||
|
|
||||||
Essentially, you get the best of both Emacs and external shell
|
Essentially, you get the best of both Emacs and external shell
|
||||||
programs *ALL WITHIN* Emacs for free.
|
programs *ALL WITHIN* Emacs for free.
|
||||||
*** Eshell bindings
|
*** Eshell functionality
|
||||||
Bind some evil-like movements for easy shell usage, and a toggle
|
Bind some evil-like movements for easy shell usage, and a toggle
|
||||||
function to pull up the eshell quickly.
|
function to pull up the eshell quickly.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
@@ -2193,6 +2167,10 @@ Colourising the compilation buffer so ANSI colour codes get computed.
|
|||||||
(use-package compile
|
(use-package compile
|
||||||
:defer t
|
:defer t
|
||||||
:straight nil
|
:straight nil
|
||||||
|
:display
|
||||||
|
("\\*compilation\\*"
|
||||||
|
(display-buffer-at-bottom)
|
||||||
|
(window-height . 0.25))
|
||||||
:config
|
:config
|
||||||
(defun +compile/colourise ()
|
(defun +compile/colourise ()
|
||||||
"Colourise the emacs compilation buffer."
|
"Colourise the emacs compilation buffer."
|
||||||
@@ -2550,7 +2528,7 @@ time a clock out occurs.")
|
|||||||
Setup for C and C++ modes via the cc-mode package. C and C++ are
|
Setup for C and C++ modes via the cc-mode package. C and C++ are
|
||||||
great languages for general purpose programming. My preferred choice
|
great languages for general purpose programming. My preferred choice
|
||||||
when I want greater control over memory management.
|
when I want greater control over memory management.
|
||||||
*** Configuration
|
*** cc-mode
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package cc-mode
|
(use-package cc-mode
|
||||||
:defer t
|
:defer t
|
||||||
|
|||||||
Reference in New Issue
Block a user