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: Sun, 22 Jun 2008 22:04:37 -0400 Message-ID: <87d4m8dhze.fsf@stupidchicken.com> References: <87y74x9rfl.fsf@stupidchicken.com> <858wwx5iv9.fsf@lola.goethe.zz> <87myldt4vy.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 1214186713 25291 80.91.229.12 (23 Jun 2008 02:05:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 23 Jun 2008 02:05:13 +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 04:05:57 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 1KAbR4-0007KJ-Tp for ged-emacs-devel@m.gmane.org; Mon, 23 Jun 2008 04:05:47 +0200 Original-Received: from localhost ([127.0.0.1]:36308 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KAbQF-0002l3-Pe for ged-emacs-devel@m.gmane.org; Sun, 22 Jun 2008 22:04:47 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KAbQC-0002jz-7M for emacs-devel@gnu.org; Sun, 22 Jun 2008 22:04:44 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KAbQA-0002hY-Nr for emacs-devel@gnu.org; Sun, 22 Jun 2008 22:04:43 -0400 Original-Received: from [199.232.76.173] (port=49283 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KAbQA-0002hO-K4 for emacs-devel@gnu.org; Sun, 22 Jun 2008 22:04:42 -0400 Original-Received: from c-24-63-201-57.hsd1.ma.comcast.net ([24.63.201.57]:12360 helo=furry) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KAbQ6-0000kn-LZ; Sun, 22 Jun 2008 22:04:38 -0400 Original-Received: by furry (Postfix, from userid 1000) id 98CD6C054; Sun, 22 Jun 2008 22:04:37 -0400 (EDT) In-Reply-To: (Stefan Monnier's message of "Sun, 22 Jun 2008 21:23:26 -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:99749 Archived-At: Stefan Monnier writes: >>> For truncate-partial-window-width OTOH, I think it would make sense to >>> allow it to be an integer to mean "truncate if the window is less than >>> this number". But that's unrelated to word-wrapping, > >> It's a good idea, and it's actually fairly closely related to >> word-wrapping. If truncate-partial-window-width is a sufficiently small >> number, it wouldn't interfere with word wrap for fairly large-sized >> windows. For small windows, it would make sense to truncate instead of >> word wrapping. > >> So maybe this is a good solution. > > Solution to what? 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.