title: Insert the output of shell command into emacs buffer
body: <p>I want to set a key binding to insert the date into the buffer.  I have written the following lisp in my <code>.emacs</code> file.  Using <code>date</code> as an example:</p>
  
  <pre><code>;;put the date                                                                  
  (global-set-key
   (kbd "C-c C-d")
   (shell-command "date" (current-buffer))
  )
  </code></pre>
  
  <p>The key binding works okay when I use other commands like <code>'next-line</code>, but <code>shell-command</code> will put it into the <code>*scratch*</code> buffer when the .emacs is read and leaves it at that.</p>
  
  <p>Maybe I need to use <code>shell-command-on-region</code>.</p>