From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mauro Aranda Newsgroups: gmane.emacs.bugs Subject: bug#15925: 24.3.50; error when customizing whitespace-display-mappings Date: Sat, 26 Sep 2020 10:45:56 -0300 Message-ID: References: <87mwl0vo36.wl%claudio.bley@gmail.com> <87a6xgd2rw.fsf@gnus.org> <871rirb5ot.fsf@gnus.org> <87ft76rxaw.fsf@gnus.org> <875z80mzy4.fsf@gnus.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000d16edd05b037a7cd" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2729"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Glenn Morris , 15925@debbugs.gnu.org, claudio.bley@googlemail.com To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 26 15:47:08 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kMAXc-0000a1-E4 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 26 Sep 2020 15:47:08 +0200 Original-Received: from localhost ([::1]:60336 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kMAXb-0007fM-HL for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 26 Sep 2020 09:47:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51206) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kMAXW-0007fF-0H for bug-gnu-emacs@gnu.org; Sat, 26 Sep 2020 09:47:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34591) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kMAXV-0003IH-NJ for bug-gnu-emacs@gnu.org; Sat, 26 Sep 2020 09:47:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kMAXV-0004Ed-Ld for bug-gnu-emacs@gnu.org; Sat, 26 Sep 2020 09:47:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mauro Aranda Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 26 Sep 2020 13:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15925 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 15925-submit@debbugs.gnu.org id=B15925.160112797616225 (code B ref 15925); Sat, 26 Sep 2020 13:47:01 +0000 Original-Received: (at 15925) by debbugs.gnu.org; 26 Sep 2020 13:46:16 +0000 Original-Received: from localhost ([127.0.0.1]:46137 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMAWm-0004Dd-6E for submit@debbugs.gnu.org; Sat, 26 Sep 2020 09:46:16 -0400 Original-Received: from mail-wr1-f42.google.com ([209.85.221.42]:42394) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMAWk-0004DR-Ki for 15925@debbugs.gnu.org; Sat, 26 Sep 2020 09:46:15 -0400 Original-Received: by mail-wr1-f42.google.com with SMTP id c18so6913859wrm.9 for <15925@debbugs.gnu.org>; Sat, 26 Sep 2020 06:46:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=JQlHpLLwb+9WeN8N4whfzfkNG+4w5Kd+eK4BXxXIQ24=; b=Pe8+ipQgYLPwtQXSb6HDalpMOdxjNXfdnC62pIhwBLz+nwFBRFwWHtcc/aISyOskXv fnxQXk7ydryOlNS/OcMEpeZUuJQmlVCABOzJZXMsOvNaV4xhiCvbJtZoBsUCNlRcHybC yY5GPoQhKhuzkYcJLLYeoLdrJ2T5eVlZkSxzwoZN8jy4JydvNGiSkiuoC1+HHJCa6jM4 kh5phKvfmO0DAXLfxd4/mlFMPMxc+5AVDkPqiUpB9lxyWrvA/ygdPWmb1euGkCfZYzbN oqQ7RB2zWbVtAUBkIwFIWbHzHXfiI8nDDZJqnSVj4XMQwIzRjwlOFvbBFOh2auVS5R21 paKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=JQlHpLLwb+9WeN8N4whfzfkNG+4w5Kd+eK4BXxXIQ24=; b=lRM1qRTTWJUFQMt4+K2tktuV+ox3XswOr7iAKMZavcv1v8HLgSGsbxlcWx27OpnArL CvfHyvwvZdoqWxRmLlbY/WrAHsFjpRP5hsM/OO5gVkxkPUZwycXYg9cq548ryVWz1rOe LgDfxbKDITYoIYvVXQgUuTWPwFS0ESBYyB89uEAXbnq5gk6y3mBYngWSiLjby8vwCg63 5IrnhULivKioADC7CPcEDEkrkYM3BEQkMxTthNh9PYndNRw+TBLAliFtDkj8wq1jmevl nWZoNzLWGN7P10ktSefsfLgnzKxb1elgtZO8ZY9EBibuKHDCvDW1UVVEIU2sp2TwRjJw mGnQ== X-Gm-Message-State: AOAM532Jlc8GPtApfQeIU3CVVP8OBPV5x5VURKKPp4thyntL8e/EbvhS cFIs7uElEBbw900KED3fQp406HpxKelnrzWO59g= X-Google-Smtp-Source: ABdhPJxc4KjcEXLvvf51k0CU1BG6vwy+u8+h6DCrA1bI+Yi98tuSnaPTu1YgBz5cJQFeV99InIJXCYgIJ/YLIrRHGso= X-Received: by 2002:adf:9f10:: with SMTP id l16mr10326119wrf.77.1601127968761; Sat, 26 Sep 2020 06:46:08 -0700 (PDT) In-Reply-To: <875z80mzy4.fsf@gnus.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:189024 Archived-At: --000000000000d16edd05b037a7cd Content-Type: text/plain; charset="UTF-8" Lars Ingebrigtsen writes: > (Oops. Sent the previous mail too early.) > > Mauro Aranda 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. --000000000000d16edd05b037a7cd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Lars Ingebrigtsen <la= rsi@gnus.org> writes:

> (Oops.=C2=A0 Sent the previous mai= l too early.)
>
> Mauro Aranda <maurooaranda@gmail.com> writes:
>
>> Ho= w does the attached patch look? I didn't include changes for the rest>> of the escape sequences, because of Eli's objections.
>= ;
> Looks good.=C2=A0 The only thing that's confusing now is that= if you delete
> the char, it displays as \s?
>
> M-x cus= tomize-variable RET whitespace-display-mappings RET
>
>
>=
>
> Hit DEL:
>
>
>
>
>
> S= o there's no difference in the display between a missing character and<= br>> 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 ag= ain, if it became empty for a while.

Try the following in current ma= ster (i.e., without my patch applied):

(defcustom foo-option ?. &quo= t;..."
=C2=A0 :type 'character
=C2=A0 :group 'emacs)
=
Eval, and confirm that foo-option value is ?.

M-x customize-opti= on RET foo-option RET

Delete the ".", and then click State= and Set for Current Session.
You'll see that foo-option was set...b= ut 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 re= turn ?\s for the value of that
widget.

If you do:
M-: foo-opti= on 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".=C2=A0 Having= a
truly empty character widget wouldn't be of much help, since the<= br>:validate function will complain anyway because the widget doesn't h= ave
a single character.
--000000000000d16edd05b037a7cd--