{"id":10952,"date":"2022-11-15T14:57:33","date_gmt":"2022-11-15T19:57:33","guid":{"rendered":"https:\/\/irreal.org\/blog\/?p=10952"},"modified":"2022-11-15T14:57:33","modified_gmt":"2022-11-15T19:57:33","slug":"solving-problems-with-some-quick-elisp","status":"publish","type":"post","link":"https:\/\/irreal.org\/blog\/?p=10952","title":{"rendered":"Solving Problems With Some Quick Elisp"},"content":{"rendered":"<p>I often read complaints about how hard it is to learn Elisp and that therefore we should rewrite Emacs in Javascript or something equally silly. The fact is, of course, that Elisp, like most Lisps, is actually easy to learn and once you\u2019ve spend a bit of time with it, you\u2019ve got a very powerful tool for solving text manipulation problems or, really, just about any problem at all.<\/p>\n<p>Marcin Borkowski (mbork) has a <a href=\"https:\/\/mbork.pl\/2022-11-14_Doubling_backslashes\">short post that illustrates this nicely<\/a>. Mbork\u2019s problem is a simple one. He needs to replace all backslashes with double backslashes. That\u2019s a trivial problem in Emacs but Mbork wants to replace only <i>single<\/i> backslashes so the obvious solutions like <code>replace-regexp<\/code> don\u2019t quite do the job. No matter, he simply wrote a bit of Elisp that, he says, took him about 6 minutes including the inevitable debugging.<\/p>\n<p>Folks are fond of pointing out, correctly, that Elisp is not the best Lisp but it\u2019s more than good enough for its domain. Sure, things like name spaces would be nice but look at this way, part of what make Elisp so easy to learn is its simplicity.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I often read complaints about how hard it is to learn Elisp and that therefore we should rewrite Emacs in Javascript or something equally silly. The fact is, of course, that Elisp, like most Lisps, is actually easy to learn &hellip; <a href=\"https:\/\/irreal.org\/blog\/?p=10952\">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-10952","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\/10952","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=10952"}],"version-history":[{"count":1,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/10952\/revisions"}],"predecessor-version":[{"id":10953,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/10952\/revisions\/10953"}],"wp:attachment":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10952"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10952"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10952"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}