From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Will Parsons Newsgroups: gmane.emacs.help Subject: Re: Making a non-ASCII space character visible Date: Wed, 20 Jun 2018 17:05:06 -0400 Message-ID: References: Reply-To: gyliamos@gmail.com NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1529529022 23767 195.159.176.226 (20 Jun 2018 21:10:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 20 Jun 2018 21:10:22 +0000 (UTC) User-Agent: slrn/1.0.3 (FreeBSD) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jun 20 23:10:18 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fVkMq-00063e-6v for geh-help-gnu-emacs@m.gmane.org; Wed, 20 Jun 2018 23:10:16 +0200 Original-Received: from localhost ([::1]:51804 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fVkOx-0002GZ-GC for geh-help-gnu-emacs@m.gmane.org; Wed, 20 Jun 2018 17:12:27 -0400 Original-Path: usenet.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 64 Original-X-Trace: individual.net wVMFoTNZUaEWiKAmCa76YAuOZvY/sZxr0cqpEjdjiZ/FtMKI5X Cancel-Lock: sha1:oWIzIUrOeWC4w2Ua1qEytSJlfz0= Original-Xref: usenet.stanford.edu gnu.emacs.help:223112 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:117234 Archived-At: On Monday, 18 Jun 2018 10:30 PM -0400, Nick Helm wrote: > On Tue, 19 Jun 2018 at 12:12:29 +1200, Will Parsons wrote: > >> OK - I have now modified my .emacs file to have the following lines: >> >> ------- >> (setq whitespace-display-mappings '((space-mark 32 [183] [46]) >> (space-mark 160 [164] [95]) >> (space-mark 8199 [164] [95]) >> (newline-mark 10 [36 10]) >> (tab-mark 9 [187 9] [92 9]))) >> (global-whitespace-mode 1) >> (setq-default whitespace-style '(face lines-tail tabs trailing)) >> ------- >> >> I have removed the setting of whitespace-display-mappings that I had >> previously manually introduced to custom.el, and the only other >> setting that appears to reference whitespace is the setting >> >> (whitespace-tab ((t (:background "#081820" :foreground "darkgray"))) >> >> in my custom.el file, which I have now removed. >> >> Unfortunately, after making these changes, and having restarted Emacs, >> there is still no change to the display of u+2007. > > This looks good, just a couple more things to tweak. You need to turn on > visualising of space characters by adding "space-mark" to > whitespace-style: > > (setq-default whitespace-style '(face lines-tail space-mark tabs trailing)) > > This variable tells whitespace-mode and global-whitespace-mode which > classes of chars you want to visualise when one of the modes is active. > The space-mark entry tells Emacs to visualise the various space-mark > chars you set up with whitespace-display-mappings, in partiuclar your > new entry for FIGURE SPACEs. > > The only other thing is don't forget to put the expressions that set the > configuration variables (the setqs) before you active the mode, > something like this: > > (setq whitespace-display-mappings '((space-mark 32 [183] [46]) > (space-mark 160 [164] [95]) > (space-mark 8199 [164] [95]) > (newline-mark 10 [36 10]) > (tab-mark 9 [187 9] [92 9]))) > (setq-default whitespace-style '(face lines-tail space-mark tabs trailing)) > (global-whitespace-mode 1) > > Try this in your ~/.emacs, cross fingers and restart Emacs. Thank you very much! The code above didn't *quite* meet my needs, since regular spaces were indicated by an unwanted middle-dot character, but that was easily remedied by deleting the mappling for 0020 from whitespace-display-mappings. With that change, everything seems good. So, once again, thanks to you, Eli, and the others who have helped me solve my original problem, and given me a better understanding how whitespace-mode fits together in the process. -- Will