a command which wraps the words or redistributes the newlines within a paragraph as defined by the current major-mode
Questions tagged [fill-paragraph]
80 questions
12
votes
3 answers
How to make fill-region/paragraph identify a paragraph prefix?
Let's say I have the following buffer.
1. lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum
Hitting M-q here while in text-mode leads to the following.
1. lorem ipsum lorem ipsum lorem ipsum…

Malabarba
- 23,148
- 6
- 79
- 164
11
votes
3 answers
fill-paragraph marks file as changed, even if it didn't do anything
Whenever I call fill-paragraph, the buffer is always marked as modified, even if the command had no effect (i.e. if the paragraph was already filled). It also creates an empty undoable action (easily detected with undo-tree-mode). Other commands…

lily
- 375
- 1
- 8
6
votes
2 answers
How can I fill-paragraph a string according to its value rather than its input syntax?
I have a docstring to a simple function, but the docstring uses many escape sequences to explain the reasoning for the function.
(defun sx-encoding-normalize-line-endings (string)
"Normalize the line endings for STRING.
The API returns strings…

Sean Allred
- 6,921
- 18
- 86
4
votes
4 answers
How does one do the reverse of fill-region / fill-paragraph in emacs?
The commands fill-region (and fill-paragraph) breaks lines in a region (and paragraph) to a predefined width. How does one achieve the opposite effect?
Given a buffer, say markdown or org, where paragraphs are separated by two newlines, how does one…

hrkrshnn
- 439
- 7
- 16
3
votes
2 answers
`fill-paragraph` prevent breaking
I'm trying to prevent fill-paragraph from breaking a certain type of string:
<>
This is an inline Stata dynamic tag. The <> are fixed, the rest inside can change and be any length and contain…

Josh
- 95
- 6
3
votes
1 answer
how to set a fill suffix?
I want to fill (wrap) long lines at n characters, ensuring that each new line ends with "///". (That is the "continuation character" for long lines in Stata code.
So that something like this
This is a long line. This is a long line. This is a long…

Cheuk
- 31
- 1
3
votes
0 answers
fill-paragraph chokes on semicolons
I use mutt for email (outside of emacs) and set my EDITOR to an emacsclient invocation. Thus, mutt spawns emacsclient in the same terminal when I want to compose an E-mail, then catches the output file when I quit.
This buffer operates in…

Tom Hunt
- 161
- 4
2
votes
1 answer
Want to Alt-Q on a long piece of text - but it has no spaces so it doesn't work
When you press Meta-Q to wrap a long blob of text, it doesn't work, probably because my text has no spaces.
my text is the result of a curl, json with no spaces.
so how do I tell emacs to add newlines at around 80 chars mark?

american-ninja-warrior
- 3,903
- 2
- 24
- 44
2
votes
3 answers
How to make fill-paragraph respect smileys at end of sentences?
I'm a big fan of fill-paragraph, and also sentence-end-double-space being set to t so that I can easily navigate and edit via backward-sentence, forward-sentence, kill-sentence, transpose-sentences and so on.
However there is one minor flaw with…

Adam Spiers
- 245
- 2
- 12
1
vote
1 answer
Specify a block of text that should not be filled (leave it "verbatim")?
Consider the following piece of text (in whatever general major mode it may be):
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
nostrud…

space_voyager
- 719
- 5
- 20
1
vote
1 answer
is there a fill paragraph with bullets combo command for emacs
With emacs how can I easily go from this:
to this (has nice indentation and fill-paragraph):

american-ninja-warrior
- 3,903
- 2
- 24
- 44
1
vote
0 answers
How to get fill-paragraph in a scala multi-line comment to wrap?
Emacs is my weapon of choice for documenting code, not least because of its great support for formatting comments. However, there is one thing that is slowing me down in scala-mode2. When I have a line that starts with an @param annotation the…

kilo
- 111
- 3
0
votes
1 answer
How to detect if a paragraph has been filled?
Q: how can I detect, programmatically, if a paragraph has been filled?
fill-paragraph (synonyms fail me) fills a paragraph, and related
fill-* functions do analogous things. Is there a way to detect,
programmatically, if a paragraph has already…

Dan
- 32,980
- 7
- 102
- 169
0
votes
1 answer
paragraph reflow and advance to next para?
Excuse tyro question (google hasn't helped), but the default behaviour of paragraph reflow (M-q) not advancing to the next para doesn't suit me, particularly when reflowing a large section of text, and i end up doing the combination para-reflow,…

ionh
- 13
- 4