GNU bug report logs - #28183
Customize always reports error when trying to enter characters to Whitespace Mode display mappings

Previous Next

Package: emacs;

Reported by: Andrew Toskin <andrew.toskin <at> gmail.com>

Date: Tue, 22 Aug 2017 04:56:01 UTC

Severity: normal

Tags: fixed, patch

Merged with 15925, 21771, 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


View this message in rfc822 format

From: Andrew Toskin <andrew.toskin <at> gmail.com>
To: 28183 <at> debbugs.gnu.org
Subject: bug#28183: Customize always reports error when trying to enter characters to Whitespace Mode display mappings
Date: Tue, 29 Aug 2017 20:11:31 -0700
[Message part 1 (text/plain, inline)]
Bump.

Any ideas?


On Mon, Aug 21, 2017 at 9:54 PM, Andrew Toskin <andrew.toskin <at> gmail.com>
wrote:

> ## The problem
>
> Customize throws an error when trying to set characters in the Whitespace
> Mode display mappings. When I paste the symbols I want into the Customize
> fields, it says "This field should contain a single character." Even
> though I've only deleted and entered a single character! There's a lot more
> documentation about the syntax of setting the variable in code than through
> the Customize interface, so I'm not sure if Customize is broken or if I'm
> misunderstanding something. But when trying to edit more than one display
> mapping, this error is at least vague and unhelpful.
>
>
> ## My system setup
>
> * Fedora 26 Workstation x86_64
> * Emacs 25.2.1 in an X window, with GTK+ 3.22.16
> * Whitespace Mode 13.2.2 (packaged with Emacs, in Fedora)
>
>
> ## Steps to reproduce
>
> 1. Launch Emacs without any other configuration (`emacs --quick`).
> 2. Execute Customize and search for Whitespace Display Mappings.
> 3. Edit the character mapping. For example, delete the default "$" used
> for newlines, and paste "↵" (U+21b5 "Downwards Arrow With Corner Leftward").
> 4. Click Apply. See the error in the mode line at the bottom of Emacs
>
> I thought at first that Customize wasn't accepting Unicode characters that
> might be more than a single byte, but I actually tried resetting all
> mappings to default, then editing the newline mapping to replace the
> default "$" with another ASCII character, "&", and it **still** says "This
> field should contain a single character."
>
> I ended up setting the display mapping manually from my config file.
>
>   (setq whitespace-display-mappings '(
>         ;; Plain space: · or .
>         (space-mark   32  [183]     [46]            )
>         ;; Non-breaking "hard" space: • or _
>         (space-mark   160 [8226]    [95]            )
>         ;; Newline: ↵ or ¬ or $
>         (newline-mark 10  [8629 10] [172 10] [36 10])
>         ;; Tab: ⇥ or » or \
>         (tab-mark     9   [8677 9]  [187 9]  [92 9] )))
>
> **This** works as expected.
>
> But I can't figure out why I couldn't do this in Customize. What do you
> think?
>
> Thank,
> ~ Andrew
>
[Message part 2 (text/html, inline)]

This bug report was last modified 4 years and 236 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.