summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2017-02-18 22:18:16 +0100
committerRicardo Wurmus <rekado@elephly.net>2017-02-18 22:18:16 +0100
commit45223f66e136306a10ffd83641ee7497df5811e8 (patch)
tree73ad4387fcbaf44103679532fa22de71bd232bf0
parent3995363964fe79ee3fd0449b2ecb73fe750d6a9e (diff)
Add "Better defaults" section.
-rw-r--r--init.org89
1 files changed, 58 insertions, 31 deletions
diff --git a/init.org b/init.org
index 097a33d..ebc9493 100644
--- a/init.org
+++ b/init.org
@@ -142,6 +142,63 @@ Install packages as soon as this configuration is evaluated. If there’s an er
(init--install-packages))))
#+END_SRC
+* Better defaults
+:PROPERTIES:
+:header-args: :noweb-ref better-defaults
+:END:
+
+Emacs defaults are hostile to most people. They are what kept me from using Emacs for many years. Some people agree and wrote a package to fix some of the quirks that are almost universally hated. Note that the =better-defaults= package also hides the GUI elements.
+
+#+BEGIN_SRC elisp
+(require 'better-defaults)
+#+END_SRC
+
+I’m easily confused by the way the cursor (point) keeps jumping around when scrolling by pages. With this variable set to =t= the cursor keeps its screen position constant even when scrolling by full screens.
+
+#+BEGIN_SRC elisp
+(setq scroll-preserve-screen-position t)
+#+END_SRC
+
+Here are a few more simple tweaks:
+
+#+BEGIN_SRC elisp
+;; No splash screen please ...
+(setq inhibit-startup-message t)
+
+;; display tool tips in echo area only
+(tooltip-mode -1)
+
+;; by default Emacs will only resize the frame line by line
+(setq frame-resize-pixelwise t)
+
+;; don’t force me to input “yes” or “no”
+(defalias 'yes-or-no-p 'y-or-n-p)
+
+;; disable mouse scrolling
+(mouse-wheel-mode -1)
+#+END_SRC
+
+Tell Emacs to look for my custom code in the =lisp= directory. This will not be needed in the future once everything is found in this Org document.
+
+#+BEGIN_SRC elisp
+(add-to-list 'load-path (concat user-emacs-directory "lisp"))
+#+END_SRC
+
+Also tell Emacs that I want to have a separate file for all other customisations that are handled through =M-x customize=.
+
+#+BEGIN_SRC elisp
+;; Keep emacs Custom-settings in separate file
+(setq custom-file (expand-file-name "custom.el" user-emacs-directory))
+(load custom-file)
+#+END_SRC
+
+After years of using a dark theme I found that the most important thing for me is a more even contrast. That’s why I like to use the /Solarized/ theme.
+
+#+BEGIN_SRC elisp
+(setq frame-background-mode 'light)
+(load-theme 'solarized-light t)
+#+END_SRC
+
* Default fonts
:PROPERTIES:
:header-args: :noweb-ref default-fonts
@@ -1281,27 +1338,6 @@ Load all of this email configuration code only when I start =mu4e=.
)
#+END_SRC
-* TODO Initial stuff
-:PROPERTIES:
-:header-args: :noweb-ref initial
-:END:
-
-This is supposed to happen at the very beginning, even before loading packages. I still need to arrange these things nicely.
-
-#+BEGIN_SRC elisp
-;; No splash screen please ...
-(setq inhibit-startup-message t)
-
-;; display tool tips in echo area only
-(tooltip-mode -1)
-(setq frame-resize-pixelwise t)
-(defalias 'yes-or-no-p 'y-or-n-p)
-
-;; disable mouse scrolling
-(mouse-wheel-mode -1)
-
-(add-to-list 'load-path (concat user-emacs-directory "lisp"))
-#+END_SRC
* TODO More stuff
:PROPERTIES:
@@ -1311,17 +1347,8 @@ This is supposed to happen at the very beginning, even before loading packages.
This is even more stuff to be done after initialising packages. I still need to process all of this and clean it up.
#+BEGIN_SRC elisp
-;; better defaults, includes hiding the GUI
-(require 'better-defaults)
-
(require 'projectile)
(projectile-global-mode)
-;; Keep emacs Custom-settings in separate file
-(setq custom-file (expand-file-name "custom.el" user-emacs-directory))
-(load custom-file)
-
-(setq frame-background-mode 'light)
-(load-theme 'solarized-light t)
#+END_SRC
* TODO And even more
@@ -1498,7 +1525,7 @@ Having defined named code blocks in the sections above we can finally put them a
#+BEGIN_SRC elisp :noweb yes :tangle yes
<<compile-init>>
-<<initial>>
+<<better-defaults>>
<<packages>>
<<default-fonts>>
<<manuals>>