{"id":5720,"date":"2016-11-13T14:52:00","date_gmt":"2016-11-13T19:52:00","guid":{"rendered":"http:\/\/irreal.org\/blog\/?p=5720"},"modified":"2016-11-13T14:53:00","modified_gmt":"2016-11-13T19:53:00","slug":"zamansky-20-yanking-and-auto-revert","status":"publish","type":"post","link":"https:\/\/irreal.org\/blog\/?p=5720","title":{"rendered":"Zamansky 20: Yanking and Auto Revert"},"content":{"rendered":"<p> <a href=\"http:\/\/cestlaz.github.io\">Mike Zamansky<\/a> has another video up in his Using Emacs Series. This time he provides a <a href=\"http:\/\/cestlaz.github.io\/posts\/using-emacs-20-yanking\/#.WCi9mXeZOuU\">video demonstration of counsel-yank-pop<\/a> that I wrote about previously <a href=\"http:\/\/irreal.org\/blog\/?p=5707\">here on Irreal<\/a>. As always, things seem clearer and easier to understand when you see it actually happen. <\/p>\n<p> The other thing that Zamansky covers is <code>auto-revert-mode<\/code>. It checks if the file you are looking at in Emacs has changed on disk and reloads it if so. If you&#8217;re working with a single machine that doesn&#8217;t seem very useful or even to make sense<sup><a id=\"fnr.1\" class=\"footref\" href=\"#fn.1\">1<\/a><\/sup> but it&#8217;s really useful when you work on more than a single computer. <\/p>\n<p> To see how it can really help your workflow, let&#8217;s assume you work on two separates machines&#x2014;one at work, one at home, say. In order to keep files synced, you use something like <a href=\"https:\/\/www.dropbox.com\/\">Dropbox<\/a>. Then when you save a file at work, it also updates your machine at home. The problem occurs when you already have the file open in Emacs on your home machine. Now the on-disk copy and the in-buffer copies differ and it&#8217;s easy to get a conflict. This is the exact situation <code>auto-revert-mode<\/code> fixes. When Emacs sees the file change on disk, it automatically reloads the buffer so that when you come back to your home machine you&#8217;ll be working with an up-to-date copy of the file. <\/p>\n<div id=\"footnotes\">\n<h2 class=\"footnotes\">Footnotes: <\/h2>\n<div id=\"text-footnotes\">\n<div class=\"footdef\"><sup><a id=\"fn.1\" class=\"footnum\" href=\"#fnr.1\">1<\/a><\/sup> <\/p>\n<div class=\"footpara\">\n<p class=\"footpara\"> It can even be useful on a single machine if you have an external process that occasionally updates a file you&#8217;re examining in Emacs&#x2014;a system log file, for example. <\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Mike Zamansky has another video up in his Using Emacs Series. This time he provides a video demonstration of counsel-yank-pop that I wrote about previously here on Irreal. As always, things seem clearer and easier to understand when you see &hellip; <a href=\"https:\/\/irreal.org\/blog\/?p=5720\">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-5720","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\/5720","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=5720"}],"version-history":[{"count":1,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/5720\/revisions"}],"predecessor-version":[{"id":5721,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/5720\/revisions\/5721"}],"wp:attachment":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5720"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5720"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5720"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}