1

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

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 ()
  (interactive)
  (goto-char (point-min))
  (replace-regexp "^\\(\\w\\)" "* \\1") ; add bullet to lines with text
  (mark-whole-buffer)
  (fill-paragraph nil t))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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