{"id":6412,"date":"2017-07-07T13:16:00","date_gmt":"2017-07-07T17:16:00","guid":{"rendered":"http:\/\/irreal.org\/blog\/?p=6412"},"modified":"2017-07-07T13:29:07","modified_gmt":"2017-07-07T17:29:07","slug":"pretty-printing-and-macroexpanding-the-last-sexpression","status":"publish","type":"post","link":"https:\/\/irreal.org\/blog\/?p=6412","title":{"rendered":"Pretty Printing and Macroexpanding the Last Sexpression"},"content":{"rendered":"<p> As Emacs users, we&rsquo;re always discovering some new feature of our favorite editor. Here&rsquo;s one that&rsquo;s so obscure not even John Wiegley was aware of it. <\/p>\n<p> Over at the Emacs subreddit, glyfo was showing off a bit of elisp that he wrote to <a href=\"https:\/\/www.reddit.com\/r\/emacs\/comments\/6lova7\/heres_a_short_but_sweet_macro_viewing_function_i\/\">macroexpand the last sexpr<\/a>. Kaushalmodi noted in the comments that there&rsquo;s already a command for that, <code>pp-macroexpand-last-sexp<\/code>. That nice to know because it can often be useful. At bit later John commented that he hadn&rsquo;t been aware of the command but had often needed it. <\/p>\n<p> If you&rsquo;re writing Elisp or just trying to read and understand some code that uses a macro, this is a command worth knowing. The name is pretty easy to remember and even if I forget, I can find it again by searching Irreal. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>As Emacs users, we&rsquo;re always discovering some new feature of our favorite editor. Here&rsquo;s one that&rsquo;s so obscure not even John Wiegley was aware of it. Over at the Emacs subreddit, glyfo was showing off a bit of elisp that &hellip; <a href=\"https:\/\/irreal.org\/blog\/?p=6412\">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,28],"class_list":["post-6412","post","type-post","status-publish","format-standard","hentry","category-general","tag-emacs","tag-emacs-lisp"],"_links":{"self":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/6412","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=6412"}],"version-history":[{"count":2,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/6412\/revisions"}],"predecessor-version":[{"id":6414,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/6412\/revisions\/6414"}],"wp:attachment":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6412"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6412"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6412"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}