From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Klaus Uhl Newsgroups: gmane.emacs.help Subject: Re: LaTeX reformat Date: 08 Jan 2004 23:54:00 +0100 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87d69urr07.fsf@ulm.my.lan> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1073684760 18189 80.91.224.253 (9 Jan 2004 21:46:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 9 Jan 2004 21:46:00 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jan 09 22:45:55 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Af4S3-0007Ok-00 for ; Fri, 09 Jan 2004 22:45:55 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Aek7W-0005AS-Gs for geh-help-gnu-emacs@m.gmane.org; Thu, 08 Jan 2004 19:03:22 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!p5088f0fb.dip0.t-ipconnect.DE!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 44 Original-NNTP-Posting-Host: p5088f0fb.dip0.t-ipconnect.de (80.136.240.251) Original-X-Trace: news.uni-berlin.de 1073602362 8891654 80.136.240.251 ([99401]) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 Original-Xref: shelby.stanford.edu gnu.emacs.help:119898 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:15872 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:15872 David Rasmussen 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