Bryce Thomas
Bryce Thomas

Reputation: 10799

How do I stop Emacs automatically inserting hyphens at the beginning of new lines in fundamental fill mode

I'm jotting down some notes in Emacs in Fundamental Fill mode. I'm starting each one of my notes with a "-" on a new line. The problem is, whenever one of the notes I'm writing is too long to fit on a single line, it gets pushed down to the next line (which I want to happen) but Emacs goes ahead and automatically inserts another "-" for me out the front on the new line (which I don't want to happen). Is there a way to stop Emacs from exhibiting this "helpful" behaviour?

Upvotes: 2

Views: 729

Answers (2)

Norman Ramsey
Norman Ramsey

Reputation: 202505

I solved this problem by using the filladapt package, which is much more sophisticated about how and where it inserts things. I added the following lines to my .emacs file:

(require 'filladapt)
(add-hook 'text-mode-hook 'turn-on-filladapt-mode)

Upvotes: 0

Rémi
Rémi

Reputation: 8342

For note taking with emacs you could try emacs-org and M-x remember (both work with one another).

Another slightly offtopic answer would be to use word-wrap: you could let long line be longline in the file, but let emacs wrap line at word boundary for better readability with M-x toggle-word-wrap

Finaly, you can set adaptive-fill-mode to nil in your .emacs to remove this adaptive filling:

(setq adaptive-fill-mode ())

You could also look at adaptive-fill-regexp (see Emacs documentation for it)

Upvotes: 3

Related Questions