Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I get Emacs to fill sentences, but not paragraphs?
    primarykey
    data
    text
    <p>I've <a href="https://stackoverflow.com/questions/539791/tips-for-collaboratively-editing-a-latex-document/539848#539848">seen</a> at least two <a href="https://stackoverflow.com/questions/193298/best-practices-in-latex/196724#196724">recommendations</a> on StackOverflow to insert newlines between sentences when editing LaTeX documents. The reason being that the practice facilitates source control, <code>diff</code>ing, and collaborative editing.</p> <p>I'm basically convinced, but I'm lazy, and I don't want to have to think about it.</p> <p>So I'm searching for some emacs incantation to handle it for me. Could be a minor mode, could be a set of variables that need to be set.</p> <p>I think what I <em>don't</em> want is</p> <ul> <li>Soft wrapping of text (say using the <a href="http://www.emacswiki.org/emacs/LongLines" rel="nofollow noreferrer">longlines</a> and <code>(set long-lines-auto-wrap 't)</code>). This is because I don't want to impose requirements on my collaborators' editors, and <em>I</em> sometimes use other unix tools to examine these files.</li> </ul> <p>I think what I <em>do</em> want is</p> <ul> <li>For <code>fill-paragraph</code> to fill between newlines that look like they mark the end of a sentence. </li> <li>A solution that works with <code>auto-fill-mode</code> would be a bonus.</li> </ul> <p>That is:</p> <blockquote> <p>chat chat chat.<br> A new sentence<br> with goofed up wrapping that needs to be fixed.<br> Mumble mumble </p> </blockquote> <p>Transformed to:</p> <blockquote> <p>chat chat chat.<br> A new sentence with goofed up wrapping that needs to be fixed.<br> Mumble mumble </p> </blockquote> <p>Your comments and suggestions are appreciated.</p> <hr> <p>Edit: The suggestion by <a href="https://stackoverflow.com/questions/539984/how-do-i-get-emacs-to-fill-sentences-but-not-paragraphs/540760#540760">Jouni K. Seppänen</a> pointed me at <code>LaTeX-fill-break-at-separators</code>, which suggests that emacs almost knows how to do this already. Anyway, I'm off to read some code, and will report back. Thanks again.</p> <hr> <p>More general version of the same question: <a href="https://stackoverflow.com/questions/543379/editor-showdown-maintain-newlines-at-the-ends-of-sentences">Editor showdown: Maintain newlines at the ends of sentences</a>. Thanks, <a href="https://stackoverflow.com/users/4234/dreeves">dreeves</a>.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload