summary refs log tree commit diff
path: root/emacs.org
diff options
context:
space:
mode:
Diffstat (limited to 'emacs.org')
-rw-r--r--emacs.org48
1 files changed, 16 insertions, 32 deletions
diff --git a/emacs.org b/emacs.org
index ac4d0c4..a54dcbb 100644
--- a/emacs.org
+++ b/emacs.org
@@ -9,8 +9,7 @@ Also, if you just stumbled accross this at random, there is an easy tangle butto
 * Before we start lisping
   This emacs config's dependencies are mostly managed by [[https://nixos.org][nix]], therefore we have to make a nix file before we
   do any emacs configuring by ourselves
-  #+name: emacs.nix
-  #+begin_src nix
+  #+begin_src nix :tangle emacs.nix
     let
       sources = import ./nix/sources.nix
     in
@@ -26,15 +25,13 @@ Also, if you just stumbled accross this at random, there is an easy tangle butto
 ** The bases
    This is only better-defaults. It comes with ido-mode and some other defaults that I forgot to set in my
    init file that I stole from [[https://github.com/editor-bootstrap/emacs-bootstrap][emacs-bootstrap]] months ago
-   #+name: emacsconfig/base.el
-   #+begin_src elisp :mkdirp yes
+   #+begin_src elisp :mkdirp yes :tangle emacsconfig/base.el
      (use-package better-defaults)
    #+end_src
 ** Generally nice emacs tools
 *** Magit
     Simple. Nice. default config. (almost)
-    #+name emacsconfig/extras.el
-    #+begin_src elisp
+    #+begin_src elisp :tangle emacsconfig/extras.el
       (use-package magit
         :defer t
         :config
@@ -50,8 +47,7 @@ Also, if you just stumbled accross this at random, there is an easy tangle butto
 *** IRC
     I use IRC in emacs, with ERC. There is even a small macro so that I can easily join new servers
     with my preferred nickname
-    #+name: emacsconfig/extras.el
-    #+begin_src elisp
+    #+begin_src elisp :tangle emacsconfig/extras.el
       (use-package erc
         :custom
         (erc-server-reconnect-attempts 10)
@@ -73,8 +69,7 @@ Also, if you just stumbled accross this at random, there is an easy tangle butto
     #+end_src
 *** Dashboard
     Gives me access to the most recent files I edited, and some other stuff that I don't really care about
-    #+name: emacsconfig/extras.el
-    #+begin_src elisp
+    #+begin_src elisp :tangle emacsconfig/extras.el
       (use-package dashboard
         :config (dashboard-setup-startup-hook))
     #+end_src
@@ -82,8 +77,7 @@ Also, if you just stumbled accross this at random, there is an easy tangle butto
     I don't use elfeed in emacs that much anymore, as I have switched to [[https://www.seamonkey-project.org/][seamonkey]] for my RSS needs.
     Here is my old config anyways. If you want to browse through some default news feel free to remove the last
     =:custom= option
-    #+name: emacsconfig/extras.el
-    #+begin_src elisp
+    #+begin_src elisp :tangle emacsconfig/extras.el
       (use-package elfeed
         :bind
         ("C-x w" . elfeed)
@@ -160,8 +154,7 @@ Also, if you just stumbled accross this at random, there is an easy tangle butto
      #+end_src
 *** Which-key
     Has god-mode support
-    #+name: emacsconfig/extras.el
-    #+begin_src elisp
+    #+begin_src elisp :tangle emacsconfig/extras.el
       (use-package which-key
         :after god-mode
         :config
@@ -174,8 +167,7 @@ Also, if you just stumbled accross this at random, there is an easy tangle butto
 *** Company
     Generally nice for auto-completion anywhere. I think here is also the place to note that I am not a huge fan
     of language-servers, as I've had bad experiences with them when I was still using vim
-    #+name: emacsconfig/extras.el
-    #+begin_src elisp
+    #+begin_src elisp :tangle emacsconfig/extras.el
       (use-package company
         :bind
         ("C-SPC" . company-complete))
@@ -183,8 +175,7 @@ Also, if you just stumbled accross this at random, there is an easy tangle butto
 *** Matching of parentheses and other stuff
     "ERROR: Unmatched parenteses/braces/whatever" is really a thing I would prefer to never see again
     It has nix and lisp support, but other langages are fairly standards so not much configuration needed there
-    #+name: emacsconfig/extras.el
-    #+begin_src elisp
+    #+begin_src elisp :tangle emacsconfig/extras.el
       (use-package smartparens
         :hook
         (emacs-lisp-mode . smartparens-mode)
@@ -208,8 +199,7 @@ Also, if you just stumbled accross this at random, there is an easy tangle butto
 ***** Nix mode
       This config is just part of editing nix config. It is supposed to come with company support, but
       the auto-completion backend turns out to not be that great. We'll see what I do with it
-      #+name: emacsconfig/nix.el
-      #+begin_src elisp
+      #+begin_src elisp :tangle emacsconfig/nix.el
         (use-package nix-mode
           :mode "\\.nix\\'"
           :hook
@@ -228,8 +218,7 @@ Also, if you just stumbled accross this at random, there is an easy tangle butto
 ***** Nix package management
       I use nix-sandbox for managing nix package for other languages.
       One of the functions doesn't work that well for me so I replaced it with something that does
-      #+name: emacsconfig/nix.el
-      #+begin_src elisp
+      #+begin_src elisp :tangle emacsconfig/nix.el
         (use-package nix-sandbox
           :config
           (defun nix-executable-find (sandbox executable)
@@ -239,8 +228,7 @@ Also, if you just stumbled accross this at random, there is an easy tangle butto
       #+end_src
       Beyond that, there is a helper function that makes it easy to quickly define environments with the required
       packages for a programming language
-      #+name: emacsconfig/nix.el
-      #+begin_src elisp
+      #+begin_src elisp :tangle emacsconfig/nix.el
         (defun nix-env-from-packages (name &rest packages)
           "create a nix environment from nix packages. returns the location of the environment"
           (interactive (append
@@ -268,8 +256,7 @@ Also, if you just stumbled accross this at random, there is an easy tangle butto
 
      #+end_src
      First we set an interpreter with nix, it comes with all the python autocompletion tools we need
-     #+name: el-python-config
-     #+begin_src elisp
+     #+begin_src elisp :tangle el-python-config
        (setq python-shell-interpreter
              (nix-executable-find
               (nix-env-from-packages "python" "(python3.withPackages (p: with p; [pygame virtualenvwrapper pip sqlite jedi flake8 yapf autopep8 black]))")
@@ -277,8 +264,7 @@ Also, if you just stumbled accross this at random, there is an easy tangle butto
 
      #+end_src
      Then we introduce elpy with so that it can use all the tools immidiately without downloading them
-     #+name: el-python-config-2
-     #+begin_src elisp
+     #+begin_src elisp :tangle el-python-config-2
        (use-package elpy
          :config
          (elpy-enable)
@@ -290,8 +276,7 @@ Also, if you just stumbled accross this at random, there is an easy tangle butto
      might expand later, but so far this is what I have
 ***** Web mode
       General xml stuff editing. Fairly standard
-      #+name: emacsconfig/web.el
-      #+begin_src elisp
+      #+begin_src elisp :tangle emacsconfig/web.el
         (use-package web-mode
           :mode (("\\.x?html?\\'" . web-mode)
                  ("\\.x[sm]l\\'"  . web-mode)
@@ -309,8 +294,7 @@ Also, if you just stumbled accross this at random, there is an easy tangle butto
       #+end_src
 ***** Emmet mode
       for quickly inserting a whole XML tree
-      #+name: emacsconfig/web.el
-      #+begin_src elisp
+      #+begin_src elisp :tangle emacsconfig/web.el
         (use-package emmet-mode
           :hook
           (sgml-mode . emmet-mode)