From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Richard M. Stallman" Newsgroups: gmane.emacs.devel Subject: Re: Line wrapping during redisplay (was: longlines.el problems...) Date: Fri, 22 Jul 2005 00:55:47 -0400 Message-ID: References: <85irzgewr0.fsf@lola.goethe.zz> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1122009794 17099 80.91.229.2 (22 Jul 2005 05:23:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 22 Jul 2005 05:23:14 +0000 (UTC) Cc: cyd@stupidchicken.com, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 22 07:23:13 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Dvq04-00051K-UW for ged-emacs-devel@m.gmane.org; Fri, 22 Jul 2005 07:23:09 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dvq2C-0006kI-Lo for ged-emacs-devel@m.gmane.org; Fri, 22 Jul 2005 01:25:20 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DvpwU-0005ZS-Uv for emacs-devel@gnu.org; Fri, 22 Jul 2005 01:19:27 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DvpwH-0005Qt-9E for emacs-devel@gnu.org; Fri, 22 Jul 2005 01:19:17 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DvpwC-0005NF-SZ for emacs-devel@gnu.org; Fri, 22 Jul 2005 01:19:08 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DvpjR-0004Hn-Ji for emacs-devel@gnu.org; Fri, 22 Jul 2005 01:05:57 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1DvpZb-00034j-87; Fri, 22 Jul 2005 00:55:47 -0400 Original-To: storm@cua.dk (Kim F. Storm) In-reply-to: (storm@cua.dk) 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:41120 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:41120 Perhaps you would like to experiment a little with the following patch which implements non-destructive line-wrapping during redisplay, i.e. it automatically breaks _displayed_ lines at suitable spaces and tabs. With this approach, the commands that operate on lines in the buffer will all treat the paragraph as one line, even though it appears as several. That is extremely inconvenient. There is a package that redefines the most common commands, but there are others, including M-x occur. User programs also look at lines. I strongly prefer the approach in longlines.el, because the line breaks are there in the buffer, so that all sorts of commands that look for line breaks will see them where the user sees them. Here's a peculiar idea. Make it possible for an overlay to make a space "appear" as a newline or vice versa. The result is a change in the apparent contents of the buffer, for display purposes and for some commands. But killing and yanking would not copy these overlays (since they don't copy any overlays).