title: Emacs shell command on buffer
body: <p>I'd like to set up a function that does the equivalent of marking the whole buffer, and running <code>C-u M-|</code> to prompt for a command, pipe the buffer to the command and replace the buffer with the output. Then maybe set it to shift-f5 or something.</p>
  
  <p>I've only got as far as this:</p>
  
  <pre><code>(defun shell-command-on-buffer ()
    (interactive)
    (mark-whole-buffer))
  </code></pre>
  
  <p>How can I do the rest?</p>