diff options
| l---------[-rw-r--r--] | .emacs.d/README.org | 98 | ||||
| -rw-r--r-- | .emacs.d/init.org | 21 |
2 files changed, 16 insertions, 103 deletions
diff --git a/.emacs.d/README.org b/.emacs.d/README.org index 3c2fa65..6a52c33 100644..120000 --- a/.emacs.d/README.org +++ b/.emacs.d/README.org @@ -1,97 +1 @@ -#+TITLE: GNU Emacs configuration -#+AUTHOR: Miquel Sabaté Solà -#+EMAIL: mikisabate@gmail.com - -* 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. This function also generates an HTML version of it, that can be be found [[http://jo.mssola.com/static/init.html][here]]. - -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. - -=Supported versions=: GNU Emacs 25.3 and 26.x. - -* 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. In openSUSE it can be installed from - [[https://build.opensuse.org/package/show/server:mail/maildir-utils][obs://server:mail/maildir-utils]]. - -** Go - -In order to get a proper Go environment, you need to perform the following commands: - -#+BEGIN_SRC sh -$ go get -u golang.org/x/tools/cmd/goimports -$ go get -u github.com/dougm/goflymake -$ go get -u github.com/rogpeppe/godef -$ 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. - -* 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=, =abbrevs.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]] -- [[https://github.com/hlissner/doom-emacs][doom-emacs]] -- [[https://gitlab.com/protesilaos/dotfiles][@protesilaos]] - -* License - -#+BEGIN_SRC text - Copyright (C) 2014-2020 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 +./init.org
\ No newline at end of file diff --git a/.emacs.d/init.org b/.emacs.d/init.org index edf594a..bdecab1 100644 --- a/.emacs.d/init.org +++ b/.emacs.d/init.org @@ -8,12 +8,7 @@ * Preface -This is my attempt of getting my configuration organized with literate -programming and =org-babel=. I took the workflow I'm following from [[https://github.com/larstvei][@larstvei]]. -The idea is that the =init.el= file will replace itself on the first execution -with the tangled version of this file. This first version will also be -byte-compiled. This means that all changes are to be made on the =init.org= -file *always*. The initial contents of the =init.el= are: +This is my attempt of getting my configuration organized with literate programming and =org-babel=. I took the workflow I'm following from [[https://github.com/larstvei][@larstvei]]. The idea is that the =init.el= file will replace itself on the first execution with the tangled version of this file. This first version will also be byte-compiled. This means that all changes are to be made on the =init.org= file *always*. The initial contents of the =init.el= are: #+BEGIN_SRC elisp :tangle no ;; We can't tangle without org! @@ -104,6 +99,8 @@ on each change, the following function is provided: As you can see, this function will tangle and compile the resulting =init.el= file, and it will also produce an HTML version of it. This HTML version will be pushed into my [[http://jo.mssola.com][personal site]] thanks to a git [[https://github.com/mssola/dotfiles/blob/master/.emacs.d/pre-push][pre-push]] hook. The resulting version being hosted [[http://jo.mssola.com/static/init.html][here]]. +Other than that, I run GNU Emacs in server mode, but I don't use systemd for that. Instead, 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. All this is handled outside of this configuration, by adding some handy scripts like =e= and =emacsclient-a-nw= that can be found inside of the =bin= directory from my dotfiles, and that they are later picked up by various config files such as =.bashrc=, =.gitconfig=, =i3= and such. + * Introduction I'm using GNU Emacs 27, but everything should be working since GNU Emacs 24. There are some exceptions to this (e.g. webkit support), but these cases are individually handled. In the following block we define some handy constants that will be used throughout this configuration in order to support multiple versions of GNU Emacs. Moreover, this block also checks the version being used and errors out if you are using a GNU Emacs that is just too old for this configuration. @@ -2284,6 +2281,18 @@ Display emojis in buffer! (setq emojify-emoji-styles '(unicode github))) #+END_SRC +* Installation + +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=, =abbrevs.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. + +Other than that, in the =dependencies.sh= script you will be able to find the **runtime dependencies** that should be installed in order to get everything working. Note that this script assumes that you are running openSUSE, so don't run it blindly. All the software installed by this script has already been explained during this configuration. + * 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: |
