From: "Drew Adams" <drew.adams@oracle.com>
To: "'Sven Bretfeld'" <sven.bretfeld@gmx.ch>, <help-gnu-emacs@gnu.org>
Subject: RE: ucs-insert no longer working
Date: Sun, 14 Apr 2013 15:05:59 -0700 [thread overview]
Message-ID: <4C3F325A73434A61997416EDFBEA6A8B@us.oracle.com> (raw)
In-Reply-To: <87y5ckj0rl.fsf@gmx.ch>
> (ucs-insert "0101")
>
> (wrong-type-argument characterp "0101")
>
> Calling ucs-insert manually with M-x works however.
> What strange bug is that?
It's not a bug. When you call the command interactively you are prompted for
input and the command interprets that input. In this case it interprets your
input of 0101 as a hex code for a character.
But after that interactive dialong is finished, what is passed to the command
body is the character. And a character in Emacs Lisp is an integer (only
certain integers are chars, however).
The command requires a character as its argument. "0101" is not a character.
It is not even a non-character integer. It is a string.
Try (ucs-insert ?\x0101) and you will see the difference.
Consult the Elisp manual, node `Strings and Characters', and its subnodes.
next prev parent reply other threads:[~2013-04-14 22:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-14 20:49 ucs-insert no longer working Sven Bretfeld
2013-04-14 22:05 ` Drew Adams [this message]
[not found] <mailman.24120.1365972586.855.help-gnu-emacs@gnu.org>
2013-04-14 21:25 ` Sven Joachim
2013-04-16 7:38 ` Sven Bretfeld
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C3F325A73434A61997416EDFBEA6A8B@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=help-gnu-emacs@gnu.org \
--cc=sven.bretfeld@gmx.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).