hjertnes.blog

#

12.10.2018 06:41

Liked: Remembering Steve Jobs | iMore

#

12.10.2018 06:41

Liked: Node.js Foundation and JS Foundation Announce Intent to Create Joint Organization to Support the Broad Node.js and JavaScript Communities - The Linux Foundation

#

12.10.2018 06:41

Liked: Working with Babel 7 and Webpack | The Basement

#

12.10.2018 06:40

Liked: Emacs and Pairs

#

11.10.2018 19:19

Liked: How Wealthy People Protect Their Money - The Atlantic

#

11.10.2018 19:19

Liked: Taylor Swift Posts Political Message on Instagram Supporting Democrats

#

11.10.2018 19:19

Liked: carmine/README.md at master ยท ptaoussanis/carmine

#

11.10.2018 19:19

Liked: Lisp editing - WikEmacs

Emacs: Use-package

11.10.2018 10:00

use-package is my preferred way of dealing with emacs packages. You can find more information about it here. What I ended up with before I started to really get into use-package is that you have all of these packages, that are installed and loaded in a specific way. Where you have some config stuff in the beginning and modes and other stuff are loaded in a specific order to make it all work etc. Use-package tries to fix this by making these simple idependent statments that can be in any order you want.

The way it works is that you write for example (use-package foo) this tells us that this package should be loaded. And then you can add :ensure t if you want use-package to also install it if it needs to. If you also need to do something (like setting a variable or ten) before loading it you can do this by adding something like :init (setq b 1)(run-function) etc. And you can also add code you want to run after it have been loaded like enabling a mode with :config (foo-mode 1).

The complete result would look something like (use-package foobar :ensure t :init (setq a 1)(run-function) :config (foo-mode 1))

Then you can also add stuff like :after (org org-babel) if you need to control that something should first load after all of some other packages have loaded.

I think use-package is a very useful tool to keep a flat sturcutre to your package configuration, while still making sure all of them are independednt. My config got a lot cleaner after I started using it.

#

11.10.2018 06:45

Liked: natemcmaster/dotnet-tools: A list of tools to extend the .NET Core command line (dotnet)