Is there a build of GUI Emacs for Mac that can display emoji? I tried this and AquaEmacs but neither of them could display it.
Asked
Active
Viewed 1,418 times
1 Answers
9
The Emacs Mac Port is said to support emoji display out of the box:
- Can display color bitmap fonts such as Apple Color Emoji, if compiled and executed on Mac OS X 10.7 or later. Also supports display of some combinations of regional indicator symbols, such as U+1F1EF followed by U+1F1F5, as national flags. Variation Selectors 15 (text-style) and 16 (emoji-style) are also supported. On OS X 10.10.3 and later, emoji modifiers for skin tones (U+1F3FB - U+1F3FF) are supported as well.
It's available in a Homebrew Tap. To enable the tap and install the port, type:
$ brew tap railwaycat/emacsmacport
$ brew install emacs-mac
Alternatively you can manually configure the Emacs' font choice to use Apple's Emoji font:
(set-fontset-font t 'symbol (font-spec :family "Apple Color Emoji")
frame 'prepend)
Note that you'll need to apply this to every new frame, and thus call it in a function for after-make-frame-functions
.
This should work on a normal Cocoa build of standard Emacs, e.g. from brew install emacs
or Emacs for Mac OS X.
port install emacs-mac-app
). – Constantine Feb 10 '16 at 16:15brew linkapps
to have it appear in Launchpad, etc. As for the alternative method, the error message doesn't help without seeing what you've done. Take a look at the docstring ofafter-make-frame-functions
to figure out how it's supposed to be used. – Feb 12 '16 at 17:02after-make-frame-functions
? – stacko Feb 12 '16 at 17:19C-h v after-make-frame-functions
? – Feb 12 '16 at 17:20(add-hook 'after-make-frame-functions 'my-set-font) (defun my-set-font () (interactive) (set-fontset-font t 'symbol (font-spec :family "Apple Color Emoji") frame 'prepend))
I tried this as I said earlier and it didn't work. Am I taking what you wrote in your answer wrong? – stacko Feb 12 '16 at 17:26frame
. – Feb 12 '16 at 17:28after-make-frame-functions is a variable defined in ``frame.el'. Its value is (my-set-font select-frame)
Does theselect-frame
part mean it needs an argumentframe
? – stacko Feb 12 '16 at 17:36The functions are run with one arg, the newly created frame
after that. :This variable may be risky if used as a file-local variable. Documentation: Functions to run after a frame is created. The functions are run with one arg, the newly created frame.
– stacko Feb 12 '16 at 17:41(mapc '(lambda (f) (set-fontset-font t 'symbol (font-spec :family "Apple Color Emoji") f 'prepend)) (frame-list))
to apply this to the initially created frame. – Winny Oct 29 '21 at 15:44