unicode emoji in messages

11 views
Skip to first unread message

Matt Price

unread,
Dec 12, 2016, 11:02:16 AM12/12/16
to mu-di...@googlegroups.com
What do other people use to view(and potentially compose) unicode emoji in messages? I've started getting these lately and it would be convenient to be able to see them directly in emacs. 

Thanks!
Matt

Joost Kremers

unread,
Dec 13, 2016, 7:03:39 AM12/13/16
to mu-di...@googlegroups.com
Well, if they're Unicode emoji, then all you really need is a font
that covers them. If you don't want to use that particular font
for the rest of your Emacs, you'll need to it set up in such a way
that it gets used for those emoji only. I know Emacs can do this
using so-called fontsets, but I'm not entirely sure how.

As for inputting them, you can always use C-x 8 RET, but if you
intend to do this a lot, you may want to look into defining a
custom input method, which is fairly straightforward. For example,
this is what I use to create an input method for inputting some
common semantic symbols (view with an appropriate Unicode font):

```
(quail-define-package
"semantics" "Sem" "Sem" t
"Input method for semantics notation."
nil t nil nil nil nil nil nil nil nil t)

(quail-define-rules
("[[" ?⟦)
("]]" ?⟧)
(".^" ?∩)
(".v" ?∪)
(".<" ?⊆)
("/=" ?≠)
("/o" ?∅)
("+o" ?⊕)
(".e" ?∈)
("/e" ?∉)
("^w" ?ʷ)
(".N" ?ℕ))
```

Strangely enough, `quail-define-rules` doesn't have an argument
telling it which quail package to add the rules to. You just need
to put the package definition right before the rule definition.

An alternative way to input them would be to use the hydra package
and define a hydra for them.

HTH

--
Joost Kremers
Life has its moments

Christophe Troestler

unread,
Dec 16, 2016, 7:16:37 PM12/16/16
to mu-discuss
To view UTF-8 emoticons (while my default font is not DajaVu), I use
        (set-fontset-font t '(#x1F600 . #x1F64F) "DejaVu Sans")

Hope it helps,
C.
Reply all
Reply to author
Forward
0 new messages