{"id":404,"date":"2011-12-25T22:05:50","date_gmt":"2011-12-26T03:05:50","guid":{"rendered":"http:\/\/irreal.org\/blog\/?p=404"},"modified":"2011-12-25T22:05:50","modified_gmt":"2011-12-26T03:05:50","slug":"emacs-jump-to-register-in-exploratory-programming","status":"publish","type":"post","link":"https:\/\/irreal.org\/blog\/?p=404","title":{"rendered":"Emacs&#8217; <code>jump-to-register<\/code> In Exploratory Programming"},"content":{"rendered":"\n<p>I&#8217;ve written before about <a href=\"http:\/\/irreal.org\/blog\/?p=320\">Emacs Registers<\/a> and how you can store the mark in a register with \u3010<kbd>Ctrl<\/kbd>+<kbd>x<\/kbd> <kbd>r<\/kbd> <kbd>Space<\/kbd>\u3011 <i>register<\/i>. That&#8217;s one of those things that&#8217;s occasionally useful because you can then jump to that position with \u3010<kbd>Ctrl<\/kbd>+<kbd>x<\/kbd> <kbd>r<\/kbd> <kbd>j<\/kbd>\u3011 <i>register<\/i> but in my experience, I just don&#8217;t use it that often. However, while I was doing <a href=\"http:\/\/irreal.org\/blog\/?p=398\">exploratory programming<\/a> for my series on executable log records, I found that it was extraordinarily useful. <\/p>\n<p> As I explained in the <a href=\"http:\/\/irreal.org\/blog\/?p=398\">exploratory programming<\/a> post, I developed the code by writing some exploratory functions and then trying them out on a record sexpr. I used the same file for the entire series and as I added additional posts to the series, I just added code to the end of the buffer. Then I would try it out on one of the records that were at the top of the buffer. By storing the mark in a register, I was able to quickly return to the end of the record and execute it with \u3010<kbd>Ctrl<\/kbd>+<kbd>x<\/kbd> <kbd>Ctrl<\/kbd>+<kbd>e<\/kbd>\u3011. Then I could return to the code I was working on by simply going to the end of the buffer with \u3010<kbd>Meta<\/kbd>+<kbd>&gt;<\/kbd>\u3011. <\/p>\n<p> None of this is extraordinary or ground breaking but it does show how a simple Emacs command can really speed up development. Without storing the position of the record in a register, I would have had to move to it with a much more complicated series of keystrokes. This is another example of Emacs providing the very tool you need for a specific task. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve written before about Emacs Registers and how you can store the mark in a register with \u3010Ctrl+x r Space\u3011 register. That&#8217;s one of those things that&#8217;s occasionally useful because you can then jump to that position with \u3010Ctrl+x r &hellip; <a href=\"https:\/\/irreal.org\/blog\/?p=404\">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":[9],"tags":[18],"class_list":["post-404","post","type-post","status-publish","format-standard","hentry","category-programming","tag-emacs"],"_links":{"self":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/404","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=404"}],"version-history":[{"count":0,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/404\/revisions"}],"wp:attachment":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=404"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=404"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=404"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}