{"id":11045,"date":"2022-12-29T12:57:25","date_gmt":"2022-12-29T17:57:25","guid":{"rendered":"https:\/\/irreal.org\/blog\/?p=11045"},"modified":"2022-12-29T12:57:25","modified_gmt":"2022-12-29T17:57:25","slug":"emacs-from-scratch","status":"publish","type":"post","link":"https:\/\/irreal.org\/blog\/?p=11045","title":{"rendered":"Emacs From Scratch"},"content":{"rendered":"<p>Torstein Johansen has an interesting post on his new Emacs configuration. He\u2019s a long time Emacs user and his old configuration was 20 years old and 1617 lines long. After he <a href=\"https:\/\/www.youtube.com\/watch?v=WW7LxxrTs5Y\">refactored his configuration<\/a> it was down to 368 lines. A lot of the refactoring was simply a matter of removing packages whose functionality had been superseded by core Emacs.<\/p>\n<p>One thing he does in the video is to number each section of the configuration and then add <code>(occur \"^;; [0-9]+\")<\/code> at the top. Executing that expression generates a table of contents for the file. That seems like a nice feature but it\u2019s not in his <a href=\"https:\/\/gitlab.com\/skybert\/my-little-friends\/-\/blob\/2022-emacs-from-scratch\/emacs\/.emacs\">final configuration<\/a>, which may mean that there\u2019s a problem when Emacs starts.<\/p>\n<p>My own configuration is currently 2461 lines long so I\u2019m sure it could also do with some refactoring. It\u2019s a bit over 15 years old now so there\u2019s bound to be some cruft in there. One comfort that I took away from Johansen\u2019s video is that he keeps almost everything in a single file.<\/p>\n<p>The current conventional practice is to separate discrete functionality into separate files. Johansen finds this hard to navigate and I agree. I get a lot of pushback whenever I say that but it\u2019s still true. It\u2019s nice to know that at least one other person agrees with me.<\/p>\n<p>If you like seeing what other people are doing with their configuration, Johansen\u2019s video is worth watching. The video is 27 minutes, 50 seconds long so you\u2019ll need to schedule some time for it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Torstein Johansen has an interesting post on his new Emacs configuration. He\u2019s a long time Emacs user and his old configuration was 20 years old and 1617 lines long. After he refactored his configuration it was down to 368 lines. &hellip; <a href=\"https:\/\/irreal.org\/blog\/?p=11045\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[18],"class_list":["post-11045","post","type-post","status-publish","format-standard","hentry","category-general","tag-emacs"],"_links":{"self":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/11045","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=11045"}],"version-history":[{"count":1,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/11045\/revisions"}],"predecessor-version":[{"id":11046,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/11045\/revisions\/11046"}],"wp:attachment":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11045"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11045"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11045"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}