Originally published 2021/10/27. Updated to include the .xssessionsrc point
I run pretty often into this issue, so this is a checklist for me.
Issue being, that I cannot use Compose key sequences to type out the characters I need.
Case in point being, the apostrophe ’ and the quote marks “” , ‘’ that I use, all the live long day.
- Make sure that emacs is running as a service. It runs in your user, so check status with
systemctl --user status emacs.service- Do the normal computer user thing. Restart the service.
systemctl --user restart emacs.service.1
- Do the normal computer user thing. Restart the service.
- Make sure the system is UTF-8 everywhere. (en_IN.UTF-8 does not work for me. Make sure it’s en_US.UTF-8)
- One place that Emacs looks is the
.xsessionrcfile in the home folder.- These are the contents of mine. My Emacs refuses to let the compose key sequences work, unless it’s present
LC_NUMERIC=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=en_US.UTF-8 LC_ADDRESS=en_US.UTF-8 LC_TELEPHONE=en_US.UTF-8 LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=en_US.UTF-8 LC_TIME=en_US.UTF-8 PAPERSIZE=a4 LANGUAGE=en_US LANG=en_US.UTF-8 if [ $DISPLAY != ":0" ] then export XAUTHORITY=${HOME}/.Xauthority fi
- These are the contents of mine. My Emacs refuses to let the compose key sequences work, unless it’s present
- One place that Emacs looks is the
This should do the trick 99% of the time.
Have done it close to 4–5 times now. It works! ↩︎