[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Making a non-ASCII space character visible
From: |
Will Parsons |
Subject: |
Re: Making a non-ASCII space character visible |
Date: |
Sun, 17 Jun 2018 16:28:18 -0400 |
User-agent: |
slrn/1.0.3 (FreeBSD) |
On Sunday, 17 Jun 2018 3:31 PM -0400, Eli Zaretskii wrote:
>> From: Will Parsons <varro@nodomain.invalid>
>> 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
Re: Making a non-ASCII space character visible, Eli Zaretskii, 2018/06/17
Message not available
- Re: Making a non-ASCII space character visible, Will Parsons, 2018/06/17
- Re: Making a non-ASCII space character visible, Eli Zaretskii, 2018/06/17
- Message not available
- Re: Making a non-ASCII space character visible, Will Parsons, 2018/06/17
- Re: Making a non-ASCII space character visible, Eli Zaretskii, 2018/06/17
- Message not available
- Re: Making a non-ASCII space character visible,
Will Parsons <=
- Re: Making a non-ASCII space character visible, Nick Helm, 2018/06/17
- Message not available
- Re: Making a non-ASCII space character visible, Will Parsons, 2018/06/18
- Re: Making a non-ASCII space character visible, Nick Helm, 2018/06/18
- Message not available
- Re: Making a non-ASCII space character visible, Will Parsons, 2018/06/20
Message not available