Questions tagged [auto-fill-mode]

38 questions
11
votes
3 answers

What is the difference between refill-mode and auto-fill-mode?

I tried to read the documentation, but in practice, I could not tell the difference. I feel they are doing the same thing. I can turn both modes on, but I am not sure in what circumstance I need to do so.
Tianyi
  • 111
  • 3
7
votes
3 answers

Org-mode Auto-Fill-Mode

Whenever I open an org file, I have to activate auto-fill-mode and go through every signle line that I need to read and press RET to get a filled paragraph. Is there any way to globally set auto-fill-mode and applied to all the paragraphs in an org…
nima
  • 205
  • 2
  • 6
7
votes
1 answer

How realign existing contents of buffer on column-width?

I added the following settings to my dot-Emacs: (add-hook 'org-mode-hook 'turn-on-auto-fill) (add-hook 'org-mode-hook (lambda() (set-fill-column 80))) When I'm typing sentences in an existing Org-file which are longer than 80 columns, it…
ReneFroger
  • 3,855
  • 22
  • 63
6
votes
2 answers

How to have fill-paragraph/fill-region break the line after a period?

I'm having trouble getting Emacs to properly fill a section of text when the last word of a suitable line ends with a period. Emacs seems to think that words separated by a period (and space) are joined. For example, if I set the fill-column to 10…
AlysCole
  • 63
  • 3
4
votes
1 answer

org-mode, auto new line at 80th column?

When I'm writing in org-mode I want it to automatically handle the creation of new lines similar to MS Word. Can anyone recommend an .emacs config that will only apply to org-mode?
Philip Kirkbride
  • 557
  • 5
  • 14
4
votes
1 answer

Fill is not working in org-mode?

While in org-mode I've tried calling fill-paragraph directly. I've tried using auto-fill-mode and refill-mode. I've tried org-fill-paragraph. The fill-column is set appropriately. None of them make the fill happen; absolutely no changes…
Drew Mills
  • 51
  • 5
4
votes
1 answer

Simple fill-sentence function

I am new to emacs and would like to make a simple function to automate a series of commands I use repeatedly. In auto-fill-mode after I edit the text I often need to re-wrap the lines. (I am writing in LaTeX with each sentence starting on a new…
musarithmia
  • 143
  • 5
3
votes
1 answer

How to set automatic indentation to move past numbers on first line?

I'm using auto-fill-mode with indented-text-mode to write numbered lists. I'm trying to figure out how to persuade the automatic indentation to move past an item number on the first line. I'm working with emacs -q and I have fill-column set to 70…
Norman Ramsey
  • 1,113
  • 6
  • 13
3
votes
1 answer

fill-paragraph does not honor fill-column

C-h v fill-column gives me 80. Pasting the lorem ipsum text in *scratch* (lines longer than 80) then going M-x fill-paragraph fills around column 66. The same in c-mode. In this mode, comment wraps seem to work, but not raw text outside code. If I…
Gauthier
  • 499
  • 2
  • 13
3
votes
1 answer

Prevent hooks from parent mode in derived mode

I have: (add-hook 'text-mode-hook 'turn-on-auto-fill) but in lisp/nxml/nxml-mode.el: (define-derived-mode nxml-mode text-mode "nXML" All XML files is opened with auto-fill-mode. That is inconvenient because XML file under source control and…
gavenkoa
  • 3,352
  • 19
  • 36
3
votes
0 answers

Enabling auto-fill-mode only when document already filled

I have turn-on-auto-fill as part of my text-mode-hook. This works great for new documents, but when I open a buffer that is not filled with hard breaks I rarely want to start doing so to a single paragraph just because I make one edit to the…
Michael Hoffman
  • 665
  • 6
  • 14
3
votes
1 answer

Emacs auto fill on period

How can I tweak Emacs auto-fill to fill when a period is inserted? For example, with a (setq fill-column 10) the following will auto-fill when I press the space after "fill". ;; good fill ;; good ;; fill on This example doesn't fill when I press…
Joe
  • 1,312
  • 1
  • 8
  • 19
3
votes
1 answer

Fill-column conflicts with YASnippet [Examples in gif]

I use fill-column in my dot-Emacs. And I have the following setting: (turn-on-auto-fill) (set-fill-column 60) The result looks like this: Every time when the input exceeds columnnumber 60, it will break and proceed further on the new line. Next…
ReneFroger
  • 3,855
  • 22
  • 63
2
votes
2 answers

Turn on auto-fill-mode when editing a commit message with Magit?

I have tried: (add-hook 'git-commit-mode-hook '(lambda () (setq fill-column 72) (turn-on-auto-fill))) In both cases, auto-fill-mode is not active in the COMMIT_EDITMSG buffer…
Mathieu Marques
  • 1,953
  • 1
  • 13
  • 30
2
votes
1 answer

Prevent fill-paragraph from wrapping past horizontal rules

Say I have the following document: Sir Bedevere ------------ Well, now, uh, Lancelot, Galahad, and I, wait until nightfall, and then leap out of the rabbit, taking the French by surprise - not only by surprise, but totally unarmed! If I execute M-x…
Ben
  • 587
  • 4
  • 11
1
2 3