{"id":6404,"date":"2017-07-04T12:11:00","date_gmt":"2017-07-04T16:11:00","guid":{"rendered":"http:\/\/irreal.org\/blog\/?p=6404"},"modified":"2017-07-04T12:11:23","modified_gmt":"2017-07-04T16:11:23","slug":"indenting-and-pretty-printing-a-sexpr","status":"publish","type":"post","link":"https:\/\/irreal.org\/blog\/?p=6404","title":{"rendered":"Indenting and Pretty Printing a Sexpr"},"content":{"rendered":"<p> Over at the Emacs Stack Exchange, Jue asks if <a href=\"https:\/\/emacs.stackexchange.com\/questions\/33787\/fill-paragraph-m-q-for-s-expressions\">there&rsquo;s something equivalent to fill-paragraph for S-expressions<\/a>. Part of the problem is that <code>paredit<\/code> redefines <kbd>Meta<\/kbd>+<kbd>q<\/kbd> so fill-paragraph appears not to work. <\/p>\n<p> It turns out, though, that there is a command specifically intended to reflow sexprs. That command is <code>indent-pp-sexp<\/code>, bound to <kbd>Ctrl<\/kbd>+<kbd>Meta<\/kbd>+<kbd>q<\/kbd>. It won&rsquo;t break up lines but it will reindent them properly, something I, at least, often need. If you specify the universal argument, it will pretty print the sexpr, including breaking lines up and properly indenting the expression. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Over at the Emacs Stack Exchange, Jue asks if there&rsquo;s something equivalent to fill-paragraph for S-expressions. Part of the problem is that paredit redefines Meta+q so fill-paragraph appears not to work. It turns out, though, that there is a command &hellip; <a href=\"https:\/\/irreal.org\/blog\/?p=6404\">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-6404","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\/6404","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=6404"}],"version-history":[{"count":1,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/6404\/revisions"}],"predecessor-version":[{"id":6405,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/6404\/revisions\/6405"}],"wp:attachment":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6404"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6404"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6404"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}