{"id":10216,"date":"2021-12-29T13:37:53","date_gmt":"2021-12-29T18:37:53","guid":{"rendered":"https:\/\/irreal.org\/blog\/?p=10216"},"modified":"2021-12-29T13:37:53","modified_gmt":"2021-12-29T18:37:53","slug":"a-nice-example-of-emacs-keyboard-macros","status":"publish","type":"post","link":"https:\/\/irreal.org\/blog\/?p=10216","title":{"rendered":"A Nice Example of Emacs Keyboard Macros"},"content":{"rendered":"<p>Just a quickie today. Bill over at ATMakers has a short video on <a href=\"https:\/\/www.youtube.com\/watch?v=wFCO__0prCM\">Why He Uses Emacs<\/a>. It\u2019s actually a nice example of using keyboard macros to convert raw data into the required form.<\/p>\n<p>I like it because it\u2019s a realistic example. Very often when we want to convert a data set to some other format, we have the problem that the source data is not completely regular. Theoretically, this means we can\u2019t write a quick and easy macro to do the conversion but, of course, that is not how we work. If there are one or two outliers in the data, we just convert everything according to the canonical data and fix up the outliers by hand afterwards.<\/p>\n<p>That\u2019s exactly what Bill does in his video. Most of the data is converted perfectly but the two outliers are easy to fix by hand and the entire process is much more efficient than converting each datum by hand or writing an app that does the right thing for each entry. Instead of an hour or two of tedious work or programming, Bill converts the first entry while recording his keystrokes and then applies that to all the other entries. The fact that it doesn\u2019t work on a couple of irregular entries doesn\u2019t matter; they are easily fixed by hand.<\/p>\n<p>The video is only 6 minutes, 15 seconds long so it should be easy to find time for it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Just a quickie today. Bill over at ATMakers has a short video on Why He Uses Emacs. It\u2019s actually a nice example of using keyboard macros to convert raw data into the required form. I like it because it\u2019s a &hellip; <a href=\"https:\/\/irreal.org\/blog\/?p=10216\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[18],"class_list":["post-10216","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\/10216","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=10216"}],"version-history":[{"count":1,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/10216\/revisions"}],"predecessor-version":[{"id":10217,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/10216\/revisions\/10217"}],"wp:attachment":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10216"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10216"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10216"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}