emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#10857: closed (ucs-insert deals inconsistently wit


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#10857: closed (ucs-insert deals inconsistently with errors)
Date: Wed, 22 Feb 2012 23:39:02 +0000

Your message dated Thu, 23 Feb 2012 01:35:30 +0200
with message-id <address@hidden>
and subject line Re: bug#10857: ucs-insert deals inconsistently with errors
has caused the debbugs.gnu.org bug report #10857,
regarding ucs-insert deals inconsistently with errors
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
10857: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10857
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: ucs-insert deals inconsistently with errors Date: Mon, 20 Feb 2012 16:53:56 +0100
Package: emacs
Severity: minor


`ucs-insert' does not deal very consistently with errors.

Two anomalies:

1)  M-x ucs-insert <RET> zzz <RET>   => "Not a Unicode character code: nil"
    Which is caused by `read-char-by-name' not having a way to pass
back what the user really typed. Still, I typed "zzz", not "nil", so
the message is unhelpful.

2) When called from lisp code, it deals differently with erroneous
strings and erroneous non-strings:
    (ucs-insert 'zzz)  =>  "Not a Unicode character code: zzz"   ;; correct
    (ucs-insert "zzz")  =>  any non-hex string is turned into ^@ and
inserted, and no error is produced.

The second problem can be trivially fixed with (not (string-match-p
"[^[:xdigit:]]" character)), though the docstring of `ucs-insert' does
not really say much about the valid forms the CHARACTER arg can take.

    Juanma



--- End Message ---
--- Begin Message --- Subject: Re: bug#10857: ucs-insert deals inconsistently with errors Date: Thu, 23 Feb 2012 01:35:30 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.93 (x86_64-pc-linux-gnu)
>>       ((string-match-p "^#" input)
>
> This should also use \`.

All right, installed.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]