title: How do I get emacs to write to read-only files automatically?
body: <p>I am finding myself editing a lot of files that are read-only.  I usually hit <code>C-x C-q</code> to call <code>toggle-read-only</code>.  Then I hit <code>C-x C-s</code> to save and get,</p>
  
  <pre><code>File foo.txt is write-protected; try to save anyway? (y or n)
  </code></pre>
  
  <p>After hitting <code>y</code>, the file is saved and the permissions on the file remain read-only.</p>
  
  <p>Is there a way to shorten this process and make it so that simply saving a file with C-x C-s does the whole thing without prompting?  Should I look into inserting <code>chmod</code> in <code>before-save-hook</code> and <code>after-save-hook</code> or is there a better way?</p>