With emacs how can I easily go from this:

enter image description here

to this (has nice indentation and fill-paragraph):

enter image description here


1 Answer 1


Wrapping the paragraphs is simple: C-x h M-q (mark the whole buffer, fill paragraphs).

Adding the bullets is not a built-in capability in text-mode, but can be accomplished a few ways. You could record a macro to add the bullet and format the paragraph, then apply that to each line. Or you could use query/replace to add the bullet to the beginning of every paragraph, then fill the whole buffer.

Here's a custom function that implements that last approach:

(defun bullet-and-fill ()
  (goto-char (point-min))
  (replace-regexp "^\\(\\w\\)" "* \\1") ; add bullet to lines with text
  (fill-paragraph nil t))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.