* Using autofill./
@ 2005-10-04 15:24 Shashank Khanvilkar
2005-10-04 16:12 ` Peter Dyballa
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Shashank Khanvilkar @ 2005-10-04 15:24 UTC (permalink / raw)
Hi,
Will appreciate some help here.
I am trying to make an ascii resume. I had set the line width to 75
characters. However now i find another site which requires the line
width to be just 62 characters.
To do this I am using the emacs autofill mode and have set the
fill-column variable to 62 by placing the following lines in ~/.emacs.
(setq text-mode-hook 'turn-on-auto-fill)
(setq fill-column '62)
However suppose I have a paragraph like the below:
Background
----------
* This is a test message. This is a test message. This is a test
message.This is a test message. This is a test message. This is a test
message. This is a test message. This is a test message.
* This is a second test message. This is a second test message.
This is a second test message. This is a second test message.
This is a second test message.
How do i ask emacs to apply the new line width.
I tried using <Meta-q> but it makes the above lines as:
Background ---------- * This is a test message. This is a test
message. This is a test message. This is a test message. This
is a test message. This is a test message. This is a test
message. This is a test message. * This is a second test
message. This is a second test message. This is a second
test message. This is a second test message. This is a
second test message.
Am i doing something wrong here.
Thanks
Shashank
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Using autofill./
2005-10-04 15:24 Using autofill./ Shashank Khanvilkar
@ 2005-10-04 16:12 ` Peter Dyballa
2005-10-04 17:32 ` Giorgos Keramidas
2005-10-04 17:41 ` rgb
2 siblings, 0 replies; 9+ messages in thread
From: Peter Dyballa @ 2005-10-04 16:12 UTC (permalink / raw)
Cc: help-gnu-emacs
Am 04.10.2005 um 17:24 schrieb Shashank Khanvilkar:
> I am trying to make an ascii resume. I had set the line width to 75
> characters. However now i find another site which requires the line
> width to be just 62 characters.
>
Try (buffer) local variables like
%
% Local Variables:
% mode: LaTeX
% fill-column: 99999
% coding-system: utf-8-unix
% End:
%
which belong to the file's end. In the file's header you can put them
too:
% -*- mode: Text; fill-column: 69; coding-system: iso-8859-15-unix; -*-
% is just one example for starting a comment.
--
Greetings
Pete
Got Mole problems?
Call Avogadro 6.02 x 10^23
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Using autofill./
2005-10-04 15:24 Using autofill./ Shashank Khanvilkar
2005-10-04 16:12 ` Peter Dyballa
@ 2005-10-04 17:32 ` Giorgos Keramidas
2005-10-05 0:18 ` Neon Absentius
[not found] ` <mailman.9763.1128471558.20277.help-gnu-emacs@gnu.org>
2005-10-04 17:41 ` rgb
2 siblings, 2 replies; 9+ messages in thread
From: Giorgos Keramidas @ 2005-10-04 17:32 UTC (permalink / raw)
Shashank Khanvilkar <shashank@mia.ece.uic.edu> writes:
> However suppose I have a paragraph like the below:
> Background
> ----------
> * This is a test message. This is a test message. This is a test
> message.This is a test message. This is a test message. This is a test
> message. This is a test message. This is a test message.
> * This is a second test message. This is a second test message.
> This is a second test message. This is a second test message.
> This is a second test message.
>
> How do i ask emacs to apply the new line width.
> I tried using <Meta-q> but it makes the above lines as:
>
> Background ---------- * This is a test message. This is a test
> message. This is a test message. This is a test message. This
> is a test message. This is a test message. This is a test
> message. This is a test message. * This is a second test
> message. This is a second test message. This is a second
> test message. This is a second test message. This is a
> second test message.
You can set a "fill prefix" of a couple of spaces. The M-q command
respects the value of fill-prefix. To set the value of fill-prefix
use the ``C-x .'' command.
With a fill prefix of 2 spaces and the following original text:
* This is a test message. This is a test message. This
is a test message.This is a test message. This is a test
message. This is a test message. This is a test
message. This is a test message.
you can set the fill-column to its new value (i.e. 40) and
refill the paragraph by hitting M-q just once:
* This is a test message. This is a test
message. This is a test message.This is a
test message. This is a test message. This
is a test message. This is a test
message. This is a test message.
I usually reformat list items by setting the fill-prefix to the
indentation of the second line (the first one has the bullet).
Note that M-q is *not* the same as auto-fill-mode, but auto-fill-mode
also respects the current fill-prefix.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Using autofill./
2005-10-04 15:24 Using autofill./ Shashank Khanvilkar
2005-10-04 16:12 ` Peter Dyballa
2005-10-04 17:32 ` Giorgos Keramidas
@ 2005-10-04 17:41 ` rgb
2 siblings, 0 replies; 9+ messages in thread
From: rgb @ 2005-10-04 17:41 UTC (permalink / raw)
> How do i ask emacs to apply the new line width.
> I tried using <Meta-q> but it makes the above lines as:
>
>
> Background ---------- * This is a test message. This is a test
> message. This is a test message. This is a test message. This
> is a test message. This is a test message. This is a test
> message. This is a test message. * This is a second test
> message. This is a second test message. This is a second
> test message. This is a second test message. This is a
> second test message.
M-q (aka fill-paragraph) operates on paragraphs.
The regexp's paragraph-start and paragraph-separate are used
to determine what constitutes a paragraph. Apparently their
current values are considering text as part of a paragraph
that you'd rather it didn't.
As a quick fix. Separate the paragraphs you want to fill
with blank lines. Otherwise you need to modify the regexps
to reflect your definition of what does and doesn't belong
to a paragraph.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Using autofill./
2005-10-04 17:32 ` Giorgos Keramidas
@ 2005-10-05 0:18 ` Neon Absentius
[not found] ` <mailman.9763.1128471558.20277.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 9+ messages in thread
From: Neon Absentius @ 2005-10-05 0:18 UTC (permalink / raw)
On Tue, Oct 04, 2005 at 08:32:51PM +0300, Giorgos Keramidas wrote:
> Shashank Khanvilkar <shashank@mia.ece.uic.edu> writes:
> > However suppose I have a paragraph like the below:
> > Background
> > ----------
> > * This is a test message. This is a test message. This is a test
> > message.This is a test message. This is a test message. This is a test
> > message. This is a test message. This is a test message.
> > * This is a second test message. This is a second test message.
> > This is a second test message. This is a second test message.
> > This is a second test message.
> >
> > How do i ask emacs to apply the new line width.
> > I tried using <Meta-q> but it makes the above lines as:
> >
> > Background ---------- * This is a test message. This is a test
> > message. This is a test message. This is a test message. This
> > is a test message. This is a test message. This is a test
> > message. This is a test message. * This is a second test
> > message. This is a second test message. This is a second
> > test message. This is a second test message. This is a
> > second test message.
>
> You can set a "fill prefix" of a couple of spaces. The M-q command
> respects the value of fill-prefix. To set the value of fill-prefix
> use the ``C-x .'' command.
>
This is great advice indeed. By following it you can get your
example text after "M-q" to look something like this:
Background ---------- * This is a test message. This is a
test message. This is a test message.This is a test
message. This is a test message. This is a test message.
This is a test message. This is a test message. * This is
a second test message. This is a second test message.
This is a second test message. This is a second test
message. This is a second test message.
> you can set the fill-column to its new value (i.e. 40) and
> refill the paragraph by hitting M-q just once:
>
> * This is a test message. This is a test
> message. This is a test message.This is a
> test message. This is a test message. This
> is a test message. This is a test
> message. This is a test message. ^^^^^^^^
> ^^^^^^^^
Before you start giving advice on filling don't you think that you
should first fix yours? You might want to have a look at the
variable "sentence-end-double-space" for example.
--
Everyone is so overwhelmed by the hospitality. And so many of the
people in the arena here, you know, were underprivileged anyway, so
this--this (she chuckles slightly) is working very well for them.
-- Barbara Bush, about the refugees from New Orleans.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Using autofill./
[not found] ` <mailman.9763.1128471558.20277.help-gnu-emacs@gnu.org>
@ 2005-10-05 13:45 ` Giorgos Keramidas
2005-10-05 14:26 ` Neon Absentius
[not found] ` <mailman.9832.1128522413.20277.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 9+ messages in thread
From: Giorgos Keramidas @ 2005-10-05 13:45 UTC (permalink / raw)
Neon Absentius <absent@sdf.lonestar.org> writes:
>On Tue, Oct 04, 2005 at 08:32:51PM +0300, Giorgos Keramidas wrote:
>> you can set the fill-column to its new value (i.e. 40) and
>> refill the paragraph by hitting M-q just once:
>>
>> * This is a test message. This is a test
>> message. This is a test message.This is a
>> test message. This is a test message. This
>> is a test message. This is a test
>> message. This is a test message. ^^^^^^^^
>> ^^^^^^^^
>
> Before you start giving advice on filling don't you think that you
> should first fix yours? You might want to have a look at the
> variable "sentence-end-double-space" for example.
In what ways does my personal preference for the current setting of
sentence-end-double-space affect the correctness or the usefulness of
the advice about filling?
Keep the irony to yourself the next time, thanks...
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Using autofill./
2005-10-05 13:45 ` Giorgos Keramidas
@ 2005-10-05 14:26 ` Neon Absentius
[not found] ` <mailman.9832.1128522413.20277.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 9+ messages in thread
From: Neon Absentius @ 2005-10-05 14:26 UTC (permalink / raw)
On Wed, Oct 05, 2005 at 04:45:44PM +0300, Giorgos Keramidas wrote:
> Neon Absentius <absent@sdf.lonestar.org> writes:
> >On Tue, Oct 04, 2005 at 08:32:51PM +0300, Giorgos Keramidas wrote:
> >> you can set the fill-column to its new value (i.e. 40) and
> >> refill the paragraph by hitting M-q just once:
> >>
> >> * This is a test message. This is a test
> >> message. This is a test message.This is a
> >> test message. This is a test message. This
> >> is a test message. This is a test
> >> message. This is a test message. ^^^^^^^^
> >> ^^^^^^^^
> >
> > Before you start giving advice on filling don't you think that you
> > should first fix yours? You might want to have a look at the
> > variable "sentence-end-double-space" for example.
>
> In what ways does my personal preference for the current setting of
> sentence-end-double-space affect the correctness or the usefulness of
> the advice about filling?
In no way. Your advice was *irrelevant* to what the OP asked. I
would also say that to the degree that your answer did not really
solve the problem it was also wrong. And of course, the value of the
variable "sentence-end-double-space" doesn't affect the validity of
any of those statements. What it does affect however is the filling
behaviour of emacs. Obviously the paragraph I quoted is not filled
correctly. As I tried to indicate -- perhaps overestimating your
power of observation -- the underlined word ("message") in the last
line actually fits in the previous line without exceeding the value
of fill-column.
At a meta-level, I do think that the fact that the filling behaviour
of your copy of emacs is *obviously* not optimal, gives an indication
of the usefulnes of your advice on the filling behaviour of emacs.
Don't you?
>
> Keep the irony to yourself the next time, thanks...
>
No, thank you. I'd rather share.
--
Everyone is so overwhelmed by the hospitality. And so many of the
people in the arena here, you know, were underprivileged anyway, so
this--this (she chuckles slightly) is working very well for them.
-- Barbara Bush, about the refugees from New Orleans.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Using autofill./
[not found] ` <mailman.9832.1128522413.20277.help-gnu-emacs@gnu.org>
@ 2005-10-05 14:56 ` Giorgos Keramidas
2005-10-05 15:10 ` Neon Absentius
0 siblings, 1 reply; 9+ messages in thread
From: Giorgos Keramidas @ 2005-10-05 14:56 UTC (permalink / raw)
Neon Absentius <absent@sdf.lonestar.org> writes:
>On Wed, Oct 05, 2005 at 04:45:44PM +0300, Giorgos Keramidas wrote:
>>Neon Absentius <absent@sdf.lonestar.org> writes:
>>>On Tue, Oct 04, 2005 at 08:32:51PM +0300, Giorgos Keramidas wrote:
>>>> you can set the fill-column to its new value (i.e. 40) and
>>>> refill the paragraph by hitting M-q just once:
>>>>
>>>> * This is a test message. This is a test
>>>> message. This is a test message.This is a
>>>> test message. This is a test message. This
>>>> is a test message. This is a test
>>>> message. This is a test message. ^^^^^^^^
>>>> ^^^^^^^^
>>>
>>> Before you start giving advice on filling don't you think that you
>>> should first fix yours? You might want to have a look at the
>>> variable "sentence-end-double-space" for example.
>>
>> In what ways does my personal preference for the current setting of
>> sentence-end-double-space affect the correctness or the usefulness of
>> the advice about filling?
>
> In no way.
Thanks.
> Your advice was *irrelevant* to what the OP asked.
Not quite. Go back and reread the OP's post.
> At a meta-level, I do think that the fact that the filling behaviour
> of your copy of emacs is *obviously* not optimal, gives an indication
> of the usefulnes of your advice on the filling behaviour of emacs.
> Don't you?
No.
>> Keep the irony to yourself the next time, thanks...
>
> No, thank you. I'd rather share.
Great. Thanks for your invaluable contributions to the original
poster's question. *plonk*
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Using autofill./
2005-10-05 14:56 ` Giorgos Keramidas
@ 2005-10-05 15:10 ` Neon Absentius
0 siblings, 0 replies; 9+ messages in thread
From: Neon Absentius @ 2005-10-05 15:10 UTC (permalink / raw)
On Wed, Oct 05, 2005 at 05:56:09PM +0300, Giorgos Keramidas wrote:
>
> > Your advice was *irrelevant* to what the OP asked.
>
> Not quite. Go back and reread the OP's post.
>
Yes. I did. The problem was that "fill-paragraph" didn't respect what
(s)he consedered to be paragraph boundaries. How do you think your post
contributed to it?
> > At a meta-level, I do think that the fact that the filling behaviour
> > of your copy of emacs is *obviously* not optimal, gives an indication
> > of the usefulnes of your advice on the filling behaviour of emacs.
> > Don't you?
>
> No.
>
Well, think about it a little bit maybe you will see my point.
> >> Keep the irony to yourself the next time, thanks...
> >
> > No, thank you. I'd rather share.
>
> Great. Thanks for your invaluable contributions to the original
> poster's question. *plonk*
I was hoping that you would thank me for telling you how to fix your
configuration so that filling works in the intendend way. Oh well.
Anyway. You are right. Whatever. Bye.
--
Everyone is so overwhelmed by the hospitality. And so many of the
people in the arena here, you know, were underprivileged anyway, so
this--this (she chuckles slightly) is working very well for them.
-- Barbara Bush, about the refugees from New Orleans.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2005-10-05 15:10 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-04 15:24 Using autofill./ Shashank Khanvilkar
2005-10-04 16:12 ` Peter Dyballa
2005-10-04 17:32 ` Giorgos Keramidas
2005-10-05 0:18 ` Neon Absentius
[not found] ` <mailman.9763.1128471558.20277.help-gnu-emacs@gnu.org>
2005-10-05 13:45 ` Giorgos Keramidas
2005-10-05 14:26 ` Neon Absentius
[not found] ` <mailman.9832.1128522413.20277.help-gnu-emacs@gnu.org>
2005-10-05 14:56 ` Giorgos Keramidas
2005-10-05 15:10 ` Neon Absentius
2005-10-04 17:41 ` rgb
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).