auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX] Custom `fill-paragraph` criteria


From: Chase Dwelle
Subject: Re: [AUCTeX] Custom `fill-paragraph` criteria
Date: Wed, 18 Mar 2015 11:11:09 -0400

Thanks, these solutions worked. Just a note for anyone doing the same thing, if you don't use double spaces after your sentences (like me), then you need to add the following to your init file:

(setq sentence-end-double-space nil)


Chase Dwelle
PhD Pre-Candidate - Environmental Engineering
Dow Doctoral Sustainability Fellow






On Thu, Mar 12, 2015 at 6:14 PM, Mosè Giordano <address@hidden> wrote:
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è


reply via email to

[Prev in Thread] Current Thread [Next in Thread]