{"id":9156,"date":"2020-09-19T13:49:27","date_gmt":"2020-09-19T17:49:27","guid":{"rendered":"https:\/\/irreal.org\/blog\/?p=9156"},"modified":"2020-09-19T13:49:27","modified_gmt":"2020-09-19T17:49:27","slug":"leveraging-emacs-introspection","status":"publish","type":"post","link":"https:\/\/irreal.org\/blog\/?p=9156","title":{"rendered":"Leveraging Emacs Introspection"},"content":{"rendered":"<p>James Cash has an instructive video that shows <a href=\"https:\/\/www.youtube.com\/watch?time_continue=1&amp;v=TKKczIuhrxY&amp;feature=emb_logo\">how to leverage Emacs introspection<\/a> to solves problems or make simple changes. Cash doesn\u2019t like the way <kbd>Return<\/kbd> behaves when the point is on a list item. The default behavior is simply to start a new line but he\u2019d like it to start a new item.<\/p>\n<p>He\u2019s using evil mode so the keystrokes are different from what a vanilla Emacser is used to but the ideas are the same and the actual key sequences don\u2019t matter. He notes that entering <kbd>o<\/kbd> instead of <kbd>Return<\/kbd> does what he wants so he uses the simplest type of introspection, <code>describe-key<\/code> (bound to <kbd>Ctrl<\/kbd>+<kbd>h<\/kbd> <kbd>k<\/kbd>), to help solve his problem.<\/p>\n<p>By checking which command is bound to <kbd>Return<\/kbd> and which is bound to <kbd>o<\/kbd>, he\u2019s able to figure out what changes he needs for making the <kbd>Return<\/kbd> functionality behave in the way he desires.<\/p>\n<p>For purposes of the video, he does this by simply making changes directly to the function in question and evaluating it. That\u2019s less than ideal in the real world, of course, but Cash does offer some alternative ways of making the changes.<\/p>\n<p>Regardless, the point of the video is how easy it is to track down where things are happening and fix or change them if you need to. The video is only 10 minutes, 22 seconds so it should be easy to find time for it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>James Cash has an instructive video that shows how to leverage Emacs introspection to solves problems or make simple changes. Cash doesn\u2019t like the way Return behaves when the point is on a list item. The default behavior is simply &hellip; <a href=\"https:\/\/irreal.org\/blog\/?p=9156\">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-9156","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\/9156","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=9156"}],"version-history":[{"count":1,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/9156\/revisions"}],"predecessor-version":[{"id":9157,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/9156\/revisions\/9157"}],"wp:attachment":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9156"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9156"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9156"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}