From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#9653: 24.0.50; `ucs-names' - Why all of the ("" . XXX) entries? Date: Wed, 05 Oct 2011 06:20:35 -0400 Message-ID: References: <74B14D2A03144E798C9415172D5FE01A@us.oracle.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1317810076 2960 80.91.229.12 (5 Oct 2011 10:21:16 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 5 Oct 2011 10:21:16 +0000 (UTC) Cc: 9653@debbugs.gnu.org To: Kenichi Handa Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 05 12:21:10 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RBOb3-0000lB-Es for geb-bug-gnu-emacs@m.gmane.org; Wed, 05 Oct 2011 12:21:05 +0200 Original-Received: from localhost ([::1]:52200 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBOb2-0002e3-Vf for geb-bug-gnu-emacs@m.gmane.org; Wed, 05 Oct 2011 06:21:04 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:41670) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBOaz-0002dH-LZ for bug-gnu-emacs@gnu.org; Wed, 05 Oct 2011 06:21:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RBOay-0002cv-6M for bug-gnu-emacs@gnu.org; Wed, 05 Oct 2011 06:21:01 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48138) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBOax-0002cp-UI for bug-gnu-emacs@gnu.org; Wed, 05 Oct 2011 06:21:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RBOaz-00071B-T7 for bug-gnu-emacs@gnu.org; Wed, 05 Oct 2011 06:21:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Oct 2011 10:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9653 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 9653-submit@debbugs.gnu.org id=B9653.131781004426954 (code B ref 9653); Wed, 05 Oct 2011 10:21:01 +0000 Original-Received: (at 9653) by debbugs.gnu.org; 5 Oct 2011 10:20:44 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBOah-00070g-FK for submit@debbugs.gnu.org; Wed, 05 Oct 2011 06:20:43 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBOae-00070Z-Nh for 9653@debbugs.gnu.org; Wed, 05 Oct 2011 06:20:42 -0400 Original-Received: from eliz by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RBOaZ-0006gk-Um; Wed, 05 Oct 2011 06:20:36 -0400 In-reply-to: (message from Kenichi Handa on Wed, 05 Oct 2011 17:59:06 +0900) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 05 Oct 2011 06:21:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:52208 Archived-At: > From: Kenichi Handa > Date: Wed, 05 Oct 2011 17:59:06 +0900 > Cc: 9653@debbugs.gnu.org > > I think what get-char-code-proeprty returns belongs to an > external API, and currently I put this docstring to `name' > property. > > "Unicode character name. > Property value is a string." Right, and the same is in the ELisp manual: `name' Corresponds to the `Name' Unicode property. The value is a string consisting of upper-case Latin letters A to Z, digits, spaces, and hyphen `-' characters. For unassigned codepoints, the value is an empty string. A similar verbiage is there for old-name. > I'll repeat that when one want to know what Unicode says > about the name of a character, the answer is "", not > "". Correct. > > >> If not (i.e. all things being equal) I'd prefer to use nil which is > > >> ever so slightly closer to usual Elisp practice, > > > Really? I've thought nil and "" are rather different object in Elisp. > > > > Of course they are, nil usually means "not found" or something like > > that, and I think it suits this case perfectly. > > I'm not sure because there are multiple use-cases of > get-char-code-property, and nil is better only in some of > them. But, it's just "I'm not sure". If you are sure, as I > wrote above, I'll change it back. FWIW, I'm not sure, either. Stefan, can you please provide "heavier" arguments than just what's been written in this thread? If the issue is just to filter the empty names from what ucs-names returns, we can do that with either nil or empty strings. But let's also think about other users of get-char-code-property, such as what-cursor-position etc., where we will now need to display an empty string when we get nil. By contrast, the way get-char-code-property is coded now its results are ready to be displayed in a manner that is entirely consistent with the requirements of the Unicode standard, and not really getting in the way of Emacs. So it is unclear to me why we should disregard the standard's guidance in this particular case.