{"id":9646,"date":"2021-04-22T15:46:15","date_gmt":"2021-04-22T19:46:15","guid":{"rendered":"https:\/\/irreal.org\/blog\/?p=9646"},"modified":"2021-04-22T15:46:15","modified_gmt":"2021-04-22T19:46:15","slug":"fifteen-days-with-dired","status":"publish","type":"post","link":"https:\/\/irreal.org\/blog\/?p=9646","title":{"rendered":"Fifteen Days with Dired"},"content":{"rendered":"<p>Ramit Mittal is a new Spacemacs user who <a href=\"https:\/\/www.ramitmittal.com\/blog\/15-days-in-dired\/\">decided that for 15 days he would use Dired for all his file operations<\/a>. That\u2019s not hard to do. I don\u2019t <i>always<\/i> use Dired but it\u2019s usually easier than bringing up or switching to a terminal to do it by hand. Especially since if I need to do a file operation, I am almost certainly in Emacs anyway.<\/p>\n<p>For most operations, Dired provides the advantages of doing an <code>ls<\/code> followed by whatever file operation you need. In fact, it\u2019s better because you can search for the file you want to operate on by typing the first few letters.<\/p>\n<p>Mittal\u2019s post demonstrates some of the ways he learned to use Dired to make his workflow easier. He mentions, for example, that when you open a terminal while in a Dired buffer, the terminal will open in the same directory as the buffer.<\/p>\n<p>He also mentions using <code>xdg-open<\/code> to open a file in its default application. That works in Linux; for macOS, you would use <code>open<\/code>. Although he doesn\u2019t mention it, you can also map <code>xdg-open<\/code> or <code>open<\/code> to the be the default action for the <kbd>!<\/kbd> and <kbd>&amp;<\/kbd> commands.<\/p>\n<p>I don\u2019t know for sure but my impression is that Dired is an underused feature of Emacs. It\u2019s really powerful and useful and very much worth taking a bit of times to learn. It also helps to bookmark its refcard so you can bring it up if you forget one of its many commands. In any event, Mittal\u2019s post is short and worth spending a couple of minutes to read.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ramit Mittal is a new Spacemacs user who decided that for 15 days he would use Dired for all his file operations. That\u2019s not hard to do. I don\u2019t always use Dired but it\u2019s usually easier than bringing up or &hellip; <a href=\"https:\/\/irreal.org\/blog\/?p=9646\">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-9646","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\/9646","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=9646"}],"version-history":[{"count":1,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/9646\/revisions"}],"predecessor-version":[{"id":9647,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/9646\/revisions\/9647"}],"wp:attachment":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9646"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9646"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9646"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}