all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Sebastian Urban <mrsebastianurban@gmail.com>,
	Lars Ingebrigtsen <larsi@gnus.org>, VanL <van@scratch.space>
Cc: 36454@debbugs.gnu.org
Subject: bug#36454: 26.2.90; feature request - Insert char by hex tab completion or C-x 8 RET ffe <TAB>
Date: Mon, 15 Jul 2019 09:03:22 -0700 (PDT)	[thread overview]
Message-ID: <4087f726-f9e7-4bc5-a9b3-7d24d9b7f7c5@default> (raw)
In-Reply-To: <b2238b0a-006f-945e-0eab-4bab7e58378a@gmail.com>

> 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).
> 
> 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.
> 
> > I don't think this sounds very useful, because the hex values are
> > kinda tightly packed, so you get too many matches.
> 
> 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.
> 
> > 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.)





  reply	other threads:[~2019-07-15 16:03 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-01  2:39 bug#36454: 26.2.90; feature request - Insert char by hex tab completion or C-x 8 RET ffe <TAB> VanL
2019-07-08 22:45 ` Lars Ingebrigtsen
2019-07-15  8:34   ` Sebastian Urban
2019-07-15 16:03     ` Drew Adams [this message]
2019-07-15 18:59       ` Sebastian Urban
2019-07-15 19:29         ` Drew Adams
2019-07-17 17:20           ` Sebastian Urban
2019-07-17 21:34             ` Drew Adams
2019-07-18  9:50               ` Eli Zaretskii
     [not found] <<m2o92elbqy.fsf@scratch.space>
     [not found] ` <<87r27016xo.fsf@mouse.gnus.org>
     [not found]   ` <<b2238b0a-006f-945e-0eab-4bab7e58378a@gmail.com>
     [not found]     ` <<4087f726-f9e7-4bc5-a9b3-7d24d9b7f7c5@default>
     [not found]       ` <<2f469306-98d3-8735-4d0d-61aae53321d0@gmail.com>
     [not found]         ` <<8a8360df-afe2-4ae8-abac-96e7691f52a6@default>
     [not found]           ` <<27479297-ab97-106b-7325-5ac6ef5d0b92@gmail.com>
     [not found]             ` <<1981011f-2e19-4f4b-a7ac-8ccd15298b1a@default>
     [not found]               ` <<83k1cfy8mp.fsf@gnu.org>
2019-07-18 16:15                 ` Drew Adams
2019-07-18 16:53                   ` Eli Zaretskii
     [not found] <<<m2o92elbqy.fsf@scratch.space>
     [not found] ` <<<87r27016xo.fsf@mouse.gnus.org>
     [not found]   ` <<<b2238b0a-006f-945e-0eab-4bab7e58378a@gmail.com>
     [not found]     ` <<<4087f726-f9e7-4bc5-a9b3-7d24d9b7f7c5@default>
     [not found]       ` <<<2f469306-98d3-8735-4d0d-61aae53321d0@gmail.com>
     [not found]         ` <<<8a8360df-afe2-4ae8-abac-96e7691f52a6@default>
     [not found]           ` <<<27479297-ab97-106b-7325-5ac6ef5d0b92@gmail.com>
     [not found]             ` <<<1981011f-2e19-4f4b-a7ac-8ccd15298b1a@default>
     [not found]               ` <<<83k1cfy8mp.fsf@gnu.org>
     [not found]                 ` <<6251d2e2-5366-4c06-8c42-811d1aa7d5e3@default>
     [not found]                   ` <<831rynwah9.fsf@gnu.org>
2019-07-18 20:44                     ` Drew Adams
2019-07-19  6:41                       ` Eli Zaretskii
2019-07-19 23:07                         ` Richard Stallman
2019-07-20  8:04                           ` VanL
     [not found] <<<<m2o92elbqy.fsf@scratch.space>
     [not found] ` <<<<87r27016xo.fsf@mouse.gnus.org>
     [not found]   ` <<<<b2238b0a-006f-945e-0eab-4bab7e58378a@gmail.com>
     [not found]     ` <<<<4087f726-f9e7-4bc5-a9b3-7d24d9b7f7c5@default>
     [not found]       ` <<<<2f469306-98d3-8735-4d0d-61aae53321d0@gmail.com>
     [not found]         ` <<<<8a8360df-afe2-4ae8-abac-96e7691f52a6@default>
     [not found]           ` <<<<27479297-ab97-106b-7325-5ac6ef5d0b92@gmail.com>
     [not found]             ` <<<<1981011f-2e19-4f4b-a7ac-8ccd15298b1a@default>
     [not found]               ` <<<<83k1cfy8mp.fsf@gnu.org>
     [not found]                 ` <<<6251d2e2-5366-4c06-8c42-811d1aa7d5e3@default>
     [not found]                   ` <<<831rynwah9.fsf@gnu.org>
     [not found]                     ` <<af7417e0-bf8e-4400-a501-71dcb499565b@default>
     [not found]                       ` <<83wogev83t.fsf@gnu.org>
2019-07-19 14:38                         ` Drew Adams
2019-07-19 14:57                           ` Eli Zaretskii
     [not found] <<<<<m2o92elbqy.fsf@scratch.space>
     [not found] ` <<<<<87r27016xo.fsf@mouse.gnus.org>
     [not found]   ` <<<<<b2238b0a-006f-945e-0eab-4bab7e58378a@gmail.com>
     [not found]     ` <<<<<4087f726-f9e7-4bc5-a9b3-7d24d9b7f7c5@default>
     [not found]       ` <<<<<2f469306-98d3-8735-4d0d-61aae53321d0@gmail.com>
     [not found]         ` <<<<<8a8360df-afe2-4ae8-abac-96e7691f52a6@default>
     [not found]           ` <<<<<27479297-ab97-106b-7325-5ac6ef5d0b92@gmail.com>
     [not found]             ` <<<<<1981011f-2e19-4f4b-a7ac-8ccd15298b1a@default>
     [not found]               ` <<<<<83k1cfy8mp.fsf@gnu.org>
     [not found]                 ` <<<<6251d2e2-5366-4c06-8c42-811d1aa7d5e3@default>
     [not found]                   ` <<<<831rynwah9.fsf@gnu.org>
     [not found]                     ` <<<af7417e0-bf8e-4400-a501-71dcb499565b@default>
     [not found]                       ` <<<83wogev83t.fsf@gnu.org>
     [not found]                         ` <<9ad40946-43b5-440c-958d-35da10ab2669@default>
     [not found]                           ` <<831rymul58.fsf@gnu.org>
2019-07-19 15:30                             ` Drew Adams
2019-07-19 20:12                               ` Sebastian Urban
2019-07-20  7:10                                 ` Eli Zaretskii
2019-07-20 13:28                                 ` Lars Ingebrigtsen
2019-07-20 14:36                                   ` Sebastian Urban
2019-07-20 15:54                                     ` Eli Zaretskii
     [not found] <<<<<<m2o92elbqy.fsf@scratch.space>
     [not found] ` <<<<<<87r27016xo.fsf@mouse.gnus.org>
     [not found]   ` <<<<<<b2238b0a-006f-945e-0eab-4bab7e58378a@gmail.com>
     [not found]     ` <<<<<<4087f726-f9e7-4bc5-a9b3-7d24d9b7f7c5@default>
     [not found]       ` <<<<<<2f469306-98d3-8735-4d0d-61aae53321d0@gmail.com>
     [not found]         ` <<<<<<8a8360df-afe2-4ae8-abac-96e7691f52a6@default>
     [not found]           ` <<<<<<27479297-ab97-106b-7325-5ac6ef5d0b92@gmail.com>
     [not found]             ` <<<<<<1981011f-2e19-4f4b-a7ac-8ccd15298b1a@default>
     [not found]               ` <<<<<<83k1cfy8mp.fsf@gnu.org>
     [not found]                 ` <<<<<6251d2e2-5366-4c06-8c42-811d1aa7d5e3@default>
     [not found]                   ` <<<<<831rynwah9.fsf@gnu.org>
     [not found]                     ` <<<<af7417e0-bf8e-4400-a501-71dcb499565b@default>
     [not found]                       ` <<<<83wogev83t.fsf@gnu.org>
     [not found]                         ` <<<9ad40946-43b5-440c-958d-35da10ab2669@default>
     [not found]                           ` <<<831rymul58.fsf@gnu.org>
     [not found]                             ` <<d43cf089-0c6d-4525-b29a-d83d50b0c2a1@default>
     [not found]                               ` <<b6ebc36d-10f8-6cde-a4bf-a93876b98bfb@gmail.com>
     [not found]                                 ` <<83v9vxtc52.fsf@gnu.org>
2019-07-20 16:35                                   ` Drew Adams

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4087f726-f9e7-4bc5-a9b3-7d24d9b7f7c5@default \
    --to=drew.adams@oracle.com \
    --cc=36454@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=mrsebastianurban@gmail.com \
    --cc=van@scratch.space \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.