From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#56176: 28.1.50; csv-align-mode misaligns when display-line-numbers-mode is on Date: Mon, 27 Jun 2022 11:27:17 -0400 Message-ID: References: <87pmizjftu.fsf@fastmail.fm> <87zgi2qu3r.fsf@gnus.org> <83bkue8dho.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28225"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: joostkremers@fastmail.fm, larsi@gnus.org, 56176@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 27 17:28:10 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o5qen-00074z-Rz for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 27 Jun 2022 17:28:10 +0200 Original-Received: from localhost ([::1]:43854 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o5qem-00019h-Nj for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 27 Jun 2022 11:28:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39028) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o5qeg-000191-8Z for bug-gnu-emacs@gnu.org; Mon, 27 Jun 2022 11:28:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59148) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o5qef-0002e9-Ug for bug-gnu-emacs@gnu.org; Mon, 27 Jun 2022 11:28:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o5qef-0004Om-Ol for bug-gnu-emacs@gnu.org; Mon, 27 Jun 2022 11:28:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 27 Jun 2022 15:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56176 X-GNU-PR-Package: emacs Original-Received: via spool by 56176-submit@debbugs.gnu.org id=B56176.165634364916863 (code B ref 56176); Mon, 27 Jun 2022 15:28:01 +0000 Original-Received: (at 56176) by debbugs.gnu.org; 27 Jun 2022 15:27:29 +0000 Original-Received: from localhost ([127.0.0.1]:53044 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o5qe9-0004Nv-1E for submit@debbugs.gnu.org; Mon, 27 Jun 2022 11:27:29 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:1033) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o5qe6-0004Nj-Rt for 56176@debbugs.gnu.org; Mon, 27 Jun 2022 11:27:27 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 6E50E44119A; Mon, 27 Jun 2022 11:27:21 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 37CA1440FFC; Mon, 27 Jun 2022 11:27:20 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1656343640; bh=mlvhUj3dA8mjlnJxksweGktV4tsScnumejR5gP59h10=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=EjWpyPoDU9lq9wXBeRbfQ13BsoyZlUXa1kf9mtKezhDH0E6+V6dpwpTNqgyfo2Bn8 IgJEQCfKQ9DvzG6PoFoEz9yOyJQsGP9OtK6l6aboXFUEqu5rQJRWE8pdbt1kJtxVp8 w8v3hSq7l5Y33BUIG6K+9hI0LIKYt5HnjkT108/XvS16nsSj0LFD/7x8DjRUqPNsHP 2OmVB/LxJlIjlQkuVzUvTbhutvF4q2N+7Y7ziLWA3fBhkvQmw1UK77JmBGrjJrrNid MV4sHi7WGgITAayeoXK221Xz1Mqk5ttscYzXEZ3vO+8JmzX6jFUEtQls41MePHr/WE q4Og2QmFljHrA== Original-Received: from alfajor (smb-adp06.hotspot.hub-one.net [213.174.99.155]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 2D23312039B; Mon, 27 Jun 2022 11:27:19 -0400 (EDT) In-Reply-To: <83bkue8dho.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 27 Jun 2022 16:03:47 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:235476 Archived-At: --=-=-= Content-Type: text/plain > A recipe starting from "emacs -Q", preferably without csv-mode at all, > would be appreciated. Here's one that works for me: src/emacs -Q -l ~/tmp/foo.el -f my-test where `foo.el` is the attached file. Then scroll horizontally (I use `C-f` from the BOL and `C-b` from EOL to do that), you'll see that sometimes the columns aren't aligned (tho sometimes they are, even the very same columns). Stefan --=-=-= Content-Type: application/emacs-lisp Content-Disposition: inline; filename=foo.el Content-Transfer-Encoding: quoted-printable ;; -*- lexical-binding: t; -*- (defconst my-text #(" Nom Code .TP1 .Intra .TP2 .TP3 .Final .Exams .TPs .Exos .Total Note bomaxi iadve, Maxime BawfgO 13.13 17 14 13.5 16.5 33.5 40.63 5 79.13 A- aslkdufhyaf sadfasf, sdfgdsg sfgsdg 7.95 10 7 11 9 19 25.95 5 49.95 D " 0 1 (face csv-separator-face display (space :align-to 12) csv--jit t font= ified t) 1 4 (csv--jit t fontified t) 4 5 (face csv-separator-face display = (space :align-to 29) csv--jit t fontified t) 5 9 (csv--jit t fontified t) 9= 10 (face csv-separator-face display (space :align-to 46) csv--jit t fontif= ied t) 10 14 (csv--jit t fontified t) 14 15 (face csv-separator-face displa= y (space :align-to 59) csv--jit t fontified t) 15 21 (csv--jit t fontified = t) 21 22 (face csv-separator-face display (space :align-to 66) csv--jit t f= ontified t) 22 26 (csv--jit t fontified t) 26 27 (face csv-separator-face d= isplay (space :align-to 71) csv--jit t fontified t) 27 31 (csv--jit t fonti= fied t) 31 32 (face csv-separator-face display (space :align-to 77) csv--ji= t t fontified t) 32 38 (csv--jit t fontified t) 38 39 (face csv-separator-f= ace display (space :align-to 84) csv--jit t fontified t) 39 45 (csv--jit t = fontified t) 45 46 (face csv-separator-face display (space :align-to 91) cs= v--jit t fontified t) 46 50 (csv--jit t fontified t) 50 51 (face csv-separa= tor-face display (space :align-to 96) csv--jit t fontified t) 51 56 (csv--j= it t fontified t) 56 57 (face csv-separator-face display (space :align-to 1= 15) csv--jit t fontified t) 57 63 (csv--jit t fontified t) 63 64 (face csv-= separator-face display (space :align-to 122) csv--jit t fontified t) 64 69 = (csv--jit t fontified t) 69 75 (csv--jit t fontified t) 75 76 (face csv-sep= arator-face display (space :align-to 12) csv--jit t fontified t) 76 81 (csv= --jit t fontified t) 81 82 (face csv-separator-face display (space :align-t= o 29) csv--jit t fontified t) 82 89 (csv--jit t fontified t) 89 90 (face cs= v-separator-face display (space :align-to 46) csv--jit t fontified t) 90 96= (csv--jit t fontified t) 96 97 (face csv-separator-face display (space :al= ign-to 59) csv--jit t fontified t) 97 102 (csv--jit t fontified t) 102 103 = (face csv-separator-face display (space :align-to 66) csv--jit t fontified = t) 103 105 (csv--jit t fontified t) 105 106 (face csv-separator-face displa= y (space :align-to 71) csv--jit t fontified t) 106 108 (csv--jit t fontifie= d t) 108 109 (face csv-separator-face display (space :align-to 77) csv--jit= t fontified t) 109 113 (csv--jit t fontified t) 113 114 (face csv-separato= r-face display (space :align-to 84) csv--jit t fontified t) 114 118 (csv--j= it t fontified t) 118 119 (face csv-separator-face display (space :align-to= 91) csv--jit t fontified t) 119 123 (csv--jit t fontified t) 123 124 (face= csv-separator-face display (space :align-to 96) csv--jit t fontified t) 12= 4 129 (csv--jit t fontified t) 129 130 (face csv-separator-face display (sp= ace :align-to 115) csv--jit t fontified t) 130 131 (csv--jit t fontified t)= 131 132 (face csv-separator-face display (space :align-to 122) csv--jit t = fontified t) 132 137 (csv--jit t fontified t) 137 138 (face csv-separator-f= ace display (space :align-to 141) csv--jit t fontified t) 138 140 (csv--jit= t fontified t) 140 141 (csv--jit t fontified t) 141 152 (csv--jit t fontif= ied t) 152 153 (face csv-separator-face display (space :align-to 12) csv--j= it t fontified t) 153 160 (csv--jit t fontified t) 160 161 (face csv-separa= tor-face display (space :align-to 29) csv--jit t fontified t) 161 169 (csv-= -jit t fontified t) 169 170 (face csv-separator-face display (space :align-= to 46) csv--jit t fontified t) 170 176 (csv--jit t fontified t) 176 177 (fa= ce csv-separator-face display (space :align-to 59) csv--jit t fontified t) = 177 181 (csv--jit t fontified t) 181 182 (face csv-separator-face display (= space :align-to 66) csv--jit t fontified t) 182 184 (csv--jit t fontified t= ) 184 185 (face csv-separator-face display (space :align-to 71) csv--jit t = fontified t) 185 186 (csv--jit t fontified t) 186 187 (face csv-separator-f= ace display (space :align-to 77) csv--jit t fontified t) 187 189 (csv--jit = t fontified t) 189 190 (face csv-separator-face display (space :align-to 84= ) csv--jit t fontified t) 190 191 (csv--jit t fontified t) 191 192 (face cs= v-separator-face display (space :align-to 91) csv--jit t fontified t) 192 1= 94 (csv--jit t fontified t) 194 195 (face csv-separator-face display (space= :align-to 96) csv--jit t fontified t) 195 200 (csv--jit t fontified t) 200= 201 (face csv-separator-face display (space :align-to 115) csv--jit t font= ified t) 201 202 (csv--jit t fontified t) 202 203 (face csv-separator-face = display (space :align-to 122) csv--jit t fontified t) 203 205 (csv--jit t f= ontified t) 205 206 (csv--jit t fontified t) 206 207 (csv--jit t fontified = t) 207 208 (csv--jit t fontified t) 208 209 (face csv-separator-face displa= y (space :align-to 141) csv--jit t fontified t) 209 211 (csv--jit t fontifi= ed t))) (defun my-test () (pop-to-buffer "*CSV-like*") (setq truncate-lines t) (display-line-numbers-mode 1) (erase-buffer) (insert my-text)) --=-=-=--