Skip to content

Instantly share code, notes, and snippets.

@pjaspers
Last active August 29, 2015 14:11
Show Gist options
  • Save pjaspers/205cfcaee54b409145f1 to your computer and use it in GitHub Desktop.
Save pjaspers/205cfcaee54b409145f1 to your computer and use it in GitHub Desktop.
(defun pjaspers-emoji-me()
"Takes a word and show in a temporary buffer all emoji matching that"
(interactive)
(let* ((wildcard-name (read-string "Enter string to look for: "))
(all-known (ucs-names))
(buffer-name (format "*emoji-me-%s*" wildcard-name))
(results (remove-if-not (lambda(x) (let ((str (car x)))(string-match wildcard-name str))) all-known)))
(with-output-to-temp-buffer buffer-name
(print (mapconcat (function (lambda(x) (format "%s - %s" (car x) (char-to-string (cdr x))))) results "\n"))
(switch-to-buffer buffer-name))))
CAT FACE - 🐱
CAT FACE WITH WRY SMILE - 😼
GRINNING CAT FACE WITH SMILING EYES - 😸
POUTING CAT FACE - 😾
SMILING CAT FACE WITH OPEN MOUTH - 😺
CAT FACE WITH TEARS OF JOY - 😹
CRYING CAT FACE - 😿
KISSING CAT FACE WITH CLOSED EYES - 😽
SMILING CAT FACE WITH HEART-SHAPED EYES - 😻
WEARY CAT FACE - πŸ™€
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment