From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Using proportional (variable-width) fonts in Emacs23 Date: Mon, 28 Mar 2011 20:29:36 +0200 Message-ID: <83d3lbrtdb.fsf@gnu.org> References: <898836.13190.qm@web121803.mail.ne1.yahoo.com> NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1301337073 15490 80.91.229.12 (28 Mar 2011 18:31:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 28 Mar 2011 18:31:13 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Mar 28 20:31:09 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q4HDX-00063M-Ht for geh-help-gnu-emacs@m.gmane.org; Mon, 28 Mar 2011 20:31:07 +0200 Original-Received: from localhost ([127.0.0.1]:47235 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q4HDW-0004Bt-Oo for geh-help-gnu-emacs@m.gmane.org; Mon, 28 Mar 2011 14:31:06 -0400 Original-Received: from [140.186.70.92] (port=48980 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q4HC3-0003xQ-Vw for help-gnu-emacs@gnu.org; Mon, 28 Mar 2011 14:29:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q4HC2-0001rB-K1 for help-gnu-emacs@gnu.org; Mon, 28 Mar 2011 14:29:35 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:58862) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q4HC2-0001qg-AF for help-gnu-emacs@gnu.org; Mon, 28 Mar 2011 14:29:34 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0LIS005005LM6400@a-mtaout21.012.net.il> for help-gnu-emacs@gnu.org; Mon, 28 Mar 2011 20:29:28 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.126.47.180]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LIS005J06126Q10@a-mtaout21.012.net.il> for help-gnu-emacs@gnu.org; Mon, 28 Mar 2011 20:29:28 +0200 (IST) In-reply-to: <898836.13190.qm@web121803.mail.ne1.yahoo.com> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.169 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:80488 Archived-At: > Date: Mon, 28 Mar 2011 09:22:51 -0700 (PDT) > From: Erin Brinkley > > But I discovered a huge problem: the fill and word wrap commands are hard coded to work for monospaced fonts only! For instance the fill-column is based on monospace fonts: if you use a proportional font and set the fill column to what you think is a reasonable number, you'll soon find out that you are WRONG and you get extra whitespace at the end of a line, and words will wrap! The only way out is to set the fill-column to an insanely low number, and that's not a real solution either! What do you mean by "word wrap" commands? The only word wrap described in the Emacs manual is invoked by "M-x visual-line-mode RET", and that one is _not_ hard coded for monospaced fonts. Please try it. The reason filling counts all characters of the same fonts as if they had the same size is that filling inserts hard newlines, so the result should work independent of the font. Filling works on the buffer text level, where character size on screen are not known. By contrast, you are looking for _display_time_ wrap, so filling is not what you want. "Word wrap" as implemented as part of Visual Line Mode is designed to exactly that, and it works on the level where the true size of each character on display is known.