{"id":508,"date":"2009-03-02T14:47:18","date_gmt":"2009-03-02T18:47:18","guid":{"rendered":"http:\/\/timony.com\/mickzblog\/2009\/03\/02\/emacs-and-tilde-files\/"},"modified":"2009-03-02T14:47:18","modified_gmt":"2009-03-02T18:47:18","slug":"emacs-and-tilde-files","status":"publish","type":"post","link":"http:\/\/timony.com\/mickzblog\/2009\/03\/02\/emacs-and-tilde-files\/","title":{"rendered":"Emacs and tilde files"},"content":{"rendered":"<p>By default Emacs saves a copy of the previous version of a file you are editing in the same directory as where the original file is located. It saves a copy with ~ appended to the end of the name. ~ is pronounced tilde. However, some tools and programming environments don&#8217;t know how to handle these tilde files and this can cause various problems. Someone mentioned on the Boston Ruby list that &#8220;<a href=\"http:\/\/groups.google.com\/group\/boston-rubygroup\/browse_thread\/thread\/0171b77ffd0abee1?hl=en\">Rails 2.3 router picked up emacs tilde ~ file before *.erb.html file &#8230;<\/a>&#8220;. And the solution is pretty easy, you just tell emacs to save the ~ files in a different directory:<br \/>\n<a href=\"http:\/\/amitp.blogspot.com\/2007\/03\/emacs-move-autosave-and-backup-files.html\">http:\/\/amitp.blogspot.com\/2007\/03\/emacs-move-autosave-and-backup-files.html<\/a><\/p>\n<p>Now I wonder is there a way to have it only do this for certain types of files, or only to do it for certain workspaces, that way if I&#8217;m edit a file in a directory named ruby it will save the files elsewhere, otherwise save the file in the CWD.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>By default Emacs saves a copy of the previous version of a file you are editing in the same directory as where the original file is located. It saves a copy with ~ appended to the end of the name. ~ is pronounced tilde. However, some tools and programming environments don&#8217;t know how to handle &hellip; <a href=\"http:\/\/timony.com\/mickzblog\/2009\/03\/02\/emacs-and-tilde-files\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Emacs and tilde files<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"footnotes":""},"categories":[33],"tags":[230,502,526,528],"class_list":["post-508","post","type-post","status-publish","format-standard","hentry","category-programming","tag-emacs","tag-programming","tag-ror","tag-ruby"],"_links":{"self":[{"href":"http:\/\/timony.com\/mickzblog\/wp-json\/wp\/v2\/posts\/508","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/timony.com\/mickzblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/timony.com\/mickzblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/timony.com\/mickzblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/timony.com\/mickzblog\/wp-json\/wp\/v2\/comments?post=508"}],"version-history":[{"count":0,"href":"http:\/\/timony.com\/mickzblog\/wp-json\/wp\/v2\/posts\/508\/revisions"}],"wp:attachment":[{"href":"http:\/\/timony.com\/mickzblog\/wp-json\/wp\/v2\/media?parent=508"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/timony.com\/mickzblog\/wp-json\/wp\/v2\/categories?post=508"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/timony.com\/mickzblog\/wp-json\/wp\/v2\/tags?post=508"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}