all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* line wrap problem
@ 2003-03-18 17:09 S. Eng
  2003-03-18 17:22 ` Pierre Albarede
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: S. Eng @ 2003-03-18 17:09 UTC (permalink / raw)


Hi

I want to line wrap at column 72.
I have the following lines in my .emacs

(setq default-major-mode 'text-mode)
(setq text-mode-hook 'turn-on-auto-fill)
(setq current-fill-column 72)

It does not work on NTEmacs 21.1.1 running under Win2K, or on 20.7
running under Redhat 7.2.

At the bottom of the window, the NT version says (Lisp interaction
fill)
At the bottom of the window, the Red Hat version says (Text fill)

The Options menu for the NT version allows me to choose 'word wrap'. I
turned it on and it also does not work.

Any help would be greatly appreciated.
Thanks in advance.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: line wrap problem
  2003-03-18 17:09 line wrap problem S. Eng
@ 2003-03-18 17:22 ` Pierre Albarede
  2003-03-18 23:14   ` S. Eng
  2003-03-19  8:55   ` Pierre Albarede
  2003-03-19  2:25 ` Edward Dodge
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 13+ messages in thread
From: Pierre Albarede @ 2003-03-18 17:22 UTC (permalink / raw)


Hi,

auto-fill works when you first type a paragraph.
After insertion, you need M-q to make it work.

I have read on the to-do-list of CVS or somewhere about a bug on line 
length, but this is not your problem.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: line wrap problem
  2003-03-18 17:22 ` Pierre Albarede
@ 2003-03-18 23:14   ` S. Eng
  2003-03-19  0:53     ` Unknown
  2003-03-19  9:06     ` Erik Simon
  2003-03-19  8:55   ` Pierre Albarede
  1 sibling, 2 replies; 13+ messages in thread
From: S. Eng @ 2003-03-18 23:14 UTC (permalink / raw)


Salut Pierre.. can you please elaborate.
I typed a paragraph. Press return. Then type 'esc-x-auto-fill-mode'
Is this what you mean? It still does not work. 
Thanks in advace.
ngse

Pierre Albarede <albanews@free.fr> wrote in message news:<3E7755EC.9060506@free.fr>...
> Hi,
> 
> auto-fill works when you first type a paragraph.
> After insertion, you need M-q to make it work.
> 
> I have read on the to-do-list of CVS or somewhere about a bug on line 
> length, but this is not your problem.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: line wrap problem
  2003-03-18 23:14   ` S. Eng
@ 2003-03-19  0:53     ` Unknown
  2003-03-19  9:06     ` Erik Simon
  1 sibling, 0 replies; 13+ messages in thread
From: Unknown @ 2003-03-19  0:53 UTC (permalink / raw)


S. Eng wrote:

> Salut Pierre.. can you please elaborate.
> I typed a paragraph. Press return. Then type 'esc-x-auto-fill-mode'
> Is this what you mean? It still does not work.
> Thanks in advace.
> ngse
> 
> Pierre Albarede <albanews@free.fr> wrote in message
> news:<3E7755EC.9060506@free.fr>...
>> Hi,
>> 
>> auto-fill works when you first type a paragraph.
>> After insertion, you need M-q to make it work.
>> 
>> I have read on the to-do-list of CVS or somewhere about a bug on line
>> length, but this is not your problem.

Top posting upsets people.  People who're upset tend not want to help you.

--
Le

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: line wrap problem
  2003-03-18 17:09 line wrap problem S. Eng
  2003-03-18 17:22 ` Pierre Albarede
@ 2003-03-19  2:25 ` Edward Dodge
  2003-03-19 18:11 ` Eric Pement
  2003-03-20  0:42 ` Unknown
  3 siblings, 0 replies; 13+ messages in thread
From: Edward Dodge @ 2003-03-19  2:25 UTC (permalink / raw)


ngse@yahoo.com (S. Eng) writes:

> Hi
> 
> I want to line wrap at column 72.
> I have the following lines in my .emacs
> 
> (setq default-major-mode 'text-mode)
> (setq text-mode-hook 'turn-on-auto-fill)

Try this instead:

(add-hook 'text-mode-hook 'turn-on-auto-fill)

Or if you have a newer version of EMACS,  and want to have the
auto-fill even if you're in the middle of a paragraph:

(add-hook 'text-mode-hook 'refill-mode)

> (setq current-fill-column 72)

-- 
Edward Dodge

/Confabulation Consulting/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: line wrap problem
  2003-03-18 17:22 ` Pierre Albarede
  2003-03-18 23:14   ` S. Eng
@ 2003-03-19  8:55   ` Pierre Albarede
  2003-03-19 16:19     ` Colin Marquardt
  1 sibling, 1 reply; 13+ messages in thread
From: Pierre Albarede @ 2003-03-19  8:55 UTC (permalink / raw)


> Salut Pierre.. can you please elaborate.
> I typed a paragraph. Press return. Then type 'esc-x-auto-fill-mode'
> Is this what you mean? It still does not work. 

esc = méta = M the escape key on most keyboards

Type first M-x auto-fill-mode
then your pararagraph.

Later on, to reformat after insertion type M-q.

Attention : the other guy told us, not to post on the other newsgroup 
comp.emacs.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: line wrap problem
  2003-03-18 23:14   ` S. Eng
  2003-03-19  0:53     ` Unknown
@ 2003-03-19  9:06     ` Erik Simon
  1 sibling, 0 replies; 13+ messages in thread
From: Erik Simon @ 2003-03-19  9:06 UTC (permalink / raw)


On 19 Mar 2003, S. Eng wrote:
>I typed a paragraph. Press return. Then type 'esc-x-auto-fill-mode'
>Is this what you mean? It still does not work. 

You have to turn on auto-fill-mode before you type. Otherwise, you
reformat the paragraph with M-q.

See:
<http://www.gnu.org/manual/emacs-21.2/html_node/emacs_239.html>
<http://www.gnu.org/manual/emacs-21.2/html_node/emacs_241.html#SEC241>

Cheers
-- 
Erik Simon

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: line wrap problem
  2003-03-19  8:55   ` Pierre Albarede
@ 2003-03-19 16:19     ` Colin Marquardt
  2003-03-19 23:19       ` Piet van Oostrum
  2003-03-20  0:34       ` Unknown
  0 siblings, 2 replies; 13+ messages in thread
From: Colin Marquardt @ 2003-03-19 16:19 UTC (permalink / raw)


Pierre Albarede <albanews@free.fr> writes:

> Attention : the other guy told us, not to post on the other newsgroup
> comp.emacs.

Uhm, that's not what Le Wang meant. Look at my signature.

-- 
A: No.
Q: Should I include quotations after my reply?

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: line wrap problem
  2003-03-18 17:09 line wrap problem S. Eng
  2003-03-18 17:22 ` Pierre Albarede
  2003-03-19  2:25 ` Edward Dodge
@ 2003-03-19 18:11 ` Eric Pement
  2003-03-19 22:49   ` S. Eng
  2003-03-20  0:42 ` Unknown
  3 siblings, 1 reply; 13+ messages in thread
From: Eric Pement @ 2003-03-19 18:11 UTC (permalink / raw)


ngse@yahoo.com (S. Eng) wrote in message news:<fb376a9e.0303180909.12d4daf7@posting.google.com>...
> Hi
> 
> I want to line wrap at column 72.
> I have the following lines in my .emacs
> 
> (setq default-major-mode 'text-mode)
> (setq text-mode-hook 'turn-on-auto-fill)
> (setq current-fill-column 72)
> 
> It does not work on NTEmacs 21.1.1 running under Win2K

I'm using GNU Emacs 21.2.1 running under Win2K, same as you.
Here's what I have in my .emacs init file:

   (setq default-major-mode 'text-mode)
   (add-hook 'text-mode-hook 'turn-on-auto-fill)
   (setq fill-column 71)

It works for me. Note especially that I use "fill-column" instead
of "current-fill-column" and also the "add-hook" command. Also,
note that when you first run Emacs, you are automatically in the
*Scratch* buffer, which is not a text-mode buffer. To run in text
mode, open or create a new file and you should see the string
"(Text Fill)--L1----ALL----" in the gray status bar.

If you can see that, then you should be able to type new content,
and see the line wrap automatically after it reaches 75 characters
or so. If you add new content to existing paragraphs, Emacs will
push the new content to the right, but will not automatically
"reflow" or reformat the paragraph.

To reformat an edited paragraph to your preset margins, you must
type ESC-q (2 successive keystrokes) or ALT-Q (simultaneously) to
reformat the paragraph. Hope this helps.

--
Eric Pement

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: line wrap problem
  2003-03-19 18:11 ` Eric Pement
@ 2003-03-19 22:49   ` S. Eng
  0 siblings, 0 replies; 13+ messages in thread
From: S. Eng @ 2003-03-19 22:49 UTC (permalink / raw)


Thank you all. It works now. 
ngse


pemente@northpark.edu (Eric Pement) wrote in message news:<227a55e9.0303191011.35f66887@posting.google.com>...
> ngse@yahoo.com (S. Eng) wrote in message news:<fb376a9e.0303180909.12d4daf7@posting.google.com>...
> > Hi
> > 
> > I want to line wrap at column 72.
> > I have the following lines in my .emacs
> > 
> > (setq default-major-mode 'text-mode)
> > (setq text-mode-hook 'turn-on-auto-fill)
> > (setq current-fill-column 72)
> > 
> > It does not work on NTEmacs 21.1.1 running under Win2K
> 
> I'm using GNU Emacs 21.2.1 running under Win2K, same as you.
> Here's what I have in my .emacs init file:
> 
>    (setq default-major-mode 'text-mode)
>    (add-hook 'text-mode-hook 'turn-on-auto-fill)
>    (setq fill-column 71)
> 
> It works for me. Note especially that I use "fill-column" instead
> of "current-fill-column" and also the "add-hook" command. Also,
> note that when you first run Emacs, you are automatically in the
> *Scratch* buffer, which is not a text-mode buffer. To run in text
> mode, open or create a new file and you should see the string
> "(Text Fill)--L1----ALL----" in the gray status bar.
> 
> If you can see that, then you should be able to type new content,
> and see the line wrap automatically after it reaches 75 characters
> or so. If you add new content to existing paragraphs, Emacs will
> push the new content to the right, but will not automatically
> "reflow" or reformat the paragraph.
> 
> To reformat an edited paragraph to your preset margins, you must
> type ESC-q (2 successive keystrokes) or ALT-Q (simultaneously) to
> reformat the paragraph. Hope this helps.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: line wrap problem
  2003-03-19 16:19     ` Colin Marquardt
@ 2003-03-19 23:19       ` Piet van Oostrum
  2003-03-20  0:34       ` Unknown
  1 sibling, 0 replies; 13+ messages in thread
From: Piet van Oostrum @ 2003-03-19 23:19 UTC (permalink / raw)


>>>>> Colin Marquardt <c.marquardt@alcatel.de> (CM) wrote:

CM> Pierre Albarede <albanews@free.fr> writes:
>> Attention : the other guy told us, not to post on the other newsgroup
>> comp.emacs.

CM> Uhm, that's not what Le Wang meant. Look at my signature.

Maybe you can make it like this:

A: Because it confuses people
Q: Why not?
A: No.
Q: Should I include quotations after my reply?

-- 
Piet van Oostrum <piet@cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP]
Private email: P.van.Oostrum@hccnet.nl

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: line wrap problem
  2003-03-19 16:19     ` Colin Marquardt
  2003-03-19 23:19       ` Piet van Oostrum
@ 2003-03-20  0:34       ` Unknown
  1 sibling, 0 replies; 13+ messages in thread
From: Unknown @ 2003-03-20  0:34 UTC (permalink / raw)


Colin Marquardt wrote:

> Pierre Albarede <albanews@free.fr> writes:
> 
>> Attention : the other guy told us, not to post on the other newsgroup
>> comp.emacs.
> 
> Uhm, that's not what Le Wang meant. Look at my signature.

Right.  Le Wang doesn't have a problem with cross-posting to other relevant 
newsgroups.  Le has to look at people top-post all day with brain-dead Notes, 
so this is a especially touchy issue for him.

To elaborate on Piet's reply, as to why it confuses people: the normal flow of 
a discussion in e-mail or newsgroups is you insert the quotation you're 
responding to and write your reply BENEATH it.  Insert some more, write some 
more, so on and so forth.  The discussion becomes impossible to follow if 
some people post before the quotation, in contradiction to the accepted norm.

--
Le

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: line wrap problem
  2003-03-18 17:09 line wrap problem S. Eng
                   ` (2 preceding siblings ...)
  2003-03-19 18:11 ` Eric Pement
@ 2003-03-20  0:42 ` Unknown
  3 siblings, 0 replies; 13+ messages in thread
From: Unknown @ 2003-03-20  0:42 UTC (permalink / raw)


S. Eng wrote:

> Hi
> 
> I want to line wrap at column 72.
> I have the following lines in my .emacs
> 
> (setq default-major-mode 'text-mode)
> (setq text-mode-hook 'turn-on-auto-fill)

`setq' shouldn't be used for hooks, use add-hook instead (see below).

> (setq current-fill-column 72)

`current-fill-column' is not a lisp variable for me.

Does this work for you?

(setq default-major-mode 'text-mode)
(add-hook 'text-mode-hook
          #'(lambda ()
              (setq fill-column 72)
              (auto-fill-mode 1)))


Again, if you insert text in the middle of the paragraph, you'll have to press 
<M-q> to refill manually
--
Le

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2003-03-20  0:42 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-18 17:09 line wrap problem S. Eng
2003-03-18 17:22 ` Pierre Albarede
2003-03-18 23:14   ` S. Eng
2003-03-19  0:53     ` Unknown
2003-03-19  9:06     ` Erik Simon
2003-03-19  8:55   ` Pierre Albarede
2003-03-19 16:19     ` Colin Marquardt
2003-03-19 23:19       ` Piet van Oostrum
2003-03-20  0:34       ` Unknown
2003-03-19  2:25 ` Edward Dodge
2003-03-19 18:11 ` Eric Pement
2003-03-19 22:49   ` S. Eng
2003-03-20  0:42 ` Unknown

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.