title: Emacs: convert items on separate lines to a comma-separated list
body: <p>I often paste items separated by newlines or line feeds into an Emacs buffer resulting in each item residing on a different line like this:</p>
  
  <pre><code>one
  two
  three
  four
  </code></pre>
  
  <p>Very often I actually want a list of comma-separated values like this:</p>
  
  <pre><code>"one", "two", "three", "four"
  </code></pre>
  
  <p>It would be great to be able to do a one-touch conversion from lines to list. I imagine I can convert this using a regex, but it seems like the kind of commonly used operation that might already have a built-in Emacs function. Can anybody suggest one?</p>