From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: csv-mode: header does not align when line numbers are displayed Date: Fri, 29 Apr 2022 13:40:20 +0300 Message-ID: <8335hwb2az.fsf@gnu.org> References: <64bbe68b-f2b9-4cb5-93b8-07e5720e74fa@www.fastmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40060"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Joost Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Apr 29 13:11:14 2022 Return-path: Envelope-to: ged-emacs-devel@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 1nkOWo-000AEM-EG for ged-emacs-devel@m.gmane-mx.org; Fri, 29 Apr 2022 13:11:14 +0200 Original-Received: from localhost ([::1]:46466 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkOWn-00087p-F0 for ged-emacs-devel@m.gmane-mx.org; Fri, 29 Apr 2022 07:11:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36684) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkO2v-0001DJ-7W for emacs-devel@gnu.org; Fri, 29 Apr 2022 06:40:21 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:45418) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkO2u-0007xa-1d; Fri, 29 Apr 2022 06:40:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=32K9Eyfun5qHUI36qm94rasMfNIP8C1lPQT6ckisrh4=; b=TA+kj5dQdeIk 3iCV/PntVeHgg43L+7BU5hVC0ZmwnGQvBEp1CSEXDJ7/yDyKPUCHwhNLiWGhx8/Xt+j6NJ48EaNpV 7GL6LToqi9fjoeORJxJJ/HPmHZwXvVVbGN5nTalycXc1NDIzeRgo4lSiD7rHNnl2siZlBP27NdcTi R/b2hvwI2G5BOXs61mYeQcVI6Zo0LogW1xtLy9l9o+fUO+jfhKw+qeVbuhgXzWggapSIt/sCZhcE7 m/wbqNuQGD17jqYCtxKLWnC80yh8TwK7z7zqYosUZfR08jwROx01RxwRBEwk2W+FopxsgCOdxdVEo jbOJfWABPM3gdJmX068okw==; Original-Received: from [87.69.77.57] (port=4977 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkO2t-0001Dg-4U; Fri, 29 Apr 2022 06:40:19 -0400 In-Reply-To: <64bbe68b-f2b9-4cb5-93b8-07e5720e74fa@www.fastmail.com> (message from Joost on Fri, 29 Apr 2022 09:47:08 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:288972 Archived-At: > Date: Fri, 29 Apr 2022 09:47:08 +0200 > From: Joost > > Not sure if this should be reported as a bug or not; let me know if it should. The bug tracker is not just for bugs, it is also for features. So yes, please post such suggestions via "M-x report-emacs-bug". > `csv-mode` has the option to display a header line so you can make column names permanently visible, which is a very nice option. However, when `display-line-numbers-mode` is active, the column names do not line up with the actual columns, because the header line does not take into account the space taken up by the line numbers. > > The following patch seems to be a quick fix: Thanks. > Though it doesn't automatically adjust the header line when `display-line-numbers-mode` is toggled or if `display-line-number-width` changes, so it's probably not the ideal solution. Indeed. I think tabulated-list.el shows how to cause the adjustment when the variable is toggled. Can you use those ideas to submit a better solution?