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: Sun, 17 Jun 2018 16:28:18 -0400 Message-ID: References: Reply-To: gyliamos@gmail.com NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1529267311 17565 195.159.176.226 (17 Jun 2018 20:28:31 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 17 Jun 2018 20:28:31 +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 Sun Jun 17 22:28:27 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 1fUeHj-0004Sy-De for geh-help-gnu-emacs@m.gmane.org; Sun, 17 Jun 2018 22:28:27 +0200 Original-Received: from localhost ([::1]:56335 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fUeJq-0005Cu-Kc for geh-help-gnu-emacs@m.gmane.org; Sun, 17 Jun 2018 16:30:38 -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 x5ZLrFjLNygy1d2Ve5foXgECs5aRDO7Tu096H4C2LNrlvioIUC Cancel-Lock: sha1:35gnvpjUB4juozt+DOgwCr0zh2M= Original-Xref: usenet.stanford.edu gnu.emacs.help:223071 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:117192 Archived-At: On Sunday, 17 Jun 2018 3:31 PM -0400, Eli Zaretskii wrote: >> From: Will Parsons >> Date: Sun, 17 Jun 2018 15:09:00 -0400 >> >> > global-whitespace-mode (the function) sets global-whitespace-mode (the >> > variable), not whitespace-mode. >> >> So, using the function global-whitespace-mode is *not* the way to >> enable whitespace mode? > > It enables global-whitespace-mode. > >> I find that confusing; where would use one vs the other? > > One is global, the other is local to the buffer in which you turn it > on. I sorry if I seem to be a bit dense here, but if global-whitespace-mode doesn't enable whitespace-mode globally, what is it good for? >> >> Adding (whitespace-mode 1) to my .emacs file apparently has no effect; >> >> the value of whitespace-mode is still nil. >> > >> > In what buffer? >> >> In any buffer. > > We are mis-communicating. My point was that the above only turns the > mode on in the buffer that happened to be current when the expression > was evaluated. And that is not what you want, so whitespace-mode > should normally be turned on from some major-mode hook. So, adding (whitespace-mode 1) to my ~/.emacs file is useless unless I add it to a major-mode hook, and that I have to do that for every major-mode I use? I can't just say "enable whitespace-mode for all buffers unless I say otherwise" then? >> As I stated elsewhere, by manually editing my customization file. >> (And I can see the change via the regular Customization interface >> under Whitespace Display Mappings - the added character is displayed >> like a space, but I can run describe-char on it and see the 2007.) > > If I copy the into *scratch* value of the defcustom converted to a > setq expression, add to it the customization for u+2007, evaluate the > expression, and then re-enable whitespace-mode, I do see it take > effect: the u+2007 character is displayed as the NBSP is. I'm afraid I'm completely lost here. > So I'm unsure why it isn't working for you. Apart from how to enable whitespace-mode automatically, I'd like to understand how that: 1) The character u+2007 (8199) has been verified to have been added to whitespace-display-mappings. 2) Even after running manually M-x whitespace-mode and verifying that the variable whitespace-mode is now set to t, the display of u+2007 doesn't change in the current buffer. -- Will