From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman (gmail)" Newsgroups: gmane.emacs.devel Subject: Re: Display-based word wrapping Date: Sun, 22 Jun 2008 22:04:01 +0200 Message-ID: <485EB031.7050502@gmail.com> References: <87y74x9rfl.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1214165107 6650 80.91.229.12 (22 Jun 2008 20:05:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 22 Jun 2008 20:05:07 +0000 (UTC) Cc: emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 22 22:05:52 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KAVo7-00051I-Uf for ged-emacs-devel@m.gmane.org; Sun, 22 Jun 2008 22:05:09 +0200 Original-Received: from localhost ([127.0.0.1]:50976 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KAVnI-000291-J7 for ged-emacs-devel@m.gmane.org; Sun, 22 Jun 2008 16:04:12 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KAVnE-00026m-EJ for emacs-devel@gnu.org; Sun, 22 Jun 2008 16:04:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KAVnD-00026L-Fs for emacs-devel@gnu.org; Sun, 22 Jun 2008 16:04:08 -0400 Original-Received: from [199.232.76.173] (port=48404 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KAVnD-00026A-CU for emacs-devel@gnu.org; Sun, 22 Jun 2008 16:04:07 -0400 Original-Received: from ch-smtp02.sth.basefarm.net ([80.76.149.213]:41622) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KAVnD-00024k-0I for emacs-devel@gnu.org; Sun, 22 Jun 2008 16:04:07 -0400 Original-Received: from c83-254-145-59.bredband.comhem.se ([83.254.145.59]:61567 helo=[127.0.0.1]) by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1KAVnA-0006XM-8b; Sun, 22 Jun 2008 22:04:05 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666 In-Reply-To: <87y74x9rfl.fsf@stupidchicken.com> X-Antivirus: avast! (VPS 080621-0, 2008-06-21), Outbound message X-Antivirus-Status: Clean X-Originating-IP: 83.254.145.59 X-ACL-Warn: Too high rate of unknown addresses received from you X-Scan-Result: No virus found in message 1KAVnA-0006XM-8b. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1KAVnA-0006XM-8b a2f68ed11fff6f903fd697fcb05b2f7a X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!) 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:99709 Archived-At: Chong Yidong wrote: > I have been studying Kim Storm's display-based word wrapping code. I > believe it's pretty safe, and suitable for inclusion into the Emacs 23 > release (probably turned off by default). > > The original patch included a `wrap-column' variable, but I'd like to > modify this to use `truncate-lines' instead, as shown below. This would > mean that word wrap always uses the right window edge as a wrap column. > Any objections? Yes, I would find this quite impractical to not have a `wrap-column'. I do not want to resize windows just to edit text in a comfortable way. (Wouldn't it also make it impossible to use the "darkroom" editing some people have suggested?) Is there any reason not to have a wrap-column? If that is nil I would suggest falling back to the window edge. > truncate-lines is a variable defined in `C source code'. > > Documentation: > Whether lines longer than the window width are truncated. > If the value is nil or `word-wrap', long lines are displayed using > continuation lines. If nil, the wrapping occurs at the right window > edge. If `word-wrap', it occurs at the rightmost space or tab > character, if possible. > > Any other non-nil value means to give each line of text just one > screen line, truncating long lines at the right window edge. > > Note that this is overridden by the variable > `truncate-partial-width-windows' if that variable is non-nil > and this buffer is not full-frame width. > > >