summaryrefslogtreecommitdiff
path: root/init.org
diff options
context:
space:
mode:
authorrekado <rekado@elephly.net>2016-07-31 21:27:29 +0200
committerrekado <rekado@elephly.net>2016-07-31 21:27:29 +0200
commitd9627719d46eb62ae5aefc0b0c10c6ee628fb598 (patch)
tree98db197d56e3e1c8f7348cfdc63a1976b93db001 /init.org
parent910bfeabbda9ed4904408bb8e0cfb7fd360fcd80 (diff)
Use visual-line-mode in org files.
This looks better and makes more sense when variable-pitch-mode is active.
Diffstat (limited to 'init.org')
-rw-r--r--init.org56
1 files changed, 14 insertions, 42 deletions
diff --git a/init.org b/init.org
index 3d9f782..47a772a 100644
--- a/init.org
+++ b/init.org
@@ -53,17 +53,9 @@ the =init.el= has to be regenerated.
:noweb-ref: packages
:END:
-Emacs is an operating system and I use it as such (see [[http://elephly.net/posts/2016-02-14-ilovefs-emacs.html][this blog
-post]]). I rely on quite a few extensions that have been made available
-on various ELPA repositories. Recently, I have moved to installing
-and managing Emacs packages like any other software package on my
-system with the functional package manager [[https://gnu.org/s/guix][GNU Guix]]. I find this more
-reliable, although at first it is slightly less convenient as I can no
-longer just use =package.el= but first need to package the Elisp code
-for Guix.
-
-To install all packages via GNU Guix I can either use a manifest file
-or use the following invocation:
+Emacs is an operating system and I use it as such (see [[http://elephly.net/posts/2016-02-14-ilovefs-emacs.html][this blog post]]). I rely on quite a few extensions that have been made available on various ELPA repositories. Recently, I have moved to installing and managing Emacs packages like any other software package on my system with the functional package manager [[https://gnu.org/s/guix][GNU Guix]]. I find this more reliable, although at first it is slightly less convenient as I can no longer just use =package.el= but first need to package the Elisp code for Guix.
+
+To install all packages via GNU Guix I can either use a manifest file or use the following invocation:
#+BEGIN_SRC sh :noweb-ref nil
guix package -i \
@@ -155,11 +147,7 @@ Now we are ready to install packages if they aren’t yet installed.
(packages-install my/packages))
#+END_SRC
-Install packages as soon as this configuration is evaluated. If
-there’s an error (e.g. because a package by this name cannot be found)
-ask Emacs to refresh the list of packages and retry. If there’s an
-error again we just ignore it. It could be that it’s because there’s
-no Internet connection.
+Install packages as soon as this configuration is evaluated. If there’s an error (e.g. because a package by this name cannot be found) ask Emacs to refresh the list of packages and retry. If there’s an error again we just ignore it. It could be that it’s because there’s no Internet connection.
#+BEGIN_SRC elisp
(condition-case e
@@ -175,10 +163,7 @@ no Internet connection.
:noweb-ref: default-fonts
:END:
-I like pretty faces. For coding I like to use the DejaVu Sans Mono
-font. In =org-mode= and in =eww= I like to use a font with variable
-pitch instead of the default mono-spaced font. I find Linux Biolinum
-pretty, especially when it’s rendered large.
+I like pretty faces. For coding I like to use the DejaVu Sans Mono font. In =org-mode= and in =eww= I like to use a font with variable pitch instead of the default mono-spaced font. I find Linux Biolinum pretty, especially when it’s rendered large.
#+BEGIN_SRC elisp
(set-frame-font "DejaVu Sans Mono")
@@ -190,11 +175,7 @@ pretty, especially when it’s rendered large.
:noweb-ref: manuals
:END:
-Also in Info manuals I want to use variable-pitch fonts where
-possible. Unfortunately, Info manuals don’t contain enough semantic
-markup, so I cannot selectively use a monospace font for examples or
-inline code and use a variable pitch font for everything else. So I
-just use variable pitch in headings.
+Also in Info manuals I want to use variable-pitch fonts where possible. Unfortunately, Info manuals don’t contain enough semantic markup, so I cannot selectively use a monospace font for examples or inline code and use a variable pitch font for everything else. So I just use variable pitch in headings.
#+BEGIN_SRC elisp
(require 'info)
@@ -254,21 +235,18 @@ This is my org mode configuration. Document it.
(add-hook 'org-mode-hook
(lambda ()
(org-bullets-mode 1)
- (variable-pitch-mode 1)))
+ (variable-pitch-mode 1)
+ (visual-line-mode 1)))
(defun gtd ()
(interactive)
(find-file (concat org-directory "/master.org")))
#+END_SRC
-I don’t like the way org-mode looks by default. It’s noisy, too
-colourful and seems old-fashioned to the point of being somewhat
-unattractive. This is why I find it important to change some of the
-default faces.
-Since I enable =variable-pitch-mode= in my org-mode buffers I also
-need to explicitly make a few faces inherit from the =fixed-width=
-face to be rendered with a monospaced font.
+I don’t like the way org-mode looks by default. It’s noisy, too colourful and seems old-fashioned to the point of being somewhat unattractive. This is why I find it important to change some of the default faces.
+
+Since I enable =variable-pitch-mode= in my org-mode buffers I also need to explicitly make a few faces inherit from the =fixed-width= face to be rendered with a monospaced font.
#+BEGIN_SRC elisp
(set-face-attribute 'org-done nil :strike-through t)
@@ -317,19 +295,14 @@ face to be rendered with a monospaced font.
(set-face-attribute face nil :height 0.8))
#+END_SRC
-To ensure that indented blocks line up with their headings despite
-using =variable-pitch-mode= we set the indentation character to =*=
-and hide it by setting the foreground colour to the same as the
-default background colour.
+To ensure that indented blocks line up with their headings despite using =variable-pitch-mode= we set the indentation character to =*= and hide it by setting the foreground colour to the same as the default background colour.
#+BEGIN_SRC elisp
(setq org-indent-boundary-char ?*)
(set-face-attribute 'org-indent nil :foreground (face-attribute 'default :background))
#+END_SRC
-The following snippet is an attempt to prettify the somewhat ugly
-headers of source code blocks in =org-mode=. The snippet was taken
-from [[https://pank.eu/blog/pretty-babel-src-blocks.html][the blog of Rasmus Pank]] and slightly modified to suit my needs.
+The following snippet is an attempt to prettify the somewhat ugly headers of source code blocks in =org-mode=. The snippet was taken from [[https://pank.eu/blog/pretty-babel-src-blocks.html][the blog of Rasmus Pank]] and slightly modified to suit my needs.
#+BEGIN_SRC elisp
(defvar-local my/org-at-src-begin -1
@@ -817,8 +790,7 @@ still need to process all of this and clean it up.
* Putting it all together
-Having defined named code blocks in the sections above we can finally
-put them all together to build the init file
+Having defined named code blocks in the sections above we can finally put them all together to build the init file
#+BEGIN_SRC elisp :noweb yes :tangle "~/.emacs.d/init.el"
<<compile-init>>