* Not taking indented text with fill-paragraph
@ 2010-05-12 9:57 Cecil Westerhof
2010-05-12 10:21 ` Pascal J. Bourguignon
[not found] ` <861vdhtgqs.fsf@aiuole.stru.polimi.it>
0 siblings, 2 replies; 5+ messages in thread
From: Cecil Westerhof @ 2010-05-12 9:57 UTC (permalink / raw)
To: help-gnu-emacs
I have often some text like the folowing:
First some text which is a description of the list that follows the
text:
item 1
item 2
item 3
item 4
Sometimes you change something an you get:
First some initial text which is a description of the list that follows the
text:
item 1
item 2
item 3
item 4
When using M-q you get:
First some initial text which is a description of the list that follows
the text: item 1 item 2 item 3 item 4
But I would prefer:
First some initial text which is a description of the list that follows
the text:
item 1
item 2
item 3
item 4
Is there a way to change the behaviour of fill-paragraph?
One solution is to mark the text which is the description, before giving
M-q, but I would prefer a solution where this is not necessary. ;-}
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Not taking indented text with fill-paragraph
2010-05-12 9:57 Not taking indented text with fill-paragraph Cecil Westerhof
@ 2010-05-12 10:21 ` Pascal J. Bourguignon
[not found] ` <87mxw54c4k.fsf@linux-lqcw.site>
[not found] ` <861vdhtgqs.fsf@aiuole.stru.polimi.it>
1 sibling, 1 reply; 5+ messages in thread
From: Pascal J. Bourguignon @ 2010-05-12 10:21 UTC (permalink / raw)
To: help-gnu-emacs
Cecil Westerhof <Cecil@decebal.nl> writes:
> I have often some text like the folowing:
>
> First some text which is a description of the list that follows the
> text:
> item 1
> item 2
> item 3
> item 4
>
> Sometimes you change something an you get:
>
> First some initial text which is a description of the list that follows the
> text:
> item 1
> item 2
> item 3
> item 4
>
> When using M-q you get:
>
> First some initial text which is a description of the list that follows
> the text: item 1 item 2 item 3 item 4
>
> But I would prefer:
>
> First some initial text which is a description of the list that follows
> the text:
> item 1
> item 2
> item 3
> item 4
>
> Is there a way to change the behaviour of fill-paragraph?
Yes. Keep an empty line inserted between paragraphs and lists. The
correct way to format such text is (as testified for example by reST):
First some initial text which is a description of the list that
follows the text:
- item 1
- item 2
- item 3
- item 4
> One solution is to mark the text which is the description, before giving
> M-q, but I would prefer a solution where this is not necessary. ;-}
--
__Pascal Bourguignon__
http://www.informatimago.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Not taking indented text with fill-paragraph
[not found] ` <87mxw54c4k.fsf@linux-lqcw.site>
@ 2010-05-12 20:09 ` Andreas Politz
[not found] ` <jwv632s3lgf.fsf-monnier+gnu.emacs.help@gnu.org>
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Politz @ 2010-05-12 20:09 UTC (permalink / raw)
To: help-gnu-emacs
Cecil Westerhof <Cecil@decebal.nl> writes:
> Op woensdag 12 mei 2010 12:21 CEST, Pascal J. Bourguignon schreef:
>
>>> Is there a way to change the behaviour of fill-paragraph?
>>
>> Yes. Keep an empty line inserted between paragraphs and lists. The
>> correct way to format such text is (as testified for example by reST):
>
> That is not a change of behaviour from fill paragraph, but a change of
> layout. That works (and sometimes I use it), but the empty line is not
> always acceptable. I then use the empty line, to be removed later (what
> I sometimes forget), or work with a region. In principal better, because
> I see immediately that I messed things up. But when I do not correct ...
I think the problem here is, that it is impossible to tell the paragraph
functions, that a line like
This line ends a paragraph:
does indeed end a paragraph. There are variables `paragraph-start' and
`paragraph-separate', but not paragraph-end .
-ap
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Not taking indented text with fill-paragraph
[not found] ` <jwv632s3lgf.fsf-monnier+gnu.emacs.help@gnu.org>
@ 2010-05-13 8:23 ` Cecil Westerhof
0 siblings, 0 replies; 5+ messages in thread
From: Cecil Westerhof @ 2010-05-13 8:23 UTC (permalink / raw)
To: help-gnu-emacs
Op woensdag 12 mei 2010 22:40 CEST, Stefan Monnier schreef:
>>>>> Is there a way to change the behaviour of fill-paragraph?
>> I think the problem here is, that it is impossible to tell the paragraph
>> functions, that a line like
>> This line ends a paragraph:
>> does indeed end a paragraph. There are variables `paragraph-start' and
>> `paragraph-separate', but not paragraph-end .
>
> Good point. I've been using a local hack that adds exactly this
> `paragraph-end' variable, which I use for LaTeX (to recognize \\ at the
> end of a line as meaning "end of paragraph" and also originally to
> try and make filling recognize %...\n comments as also indicating
> end-of-paragraph (also for filling purposes, tho not for navigation
> purposes)).
Could you post how you have done this? Would be very useful.
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Not taking indented text with fill-paragraph
[not found] ` <861vdhtgqs.fsf@aiuole.stru.polimi.it>
@ 2010-05-13 8:23 ` Cecil Westerhof
0 siblings, 0 replies; 5+ messages in thread
From: Cecil Westerhof @ 2010-05-13 8:23 UTC (permalink / raw)
To: help-gnu-emacs
Op woensdag 12 mei 2010 15:02 CEST, Giacomo Boffi schreef:
>> When using M-q you get:
>>
>> First some initial text which is a description of the list that follows
>> the text: item 1 item 2 item 3 item 4
>
> Kyle's filladapt,
> http://www.emacswiki.org/emacs/FillAdapt
I'll look into that. Thanks.
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-05-13 8:23 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-12 9:57 Not taking indented text with fill-paragraph Cecil Westerhof
2010-05-12 10:21 ` Pascal J. Bourguignon
[not found] ` <87mxw54c4k.fsf@linux-lqcw.site>
2010-05-12 20:09 ` Andreas Politz
[not found] ` <jwv632s3lgf.fsf-monnier+gnu.emacs.help@gnu.org>
2010-05-13 8:23 ` Cecil Westerhof
[not found] ` <861vdhtgqs.fsf@aiuole.stru.polimi.it>
2010-05-13 8:23 ` Cecil Westerhof
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).