From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.bugs Subject: bug#35797: 26.2; Adaptive Wrap does not respect Whitespace Mode faces Date: Sun, 19 May 2019 23:50:59 +0200 Message-ID: <87h89q6rlo.fsf@rub.de> References: <8ec78d6f3e44bd3484c986dc2535a643536c499e.camel@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="106987"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 35797@debbugs.gnu.org To: Andrew T Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun May 19 23:52:13 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hSTj2-000RhQ-Tx for geb-bug-gnu-emacs@m.gmane.org; Sun, 19 May 2019 23:52:13 +0200 Original-Received: from localhost ([127.0.0.1]:54223 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hSTj1-0001JX-Rp for geb-bug-gnu-emacs@m.gmane.org; Sun, 19 May 2019 17:52:11 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:37504) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hSTit-0001JI-Gx for bug-gnu-emacs@gnu.org; Sun, 19 May 2019 17:52:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hSTis-0002qD-Bi for bug-gnu-emacs@gnu.org; Sun, 19 May 2019 17:52:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50351) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hSTis-0002q9-70 for bug-gnu-emacs@gnu.org; Sun, 19 May 2019 17:52:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hSTis-0008Hy-16 for bug-gnu-emacs@gnu.org; Sun, 19 May 2019 17:52:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <8ec78d6f3e44bd3484c986dc2535a643536c499e.camel@gmail.com> Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 19 May 2019 21:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35797 X-GNU-PR-Package: emacs Original-Received: via spool by 35797-submit@debbugs.gnu.org id=B35797.155830267231784 (code B ref 35797); Sun, 19 May 2019 21:52:01 +0000 Original-Received: (at 35797) by debbugs.gnu.org; 19 May 2019 21:51:12 +0000 Original-Received: from localhost ([127.0.0.1]:35662 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hSTi4-0008Ga-8F for submit@debbugs.gnu.org; Sun, 19 May 2019 17:51:12 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:34905) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hSTi2-0008GM-8u for 35797@debbugs.gnu.org; Sun, 19 May 2019 17:51:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1558302662; bh=0lUSbpD427ph7tFqYCBvOeOLIlwyRacl1rYUB/IbvV8=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date; b=Tq5Xr78F/rsfw2pGM+7RoE4x41O06+8IEc5o0ng2MFJ89zgZrNmurvvchrAkIJ3qj pXj+rk9xO1D2PMmHb+mZnUiH0nC1OyzL2b/+JRfo6hleJtbo396Jnh66VOP8I3ihyn hHXqFLc9t2/DGhc8mBjiN+YUlPLPeYqI8TVNAUls= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from linux-jc9b ([188.109.155.215]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MNt0M-1hHQ0j3yMi-00OJ9z; Sun, 19 May 2019 23:51:02 +0200 X-Provags-ID: V03:K1:j+z6t7LWtqxwiDbJa06T0PQwjK8K4l7XcYmUhPZaHWN7M4fSkR9 UbTI737J+6SFwUQ4JIymXfUtrWEqdg89gV4o+vr6lt/rusBCJdpp1luRnbQUhgqg1KQF6W1 Vc9Aw3t1l7VeqdQgEEygprUDh51MlsNIG10qlETo3TVxng7EfQ5AE8zM7POAlFc6oikQRs2 pB6qdys81r7jS2MBUvyVw== X-UI-Out-Filterresults: notjunk:1;V03:K0:Ly1vr7i0YQE=:8J7lyhdaHjeJMMtC5kkQQO NAshrI1VFwhw0HnZn1ca0id+Es37vQ9+kwxDpwjoz86OaF5DOC2WjMyl0QklMzMpyL2d3LR+c MprZOPfKpglX8SNVtXNNrWQvMcnSO+TjCG+BoVQ7NZy6uPPPzZTW6IHznMGPOD64uFmJ82pOm /+5Neug1KjgeZeIA9C8ISi8v2UeB9X/2HDxcJ3BGX/sz8/nt3ylMFuaEuVmHa4b2m5P90XgH4 8Si7BiuECRAwvhxh9BN0kGQTolD1VRt6T2VSTuyKBNJy9h5W4+LHw+LpewednI7SCTZrjBvXa z1vhKsiQkawtMgfomSP6euwFaIsRzhYC+3Sy6qjFR82isr9fVkcsWK8DWaVPa4RPdRxmTllCS 9CWwFaAxrioWwiUZB+PNuGMQwWjpSVKTLApzPttWCMTTIfCIgPmyi4mrwlS51HW7TwFNknOYc Yl4tjFMfCOzqVuhIYhnSbwAXRD5wzTU1NW8/Ijgrerz/PVeb2pk0PGljJNP2Gv7RNyulOgrUc S+If0RfzVHtm/CNOyQW9y3zSj70q3hWif182E0gPWoegphzg83ABpfLfaOCC2H/Eo/aA83aZc p+oz6jR8trJOMQCK1q44WgYhWjr+Ac07pDaEJH36RSrNM2+UQ417RpRKbnMK9f5VuIQ6GAozi iYJ6aIFNiPdu6ifCk0HNlEvSXbRbCCDkOLYSe3wtVHDJLu3O03yq5ztOOfK9cMceVVR/GnVxz jLiBpwsxOXfiSJkf+SSCT1ZShgsEJ9mXn3H5ytOBN1N1aKggpewsenxiYZO8q0/Uzs0NXiMq X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:159572 Archived-At: On Sat, 18 May 2019 20:18:54 -0700 Andrew T wrote: > Appears to be similar to bug #15155: "24.3; wrap-prefix in adaptive- > wrap-prefix-mode with variable-pitch has wrong face" That bug was fixed, but the fix does not prevent your problem, so it seems to be a different issue. > I normally use `adaptive-wrap-prefix-mode` via hook to `visual-line- > mode`. > > And I use `global-whitespace-mode` to subtly show any tabs and newline > characters in general (displayed in a color close to the background > color). Spaces are normally invisible (exactly same color as > background), except trailing spaces are highlighted. > > When putting these settings together and soft-wrapping a long indented > line, the wrap prefix shows a bunch of white dots for all the space > characters being displayed. These are not trailing spaces, so these > dots are not highlighted as such, but they normally shouldn't be > visible at all with my whitespace face configurations. > > You can see the effect even without messing around with faces or > visual-line-mode hooks, though: > > emacs -Q > M-x package-install RET adaptive-wrap RET > M-x adaptive-wrap-prefix-mode RET > M-x whitespace-mode RET > > ...Then write a long indented line so that it will wrap, and see see > how the wrap prefix is a different color from the default whitespace > display characters. > > I'll also include some screenshots here: > Whitespace mode displays dots where there are spaces by altering the buffer's display table. This also affects the spaces added by adaptive-wrap-prefix-mode, but as you have seen, those spaces are not affected by customizing whitespace-mode faces. I suspect this has to do with how wrap-prefix is implemented in the display engine and may not be easy to fix. However, in case you are not aware of it, whitespace mode provides two mechanisms that may be good enough for you. To temporily suppress the dots, type `M-x whitespace-toggle-options' and then at the prompt type `S' (capital s). To permanently suppress the dots you can customize whitespace-display-mappings by either changing or deleting the character mapping for spaces (the first entry in the Customize buffer when you type `M-x customize-option RET whitespace-display-mappings RET'). (However, there currently appears to be a problem with this defcustom: when you make the change I just referred to and then try to apply or save it, this raises the error "This field should contain a single character". The problem here is with the newline character mapping: if you delete that entry, then applying or saving other changes works. The newline entry somehow runs afoul of the character editable-field widget, but I don't immediately see why and don't have time right now to pursue it. But as a workaround, in the Customize buffer you can press the state button, select "Show Saved Lisp Expression", and then either delete the sexp (space-mark 32 [183] [46]) or change it to (space-mark 32 [32] [32]), then apply or save the change.) Steve Berman