Search code examples
emacsfill

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?


Solution

  • 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)