From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#18548: Emacs whitespace mode Date: Wed, 23 Feb 2022 14:18:46 +0100 Message-ID: <87ee3t7mbt.fsf@gnus.org> References: <874k5rx5e4.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19961"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Kip Coul , Stefan Kangas , Jack Morrison , 18548@debbugs.gnu.org To: Nathaniel Braun Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 23 14:32:05 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 1nMrkP-0004ll-9i for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 23 Feb 2022 14:32:01 +0100 Original-Received: from localhost ([::1]:59582 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nMrkO-0008Er-1w for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 23 Feb 2022 08:32:00 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:57026) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nMrYo-0002Mc-M8 for bug-gnu-emacs@gnu.org; Wed, 23 Feb 2022 08:20:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50338) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nMrYo-0006cT-4L for bug-gnu-emacs@gnu.org; Wed, 23 Feb 2022 08:20:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nMrYn-0001gv-Un for bug-gnu-emacs@gnu.org; Wed, 23 Feb 2022 08:20:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 23 Feb 2022 13:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18548 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 18548-submit@debbugs.gnu.org id=B18548.16456223436367 (code B ref 18548); Wed, 23 Feb 2022 13:20:01 +0000 Original-Received: (at 18548) by debbugs.gnu.org; 23 Feb 2022 13:19:03 +0000 Original-Received: from localhost ([127.0.0.1]:44223 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nMrXr-0001ed-EE for submit@debbugs.gnu.org; Wed, 23 Feb 2022 08:19:03 -0500 Original-Received: from quimby.gnus.org ([95.216.78.240]:34334) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nMrXp-0001e6-68 for 18548@debbugs.gnu.org; Wed, 23 Feb 2022 08:19:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=5tBCfM7iP8VdCf3c8iQ8++yG7E+f/d5itnEQSJ5VqKA=; b=ZbH7uCt6aCLEWrg9Qq7fGIfv3G 8CzFHMK+TR8V+EtRH9F30vCn/+VVGQrFcGtEG1Gyc93+pT6xteZvuVQEM2XqkJC4fNFzChArHhY7Y y2om4oDlTzuW+q6Eub1DpKZ/4q77sw6VvH+iArHoDoaq70VRu+e2TuSnGtwYltGVp2o0=; Original-Received: from [84.212.220.105] (helo=giant) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nMrXf-0001qA-Qx; Wed, 23 Feb 2022 14:18:54 +0100 X-Now-Playing: Burial's _Antidawn_: "Upstairs Flat" In-Reply-To: <874k5rx5e4.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 25 Jan 2022 15:21:39 +0100") 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:227512 Archived-At: Lars Ingebrigtsen writes: > So switching on whitespace-mode messes up the display if there's only > room for a single character in the TAB? This seems like such a general > problem that it's odd that this hasn't been fixed yet. But I think I > remember somebody doing work in this area... does anybody else > remember? Ah, right -- I was probably misremembering, and I was just thinking of this: ;; WARNING: the mapping below has a problem. ;; When a TAB occupies exactly one column, it will display the ;; character ?\xBB at that column followed by a TAB which goes to ;; the next TAB column. ;; If this is a problem for you, please, comment the line below. (tab-mark ?\t [?=C2=BB ?\t] [?\\ ?\t]) ; tab - right guillemet This is used to set up a display table that maps tabs into [?=C2=BB ?\t]: (aset buffer-display-table (cadr entry) vec))))))) And that does indeed lead to the messed up display described in this bug report. And the reason that this is rarely a problem in practice is that normally you only have TAB characters at the start of a line (in the modes where you typically use whitespace-mode), I think? So I don't know whether anything can or should be done in this case. I think that (perhaps) a reasonable default would be to remove that mapping -- whitespace-mode (by default) marks TAB characters anyway with a face, so having a =C2=BB in addition is somewhat superfluous. On the oth= er hand, it's been like this forever, so perhaps we should just document the quirk instead. Or add a defcustom to allow for easier toggling, and the defcustom would then also act as documentation for this. Any opinions? --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no