[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX] Custom `fill-paragraph` criteria
From: |
Mosè Giordano |
Subject: |
Re: [AUCTeX] Custom `fill-paragraph` criteria |
Date: |
Thu, 12 Mar 2015 23:14:41 +0100 |
Hi Chase,
2015-03-12 18:48 GMT+01:00 Chase Dwelle <address@hidden>:
> As I understand it, the `fill-paragraph` command creates a new line when the
> length of the line is greater than some number of characters.
>
> For my purposes, I'd like the command to insert a new line only when there
> is a new sentence, i.e., when there is a period followed by a space and a
> new word. The reason for this is to get the full context of a change if/when
> I use the `diff` command a document.
>
> I believe the regexp for what I want is "\.\s-\w". Is there a way to make
> the `fill-paragraph` command replace this with a newline, so replace
> "\.\s-\w" with "\.\n"?
This feature is often requested by people using version control
systems. There are many solutions proposed on the Internet, just
search for "auctex sentence filling" (without quotes). Some of the
first results are:
-
https://stackoverflow.com/questions/539984/how-do-i-get-emacs-to-fill-sentences-but-not-paragraphs
-
http://pleasefindattached.blogspot.de/2011/12/emacsauctex-sentence-fill-greatly.html
-
https://thingsthatpassforknowledge.wordpress.com/2011/10/08/emacs-prettifies-plain-text-files-for-version-control/
Bye,
Mosè