{"id":1991,"date":"2013-07-08T10:15:37","date_gmt":"2013-07-08T14:15:37","guid":{"rendered":"http:\/\/irreal.org\/blog\/?p=1991"},"modified":"2013-07-08T10:15:38","modified_gmt":"2013-07-08T14:15:38","slug":"locate-and-emacs","status":"publish","type":"post","link":"https:\/\/irreal.org\/blog\/?p=1991","title":{"rendered":"Locate and Emacs"},"content":{"rendered":"\n<p>Bozhidar Batsov over at the excellent <a href=\"http:\/\/emacsredux.com\/\">Emacs Redux<\/a> tells us something that I didn&#8217;t know: It&#8217;s possible to <a href=\"http:\/\/emacsredux.com\/blog\/2013\/07\/05\/locate\/\">call locate from Emacs<\/a>. For those of you without a Unix background, <code>locate<\/code> is a utility that will return a list of any files on your system whose name contains a given string. The <code>locate<\/code> utility has been around for a long time and for years it was the best way of locating a file on your system. <\/p>\n<p> I&#8217;m not a Windows guy so I don&#8217;t know what, if any, corresponding utility exists there<sup><a class=\"footref\" name=\"fnr-.1\" href=\"#fn-.1\">1<\/a><\/sup> but OS X has an additional, similar but more useful utility called <code>Spotlight<\/code>. Normally you access that directly from the GUI but there&#8217;s also a command line interface, <code>mdfind<\/code>, for it&mdash;another thing I didn&#8217;t know. The nice thing about the Emacs interface is that you can specify the command to use so if you want to use <code>Spotlight<\/code> you can just tell Emacs to use <code>mdfind<\/code> instead of <code>locate<\/code>. Yet another example of the flexibility of Emacs. <\/p>\n<div id=\"footnotes\">\n<h2 class=\"footnotes\">Footnotes: <\/h2>\n<div id=\"text-footnotes\">\n<p class=\"footnote\"><sup><a class=\"footnum\" name=\"fn-.1\" href=\"#fnr-.1\">1<\/a><\/sup> The <code>locate<\/code> utility is pretty simple and should be easily portable to Windows&mdash;or most any OS&mdash;for those who might find it useful. <\/p>\n<\/p><\/div>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Bozhidar Batsov over at the excellent Emacs Redux tells us something that I didn&#8217;t know: It&#8217;s possible to call locate from Emacs. For those of you without a Unix background, locate is a utility that will return a list of &hellip; <a href=\"https:\/\/irreal.org\/blog\/?p=1991\">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-1991","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\/1991","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=1991"}],"version-history":[{"count":0,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1991\/revisions"}],"wp:attachment":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1991"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1991"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1991"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}