From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#36454: 26.2.90; feature request - Insert char by hex tab completion or C-x 8 RET ffe Date: Mon, 15 Jul 2019 09:03:22 -0700 (PDT) Message-ID: <4087f726-f9e7-4bc5-a9b3-7d24d9b7f7c5@default> References: <87r27016xo.fsf@mouse.gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="6980"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 36454@debbugs.gnu.org To: Sebastian Urban , Lars Ingebrigtsen , VanL Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 15 18:04:10 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hn3ST-0001f8-5i for geb-bug-gnu-emacs@m.gmane.org; Mon, 15 Jul 2019 18:04:09 +0200 Original-Received: from localhost ([::1]:40592 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hn3SS-0005xi-1n for geb-bug-gnu-emacs@m.gmane.org; Mon, 15 Jul 2019 12:04:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56099) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hn3SO-0005xP-B4 for bug-gnu-emacs@gnu.org; Mon, 15 Jul 2019 12:04:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hn3SM-00076o-2b for bug-gnu-emacs@gnu.org; Mon, 15 Jul 2019 12:04:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40006) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hn3SL-00076e-UX for bug-gnu-emacs@gnu.org; Mon, 15 Jul 2019 12:04:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hn3SL-0007UW-LV for bug-gnu-emacs@gnu.org; Mon, 15 Jul 2019 12:04:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 15 Jul 2019 16:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36454 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: wontfix Original-Received: via spool by 36454-submit@debbugs.gnu.org id=B36454.156320661828763 (code B ref 36454); Mon, 15 Jul 2019 16:04:01 +0000 Original-Received: (at 36454) by debbugs.gnu.org; 15 Jul 2019 16:03:38 +0000 Original-Received: from localhost ([127.0.0.1]:48827 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hn3Ry-0007Tr-B8 for submit@debbugs.gnu.org; Mon, 15 Jul 2019 12:03:38 -0400 Original-Received: from userp2130.oracle.com ([156.151.31.86]:43062) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hn3Rw-0007Te-LC for 36454@debbugs.gnu.org; Mon, 15 Jul 2019 12:03:37 -0400 Original-Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x6FG3UGL041454; Mon, 15 Jul 2019 16:03:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=EWQXVGr2tF4JY777yWcuRTuR8xXcD6Pk3OaKVvosaXw=; b=KlCdUrFQhd9fKc4FyUMj87+c7pYA+/+iW4nbsaLGxfdv7yIV7zOVH4d9KruLkpWvgj1n q22/1bdUcmbMVri4yVsiI2ums8BNnVrFwiSxsqvfgxPPfhYNWdCcG/cJhDcBWR/LchKo OfcFdfQMoqnqqhddatBDvf5Y9Vu7DE2qq6C61tP2VflDdtDJwdZQZzZu73imO+0Xb5PW vahvQsXV9617p3R29pbCdEhUCUBnW2eK6HHaRwKeiYZ58RTckBIGY3fyM9+a+E2ZpnXs QrndrWyBr294/JralTy/+yRdjkFJ9f50qxSTOMIKMbVlh4oHUk/ZJaMI+ZMkVJZ7TJIb vg== Original-Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2130.oracle.com with ESMTP id 2tq6qtfh06-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 15 Jul 2019 16:03:30 +0000 Original-Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x6FG2Ylk027561; Mon, 15 Jul 2019 16:03:30 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserp3030.oracle.com with ESMTP id 2tq5bbvsba-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 15 Jul 2019 16:03:29 +0000 Original-Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x6FG3NHK010813; Mon, 15 Jul 2019 16:03:23 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4861.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9319 signatures=668688 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1907150187 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9319 signatures=668688 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1907150187 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: 209.51.188.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:163135 Archived-At: > Not that I disagree, but I have this idea. There are 3 ways of > specifying character for 'C-x 8 RET': > 1. Unicode name, > 2. hex code, > 3. code with radix specified, e.g. #o... (octal), #x... (hex), > #10r...(decimal). >=20 > While it'll be difficult(?) to have both completions for name and hex > code (point 1. and 2.), because for example some names include > numbers, completions based on the code for 3rd method of inserting > char could be added. This way if someone type letters or numbers - > method 1. or 2. - he'll get completions based on Unicode name. BUT if > he define radix in the beginning (#b/#o/#x/#RADIXr), possible > completions based on the code will appear. A bit more typing > (defining radix) but it could work. This way we could also get > completions for other codes than hex. >=20 > > I don't think this sounds very useful, because the hex values are > > kinda tightly packed, so you get too many matches. >=20 > With approach described above, it'll only happen with 3rd method - > probably not the most popular. Also I think if someone will try to > complete it, he'll do it after typing at least 2 or as OP - 3 letters. >=20 > > And they get in the way of name completion. There's no problem with allowing completion against both char names and hex code points. Haven't seen any problem at all. (But of course you'll want to use a substring completion style.) --- FWIW - For Emacs 23-25, Icicles supports your #1 and #2. [And it supports a 4th kind of completion: You can enter a Unicode char itself (e.g. paste it into the minibuffer, or type a key binding that inserts it), and you see both its Unicode name and its code point. IOW, you can use completion to get info about a char, not just insert a char.] --- In Emacs 26 they changed to using a hash table for `ucs-names', which is more unidirectional than an alist, and I haven't bothered to try to convert the code. Maybe I'll fiddle with trying to get something reasonable using the hash table; maybe not. (By "more unidirectional" I mean you can't easily look up a key, given its value. I say "more" because maybe you can do it using `maphash', at quite a cost. And of course I could convert the `ucs-names' hash table to an alist, at high cost.)