unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#15925: 24.3.50; error when customizing whitespace-display-mappings
@ 2013-11-19  7:37 Claudio Bley
  2013-11-19  8:24 ` Glenn Morris
  2020-09-22 15:42 ` Mauro Aranda
  0 siblings, 2 replies; 19+ messages in thread
From: Claudio Bley @ 2013-11-19  7:37 UTC (permalink / raw)
  To: 15925

1. M-x customize-option RET whitespace-display-mappings RET
2. click INS to insert an arbitrary char into one of the vectors
3. click the State button and select "Set for current session"

You should see this error / backtrace:

Debugger entered--Lisp error: (error "This field should contain a single character")
  signal(error ("This field should contain a single character"))
  error("%s" "This field should contain a single character")
  custom-variable-set((custom-variable :documentation-shown t
  :custom-state modified :tag "Whitespace Display Mappings" :value
  whitespace-display-mappings :custom-form edit :custom-magic
  [...]
  call-interactively(widget-button-click nil nil)
  command-execute(widget-button-click)


In wid-edit.el the character widget is defined as

(define-widget 'character 'editable-field
  "A character."
  :tag "Character"
  :value 0
  :size 1
  :format "%{%t%}: %v\n"
  :valid-regexp "\\`.\\'"
  :error "This field should contain a single character"
  [...]

Note, that the regexp does not match a single newline character, which
happens to be the problem here, as the default value of
`whitespace-display-mappings' is

((space-mark 32 [183] [46])
 (space-mark 160 [164] [95])
 (newline-mark 10 [36 10])  ;; <- ?\n here
 (tab-mark 9 [187 9] [92 9]))

I think the regexp should be changed to "\\`\(.\|\n\)\\'" to allow a
single newline also.

Claudio
-- 
Claudio





^ permalink raw reply	[flat|nested] 19+ messages in thread
[parent not found: <<87mwl0vo36.wl%claudio.bley@gmail.com>]

end of thread, other threads:[~2020-09-26 15:10 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-19  7:37 bug#15925: 24.3.50; error when customizing whitespace-display-mappings Claudio Bley
2013-11-19  8:24 ` Glenn Morris
2013-11-20 10:35   ` Claudio Bley
2013-11-20 19:28     ` Stefan Monnier
2020-09-22 15:42 ` Mauro Aranda
2020-09-23 13:46   ` Lars Ingebrigtsen
2020-09-23 15:26     ` Mauro Aranda
2020-09-24 14:38       ` Lars Ingebrigtsen
2020-09-24 15:29         ` Mauro Aranda
2020-09-24 15:36           ` Mauro Aranda
2020-09-25 10:00           ` Lars Ingebrigtsen
2020-09-25 11:06             ` Eli Zaretskii
2020-09-25 11:10             ` Mauro Aranda
2020-09-25 14:32               ` Mauro Aranda
2020-09-26 13:24                 ` Lars Ingebrigtsen
2020-09-26 13:26                 ` Lars Ingebrigtsen
2020-09-26 13:45                   ` Mauro Aranda
2020-09-26 15:10                     ` Lars Ingebrigtsen
     [not found] <<87mwl0vo36.wl%claudio.bley@gmail.com>
     [not found] ` <<CABczVwdS5QJkQh1+GBBoDB4WDtSCCOJRF48whp+it0TyJ1x23Q@mail.gmail.com>
     [not found]   ` <<87a6xgd2rw.fsf@gnus.org>
     [not found]     ` <<CABczVweQk+Jiiix62mS49n1zoHNn-6uifOEB1H4==EKNSV970g@mail.gmail.com>
     [not found]       ` <<871rirb5ot.fsf@gnus.org>
     [not found]         ` <<CABczVweW=gbepHOLzBQZbAxS9yX-Fo3h2_hPDL7FwmhfjAdk6w@mail.gmail.com>
     [not found]           ` <<87ft76rxaw.fsf@gnus.org>
     [not found]             ` <<83v9g2ru8f.fsf@gnu.org>
2020-09-25 16:07               ` Drew Adams

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).