unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Will Parsons <varro@nodomain.invalid>
To: help-gnu-emacs@gnu.org
Subject: Re: Making a non-ASCII space character visible
Date: Sun, 17 Jun 2018 16:28:18 -0400	[thread overview]
Message-ID: <fonuj2Fm0qeU5@mid.individual.net> (raw)
In-Reply-To: mailman.2147.1529263896.1292.help-gnu-emacs@gnu.org

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


  parent reply	other threads:[~2018-06-17 20:28 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-16 20:15 Making a non-ASCII space character visible Will Parsons
2018-06-16 21:37 ` Will Parsons
2018-06-17  4:31   ` Marcin Borkowski
2018-06-17  5:07 ` Michael Heerdegen
2018-06-17  5:55   ` Eli Zaretskii
2018-06-17  6:24     ` Michael Heerdegen
2018-06-17  6:41       ` Eli Zaretskii
2018-06-17  6:41       ` Michael Heerdegen
     [not found]       ` <mailman.2115.1529217694.1292.help-gnu-emacs@gnu.org>
2018-06-19  0:45         ` Will Parsons
2018-06-19  1:01           ` Noam Postavsky
     [not found]           ` <mailman.2220.1529370113.1292.help-gnu-emacs@gnu.org>
2018-06-19  1:26             ` Will Parsons
     [not found]   ` <mailman.2110.1529214934.1292.help-gnu-emacs@gnu.org>
2018-06-17 18:54     ` Will Parsons
2018-06-17  6:00 ` Eli Zaretskii
     [not found] ` <mailman.2111.1529215267.1292.help-gnu-emacs@gnu.org>
2018-06-17 18:38   ` Will Parsons
2018-06-17 18:51     ` Eli Zaretskii
     [not found]     ` <mailman.2145.1529261474.1292.help-gnu-emacs@gnu.org>
2018-06-17 19:09       ` Will Parsons
2018-06-17 19:31         ` Eli Zaretskii
     [not found]         ` <mailman.2147.1529263896.1292.help-gnu-emacs@gnu.org>
2018-06-17 20:28           ` Will Parsons [this message]
2018-06-18  1:40             ` Nick Helm
     [not found]             ` <mailman.2154.1529286048.1292.help-gnu-emacs@gnu.org>
2018-06-19  0:12               ` Will Parsons
2018-06-19  2:30                 ` Nick Helm
     [not found]                 ` <mailman.2227.1529375463.1292.help-gnu-emacs@gnu.org>
2018-06-20 21:05                   ` Will Parsons
     [not found] ` <mailman.2107.1529212061.1292.help-gnu-emacs@gnu.org>
2018-06-17 18:45   ` Will Parsons
     [not found] <<fol9fvF7uauU1@mid.individual.net>
     [not found] ` <<fole90F986vU1@mid.individual.net>
2018-06-17  0:20   ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fonuj2Fm0qeU5@mid.individual.net \
    --to=varro@nodomain.invalid \
    --cc=gyliamos@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).