Emacs: fill-region Problems

By Xah Lee. Date: . Last updated: .

whitespaces added

before:

- Alice was beginning to get very tired of sitting by her sister on the bank, and of having nothing to do: once or twice she had peeped into the book her sister was reading, but it had no pictures or conversations in it, “and what is the use of a book,” thought Alice “without pictures or conversation?”.

after:

- Alice was beginning to get very tired of sitting by her sister on
  the bank, and of having nothing to do: once or twice she had peeped
  into the book her sister was reading, but it had no pictures or
  conversations in it, “and what is the use of a book,” thought Alice
  “without pictures or conversation?”.

Notice the extra whitespaces.

Asterisks Deleted

before:

* something
* in the water
* does not compute

after:

* something in the water does not compute

The asterisks are gone.

adaptive-fill-mode is t

if adaptive-fill-mode is nil, then this won't happen.

Whitespace Created When There Was None

before:

混沌未分天地乱,茫茫渺渺无人见。自从盘古破鸿蒙,开辟从兹清浊辨。覆载群生仰至仁,发明万物皆成善。欲知造化会元功,须看西游释厄传。一派白虹起,千寻雪浪飞;海风吹不断,江月照还依。冷气分青嶂,馀流润翠微;潺湲名瀑布,真似挂帘帷。

after:

混沌未分天地乱,茫茫渺渺无人见。自从盘古破鸿蒙,开辟从兹清浊辨。覆载群
生仰至仁,发明万物皆成善。欲知造化会元功,须看西游释厄传。一派白虹起,
千寻雪浪飞;海风吹不断,江月照还依。冷气分青嶂,馀流润翠微;潺湲名瀑布,
真似挂帘帷。

newline characters are added at positions when there was no space.

This is a problem when displayed in browser. Because, the newline characters will create a gap, and gaps in Chinese can change meaning.

Emacs fill command problems