1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
#+TITLE: GNU Emacs configuration
#+AUTHOR: Miquel Sabaté Solà
#+EMAIL: mikisabate@gmail.com
* mssola's GNU Emacs configuration
** About this
I'm following a literate programming approach for my GNU Emacs
configuration. The basic workflow is that on the first run the =init.el= file
will replace itself with a tangled (=org-babel=) version of itself. Therefore,
all changes should go into the =init.org= file. Moreover, I've added a function
that is executed on save which generates and compiles new versions of the
=init.el= file. Note that it will also generate an =init.html= file, which is
the file that I'm showing on my [[http://jo.mssola.com/static/init.html][personal site]].
I run GNU Emacs in daemon mode, but I don't use systemd for that. Instead, in
I'm using the =-a= argument of =emacsclient= with an empty string. This
instructs =emacsclient= to spawn a new server if there isn't one already. This
means that the first time around it will take some time, but in the next time
everything will be alright.
** Dependencies
First of all, install the [[https://github.com/mssola/soria][soria]] color theme. This should already be handled by
the install script. Then make sure to install the following:
- =calibre=: a markdown to HTML converter.
- =spell= for spell checking.
- A LaTeX to PDF converter for exporting org files to PDF. In openSUSE this is
fixed by installing the =texlive-pdftex= package.
- =mu= and =mu4e= for email. This should be installed from my [[https://build.opensuse.org/package/show/home:mssola/mu][OBS]] project.
Last but not least, to get a proper Go environment you need to install the
following:
#+BEGIN_SRC sh
go get -u golang.org/x/tools/cmd/goimports
go get -u github.com/rogpeppe/godef
go get -u github.com/dougm/goflymake
go get -u github.com/nsf/gocode
#+END_SRC
** Developing
I've added a git =pre-push= hook which syncs the =init.html= and the =org.css=
files into my personal server. So make sure to add this hook into the
=.git/hooks= directory.
** Installing
The installation process of my GNU Emacs configuration should already be handled
by the =install.sh= script that can be found in the root of this project. If you
want to do it manually:
- Create the =~/.emacs.d= directory if it has not been created yet.
- Copy the =init.el= into the =~/.emacs.d= directory. This is the only file that
should be copied instead of linked because it will get replaced on the first run
by =org-babel=.
- Link the =init.org=, =custom.el= and =gtkrc= files into the =~/.emacs.d=
directory.
- Create the =~/.emacs.d/lisp= subdirectory and link the =lisp/g.el= file there.
- Clone the [[https://github.com/mssola/soria][soria]] project and link the =soria-theme.el= file into the
=~/.emacs.d= directory.
** Credits
I've built this file by simply scavenging from other people's emacs.d/dotfiles
repositories. I have taken lots of pieces from here and there, but most notably:
- [[https://github.com/ereslibre/dotfiles][@ereslibre]]
- [[https://github.com/dmacvicar/dotfiles][@dmacvicar]]
- [[https://github.com/bbatsov/emacs.d][@bbatsov]]
- [[https://github.com/aaronbieber/dotfiles][@aaronbieber]]
- [[https://github.com/purcell/emacs.d][@purcell]]
- [[https://github.com/sachac/emacs.d][@sachac]] ([[http://pages.sachachua.com/.emacs.d/Sacha.html][HTML version]])
- [[https://github.com/larstvei/dot-emacs][@larstvei]]
** License
#+BEGIN_SRC text
Copyright (C) 2014-2017 Miquel Sabaté Solà <mikisabate@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
#+END_SRC
|