2015-03-07 Professional therapy for your Emacs config problems

The other day, abo-abo had an excellent post on his excellent blog, whose title I will not mention since it contains mismatched parentheses and my OCD makes my head explode because of that. (Please, go read that post before you continue; it is not very long, and really worth looking at.) I have to say that the last sentence was just cute. After a while it occured to me that actually, Emacs can do that! (Well, sort of.) I didn’t have too much time, so please treat it just as a proof of concept, but here is a first draft of a function which could be launched in case your init.el has some errors.

(defun init-el-doctor ()
  "Switch to *doctor* buffer and start a therapy for a user with
init.el errors."
  (setq doctor--random-adjective '((buggy)
  (setq doctor--thing '((your init file)
			(your configuration)
			(your Emacs setup)
			(the location of control on your keyboard)))
  (setq doctor--things '((your Emacs habits)
			 (your vim past)
			 (your pinky problems)))
  (setq doctor--problems '((problems)
			   (elisp frustrations)
			   (crush on RMS)))
  (setq doctor--sexlst
	'(((doc$ doctor--areyou) (doc$ doctor--afraidof) dot emacs bankruptcy \?)
	  ((doc$ doctor--describe) (doc$ doctor--something) about your vim usage \.)
	  ((doc$ doctor--please) (doc$ doctor--describe) your life outside Emacs \.\.\.)
	  ((doc$ doctor--describe) your (doc$ doctor--feelings-about) your favorite Emacs package \.)
	  ((doc$ doctor--describe) your most (doc$ doctor--random-adjective) Emacs code \.)
	  ((doc$ doctor--areyou) satisfied with (doc// doctor--lover) \.\.\. \?))))

I have to admit that I didn’t read through all of doctor.el, but I definitely want to. One curiosity I found there is that the Doc practically doesn’t use strings; all the sentences he utters are made of lists of symbols. Of course, this means that the code is sprinkled with quotes of various flavors. Also, the doctor knows quite a few funny phrases. I used to play with it when I was a student, but never found out most of them. Fun read!

CategoryEnglish, CategoryBlog, CategoryEmacs, CategoryHumor