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: Line wrapping during redisplay Date: Fri, 22 Jul 2005 07:43:10 -0400 (EDT) Message-ID: <1099.220.255.229.97.1122032590.squirrel@www.stupidchicken.com> References: <85irzgewr0.fsf@lola.goethe.zz> <85mzoghz7b.fsf@lola.goethe.zz> 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 1122033688 10757 80.91.229.2 (22 Jul 2005 12:01:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 22 Jul 2005 12:01:28 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 22 14:01:26 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DvwDW-0005EC-8n for ged-emacs-devel@m.gmane.org; Fri, 22 Jul 2005 14:01:26 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DvwFe-00038P-Jw for ged-emacs-devel@m.gmane.org; Fri, 22 Jul 2005 08:03:38 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Dvw73-0000uh-Ea for emacs-devel@gnu.org; Fri, 22 Jul 2005 07:54:53 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Dvw6w-0000r9-QZ for emacs-devel@gnu.org; Fri, 22 Jul 2005 07:54:42 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dvw6u-0000fq-OP for emacs-devel@gnu.org; Fri, 22 Jul 2005 07:54:36 -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 1Dvw5s-0003VL-NU; Fri, 22 Jul 2005 07:53:32 -0400 Original-Received: from stupidch by shark.whbdns.com with local (Exim 4.52) id 1Dvvvq-0005tO-99; Fri, 22 Jul 2005 07:43:13 -0400 Original-Received: from 220.255.229.97 ([220.255.229.97]) (SquirrelMail authenticated user cyd@stupidchicken.com) by www.stupidchicken.com with HTTP; Fri, 22 Jul 2005 07:43:10 -0400 (EDT) In-Reply-To: <85mzoghz7b.fsf@lola.goethe.zz> Original-To: "David Kastrup" 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:41127 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:41127 > Actually, since I am a cleartext guy, I want my texts wrapped in their > files. Those are almost always TeX files, and TeX does not like 50000 > character lines, anyway. Also, I have syntactical indentation in > AUCTeX, and this sort of display-induced wrapping would not help > much. > > So I am not really much of a customer of longlines.el, anyway. Your > display-based approach would probably have the advantage that the line > numbers in the source still correspond with the line numbers on file, > making error messages turn out correctly. A relatively easy way to extend longlines.el is to write a function that intelligently converts a buffer full of hard newlines into a longlines buffer. The simplest (but probably not the best) heuristic is to make "\n\n" hard newlines, and single "\n" characters soft newlines. Then you can have a file full of newlines that plays well with latex, and other programs that expect newlines. When the file is loaded into Emacs, you can use this function to turn into a longlines buffer, so you get the line wrapping functionality. Error message line numbers would correspond to the line numbers in the buffer. (With the display-based approach, even though the line numbers turn out correctly, it may be hard to find the error; for example, "line 3" may be a paragraph that takes up 50 screen lines.) One thing that longlines.el is unlikely ever to accomplish is support for proportional fonts and images. That is the big advantage of Kim's approach (which makes the planned "longlines-2" obsolete, so it's a good thing I haven't done much work on it ;-) Another advantage of the display-based approach is that it will never screw up font-lock highlighting, as longlines.el often does.