{"id":727,"date":"2012-03-14T00:00:00","date_gmt":"2012-03-14T04:00:00","guid":{"rendered":"http:\/\/irreal.org\/blog\/?p=727"},"modified":"2012-03-14T16:30:23","modified_gmt":"2012-03-14T20:30:23","slug":"virtual-dired","status":"publish","type":"post","link":"https:\/\/irreal.org\/blog\/?p=727","title":{"rendered":"Virtual Dired"},"content":{"rendered":"\n<p>Today, I stumbled upon Kirubakaran Athmanathan&#8217;s post <a href=\"http:\/\/www.kirubakaran.com\/articles\/efficiently-browsing-text-or-code.html\">Efficiently Browsing Text or Code<\/a> and learned a new Emacs trick. Athmanathan&#8217;s post is about leveraging the power of Emacs to efficiently find some text in a large group of files, choose the important files from the search, and then operate on those files in some manner. <\/p>\n<p> One trick he used that is new to me is <code>virtual-dired<\/code>. Suppose you have a complicated script that generates a listing (<code>ls -lR<\/code> style) of files. If the script is named <code>file-filter<\/code> you can use \u3010<kbd>Ctrl<\/kbd>+<kbd>u<\/kbd> <kbd>Meta<\/kbd>+<kbd>!<\/kbd>\u3011 <code>file-filter<\/code> to dump the listing into an Emacs buffer and then turn it into a <code>dired<\/code> buffer with \u3010<kbd>Meta<\/kbd>+<kbd>x<\/kbd>\u3011 <code>virtual-dired<\/code>. Now you have a custom <code>dired<\/code> buffer with all the power of <code>dired<\/code> at your disposal. Very nice. <\/p>\n<p> Be sure to follow the link and read Athmanathan&#8217;s post for other ways of using Emacs to browse files. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today, I stumbled upon Kirubakaran Athmanathan&#8217;s post Efficiently Browsing Text or Code and learned a new Emacs trick. Athmanathan&#8217;s post is about leveraging the power of Emacs to efficiently find some text in a large group of files, choose the &hellip; <a href=\"https:\/\/irreal.org\/blog\/?p=727\">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-727","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\/727","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=727"}],"version-history":[{"count":1,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/727\/revisions"}],"predecessor-version":[{"id":728,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/727\/revisions\/728"}],"wp:attachment":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=727"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=727"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=727"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}