Increasing the diversity of people who write Python (was: Benefits of unicode identifiers)

Chris Angelico rosuav at gmail.com
Mon Nov 27 09:37:12 EST 2017


On Tue, Nov 28, 2017 at 1:25 AM, Rustom Mody <rustompmody at gmail.com> wrote:
> You could go one step more sophisticated and use TeX-input method
> (C-x RET C-\)
> After which \'e will collapse as é
> “Yeah ok but how the ^)*^$# am I to remember the mantra \'e?!” you may ask
> True… So as you rightly do,
> - pick it up from google
> - put emacs into tex input mode
> - paste from google into emacs
> - place point on the new char and type C-u C-x =
>   Among other things emacs will helpfully inform you (among other things)
>   to input: type "\'{e}" or "\'e" with TeX input method

Which is closely related to the Compose key input method that I use.
First, you assign a key on your keyboard to be Compose (at least on
all my systems, there isn't one by default); I use the key between
left Ctrl and left Alt. Then you have certain key sequences available
that involve holding Compose and pressing something, and then pressing
something else. In the same way that you might press Ctrl-X, Q to do
something, you could press Compose-T, M to produce ™. Sounds
complicated, but it's not. It's right enough. All your accented
letters can be created with Compose-accent, letter - eg
Compose-apostrophe, e => é, or Compose-backtick, a => à.

Not sure what systems that's supported on. I use Debian GNU/Linux with
Xfce; I believe the Compose key handling is all done by X11, so it
should be fairly widely available at least on Linux-derived systems.

ChrisA



More information about the Python-list mailing list