{"id":11420,"date":"2023-06-12T13:42:06","date_gmt":"2023-06-12T17:42:06","guid":{"rendered":"https:\/\/irreal.org\/blog\/?p=11420"},"modified":"2023-06-12T13:42:06","modified_gmt":"2023-06-12T17:42:06","slug":"emacs-elements-video-on-narrowing","status":"publish","type":"post","link":"https:\/\/irreal.org\/blog\/?p=11420","title":{"rendered":"Emacs Elements Video on Narrowing"},"content":{"rendered":"<p>A useful but underused Emacs facility is narrowing. The idea is that you can limit the visibility of a buffer\u2019s text to a region, function, or an Org mode subtree. The rest of the buffer is still there but you can\u2019t see or access it. The operations are pretty simple but still seem hard to remember for many people.<\/p>\n<p>Over at <a href=\"https:\/\/www.youtube.com\/@emacselements\/videos\">Emacs Elements Channel<\/a> there\u2019s a new video on <a href=\"https:\/\/www.youtube.com\/watch?v=4z-ZAklZOwY\">narrowing and how to use it<\/a>. As I said, it\u2019s really pretty simple despite the problem some folks have with remembering the keystrokes. The biggest problem is widening or undoing a narrowing. I don\u2019t understand these problems even though I had them myself.<\/p>\n<p>Artur Malabarba <a href=\"https:\/\/irreal.org\/blog\/?p=4771\">to the rescue<\/a>. In his now, sadly, abandoned site, <a href=\"http:\/\/endlessparentheses.com\">Endless Parentheses<\/a>, he presents the <code>narrow-or-widen-dwim<\/code> function that makes using narrowing trivial. If you call it and the narrowing is already in effect, it widens the narrowed text. Otherwise it narrows to the proper text given the context. As I say in the above post, I don\u2019t think I\u2019ve called any of the narrowing functions directly since I installed it. Like Malabarba, I put it in my \u201ctoggle\u201d key map so it\u2019s easy to remember and use.<\/p>\n<p>The video is only 6 minutes, 12 seconds long so it should be easy to watch. After you do, be sure to check out Malabarba\u2019s function. It will make using narrowing easy. I installed it 9 years ago and haven\u2019t used anything else for narrowing since.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A useful but underused Emacs facility is narrowing. The idea is that you can limit the visibility of a buffer\u2019s text to a region, function, or an Org mode subtree. The rest of the buffer is still there but you &hellip; <a href=\"https:\/\/irreal.org\/blog\/?p=11420\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[18],"class_list":["post-11420","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\/11420","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=11420"}],"version-history":[{"count":1,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/11420\/revisions"}],"predecessor-version":[{"id":11421,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/11420\/revisions\/11421"}],"wp:attachment":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11420"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11420"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11420"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}