On 26/01/2024 22:22, Lawrence D'Oliveiro wrote:
On Fri, 26 Jan 2024 15:59:11 +0100, David Brown wrote:
On 25/01/2024 21:18, Lawrence D'Oliveiro wrote:
The compose key on *nix systems gives you a fairly mnemonic way of
typing many of them.
It lets you type some, but it is still limited in the default setup.
The default keys come from /usr/share/X11/locale/en_US.UTF-8/Compose,
which on my system contains something like 5000 entries.
But most of these cannot be typed (by most people), because the
combinations include things like dead keys that they don't have, or
letters or keys that are from other keyboard layouts. And many of the
lines are duplicates, allowing you to use any order of the keys. For
keyboard layouts without dead keys, such as standard UK and US layouts,
there's maybe a hundred symbols they can use from that file. Those of
us with dead keys or other layouts (excluding things like Chinese with
very different input methods) get perhaps three or four hundred. Almost
all of these are letters with diacriticals. The whole point of this
file is to have one file that handles many languages - Russian typists
will see a different set of 3-400 symbols than Greek typists, but it is
all conveniently in one file. It is /not/ a set of symbols that someone
with a en_US.UTF-8 locale can access.
Out of all this, there are maybe 20-30 symbols.
Now, I agree that the compose key is a great idea, and a useful way to
get these symbols. Compose ":" "-" gives you ÷, which is ÷ great for
people who don't have an AltGr key letting them press AltGr "/" to get
it. And it lets people who have an English language layout type café,
ça, naïve, etc., making occasional use of diacriticals. But many of
these are already available (certainly on *nix, and sometimes even on
Windows) with an international keyboard layout with AltGr and a few dead
keys.
It's very useful for things like diacriticals on letters that you
already have, but if you want to use it for something out of the
ordinary, you need to make your own .XCompose file.
Works fine for things like curly quotes “‘’”, em-dashes—, arithmetic
operators ×÷, some subscripts and superscripts ₉₂U²³⁹, arrows ←↑→↓.
I can type all of these, except the subscripts, without the compose key.
I do sometimes have use of the compose key. But of the symbols or
letters that I want to type and which are not available on my normal
keys (including AltGr and dead key combinations), at most a quarter are available in the standard compose key setup. If I expect to need the
symbol again, I'll often put it into my .XCompose file. As I say, the
compose key is good, but not /that/ useful in its default setup.
I have a small number of entries in my .XCompose, because I don’t want to have to remember too many customizations.
For less-commonly-used things, I go to an Emacs editor window and use its ability to enter characters by their Unicode names, then copy and paste
from there.
I use a character map applet. But regardless, it is not convenient for
most people to use such extra symbols in normal coding.
And it's easy to have different symbols that appear quite similar as
glyphs, but are very different characters as far as the compiler is
concerned.
You can actually take advantage of that. E.g. from some of my Python
code:
for cłass in (Window, Pixmap, Cursor, GContext, Region) :
delattr(cłass, "__del__")
#end for
The human reader might not actually notice (or care) that a particular
identifier looks like a reserved word, since the meaning is obvious
from context. The compiler cannot deduce the meaning from that context,
but then, it doesn’t need to.
I am not at all keen on that. I am not against using non-ASCII letters
as though they were special symbols for particular purposes, but I'd
want them to stand out clearly.
The whole point about this example is that they do not need to “stand out clearly”.
Yes, I know that was your point. And /my/ point was that I think that's
an absolutely terrible idea. But that is merely my subjective opinion.
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)