all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Klaus Uhl <news@u-h-l.de>
Subject: Re: LaTeX reformat
Date: 08 Jan 2004 23:54:00 +0100	[thread overview]
Message-ID: <87d69urr07.fsf@ulm.my.lan> (raw)
In-Reply-To: btkfpu$jb6$1@news.net.uni-c.dk

David Rasmussen <david.rasmussen@gmx.net> writes:

> In plain emacs (I am not using AucTeX as I have not been able to find
> it anywhere), I use "Auto Fill", to make it wrap lines
> automatically. When I have fiddled around with the text a bit, the
> automatically inserted newlines are at random places so the text looks
> broken up (in emacs).
> 
> A way to solve this, is to delete the now extraneous newline, and then
> go to the end of the line, and press space. This causes the whole line
> to get reformatted.

You can use M-q to reformat a single paragraph. This is no AucTeX
command but a general emacs command (fill-paragraph) so it also works
in simple text mode (e.g. I also used it to format this message).

> But it would be nice if I could just mark an entire region and
> reformat it, so that newlines were at the right places, and lines
> wrapped naturally. What is the command for this?

There is also an emacs command fill-region (type M-x fill-region) but
I am not sure if it is bound to a shortcut by default. If you often
need to reformat regions that cover more than one paragraph you can
also define your own key binding for this command. Put the line

(global-set-key '(meta w) 'fill-region)

somewhere into your .emacs file and you have bound fill-region to the
key sequence M-w.

Remark: Many keyboards (especially those of PCs) do not have a
separate meta key. On those computers you can try to type ALT-q
instead of M-q if this is configured for your X-Server. Otherwise you
can always use the sequence ESC q (i.e. press _and_ release the escape
key and then press the w key) as a replacement for M-q.

-- 

                 God is real ...
\|/ ____ \|/     ... unless declared integer.
"@'/ ,. \`@"     
\_| \__/ |_/     Mail me : news@u-h-l.de
   \__U_/        WWW     : www.u-h-l.de
                 PGP     : Look at your favourite PGP-keyserver

  parent reply	other threads:[~2004-01-08 22:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-08 20:57 LaTeX reformat David Rasmussen
2004-01-08 21:31 ` Patrick Drechsler
2004-01-08 21:53 ` David Kastrup
2004-01-08 21:54   ` David Rasmussen
2004-01-08 22:43 ` Stefan Monnier
2004-01-08 22:54 ` Klaus Uhl [this message]
2004-01-08 23:02   ` Stefan Monnier
2004-01-08 23:23     ` Klaus Uhl
2004-01-09 11:56       ` Paolo Gianrossi
2004-01-10 22:36         ` LEE Sau Dan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d69urr07.fsf@ulm.my.lan \
    --to=news@u-h-l.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.