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: Display-based word wrapping Date: Mon, 23 Jun 2008 12:42:01 -0400 Message-ID: <877icgqf1i.fsf@stupidchicken.com> References: <87y74x9rfl.fsf@stupidchicken.com> <858wwx5iv9.fsf@lola.goethe.zz> <87myldt4vy.fsf@stupidchicken.com> <87d4m8dhze.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1214239638 18356 80.91.229.12 (23 Jun 2008 16:47:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 23 Jun 2008 16:47:18 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 23 18:48:03 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 1KApCj-00046d-SV for ged-emacs-devel@m.gmane.org; Mon, 23 Jun 2008 18:47:46 +0200 Original-Received: from localhost ([127.0.0.1]:54223 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KApBu-0003dR-Kk for ged-emacs-devel@m.gmane.org; Mon, 23 Jun 2008 12:46:54 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KApBq-0003bP-2R for emacs-devel@gnu.org; Mon, 23 Jun 2008 12:46:50 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KApBo-0003Xt-8R for emacs-devel@gnu.org; Mon, 23 Jun 2008 12:46:49 -0400 Original-Received: from [199.232.76.173] (port=59913 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KApBo-0003Xa-2Z for emacs-devel@gnu.org; Mon, 23 Jun 2008 12:46:48 -0400 Original-Received: from cyd.mit.edu ([18.115.2.24]:44402) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KApBo-0001gs-DC for emacs-devel@gnu.org; Mon, 23 Jun 2008 12:46:48 -0400 Original-Received: by cyd.mit.edu (Postfix, from userid 1000) id 0221B4E440; Mon, 23 Jun 2008 12:42:01 -0400 (EDT) In-Reply-To: <87d4m8dhze.fsf@stupidchicken.com> (Chong Yidong's message of "Sun, 22 Jun 2008 22:04:37 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) 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:99788 Archived-At: Chong Yidong writes: > To the problem of how to treat truncate-partial-window-width once > word-wrapping is available as a third option for long lines (the first > two options being line truncation and simple line continuation). > > Instead of adding `word-wrap' as a new value for truncate-lines, let's > say we add a new per-buffer variable, `word-wrap', which if non-nil > says to wrap lines at word boundaries rather than the middle of words. > This variable has no effect if lines are truncated instead of > continued. Then truncate-partial-window-width need not "care" about > whether non-truncation means simple line continuation or word > wrapping. > > Finally, by allowing truncate-partial-window-width to take integer > values as you suggested, and then setting the default to a number such > as 30, we can ensure that word wrapping can still take place for > reasonably-sized partial-width windows. So, any objections to this set of variables? word-wrap (default: nil) *Non-nil means to use word-wrapping for continuation lines. When word-wrapping is on, continuation lines are wrapped at the space or tab character nearest to the right window edge. If nil, continuation lines are wrapped at the right screen edge. This variable has no effect if long lines are truncated (see `truncate-lines' and `truncate-partial-width-windows'). truncate-partial-width-windows (default: 35) Non-nil means truncate lines in windows with less than the frame width. For an integer value, truncate lines in each window with less than the full frame width, provided the window width is less than that integer; otherwise, respect the value of `truncate-lines'. For any other non-nil value, truncate lines in all windows with less than the full frame width. Nil means to respect the value of `truncate-lines'. For now, I will not provide a way to change the column at which line wrapping/continuation/truncation takes place, but I know how to do it (it's a separate set of changes).