From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#30458: 26.0; `ucs-names': No reverse lookup function now Date: Wed, 14 Feb 2018 13:09:41 -0800 (PST) Message-ID: <18b6852e-c4c7-4fa9-ab8f-916c10d001a8@default> References: <35ab0734-9032-4331-90e8-825f58fba059@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1518642513 16828 195.159.176.226 (14 Feb 2018 21:08:33 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 14 Feb 2018 21:08:33 +0000 (UTC) To: Andy Moreton , 30458@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Feb 14 22:08:29 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1em4Hi-0002wV-1a for geb-bug-gnu-emacs@m.gmane.org; Wed, 14 Feb 2018 22:08:10 +0100 Original-Received: from localhost ([::1]:60266 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1em4Jj-0006v9-VP for geb-bug-gnu-emacs@m.gmane.org; Wed, 14 Feb 2018 16:10:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50116) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1em4JZ-0006tD-Hi for bug-gnu-emacs@gnu.org; Wed, 14 Feb 2018 16:10:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1em4JW-0007Y2-PK for bug-gnu-emacs@gnu.org; Wed, 14 Feb 2018 16:10:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35411) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1em4JW-0007Xw-HR for bug-gnu-emacs@gnu.org; Wed, 14 Feb 2018 16:10:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1em4JW-0001If-BT for bug-gnu-emacs@gnu.org; Wed, 14 Feb 2018 16:10:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 14 Feb 2018 21:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30458 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 30458-submit@debbugs.gnu.org id=B30458.15186425934978 (code B ref 30458); Wed, 14 Feb 2018 21:10:02 +0000 Original-Received: (at 30458) by debbugs.gnu.org; 14 Feb 2018 21:09:53 +0000 Original-Received: from localhost ([127.0.0.1]:43308 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1em4JN-0001ID-7n for submit@debbugs.gnu.org; Wed, 14 Feb 2018 16:09:53 -0500 Original-Received: from aserp2130.oracle.com ([141.146.126.79]:53062) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1em4JM-0001I1-23 for 30458@debbugs.gnu.org; Wed, 14 Feb 2018 16:09:52 -0500 Original-Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w1EL6lsp041505; Wed, 14 Feb 2018 21:09:43 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=DJTR/YwEyZ/QM0vtK3873YfImpIaEKccWNFirKYo6r4=; b=AgCdgRzoAvkGY46CeGOUwtw1YAPFtAtErYfxSlzjVriXfisXMz2E1CzLuKPqCWi3HWBO 9eXPo9v+1O4iX/usm11BvegYbn1TPYiaqVD9PltmQg23oU09rcvkQZ9oShrzdxqR1uAA U5DLF/1BahvOG8Lgi696JnTEjghn7oxVvtz+qi9Dc36wkRopwntCeeP9q1TxVMABvztu yGnU5SU0w7UN/CoFTpVhjD7KSWMPGMBRu5zu1hi8Fpebom+tf5ROBpo3Jp2fcdZx1flp I1+2KAiU5/4E7C0UiDznGUU0KwtyHyZESEEBr+5ter8z7pziI9YOmg7/gA7++NL6CJPO 7A== Original-Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp2130.oracle.com with ESMTP id 2g4u870f0r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 14 Feb 2018 21:09:43 +0000 Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w1EL9gFa028309 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 14 Feb 2018 21:09:42 GMT Original-Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w1EL9gpK010154; Wed, 14 Feb 2018 21:09:42 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4639.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8805 signatures=668671 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=735 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1802140248 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:143288 Archived-At: > > Before Emacs 26, `ucs-names' was an alist. That meant that you could > > not only look up a character, given its name or code, but you could > > also easily look up a character name, given the character: > > > > (car (rassq CHARACTER (ucs-names))) > > > > How is this done now, with (ucs-names) returning a hash table? > > > > There is now a function `char-from-name', to replace the former forward > > alist lookup (car (assoc CHAR-NAME (ucs-names))). But there doesn't > > seem to be any reverse lookup now for `ucs-names' (e.g. `char-name' or > > `char-name-from-char'). >=20 > Looking at the implementation of ucs-names, does get-char-code-property > do what you want ? >=20 > (char-from-name "GREEK SMALL LETTER LAMBDA") =3D> 955 > (char-from-name "GREEK SMALL LETTER LAMDA") =3D> 955 > (get-char-code-property 955 'name) =3D> "GREEK SMALL LETTER LAMDA" > (get-char-code-property 955 'old-name) =3D> "GREEK SMALL LETTER LAMBDA" Yes, thanks. I had forgotten about that function. Still, I would ask to have general reverse-lookup functions for a hash table, as well. Would someone please retitle this bug for that?