From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bertrand Petit Newsgroups: gmane.emacs.devel Subject: Incorrect TAB width Date: Sun, 12 Jun 2005 15:22:53 +0200 Message-ID: <20050612132253.GB82470@memo.frmug.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0338963940==" X-Trace: sea.gmane.org 1118582678 18412 80.91.229.2 (12 Jun 2005 13:24:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 12 Jun 2005 13:24:38 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 12 15:24:29 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DhSRv-0008Na-7U for ged-emacs-devel@m.gmane.org; Sun, 12 Jun 2005 15:24:27 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DhSWV-0000Mw-QD for ged-emacs-devel@m.gmane.org; Sun, 12 Jun 2005 09:29:11 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DhSVz-0000BQ-5l for emacs-devel@gnu.org; Sun, 12 Jun 2005 09:28:39 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DhSVx-00009x-Er for emacs-devel@gnu.org; Sun, 12 Jun 2005 09:28:37 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DhSVv-00006e-VQ for emacs-devel@gnu.org; Sun, 12 Jun 2005 09:28:36 -0400 Original-Received: from [193.56.58.252] (helo=lists.frmug.org) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1DhSSX-0003ap-8J for emacs-devel@gnu.org; Sun, 12 Jun 2005 09:25:05 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by lists.frmug.org (Postfix/TLS) with ESMTP id CED6621076 for ; Sun, 12 Jun 2005 15:24:10 +0200 (CEST) Original-Received: from lists.frmug.org ([127.0.0.1]) by localhost (frmug.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 62134-07 for ; Sun, 12 Jun 2005 15:24:06 +0200 (CEST) Original-Received: by lists.frmug.org (Postfix/TLS, from userid 66) id 5CEC120FE1; Sun, 12 Jun 2005 15:24:06 +0200 (CEST) Original-Received: (from elrond@localhost) by memo.frmug.org (8.11.6/8.11.6) id j5CDMrE95943 for emacs-devel@gnu.org; Sun, 12 Jun 2005 15:22:53 +0200 (CEST) (envelope-from emacs@memo.frmug.org) X-Authentication-Warning: memo.frmug.org: elrond set sender to emacs@memo.frmug.org using -f Original-To: emacs-devel@gnu.org User-Agent: Mutt/1.4.2i X-Virus-Scanned: amavisd-new at frmug.org 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:38635 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:38635 --===============0338963940== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="XOIedfhf+7KOe/yw" Content-Disposition: inline --XOIedfhf+7KOe/yw Content-Type: multipart/mixed; boundary="huq684BweRXVnRxX" Content-Disposition: inline --huq684BweRXVnRxX Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, I recently upgraded my X11 server from XFree86 4.2.0 to 4.5.0 and noticed that emacs' display has some indentation problems. I located the trouble to the displayed width of a tabulation. The following code (also attached) demonstrates the bug: (setq default-frame-alist '((font . "-b&h-luxi mono-medium-r-normal-*-*-140-*-*-m-*-iso8859-1")= )) (insert (make-string tab-width ?\ )) (insert (format "| %d spaces\n" tab-width)) (insert " | one tabulation\n") when loaded at startup (emacs -q -l tab-bug.el), the on-screen buffer should display two vertically aligned pipes, they are not! The pipe following the tabulation is on the right of the pipe following eight spaces. It is illustrated in the joined partial screen capture. For reference I compared the behavior of xedit. Set the same font for the main xedit widget with the following command-line: echo "xedit.paned.hpane.vpane.editWindow.textSink.font: \ -b&h-luxi mono-medium-r-normal-*-*-140-*-*-m-*-iso8859-1" | xrdb (Do not perform this change using editres as xedit does not update it's measurement of the tabulation width when the text widget font is changed). Type height spaces pipe newline tab pipe. The two pipes are vertically alligned as expected. The bug was also reproduced with the following font logical descriptors: -ibm-courier-medium-r-normal-*-*-140-*-*-m-*-iso8859-1 -bitstream-bitstream vera sans mono-medium-r-normal-*-*-140-*-*-m-*-iso8859= -1 -monotype-courier new-medium-r-normal-*-*-140-*-*-c-*-iso8859-1 -b&h-lucida console-medium-r-normal-*-*-140-*-*-c-*-iso8859-1 -b&h-lucida sans typewriter-medium-r-normal-*-*-140-*-*-m-*-iso8859-1 -jmk-neep-medium-r-normal-*-*-140-*-*-c-*-iso8859-1 but not with the following XLFDs: -schumacher-clean-medium-r-normal-*-*-120-*-*-c-*-iso8859-1 -adobe-courier-medium-r-normal-*-*-140-*-*-m-*-iso8859-1 -adobe-courier-medium-r-normal-*-*-150-*-*-m-*-iso8859-1 -misc-fixed-medium-r-semicondensed-*-*-120-*-*-c-*-iso8859-1 -sony-fixed-medium-r-normal-*-*-150-*-*-c-*-iso8859-1 -bitstream-terminal-medium-r-normal-*-*-140-*-*-c-*-iso8859-1 It seems that bitmap fonts does not trigger the bug while vector-based fonts do trigger it. There is one exception: the Courier from Adobe. The bug was no there with XFree86 4.2.0, it appeared while using emacs 21.3 after updating to XFree86 4.5.0. I then updated emacs to 21.4a and it is still there. I also observed it on a host running XFree86 4.3.0 and emacs 21.3. The 4.3.0 display server has direct access to the fonts while the 4.5.0 display uses the X font server coming from the same build. I also compiled emacs version 22.0.50 and also observed the bug on this HEAD version on the XFree 4.5.0 server. Where this bug comes from? The X11 server or emacs? I inclined to think that the origin is emacs as xedit and xterm are not affected. --=20 %!PS 297.6 420.9 translate 90 rotate 0 setgray gsave 0 1 1{pop 0 180 moveto 100 180 170 100 170 -10 curveto 180 -9 180 -9 190 -10 curveto 190 100 100 180 0 180 curveto fill 180 rotate}for grestore/Bookman-LightItalic findfont 240 scalefont setfont -151.536392 -63.7998886 moveto (bp)show showpage --huq684BweRXVnRxX Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: attachment; filename="tab-bug.el" (setq default-frame-alist '((font . "-b&h-luxi mono-medium-r-normal-*-*-140-*-*-m-*-iso8859-1"))) (insert (make-string tab-width ?\ )) (insert (format "| %d spaces\n" tab-width)) (insert " | one tabulation\n") --huq684BweRXVnRxX-- --XOIedfhf+7KOe/yw Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFCrDctjUlNNMcOvVARAlJtAKCvW/QDtIqt1Gw4qmX76EnBLJ5ByQCgjX73 8ZP5X2dtdJX22PUOisSAxeo= =3NlT -----END PGP SIGNATURE----- --XOIedfhf+7KOe/yw-- --===============0338963940== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --===============0338963940==--