GNU bug report logs -
#15925
24.3.50; error when customizing whitespace-display-mappings
Previous Next
Reported by: Claudio Bley <claudio.bley <at> googlemail.com>
Date: Tue, 19 Nov 2013 07:39:02 UTC
Severity: normal
Tags: fixed, patch
Merged with 21771,
28183,
31869
Found in versions 24.3.50, 25.0.50, 27.0.50
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #64 received at 15925 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> (Oops. Sent the previous mail too early.)
>
> Mauro Aranda <maurooaranda <at> gmail.com> writes:
>
>> How does the attached patch look? I didn't include changes for the rest
>> of the escape sequences, because of Eli's objections.
>
> Looks good. The only thing that's confusing now is that if you delete
> the char, it displays as \s?
>
> M-x customize-variable RET whitespace-display-mappings RET
>
>
>
>
> Hit DEL:
>
>
>
>
>
> So there's no difference in the display between a missing character and
> a space character...
I did that on purpose, and this comment tries to explain that:
;; The character widget is not really empty:
;; its value is a single space character.
;; We need to propertize it again, if it became empty for a while.
Try the following in current master (i.e., without my patch applied):
(defcustom foo-option ?. "..."
:type 'character
:group 'emacs)
Eval, and confirm that foo-option value is ?.
M-x customize-option RET foo-option RET
Delete the ".", and then click State and Set for Current Session.
You'll see that foo-option was set...but to what? You said there is a
missing character, but really there's not such thing: there is a space
there, and the Widget library will return ?\s for the value of that
widget.
If you do:
M-: foo-option RET
you can confirm foo-option was set to ?\s
That's why I thought it would be less confusing to show the \s at all
times, and say "No, you can't have an empty character widget". Having a
truly empty character widget wouldn't be of much help, since the
:validate function will complain anyway because the widget doesn't have
a single character.
[Message part 2 (text/html, inline)]
This bug report was last modified 4 years and 237 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.