From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Chong Yidong" Newsgroups: gmane.emacs.devel Subject: Re: Turn on longlines in text modes [patch] Date: Tue, 19 Jul 2005 01:39:32 -0400 (EDT) Message-ID: <2746.155.69.5.236.1121751572.squirrel@stupidchicken.com> References: <993C95CD-DA31-4B96-A73F-94D0B46A4B65@gmail.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1121754152 21961 80.91.229.2 (19 Jul 2005 06:22:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 19 Jul 2005 06:22:32 +0000 (UTC) Cc: emacs-devel ' Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 19 08:22:28 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DulUp-0005R9-W3 for ged-emacs-devel@m.gmane.org; Tue, 19 Jul 2005 08:22:28 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DulVT-0004Ql-DB for ged-emacs-devel@m.gmane.org; Tue, 19 Jul 2005 02:23:08 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DulBk-0000E4-Ug for emacs-devel@gnu.org; Tue, 19 Jul 2005 02:02:45 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DulBf-0000C8-L7 for emacs-devel@gnu.org; Tue, 19 Jul 2005 02:02:43 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dul50-0007Qe-4k for emacs-devel@gnu.org; Tue, 19 Jul 2005 01:55:46 -0400 Original-Received: from [64.21.80.18] (helo=shark.whbdns.com) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1Dukv4-00015p-MX for emacs-devel@gnu.org; Tue, 19 Jul 2005 01:45:30 -0400 Original-Received: from stupidch by shark.whbdns.com with local (Exim 4.50) id 1DukpI-0005oI-EH; Tue, 19 Jul 2005 01:39:32 -0400 Original-Received: from 155.69.5.236 ([155.69.5.236]) (SquirrelMail authenticated user cyd@stupidchicken.com) by stupidchicken.com with HTTP; Tue, 19 Jul 2005 01:39:32 -0400 (EDT) In-Reply-To: <993C95CD-DA31-4B96-A73F-94D0B46A4B65@gmail.com> Original-To: "David Reitter" User-Agent: SquirrelMail/1.4.4 X-Priority: 3 (Normal) Importance: Normal X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - shark.whbdns.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [32675 33085] / [47 12] X-AntiAbuse: Sender Address Domain - stupidchicken.com X-Source: /usr/local/cpanel/3rdparty/bin/php X-Source-Args: /usr/local/cpanel/3rdparty/bin/php /usr/local/cpanel/base/3rdparty/squirrelmail/src/compose.php X-Source-Dir: :/base/3rdparty/squirrelmail/src X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:41065 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:41065 > With the advent of longlines-mode it seems highly useful to have this > mode directly available from the Options menu, and at least have a > simple way to turn it on automatically in all text modes, just like > auto fill. This could be done as in the enclosed patch. Of course > there would be more generic ways, integrating the auto fill and > longlines toggle functions, etc. - but probably not worth the hassle. Just a note: longlines mode should not be used with auto-fill-mode on. In fact, longlines-mode explicitly turns off auto-fill-mode. > Also, can I suggest to turn on longlines-wrap-follows-window-size by > default? Longlines is very much a matter of altering the way text is > displayed (rather than actually modifying the buffer as saved to > disk). Therefore I think it would be very sensible to link it to the > window size by default rather than to a fixed line length. (This > change is not included in the patch.) The reason longlines-wrap-follows-window-size is nil by default is that it can produce unexpected behavior when the buffer is simultaneously displayed in two windows with different widths. Longlines will wrap using the width of one of the windows, and the results will look strange in the other window. There doesn't seem to be an easy way out of this, as far as I know. At least, using fill-column, at least the results will be consistent (provided no windows are narrower than the value of fill-column.) Of course, if you don't encounter such situations, longlines-wrap-follows-window-size should work perfectly fine.