use-package’s :config vs. :init

I read this Reddit thread about favorite themes, and got intrigued by the spacemacs theme1.

I added that theme to my init file, and tried making it the default theme. I use use-package, and configured the theme as follows:

(use-package spacemacs-theme
:ensure t
(load-theme 'spacemacs-light t)

When re-evaluating my init file, the theme didn’t load. I tried to run only the (load-theme 'spacemacs-light t) line, and the theme loaded. I changed the :config to :init in the package configuration, and it loaded when I re-loaded emacs.

What, then, is the difference between :init and :config in use-package?

The answer to that question, which I found it in this stack-overflow answer, is that in use-package, whatever defined inside the :init keyword, will load whenever emacs is loading. What’s in the :config, though, will be executed only when the package is actually loaded (i.e lazy loading)2.

Here’s how my configuration for that theme looks like now:

(use-package spacemacs-theme
:ensure t
(load-theme 'spacemacs-light t)



I tried spacemacs before, and liked its look and feel, but didn’t know I can take it back with me to gnu emacs


Needless to say that, going back to the use-package documentation, the difference between :init and :config is clearly described…

Book Notes – The Myth Of Sisyphus

Thank god it’s over.

Long time ago I pledged not to put down a book I started reading. I tend to read at least couple of books in parallel, and if not being disciplined, I can easily focus on one and drop the other. I might then start yet another one, and forget about the other two.

“The Myth Of Sisyphus” almost got me to break this rule, though I haven’t. It wasn’t my “avoids putting a book down” principle that kept me going, but the book’s underling idea – the absurd life, the poignant quotes it is packed with, and the wealth of references it makes to other writers and books. Timing contributed as well, as this book came in a relevant time in life.

And so, I wanted to read what Camus had to say, but his writing style is annoying, verbose, and too abstract. Too often Camus will go in circles, to a point where I lost his line of thought. His writing style, and the way he structures his sentences are awful, making me read the same paragraphs over and over again, trying to comprehend what in havens he meant to say.

As eager I was to wrap my head around absurdism, I wouldn’t have made it without the excellent help of sparknotes. (I did skip the adjoining essays. It was too much…)

The central concern of The Myth of Sisyphus is what Camus calls “the absurd.” Camus claims that there is a fundamental conflict between what we want from the universe (whether it be meaning, order, or reasons) and what we find in the universe (formless chaos). We will never find in life itself the meaning that we want to find. Either we will discover that meaning through a leap of faith, by placing our hopes in a God beyond this world, or we will conclude that life is meaningless. (source: sparknotes)

But put writing style aside, the absurd is a thought provoking idea, and I can see why it was so influential. It raises a lot of questions, leading me to think about life in ways I never did before. However, while doing so, it doesn’t provide satisfying, practical answers. And so, the book delineates the philosophy it manifests, in that it helped me asking questions and seeing things as they are, while leading me towards no particular destination. And so, finishing reading it, I feel I was left at a dead-end.


  • If there is no eternal life, and if we don’t know what’s the meaning of life, nor will we ever know, why keep living?
  • God, as well as hope are ways around the previous question. Both don’t give answer, but stir us from the meaningless habit of living.
  • Suicide is the other extreme. If one have freedom of choice, why would she keep doing the same thing over and over again, knowing what he is doing is futile and has no point, meaning or legacy. Stop doing this repetitive thing (i.e. keep leaving the repetitive, meaningless, life) is a sound option. But it means caving to the absurd, just like believing in god and developing hope.
  • If not God, Hope or suicide, how can one keep living knowing that nothing one does adds to something?
  • Camus’s answer is to revolt, or, well, keep living live life with passion and to the fullest. While the previous point make sense, this one is less so, simply because I don’t see clearly how it translates to real life, and how my day-to-day decisions would be affected by it.
  • So, while the absurd makes a lot of sense, and make me realize that I’m not the only one who’s seeing the absurdity in life, it doesn’t get me much further. And so, I’m going to acknowledge the absurd and keep living my life, probably hoping and dreaming on “some day…”.

Favorite quotes

“Beginning to think is beginning to undermined.” (p.4)

“In a sense, and as in melodrama, killing yourself amounts to confessing. It is confessing that life is too much for you or that you do not understand it.”(p.5)

“Living, naturally, in never easy. You continue making the gestures commanded by existence for many reasons, the first of which is habit.”(p.5)

“A world that can be explained even with bad reasons is a familiar world. But, on the other hand, in a universe suddenly divested of illusions and lights, man feels an alien, a stranger.”(p.6)

“We get into the habit of living before acquiring the habit of thinking.” (p.8)

“Hitherto, … , people have played on words and pretended to believe that refusing to grant a meaning to life necessarily leads to declaring that it is not worth living.” (p.8)

“One kills oneself because life is not worth living, that is certainly a truth – yet an unfruitful one, because it is a truism. But does that insult to existence, that flat denial in which it is plunged come from the fact that it has no meaning? Does its absurdity require one to escape it through hope or suicide – this is what must be clarified, hunted down, and elucidated” (p.9)

“…during every day of an unillustrious life, time carries us. But a moment always comes when we have to carry it. We live on the future: ‘tomorrow,’ ‘later on’, ‘when you have made your way’, ‘you will understand when you are old enough’. Such irrelevancies are wonderful, for , after all, it’s a mater of dying. Yet a day comes when a man notices or says that he is thirty. Thus he asserts his youth. But simultaneously he situates himself in relation to time. … He admits that he stands at a certain point on a curve that he acknowledges having to travel to its end.”(p.13)

“Living is keeping the absurd alive. Keeping it alive is, above all contemplating it. Unlike Eurydice, the absurd dies only when we turn away from it. One of the only coherent philosophical position is thus revolt.” (p.54)

“It is essential to die unreconciled and not of one’s own free will.”(p.55)

“… either we are not free and God the all-powerful is responsible for evil. Or we are free and responsible but God is not all-powerful.”(p.56)

“Before encountering the absurd, the everyday man lives with aims,… He weighs his chances, he counts on ‘someday’…”(p.57)

“One becomes so accustomed so quickly. A man wants to earn money in order to be happy, and his whole effort and the best of a life are devoted to the earning of that money. Happiness is forgotten; the means are taken for the end.”(p.103)

“If God exists, all depends on him and we can do nothing against his will. If he does not exist everything depends on us.”(p.108)

Follow up books

Other links



I read it few years ago, but now I’m interested in reading it under the prism of absurdity

Elisp Video Tutorial – Notes

I’ve just finished watching Daniel Gopar’s elisp video tutorial. So far there are 4 parts to the tutorial, and based on this thread on Reddit, there are more to come.

After watching the guide I don’t feel more proficient in elisp, yet less timid running evals and more courageous tinkering with my config file.

Following is a short summary of the code exercises and shortcuts I logged while watching.

Part 1 – Intro

Link to episode 1

REPL – read-eval-print-loop

Define functions:

(defun add-num (a b) (+ a b))

Define a test:

(require 'ert)
(ert-deftest add-num-pos ()
         (equal (add-num 10 10) 20)))

To run the test that I’ve just created: M-x ert-run-tests-interactively

Choose the test I would like to run (in this case “pos-add-num”)

Part 2 – Create A Simple Function And A Test Of That Function

Link to episode 2

setq to set variables and lists (setq my-list '(1 2 3))

add-to-list to add element (add-to-list 'my-list 4)

Another way to add to list, but this time to a copy of the list: (cons 5 my-list) – this will return (5 1 2 3 4) But when inquiring my-list, we will get (1 2 3 4)

car returns the first element in every list (car my-list) -> 1

cdr returns everything from a list, after the first element (crd my-list) -> (2 3 4)

nth return a certain element in the list (nth 4 my-list) -> 3

member check for a certain value in a list, and return the elements in that list from that value on (member 3 my-list) -> (3 4) (member 7 my-list) -> nil

Part 3 – Looping And Local Variables

Link to episode 3

Use the scratch buffer, so I can write in multiple lines

C-x C-e to evaluate code. Point needs to be at the end of the code in order to get evaluated.

Looping through variables:

let to create a local variable

when and if – what they suppose to do…

If there is more than one statement in the if statement, need to use to wrap those lines with progn. There is no such limitation in the else statement.

Part 4 – Interactive Functions

Link to episode 4

Created a function to count words, plus the test for it.

(defun cheap-count-words()
  (let ((words 0))
      (goto-char (point-min))
    (while (forward-word)
      (setq words (1+ words)) ))
    (message (format "Words in Buffer: %s" words))words))

;; Tests
(require 'ert)

(ert-deftest count-words-test ()
  (get-buffer-create "*test*")
  (with-current-buffer "*test*"
    (insert "Hello world")
    (should (=(cheap-count-words) 2)))
  (kill-buffer "*test*"))

Another Change To My Writing Workflow

Till not long ago kept all my drafts in one big posts’ drafts. It was a good way to log things I’ve learned, while preparing to share those learnings in this blog. Keep this huge file public, meant to encourage me to iterate on drafts and eventually turn them into posts.

In an earlier post I mentioned that this strategy didn’t work very well, as this draft file turned into a draft cemetery – whatever got into it, didn’t come out. I, therefore, changed my workflow, and implemented the WordPress scheduling feature. I found that writing a first draft, and setting a publish date 2 days or so into the future, is much more effective in keeping me focused finishing up posts, and eventually help me write more.

The only thing is that I need to write those drafts somewhere, and I still want those drafts to be online. Instead of going back to my old single draft file, I figured I can start drafts in separate files, categorize them as drafts and publish them into the future. But I don’t want those drafts to show on the main page, so I installed the “Ultimate Category Excluder“, which let me exclude posts from certain categories to show up in the homepage.

Update: This “hiding category” solution won’t work… to begin with, even if I hide a category, when publishing a draft post, subscribers get a notification that there’s a new post on my blog. I don’t want that to happen. Second, the whole scheduling thing doesn’t work anymore, because the post is already live when I post it as draft… so no motivation to go back to it, more than do it when it’s part of a larger file…


Your App Is Burried In A Folder – Make Its Icon Stand Out

Meetup has finally updated its mobile app. More than that, it went through a complete re-branding, and as part of it also redesigned the icon of its mobile app.

From the look of the new icon, it seems that Meetup’s designers assumed their app sits front and center in their users’ devices. I hesitate that’s the case.

 It’s increasingly difficult for smaller publishers/brands to break through — even with downloaded apps — because of folders (being buried) .. —

I’m one of those users… while I use the Meetup app quite often, to stay in touch and communicate with members of the groups I lead, it’s not one of the few apps I spend most of my time on. Therefore Meetup, like 98% of my apps, lives in a folder.

As a foldered app, it should have an icon that’s visually distinguishable, and that stands out with every pixel, otherwise users will ignore the app and won’t use it. Meetup’s new icon is anything but standing out. On the contrary – it blends with the rest of the icons and lacks identity.

Take a look at Meetup’s icon before and after:


Figure 1: Left – before, Right – after. In both images, it’s in the top-right folder, the bottom-right icon

The previous icon, while not optimized for mobile – having to squeeze the name in the small icon – had some color contrast to it, which made it recognizable.

Your App Is Not Special

Don’t assume users care about your app; they don’t. After downloading it, they are likely to either delete it, or throw it into a folder. The least you can do is plan for the latter, and design an icon that’s unique, and can be recognized in any size.

Take a look again at the screenshots above – which icons do better job at grabbing your attention, even when placed within a folder1?



My pick would be the Workflow’s icon (same folder as Meetup, bottom-left corner), as well as Spotify (right image, top-left folder, top-left icon) and Overcast (right image, top-left folder, mid-left icon).

Magit – My Simple Workflow

I still not fluent with Magit’s terminology and workflow. Probably because I’m not using git, in general, too often. When I do, and when I try to use Magit as the interface, I usually get confused by the wealth of options and switches, and resort to git in the terminal.

Today I decided to give Magit yet another try. I read the Getting Started guide, and now things makes much more sense. However, I can see how I forget what I’ve just read a week from now, so here’s the gist of that, my simplest cheat-sheet:

(Ma)git status:

C-x g

(Ma)git add

For each unstage file: s

(Ma)git commit

c c

Type the commit note and then C-c C-c to create the commit.

(Ma)git push

p u

Done. Now I can type q to close the Magit pop-up buffer, and be back on the file I was working on.

Electric Pair Mode In Emacs

So far I’ve used TextExpander for text snippets and, well, text expansion. One of my main uses-cases is character pairings. For example, when I type " I almost always enclose it with another ".

But TextExpander is lacking in several ways:

  1. Performance – it takes a friction of a second for the expansion to happen, but it’s notable, and feels like a little hang.
  2. If I delete one part of the pair, it won’t remove the other.
  3. It won’t work to wrap text. If I typed something, and then want to wrap it with brackets, for example, I can’t select the text and type the bracket character.

In addition to the above technical shortcomings, I don’t plan to keep using TextExpander in the long run. The recent move into subscription based pricing, isn’t something I’m interested in. I mean, paying subscription to text snippets…?

Anyway, Emacs comes with an electric-pair-mode, which enables smart pairing. I turned it on, but out of the box it’s configured to work mainly with programming major modes. I need it also in other text based modes, such as org, markdown and simple text. For example, in org I use ~ for inline code snippets, and ~ isn’t paired by default. Same goes with ".

Luckily, defining more pairs is easy, through modifying the electric-pair-pairs variable.

Here’s my configuration for this mode:

(electric-pair-mode 1)
(setq electric-pair-pairs '(
                            (?\" . ?\")
                            (?\` . ?\`)
                            (?\( . ?\))
                            (?\{ . ?\})
                            ) )

I’ll add more pairs as I encounter them. Also, I’ll need to learn how to add pairs for specific major modes.