(Emacs/config)~Make basics one single source block and explanation
This commit is contained in:
@@ -19,40 +19,27 @@ applications or giving some greater reasoning about my specific
|
|||||||
configuration of a package. If you don't really want that, you may
|
configuration of a package. If you don't really want that, you may
|
||||||
tangle this file and just read the source code.
|
tangle this file and just read the source code.
|
||||||
* Basics
|
* Basics
|
||||||
Firstly, set full name and mail address. This is used in encryption
|
Let's setup a few things:
|
||||||
and mailing.
|
+ My name and mail address
|
||||||
#+begin_src emacs-lisp
|
+ File encoding
|
||||||
(setq user-full-name "Aryadev Chavali"
|
+ Backup files (~backup-directory-alist~)
|
||||||
user-mail-address "aryadev@aryadevchavali.com")
|
+ Refreshing buffers when a change occurs (~auto-revert-mode~)
|
||||||
#+end_src
|
+ Yes or no questions being less painful (~y-or-n-p~)
|
||||||
|
|
||||||
Let's set all yes or no questions to single letter responses.
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(fset 'yes-or-no-p 'y-or-n-p)
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
Set the encoding to UTF-8-Unix by default.
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package emacs
|
(use-package emacs
|
||||||
:demand t
|
:demand t
|
||||||
:init
|
:init
|
||||||
(setq-default buffer-file-coding-system 'utf-8-unix
|
(setq user-full-name "Aryadev Chavali"
|
||||||
save-buffer-coding-system 'utf-8-unix))
|
user-mail-address "aryadev@aryadevchavali.com"
|
||||||
#+end_src
|
buffer-file-coding-system 'utf-8-unix
|
||||||
|
save-buffer-coding-system 'utf-8-unix
|
||||||
Setup automatic saving for files (in case of system failure) and
|
backup-directory-alist `(("." . ,(no-littering-expand-var-file-name "saves/")))
|
||||||
auto-revert-mode (which refreshes the buffer on changes to the
|
|
||||||
underlying file). Along with that, set the custom-file (which holds
|
|
||||||
temporary customisation) in the etc folder.
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(use-package emacs
|
|
||||||
:demand t
|
|
||||||
:init
|
|
||||||
(setq backup-directory-alist `(("." . ,(no-littering-expand-var-file-name "saves/")))
|
|
||||||
global-auto-revert-non-file-buffers t
|
global-auto-revert-non-file-buffers t
|
||||||
auto-revert-verbose nil)
|
auto-revert-verbose nil)
|
||||||
:config
|
:config
|
||||||
(global-auto-revert-mode 1))
|
(fset 'yes-or-no-p 'y-or-n-p)
|
||||||
|
(global-auto-revert-mode))
|
||||||
#+end_src
|
#+end_src
|
||||||
* Custom functionality
|
* Custom functionality
|
||||||
Functions that don't require a packages to work other than Emacs,
|
Functions that don't require a packages to work other than Emacs,
|
||||||
|
|||||||
Reference in New Issue
Block a user