Giter Site home page Giter Site logo

emacs-emojify's Introduction

Emojify

https://img.shields.io/badge/version-v0.4-blue.svg https://melpa.org/packages/emojify-badge.svg http://stable.melpa.org/packages/emojify-badge.svg https://travis-ci.org/iqbalansari/emacs-emojify.svg?branch=master https://coveralls.io/repos/github/iqbalansari/emacs-emojify/badge.svg?branch=master http://img.shields.io/:license-gpl3-blue.svg https://img.shields.io/badge/PRs-welcome-brightgreen.svg

Table of contents

What is this?

Emojify is an Emacs extension to display emojis. It can display github style emojis like :smile: or plain ascii ones like :). It tries to be as efficient as possible, while also providing a lot of flexibility

What does it look like?

Here is how the commit log of this project looks with emojify mode enabled

screenshots/emojify-in-action.png?raw=true

If you prefer a GIF you can view one here.

Requirements

This package requires Emacs v24.3 and above. Emacs should be compiled with support for PNG images to display emojis as images. It is recommended that Emacs is compiled with ImageMagick support. emojify will use it to resize emojis if needed, additionally imagemagick is used to set background color for emojis to workaround the bug described in issue 7. However these are completely optional.

PNG support might require some additional steps to on Windows, you might find this stackoverflow answer helpful.

Installation

ELPA

emojify is available on MELPA and MELPA Stable. Please follow the instructions on MELPA website to enable it, if you haven’t already.

You can then install emojify from the package menu. Alternatively install it by doing the following

Refresh the package index

M-x package-refresh-contents RET

And then install it by doing

M-x package-install RET emojify

With use-package

(use-package emojify
  :hook (after-init . global-emojify-mode))

Usage

Displaying emojis

emojify-mode can be enabled/disabled separately for a buffer by using the command emojify-mode, to enable/disable it globally use the command global-emojify-mode.

To enable emojify-mode globally at startup add something like the following to your init file

(add-hook 'after-init-hook #'global-emojify-mode)

Emojify integrates with packages like prettify-symbol-mode and org-bullets-mode which display text differently, if the alternate text displayed by these packages match an emoji, emojify will display them too. See Displaying composed text as emojis for more details. Emojify can also display emojis in company-mode tooltips, see Displaying emojis in company mode tooltips for more details.

[EXPERIMENTAL] Emojify can be used for displaying emojis in the mode-line, to enable/disable it for individual buffers use the command emojify-mode-line-mode, to enable/disable it globally use the command global-emojify-mode-line-mode.

Searching emojis

The command emojify-apropos-emoji can be used to display emojis that match given regexp/apropos pattern. The results are displayed in a specialized buffer, where w or c can be used to copy emojis to the kill ring.

Inserting emojis

The command emojify-insert-emoji can be used to insert emojis interactively. While the command works with vanilla Emacs completion system, the experience would be better with something like Helm, Ivy, Icicles or Ido depending on you preference.

Describing emojis

The command emojify-describe-emoji-at-point can be used to view explanation about the command displayed at point. Additionally the command emojify-describe-emoji can be used to display description for an arbitrary emoji.

Listing all emojis

The command emojify-list-emojis can be used to view all the available emojis in a list form.

Customizations

Displaying composed text as emojis

Emacs provides a way to modify how some parts of buffer are displayed using the composition text property. prettify-symbol-mode and org-bullets-mode are some popular packages that use this feature to display certain text in the buffer differently.

If the alternate display matches an emoji then emojify will display those as emojis too. This is default behaviour. You can disable this behaviour by setting emojify-composed-text-p to nil.

Displaying emojis in company mode tooltips

Emojify can also display emojis that are part of company-mode’s completion tooltip (see company-emoji for an example of such tooltips). However this feature is turned off by default. To turn it on set emojify-company-tooltips-p to t.

Configuring the types of emojis displayed

Emojify by default displays plain text emojis (:)), unicode emojis (😄) and github style emojis :smile:. However this is customizable. You can do so by changing the value of emojify-emoji-styles using the customize interface. To change the value of the variable from Lisp using the function emojify-set-emoji-styles (or set it before loading emojify), call it with one parameter the list of styles that you want to be displayed. The possible styles are

  • ascii - Display only plain ascii emojis
  • unicode - Display only unicode emojis
  • github - Display only github style emojis

Configuring how emojis are displayed

By default emojis are displayed using images. However you can instruct emojify to display it using unicode characters or ascii characters. To do so customize the variable emojify-display-style.

You can set it one of the following values

  • image - Display emojis using images, obviously this requires the Emacs instance to support image
  • unicode - Display emojis using unicode characters, this might be a good option on platforms with good emoji fonts
  • ascii - This is simplest and does not require any external dependencies In this case emojify will display ascii equivalents of github style emojis.

Configuring the buffers where emojify mode is enabled

You can control the buffers where emojify is enabled using emojify-inhibit-major-modes and emojify-inhibit-in-buffer-functions.

Major modes where emojify-mode should be not be enabled

As the names suggests emojify-inhibit-major-modes is a list of major-modes where emojify should not be enabled.

Inhibiting emojify-mode using custom functions

emojify-inhibit-in-buffer-functions is a list of functions that emojify calls before enabling emojify-mode in a buffer. If any of the functions return a non-nil value emojify-mode is not enabled in the buffer. Users can add custom functions to this list if they wish to inhibit emojify in certain buffers. The functions are called with one argument the buffer where emojify-mode is about to be enabled.

Configuring the texts that are displayed as emojis

emojify offers two variables to inhibit the display of certain emojis.

Controlling the display of emojis in programming modes

If enabled in programming modes emojify by default will display only emojis in string and comments. This behaviour can be customized using the variable emojify-prog-contexts. The variable can be set to one of the following values

  • comments - Display emojis only in comments
  • string - Display emojis only in string
  • both - Display emojis in comments as well as string
  • none - Do not display emojis in programming modes

Inhibiting display of emojis using custom functions

emojify-inhibit-functions is a list of function emojify calls before displaying certain text as emoji, if any of the functions return a non-nil value the corresponding text is not displayed as emoji. Users can add custom functions to this list, if they inhibit display of emojis in under certain conditions. The functions are called with three arguments

  • text - The text that is about to be displayed as an emoji
  • beg - The beginning point of text in the buffer
  • end - The ending point of text in the buffer

These functions are called with the buffer where emoji is being displayed selected.

Customizing the behaviour when point enters an emoji

The behaviour when point enters an emoji can be customized using the variable emojify-point-entered-behaviour. It can have one of the following values

  • echo - Display the emojified text in the minibuffer
  • uncover - Temporarily display the underlying text while point is in the emojified text

Additionally it can be set to a custom function, the function is called with two parameters (the buffer where the emoji appears is selected while running the function)

  • beg - The beginning position of the text displayed as emoji
  • end - The ending position of the text displayed as emoji

The return value of the function is ignored.

Note: The custom function will be called for once for each character in an emoji as point moves through them. Avoid manipulating the buffer in these functions

Customizing the behaviour during isearch-mode

By default in isearch-mode the underlying emoji is displayed temporarily when point enters the emoji while searching (similar to uncover behaviour mentioned above). This can be disabled by setting emojify-reveal-on-isearch to nil.

Customizing the behaviour when mouse hovers over an emoji

When mouse hovers over a emoji, the underlying text is displayed in a help popup. This behaviour can be disabled by setting emojify-show-help to nil.

Custom emojis

You can specify custom emojis using the emojify-user-emojis variable. You need to set it to an alist where first element of cons is the text to be displayed as emoji, while the second element of the cons is an alist containing data about the emoji.

The inner alist should have atleast

  1. “name” - The name of the emoji
  2. “style” - This should be one of “github”, “ascii” or “github”

Additionally the alist should contain one of (see emojify-display-style)

  1. “unicode” - The replacement for the provided emoji for “unicode” display style
  2. “image” - The replacement for the provided emoji for “image” display style. This should be the absolute path to the image
  3. “ascii” - The replacement for the provided emoji for “ascii” display style

It is best to set this variable before you load emojify, in case you set this variable after loading emojify run the function emojify-set-emoji-data to recalculate emoji data.

User emojis take precedence over default emojis so the above mechanism can also be used to override the default emojis

Example

Below is an example of setting up custom emojis. Assuming that the custom images are at \~/.emacs.d/emojis/trollface.png and \~/.emacs.d/emojis/neckbeard.png, you instruct emojify to display :trollface: and :neckbeard: as :trollface: and :neckbeard:

(setq emojify-user-emojis '((":trollface:" . (("name" . "Troll Face")
                                              ("image" . "~/.emacs.d/emojis/trollface.png")
                                              ("style" . "github")))
                            (":neckbeard:" . (("name" . "Neckbeard")
                                              ("image" . "~/.emacs.d/emojis/neckbeard.png")
                                              ("style" . "github")))))

;; If emojify is already loaded refresh emoji data
(when (featurep 'emojify)
  (emojify-set-emoji-data))

Known issues

  • Emojis are not properly updated after customizing emojify-display-style or emojify-program-contexts. For time being you will be fine as long as you set these variables before emojify has loaded.
  • Some of the emojis prompted in the commands like emojify-insert-emoji might not be displayed by emojify, this might happen if you have newer emoji data but old set of images. Download the latest emoji image using emojify-download-emoji and set emojify-emoji-set to the downloaded set.

Contributing

Code as well as documentation contributions are welcome.

Cask is used to manage project dependencies so make sure you have it installed. To run the tests you need to install the dependencies by running the following

cask install

After the installation completes you can run the tests by running the following command

cask exec ert-runner

Thanks

Special thanks to @ryanprior for bug reports and valuable feedback on the issue tracker.

Credits

Emoji set designed and offered free by Emoji One.

Licence

EmojiOne images

The emoji images are distributed under Creative Commons License (CC-BY-SA).

OpenMoji images

All emojis designed by OpenMoji – the open-source emoji and icon project. License: CC BY-SA 4.0

Twemoji images

Copyright 2018 Twitter, Inc and other contributors Code licensed under the MIT License: http://opensource.org/licenses/MIT Graphics licensed under CC-BY 4.0: https://creativecommons.org/licenses/by/4.0/

Source code

The source code is distributed under GNU General Public License v3. See LICENSE.

emacs-emojify's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

emacs-emojify's Issues

multiple emoji in sequence

":100: 😄" is converted into two emojis, but ":100:😄" with no whitespace between is left untouched. Similarly, ":100:abcdef😄" is left untouched. The desired behavior should convert to emojis in all these cases.

Emoji not displayed in gnus article

With global-emojify-mode enabled, I do not see emoji displayed in gnus articles.
If I disable and then enable with article open I see emoji displayed

electric backspace

If you see an emoji, you don't necessarily know how many backspaces it'll take to delete it. Could be just one for a Unicode emoji or many for a github-style one. We can eliminate this uncertainty by advising delete to remove the whole emoji, regardless of how many literal characters it contains.

Incompatibility with Emacs 25?

Hi,

Is the dependence on seq-1.12 right? My emacs (25-master) refuses to install emojify with this message:

   Status: Incompatible because it depends on uninstallable packages.
   Archive: melpa

   Version: 20151214.938
   Summary: Display emojis in Emacs
   Requires: seq-1.12 (not available), ht-2.0, emacs-24.3
   Homepage: https://github.com/iqbalansari/emacs-emojify
   Keywords: multimedia convenience 

Not working in org-mode.

On Emacs 25.2.1, running on Arch Linux x86_64, I can't get emojis to display in org-mode.

Emojify works fine in message mode and Lisp Interaction (scratch). Listing the emojis also displays them. In org-mode, however, I'm only getting the unicode character. This is even after I try to enable/disable emojify-mode.

Strangely enough, org-bullet-mode, which I don't regularly use, also seems to work fine when enabled.

Update: after installing Symbola, some emoji's appear to be displaying in org-mode. I'm not sure why that's the case.

This is not a issue. It is a feature request and a thank you note

Hey guys thank you so much for such a awesome work and making world a better place 🎆 . You guys are great. I use this mode so much with my lovely OS emacs.

I was wondering if there is possibilities of adding ➕ some emojis that are specific to IT stuffs like git, google, amazon, servers, databases, emacs, router and so on ......

Show emoji in subject in mu4e headers buffer.

I'd like to see emoji that some companies are sending in the subject line of emails.

My quick fix now is to uninhibit emojify there, with

(with-eval-after-load "emojify"
  (delete 'mu4e-headers-mode emojify-inhibit-major-modes))

Then I make sure there's no emoji in the mu4e-headers-*-mark family.

I see there's an emojify-inhibit-functions used for org-mode lists and tags, but haven't researched further yet.

emojis are displaying too large

Using emacs 27.0.50 (though I remember being an issue since at least emacs 25), I get emojis that aren't scaled to the text size if they are images. No idea where the issue could be.

Here's an example image, note the emoji being wayy bigger than the text size:
ss

Reference to free variable

Hi,

I just installed this package from MELPA and added the hook as specified in your documentation. Upon restarting Emacs I get this warning:

Warning (bytecomp): reference to free variable ‘emojify-mode’

The package is working, though, so it is probably a minor issue.

Thanks for the great work.

Emojify company pseudo-buffers

Using company-emoji for completions in an emojified buffer should show emojis as they will appear, but right now the Unicode glyphs are displayed instead.

A general enough solution to #16 (comment) might be reused for this use purpose.

Resolution too low

On my hires display, and especially if I increase font size, the emojis are blurry. Is it possible to increase the resolution of the emojis?

EmojiOne or Twemoji both are blurry.

Interaction with prettify-symbols-mode

Hi @iqbalansari,

This package looks beautiful :) Do you think there would be a way to make it work with prettify-symbols-mode? I often use prettify-symbols-mode to shorten the display of common programming symbols, but of course typing the emoji directly wouldn't work (it wouldn't be proper syntax). Could emojify still work in that situation?

Here's an example of a prettify-symbols table that uses emoji:

(defvar python-prettify-symbols-alist
  '(("lambda" . )
    ("self" . ?自)
    ("yield" . ?⇢)
    ("return" . ?↪)
    ("try" . ?😱) ;; ⚠
    ("except" . ?⛐)
    ("raise" . ?💥)
    ("assert" . ?✓)
    ("<=" . ?≤)
    (">=" . ?≥)
    ("!=" . ?≠)
    ("or" . ?∨)
    ("and" . ?∧)
    ("None" . ?⊥)
    ("set()" . ?∅)
    ("not in" . ?∉)
    ("in" . ?∈)
    ("is not" . ?≢)
    ("is" . ?≡)))

Emojify messing with company-mode tooltips

Lately, with emojify globally enabled, company mode has stopped working sometimes when a tooltip needs to be displayed with the following error:

Company: An error occurred in post-command
Company: frontend company-pseudo-tooltip-unless-just-one-frontend error Wrong type argument: characterp, (cl -128 97 tl) on command post-command

Using the debugger shows me this:

Debugger entered--Lisp error: (wrong-type-argument characterp (cl -128 97 tl))
  char-to-string((cl -128 97 tl))
  mapcar(char-to-string [9 (cl -128 97 tl)])
  emojify--get-composed-text(98)
  emojify-display-emojis-in-region(1 377 nil)
  emojify-string(#("  }      accountRepository p \n         create            m \n  find(d find              m options?: FindManyOptions<Account>) {\n    retu findOne           m tory.find({ ...data, ...options });\n  }      login             m \n        \n  findOne(data: FindAccountDto, options?: FindOneOptions<Account>) {\n    return this.accountRepository.findOne(data, options);\n  }     \n        \n" 0 2 (fontified t face (default)) 2 3 (fontified t face (rainbow-delimiters-depth-2-face default)) 3 8 (face (default)) 8 9 (mouse-face (company-tooltip-mouse) face (company-tooltip-selection company-tooltip default)) 9 10 (prefix "" completion (:name #("accountRepository" 0 1 (file-location (:file "/home/pberganza/Documents/Personal/blog/nestjs-apollo-graphql-demo/api/src/accounts/accounts.service.ts" :line 19 :offset 10 :includeExternalModuleExports t :includeInsertTextCompletions t) completion #2 prefix "")) :kind "property" :kindModifiers "private" :sortText "0") file-location (:file "/home/pberganza/Documents/Personal/blog/nestjs-apollo-graphql-demo/api/src/accounts/accounts.service.ts" :line 19 :offset 10 :includeExternalModuleExports t :includeInsertTextCompletions t) mouse-face (company-tooltip-mouse) face (company-tooltip-selection company-tooltip default)) 10 27 (mouse-face (company-tooltip-mouse) face (company-tooltip-selection company-tooltip default)) 27 28 (mouse-face (company-tooltip-mouse) face (company-tooltip-annotation-selection company-tooltip-selection company-tooltip default)) 28 29 (mouse-face (company-tooltip-mouse) face (company-tooltip-selection company-tooltip default)) 29 38 (face (default)) 38 39 (mouse-face (company-tooltip-mouse) face (company-tooltip default)) 39 40 (prefix "" completion (:name #("create" 0 1 (file-location (:file "/home/pberganza/Documents/Personal/blog/nestjs-apollo-graphql-demo/api/src/accounts/accounts.service.ts" :line 19 :offset 10 :includeExternalModuleExports t :includeInsertTextCompletions t) completion #2 prefix "")) :kind "method" :kindModifiers "" :sortText "0") file-location (:file "/home/pberganza/Documents/Personal/blog/nestjs-apollo-graphql-demo/api/src/accounts/accounts.service.ts" :line 19 :offset 10 :includeExternalModuleExports t :includeInsertTextCompletions t) mouse-face (company-tooltip-mouse) face (company-tooltip default)) 40 57 (mouse-face (company-tooltip-mouse) face (company-tooltip default)) 57 58 (mouse-face (company-tooltip-mouse) face (company-tooltip-annotation company-tooltip default)) 58 59 (mouse-face (company-tooltip-mouse) face (company-tooltip default)) 59 60 (face (default)) 60 66 (fontified t face (default)) 66 67 (fontified t face (rainbow-delimiters-depth-2-face default)) 67 68 (fontified t face (default)) 68 69 (mouse-face (company-tooltip-mouse) face (company-tooltip default)) 69 70 (prefix "" completion (:name #("find" 0 1 (file-location (:file "/home/pberganza/Documents/Personal/blog/nestjs-apollo-graphql-demo/api/src/accounts/accounts.service.ts" :line 19 :offset 10 :includeExternalModuleExports t :includeInsertTextCompletions t) completion #2 prefix "")) :kind "method" :kindModifiers "" :sortText "0") file-location (:file "/home/pberganza/Documents/Personal/blog/nestjs-apollo-graphql-demo/api/src/accounts/accounts.service.ts" :line 19 :offset 10 :includeExternalModuleExports t :includeInsertTextCompletions t) mouse-face (company-tooltip-mouse) face (company-tooltip default)) 70 87 (mouse-face (company-tooltip-mouse) face (company-tooltip default)) 87 88 (mouse-face (company-tooltip-mouse) face (company-tooltip-annotation company-tooltip default)) 88 89 (mouse-face (company-tooltip-mouse) face (company-tooltip default)) 89 97 (fontified t face (default)) 97 98 (fontified t composition (2 1 [9 57708]) face (default)) 98 123 (fontified t face (default)) 123 124 (face (rainbow-delimiters-depth-2-face default) fontified t) 124 125 (fontified t face (default)) 125 126 (face (rainbow-delimiters-depth-2-face default) fontified t) 126 127 (face (default)) 127 131 (fontified t face (default)) 131 135 (fontified t face (font-lock-keyword-face default)) 135 136 (mouse-face (company-tooltip-mouse) face (company-tooltip default)) 136 137 (prefix "" completion (:name #("findOne" 0 1 (file-location (:file "/home/pberganza/Documents/Personal/blog/nestjs-apollo-graphql-demo/api/src/accounts/accounts.service.ts" :line 19 :offset 10 :includeExternalModuleExports t :includeInsertTextCompletions t) completion #2 prefix "")) :kind "method" :kindModifiers "" :sortText "0") file-location (:file "/home/pberganza/Documents/Personal/blog/nestjs-apollo-graphql-demo/api/src/accounts/accounts.service.ts" :line 19 :offset 10 :includeExternalModuleExports t :includeInsertTextCompletions t) mouse-face (company-tooltip-mouse) face (company-tooltip default)) 137 154 (mouse-face (company-tooltip-mouse) face (company-tooltip default)) 154 155 (mouse-face (company-tooltip-mouse) face (company-tooltip-annotation company-tooltip default)) 155 156 (mouse-face (company-tooltip-mouse) face (company-tooltip default)) 156 165 (fontified t face (default)) 165 166 (face (rainbow-delimiters-depth-3-face default) fontified t) 166 167 (face (rainbow-delimiters-depth-4-face default) fontified t) 167 168 (fontified t face (default)) 168 170 (fontified t composition (7 3 [9 57638]) face (default)) 170 171 (fontified t composition (7 3 [9 57638]) face (default)) 171 177 (fontified t face (default)) 177 179 (fontified t composition (7 3 [9 57638]) face (default)) 179 180 (fontified t composition (7 3 [9 57638]) face (default)) 180 188 (fontified t face (default)) 188 189 (face (rainbow-delimiters-depth-4-face default) fontified t) 189 190 (face (rainbow-delimiters-depth-3-face default) fontified t) 190 191 (fontified t face (default)) 191 192 (face (default)) 192 194 (fontified t face (default)) 194 195 (fontified t face (rainbow-delimiters-depth-2-face default)) 195 200 (face (default)) 200 201 (mouse-face (company-tooltip-mouse) face (company-tooltip default)) 201 202 (prefix "" completion (:name #("login" 0 1 (file-location (:file "/home/pberganza/Documents/Personal/blog/nestjs-apollo-graphql-demo/api/src/accounts/accounts.service.ts" :line 19 :offset 10 :includeExternalModuleExports t :includeInsertTextCompletions t) completion #2 prefix "")) :kind "method" :kindModifiers "" :sortText "0") file-location (:file "/home/pberganza/Documents/Personal/blog/nestjs-apollo-graphql-demo/api/src/accounts/accounts.service.ts" :line 19 :offset 10 :includeExternalModuleExports t :includeInsertTextCompletions t) mouse-face (company-tooltip-mouse) face (company-tooltip default)) 202 219 (mouse-face (company-tooltip-mouse) face (company-tooltip default)) 219 220 (mouse-face (company-tooltip-mouse) face (company-tooltip-annotation company-tooltip default)) 220 221 (mouse-face (company-tooltip-mouse) face (company-tooltip default)) 221 231 (face (default)) 231 239 (fontified t face (default)) 239 240 (fontified t face (default)) 240 241 (face (rainbow-delimiters-depth-2-face default) fontified t) 241 245 (fontified t face (default)) 245 246 (fontified t composition (2 1 [9 57708]) face (default)) 246 271 (fontified t face (default)) 271 272 (fontified t composition (2 1 [9 57708]) face (default)) 272 296 (fontified t face (default)) 296 297 (face (rainbow-delimiters-depth-2-face default) fontified t) 297 298 (fontified t face (default)) 298 299 (face (rainbow-delimiters-depth-2-face default) fontified t) 299 300 (face (default)) 300 304 (fontified t face (default)) 304 308 (fontified t face (font-lock-keyword-face default)) 308 310 (face (font-lock-keyword-face default) fontified t) 310 311 (fontified t face (default)) 311 315 (face (font-lock-keyword-face default) fontified t) 315 341 (fontified t face (default)) 341 342 (face (rainbow-delimiters-depth-3-face default) fontified t) 342 355 (fontified t face (default)) 355 356 (face (rainbow-delimiters-depth-3-face default) fontified t) 356 357 (fontified t face (default)) 357 358 (face (default)) 358 360 (fontified t face (default)) 360 361 (fontified t face (rainbow-delimiters-depth-2-face default)) 361 376 (face (default))) (unicode))
  ad-Advice-company-pseudo-tooltip-unhide(#f(compiled-function () #<bytecode 0x16e9f15>))
  apply(ad-Advice-company-pseudo-tooltip-unhide #f(compiled-function () #<bytecode 0x16e9f15>) nil)
  company-pseudo-tooltip-unhide()
  company-pseudo-tooltip-frontend(post-command)
  company-pseudo-tooltip-unless-just-one-frontend(post-command)
  company-call-frontends(post-command)
  company-post-command()
  company-idle-begin(#<buffer accounts.service.ts> #<window 3 on accounts.service.ts> 139 688)
  apply(company-idle-begin (#<buffer accounts.service.ts> #<window 3 on accounts.service.ts> 139 688))
  timer-event-handler([t 23808 24520 734308 nil company-idle-begin (#<buffer accounts.service.ts> #<window 3 on accounts.service.ts> 139 688) nil 553000])

Disabling emojify made everything work normally.

Question: easily filter whether to insert github or utf-8 emojis?

Hi, I love this but often find myself resorting to a web cheatsheet still 😕 I'm using ido-mode for autocompletion. The list gets slow in the popup, do you have a suggestion for an an easy way to filter out a full list of github emoji only (for commits) and utf-8 (for text)?

Slow performance when used with global-visual-line-mode or truncate-lines

I'm experiencing slow performance when using this package with global-visual-line-mode or truncate-lines. The longer the line and the more lines it has to be split into, the slower it gets. There is no drop in performance if there are no emojis on the line. I've tested this on both Windows with emax64-20171130 and on Manjaro Linux using Emacs 25.3. There is less slowdown on Linux, but I think that's just because it's much faster in general 😄

custom emoji set location

Love this package by the way.

I noticed that recently I got prompted to download the emoji set and they were placed in ~/.emacs.d/emojis, but I don't want this there. I actually put all package-related data in ~/.emacs.d/cache for example. It'd be nice if we could set a path in which the emojis folder should be placed, like all other packages do.

Thanks!

Broken layout in Org Agenda (C-a a)

The problem here is that, e.g., :thisemoji: emacs understand as 11 char length and not 1 as it should understand. I guess other tools that relies on char width become broken with emojify-mode as well. I'm not sure if it is possible to fix it, but...

a1

Please add a prefix to test-helper.el to avoid conflicts with 68 other packages

There exist at least 69 packages that contain a file named test-helper.el that also provides the feature test-helper.

This leads to issues for users who have at least two of these packages installed. It is unlikely that such a user would be able to run the tests of all of those packages. If the primary test file of one of those packages does (require 'test-helper), then it is undefined which of the various test-helper.el files gets loaded. Which it is, depends on the order of the load-path.

To avoid this conflicts, you should rename your test-helper.el to <your-package>-test-helper.el and adjust the feature accordingly.

Also don't forget to update the require form in your primary test file and/or update references to the library/feature elsewhere. Also, if your primary test file is named something like test.el, then please consider renaming that too (same for any other utility elisp files your repositoroy may contain).

Thanks!

PS: This issue is a bit generic because I had to open 69 issues.

Babel block

Love this! Thanks for your work!

Is there any way to make emojis display in org-babel and other org-blocks?

Slow performance on Emacs 26.1 RC on Windows10

Hi, because Emacs 26.1 is very close to release I installed it on my computer.
I installed GNU Emacs 26.1 (build 1, x86_64-w64-mingw32) of 2018-05-13 from https://github.com/m-parashar/emax64

Now I have significant performance issues when emojis are in buffer.
When I edit line containing emoji I have:

- redisplay_internal (C function)                                 172  94%
 - jit-lock-function                                              172  94%
  - jit-lock-fontify-now                                          172  94%
   - jit-lock--run-functions                                      172  94%
    - run-hook-wrapped                                            172  94%
     - #<compiled 0x1d054a1>                                      172  94%
      - emojify-redisplay-emojis-in-region                        172  94%
       - emojify-display-emojis-in-region                         172  94%
        - seq-do                                                  172  94%
         - mapc                                                   172  94%
          - #<compiled 0x2061c71>                                 172  94%
           - emojify--propertize-text-for-emoji                   172  94%
            - emojify--get-text-display-props                     172  94%
               emojify--get-image-display                         172  94%
+ command-execute                                                   6   3%
- ...                                                               4   2%
   Automatic GC                                                     4   2%

emojify-insert-emoji has also performance drop.

When I edit buffer that does not have any emoji there is no problem:

+ command-execute                                                 141  85%
+ ...                                                              14   8%
- redisplay_internal (C function)                                   5   3%
 - eval                                                             5   3%
  - spaceline-ml-main                                               5   3%
   + powerline-raw                                                  2   1%
   + format-mode-line                                               2   1%
   + powerline-render                                               1   0%
+ timer-event-handler                                               3   1%
  mouse-fixup-help-message                                          1   0%

Additional gathered info:

  • Problem exists only on Windows. I tried Emacs 26.1 on macOS (from brew install emacs --devel) - it works smooth as it should.
  • Problem does not occur when I set (setq emojify-display-style 'unicode) - however Windows does not have color emoji support so it sucks..
  • Problem does not occur on Emacs 25.

emojify fails in eshell buffer

I was running a node thing inside an eshell buffer and when some emojis showed up I got this error:

background-color-at-point: Wrong type argument: listp, (foreground-color . "#8FA1B3")
Error in post-command-hook (emojify-update-visible-emojis-background-after-command): (wrong-type-argument listp (foreground-color . "#8FA1B3"))
set-transient-map PCH: (wrong-type-argument listp (foreground-color . "#8FA1B3")) [3 times]

Here is the backtrace:

Debugger entered--Lisp error: (wrong-type-argument listp (foreground-color . "#8FA1B3"))
  faces--attribute-at-point(:background background-color)
  background-color-at-point()
  (save-excursion (goto-char beg) (background-color-at-point))
  (or (emojify--region-background-maybe beg end) (save-excursion (goto-char beg) (background-color-at-point)))
  emojify--get-image-background(3758327 3758328)
  (plist-put (cdr (get-text-property emoji-start 'display)) :background (emojify--get-image-background emoji-start emoji-end))
  (let ((emoji-end (+ emoji-start (length (get-text-property emoji-start 'emojify-text))))) (plist-put (cdr (get-text-property emoji-start 'display)) :background (emojify--get-image-background emoji-start emoji-end)) (setq --emojify-loop-current-pos emoji-end))
  (while (and (> --emojify-loop-end --emojify-loop-current-pos) (setq emoji-start (text-property-any --emojify-loop-current-pos --emojify-loop-end 'emojified t))) (let ((emoji-end (+ emoji-start (length (get-text-property emoji-start 'emojify-text))))) (plist-put (cdr (get-text-property emoji-start 'display)) :background (emojify--get-image-background emoji-start emoji-end)) (setq --emojify-loop-current-pos emoji-end)))
  (let ((--emojify-loop-current-pos beg) (--emojify-loop-end end) emoji-start) (while (and (> --emojify-loop-end --emojify-loop-current-pos) (setq emoji-start (text-property-any --emojify-loop-current-pos --emojify-loop-end 'emojified t))) (let ((emoji-end (+ emoji-start (length (get-text-property emoji-start 'emojify-text))))) (plist-put (cdr (get-text-property emoji-start 'display)) :background (emojify--get-image-background emoji-start emoji-end)) (setq --emojify-loop-current-pos emoji-end))))
  (save-restriction (widen) (let ((--emojify-loop-current-pos beg) (--emojify-loop-end end) emoji-start) (while (and (> --emojify-loop-end --emojify-loop-current-pos) (setq emoji-start (text-property-any --emojify-loop-current-pos --emojify-loop-end 'emojified t))) (let ((emoji-end (+ emoji-start (length (get-text-property emoji-start 'emojify-text))))) (plist-put (cdr (get-text-property emoji-start 'display)) :background (emojify--get-image-background emoji-start emoji-end)) (setq --emojify-loop-current-pos emoji-end)))))
  (save-excursion (save-restriction (widen) (let ((--emojify-loop-current-pos beg) (--emojify-loop-end end) emoji-start) (while (and (> --emojify-loop-end --emojify-loop-current-pos) (setq emoji-start (text-property-any --emojify-loop-current-pos --emojify-loop-end 'emojified t))) (let ((emoji-end (+ emoji-start (length (get-text-property emoji-start 'emojify-text))))) (plist-put (cdr (get-text-property emoji-start ...)) :background (emojify--get-image-background emoji-start emoji-end)) (setq --emojify-loop-current-pos emoji-end))))))
  (progn (save-excursion (save-restriction (widen) (let ((--emojify-loop-current-pos beg) (--emojify-loop-end end) emoji-start) (while (and (> --emojify-loop-end --emojify-loop-current-pos) (setq emoji-start (text-property-any --emojify-loop-current-pos --emojify-loop-end 'emojified t))) (let ((emoji-end (+ emoji-start (length (get-text-property emoji-start 'emojify-text))))) (plist-put (cdr ...) :background (emojify--get-image-background emoji-start emoji-end)) (setq --emojify-loop-current-pos emoji-end)))))))
  (unwind-protect (progn (save-excursion (save-restriction (widen) (let ((--emojify-loop-current-pos beg) (--emojify-loop-end end) emoji-start) (while (and (> --emojify-loop-end --emojify-loop-current-pos) (setq emoji-start (text-property-any --emojify-loop-current-pos --emojify-loop-end 'emojified t))) (let ((emoji-end (+ emoji-start (length (get-text-property emoji-start 'emojify-text))))) (plist-put ... :background ...) (setq --emojify-loop-current-pos emoji-end))))))) (set-match-data save-match-data-internal 'evaporate))
  (let ((save-match-data-internal (match-data))) (unwind-protect (progn (save-excursion (save-restriction (widen) (let ((--emojify-loop-current-pos beg) (--emojify-loop-end end) emoji-start) (while (and (> --emojify-loop-end --emojify-loop-current-pos) (setq emoji-start (text-property-any --emojify-loop-current-pos --emojify-loop-end 'emojified t))) (let ((emoji-end (+ emoji-start (length (get-text-property emoji-start 'emojify-text))))) (plist-put (cdr (get-text-property emoji-start 'display)) :background (emojify--get-image-background emoji-start emoji-end)) (setq --emojify-loop-current-pos emoji-end))))))) (set-match-data save-match-data-internal 'evaporate)))
  (progn (let ((save-match-data-internal (match-data))) (unwind-protect (progn (save-excursion (save-restriction (widen) (let ((--emojify-loop-current-pos beg) (--emojify-loop-end end) emoji-start) (while ... ...))))) (set-match-data save-match-data-internal 'evaporate))))
  (unwind-protect (progn (let ((save-match-data-internal (match-data))) (unwind-protect (progn (save-excursion (save-restriction (widen) (let ((--emojify-loop-current-pos beg) (--emojify-loop-end end) emoji-start) ...)))) (set-match-data save-match-data-internal 'evaporate)))) (if modified nil (restore-buffer-modified-p nil)))
  (let* ((modified (buffer-modified-p)) (buffer-undo-list t) (inhibit-read-only t) (inhibit-modification-hooks t)) (unwind-protect (progn (let ((save-match-data-internal (match-data))) (unwind-protect (progn (save-excursion (save-restriction ... ...))) (set-match-data save-match-data-internal 'evaporate)))) (if modified nil (restore-buffer-modified-p nil))))
  (let ((inhibit-point-motion-hooks t) (emojify-current-point (point)) (emojify-region-beg (if (region-active-p) (progn (region-beginning)))) (emojify-region-end (if (region-active-p) (progn (region-end))))) (let* ((modified (buffer-modified-p)) (buffer-undo-list t) (inhibit-read-only t) (inhibit-modification-hooks t)) (unwind-protect (progn (let ((save-match-data-internal (match-data))) (unwind-protect (progn (save-excursion ...)) (set-match-data save-match-data-internal 'evaporate)))) (if modified nil (restore-buffer-modified-p nil)))))
  (progn (let ((inhibit-point-motion-hooks t) (emojify-current-point (point)) (emojify-region-beg (if (region-active-p) (progn (region-beginning)))) (emojify-region-end (if (region-active-p) (progn (region-end))))) (let* ((modified (buffer-modified-p)) (buffer-undo-list t) (inhibit-read-only t) (inhibit-modification-hooks t)) (unwind-protect (progn (let ((save-match-data-internal ...)) (unwind-protect (progn ...) (set-match-data save-match-data-internal ...)))) (if modified nil (restore-buffer-modified-p nil))))))
  (if (equal emojify-display-style 'image) (progn (let ((inhibit-point-motion-hooks t) (emojify-current-point (point)) (emojify-region-beg (if (region-active-p) (progn (region-beginning)))) (emojify-region-end (if (region-active-p) (progn (region-end))))) (let* ((modified (buffer-modified-p)) (buffer-undo-list t) (inhibit-read-only t) (inhibit-modification-hooks t)) (unwind-protect (progn (let (...) (unwind-protect ... ...))) (if modified nil (restore-buffer-modified-p nil)))))))
  emojify--update-emojis-background-in-region(3749309 3758556)
  (let* ((region-beginning point) (region-end (min (+ region-beginning (* (frame-height) (frame-width))) (point-max)))) (emojify--update-emojis-background-in-region region-beginning region-end))
  emojify--update-emojis-background-in-region-starting-at(3749309)
  emojify-update-visible-emojis-background-after-window-scroll(#<window 18 on Aweshell: ~/code/kue/fero/dev/> 3749309)
  redisplay_internal\ \(C\ function\)()
  redisplay()
  sit-for(0.15)
  golden-ratio-scroll-highlight(3749343 3749415 0.15)
  golden-ratio-scroll-screen-up()
  funcall-interactively(golden-ratio-scroll-screen-up)
  call-interactively(golden-ratio-scroll-screen-up nil nil)
  command-execute(golden-ratio-scroll-screen-up)

and this is what was shown in the buffer right after the error:

bildo

Modifying `emojify-emojis-dir` during runtime leads to infinite loops

Hey!

When modifying emojify-emojis-dir during runtime (after package is loaded), the emojis are downloaded in one place and searched in another place (emojify-image-dir). The other place should be relative to the "running" value of emojify-emojis-dir, otherwise the downloaded emojis are not found (and download is proposed again).

Apropos Emoji Buffer: Separate Bindings for Copying as Unicode and GitHub

Hi,

First off thanks for this great package.

When in an Apropos Emoji buffer there are (usually) duplicate copies of each emoji: 1 for GitHub and 1 for the actual character. One can also press c or w to copy the emoji at point.

Why not show the emojis once, and let the binding dictate what to copy? If one presses c copy char, if w copy as GitHub?

emojify-mode can prevent user from fast-typing any text into Emacs

With emojify-mode, typing 2 letters on the keyboard (for example "as") very fast, almost at once, where both keys are pushed down, results in Emacs inserting only the first letter ("a") and then beeping the bell and showing "Quit" in the echo area. (It's as if you pressed the letter "a" and then pressed C-g, where in every other situation it would have simply been accepted as "a" and "s" keystrokes)

It's a very cool package but I had to disable it because it wouldn't let me type (or rather, type fast).

Using Emacs 26.1 build 1 on Windows

Emojis in mode-line

First of all, thanks for this great package.
I'm fairly new to Emacs and trying to introduce emoticons to my spaceline on Linux.
Icon support via spaceline-all-the-icons.el is no problem and works flawlessly.
At the risk of wasting your time by asking a newbie question, is there a way to make emoticons available in mode-line?

global-emojify-mode-line-mode and nyan-mode

I'm using global-emojify-mode-line-mode and nyan-mode. Whenever I scroll the buffer down enough, a winking face emoji appears out of nowhere

Screenshot from 2019-04-16 15-59-13

It disappears if I scroll the buffer up

Any idea what is going on?

From my .emacs

(use-package emojify
  :ensure t
  :init
  (global-emojify-mode)
  :config
  (setq emojify-emoji-set "twemoji-v12")
  (progn
    (add-hook 'after-init-hook 'global-emojify-mode-line-mode)))

This is Emacs 26.2. The same issue was present also in 26.1

emoji background doesn't change with faces

Perhaps we can use transparent images or regenerate with backgrounds for different faces.

emojify
^shows the problem: the blue portion is highlighted because the text is selected, the light gray portion because it's the current line.

Support messages and echo area.

I would like to be able to display emojis in echo area messages. That is, I want to be able to call (message "<emoji>") and have it display correctly.

I've tested global-emojify-mode and global-emojify-mode-line-mode. Emojis don't display. I've also tried emojify-message but it looks like that does something else.

Integrate with org-bullets-mode

I use emoji for my org bullets, using org-bullets to customise them. When I look at the config with global emojify mode on I see that the emoji are correctly appearing. My config is:

(setq org-bullets-bullet-list '("🍣" "🐸" "🐳" "🐻" "◉" "○" "✸" "✿"))

When I look at an org-mode file I see the bullets appearing as boxes, i.e. emojify is not changing the characters to images. I assume this is caused by something about the way that org-bullets-mode works. It looks like it uses compose-region from composite.el. Is this the same thing as the composition property you mentioned in #16? I tried updating to latest in MELPA and setting (emojify-set-emoji-style '(prettify-symbol ascii unicode github)) but it didn't help.

Let me know if you have any ideas! Thanks for this great project!

apropos-emoji

It would be nice to offer an apropos-emoji command to help people find their favorites.

Dosen't Work With Lists

Here's my Emacs version:

GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.11) of 2017-09-12 on hullmann, modified by Debian

Here's my font:

(set-frame-font "Ubuntu Mono 14" nil t)

I'm using emojify in org mode. When I use it in a list the emoji aren't show as emoji.

For example, this works:

:P this is cool :)

But this does not

- :P this is cool :)

Neither does this:

1. :P this is cool :)

Thank you!

How to Use Ido with `emojify-completing-read`?

The documentation of emojify-completing-read note being able to use Ido (or Helm, etc.) with the function yet the function has hard-coded using completing-read; how would one go about use any of the other completion methods with the emojify-completing-read function?

Emojify source code

Some languages such as Javascript, Swift, PHP and Java allow Unicode emoji outside of comments and strings. You might see code like this:

for(💜 in 💕) { 🎵(💜); }

Those should be emojified. We could fix this by making emojify-prog-contexts restrictions apply only to ASCII- and github-style emojis.

emojify-program-contexts overwritten by emojify-prog-contexts?

When I (setq emojify-program-contexts '(comments)) before emojify loads, it still is given the default value. I think the way it's set up, the obsolete variable prog-contexts' :set behavior ends up overwriting the new variable when it's first set.

I resolved it by putting the setq after the package loads, but it did take me a long while to realize that the variable was incorrect the whole time so perhaps you can fix it to save others the trouble. Maybe move the :set behavior to the new variable? That way since I setq the new variable, the old variable's wont have a :set behavior which overwrites it.

(defcustom emojify-prog-contexts
  'both
  "Contexts where emojis can be displayed in programming modes.

Possible values are
`comments' - Display emojis only in comments
`string'   - Display emojis only in strings
`both'     - Display emojis in comments and strings
`none'     - Do not display emojis in programming modes"
  :type '(radio :tag "Contexts where emojis should be displayed in programming modes"
                (const :tag "Only in comments" comments)
                (const :tag "Only in string" string)
                (const :tag "Both in comments and string" both)
                (const :tag "Do not display emojis in programming modes" none))
  :set (lambda (_ value)
         (setq emojify-program-contexts (pcase value
                                          (`comments '(comments))
                                          (`string '(string))
                                          (`both '(comments string code))
                                          (`none '()))))
  :group 'emojify)

So if I understand correctly, I setq the new variable, but when the old variable initializes it triggers its :set behavior (or does it not?), which ends up setq'ing the new variable with the default settings ('both).

Failure to download emoji

After installing on emacs 26, if I issue M-x emojify-mode and get the following on the minibuffer:

[emojify] Emoji images not available should I download them now?(yes or no) yes
Connecting to github.com:443...
Wrong type argument: stringp, nil

The destination files seem to exist, but it won't download. Any ideas?

:+1: does not show up as a valid emoji

:+1: does not turn into a :thumbsup: emoji, despite :thumbsup: working just fine.

Since people use :+1: all over the place, it would be nice to have them automatically coverted to :thumbsup: as well as the opposite (:-1: to :thumbsdown:)

On github this works fine =)
+1 -> 👍
thumbsup -> 👍

Programming modes?

This looks great! And it looks great in text-mode.

I've seen the setting to enable emoji in comments and strings in programming modes; could there be a setting to enable it in programming modes outside of comments and strings, too?

Use native emoji when available

Windows, Android, OSX and iOS all ship with native rendering for Unicode emoji. Support on GNU/Linux is coming.

When native glyphs are available, the default behavior should display emoji as Unicode. We could implement this by providing an auto setting for emojify-display-style that mimics image or unicode based on whether the platform renders native emoji.

Switch to twemoji?

Since emojione changed their license last year everyone (include emojify) are stuck with version 2.2.6. However, twitter have an alternative under CC-BY 4.0 license that continues to be updated called twemoji.

Maybe emojify should switch to using that?

"lisp nesting exceeds maximum depth" when emojify-companytooltips-p non-nil

looks like I am getting some kind of loop with the advice being added to company-pseudo-tooltip-unhide. When I load company and emojify mode I get the following error. I'm not very good at backtraces but I'm hoping you can read them!

  ad-substitute-tree(#f(compiled-function (form) #<bytecode 0x108ba55>) #f(compiled-function (form) #<bytecode 0x2224b71>) nil)
  ad-substitute-tree(#f(compiled-function (form) #<bytecode 0x108ba55>) #f(compiled-function (form) #<bytecode 0x2224b71>) (display))
  ad-substitute-tree(#f(compiled-function (form) #<bytecode 0x108ba55>) #f(compiled-function (form) #<bytecode 0x2224b71>) 'display)
  ad-substitute-tree(#f(compiled-function (form) #<bytecode 0x108ba55>) #f(compiled-function (form) #<bytecode 0x2224b71>) ('display))
  ad-substitute-tree(#f(compiled-function (form) #<bytecode 0x108ba55>) #f(compiled-function (form) #<bytecode 0x2224b71>) (ov 'display))
  ad-substitute-tree(#f(compiled-function (form) #<bytecode 0x108ba55>) #f(compiled-function (form) #<bytecode 0x2224b71>) (overlay-get ov 'display))
  ad-substitute-tree(#f(compiled-function (form) #<bytecode 0x108ba55>) #f(compiled-function (form) #<bytecode 0x2224b71>) ((overlay-get ov 'display) (overlay-get ov 'after-string)))
  ad-substitute-tree(#f(compiled-function (form) #<bytecode 0x108ba55>) #f(compiled-function (form) #<bytecode 0x2224b71>) (or (overlay-get ov 'display) (overlay-get ov 'after-string)))
  ad-substitute-tree(#f(compiled-function (form) #<bytecode 0x108ba55>) #f(compiled-function (form) #<bytecode 0x2224b71>) ((or (overlay-get ov 'display) (overlay-get ov 'after-string))))
  ad-substitute-tree(#f(compiled-function (form) #<bytecode 0x108ba55>) #f(compiled-function (form) #<bytecode 0x2224b71>) (disp (or (overlay-get ov 'display) (overlay-get ov 'after-string))))
  ad-substitute-tree(#f(compiled-function (form) #<bytecode 0x108ba55>) #f(compiled-function (form) #<bytecode 0x2224b71>) ((disp (or (overlay-get ov 'display) (overlay-get ov 'after-string))) (emojified-display (when disp (emojify-string disp))) (emojified-p (when emojified-display (text-property-any 0 (1- (length emojified-display)) 'emojified t emojified-display)))))
  ad-substitute-tree(#f(compiled-function (form) #<bytecode 0x108ba55>) #f(compiled-function (form) #<bytecode 0x2224b71>) ((ov company-pseudo-tooltip-overlay) (disp (or (overlay-get ov 'display) (overlay-get ov 'after-string))) (emojified-display (when disp (emojify-string disp))) (emojified-p (when emojified-display (text-property-any 0 (1- (length emojified-display)) 'emojified t emojified-display)))))
  ad-substitute-tree(#f(compiled-function (form) #<bytecode 0x108ba55>) #f(compiled-function (form) #<bytecode 0x2224b71>) (((ov company-pseudo-tooltip-overlay) (disp (or (overlay-get ov 'display) (overlay-get ov 'after-string))) (emojified-display (when disp (emojify-string disp))) (emojified-p (when emojified-display (text-property-any 0 (1- (length emojified-display)) 'emojified t emojified-display)))) (when (and disp emojified-p) (overlay-put ov 'after-string nil) (overlay-put ov 'display (propertize " " 'invisible t)) (overlay-put ov 'after-string emojified-display))))
  ad-substitute-tree(#f(compiled-function (form) #<bytecode 0x108ba55>) #f(compiled-function (form) #<bytecode 0x2224b71>) (let* ((ov company-pseudo-tooltip-overlay) (disp (or (overlay-get ov 'display) (overlay-get ov 'after-string))) (emojified-display (when disp (emojify-string disp))) (emojified-p (when emojified-display (text-property-any 0 (1- (length emojified-display)) 'emojified t emojified-display)))) (when (and disp emojified-p) (overlay-put ov 'after-string nil) (overlay-put ov 'display (propertize " " 'invisible t)) (overlay-put ov 'after-string emojified-display))))
  ad-substitute-tree(#f(compiled-function (form) #<bytecode 0x108ba55>) #f(compiled-function (form) #<bytecode 0x2224b71>) ((let* ((ov company-pseudo-tooltip-overlay) (disp (or (overlay-get ov 'display) (overlay-get ov 'after-string))) (emojified-display (when disp (emojify-string disp))) (emojified-p (when emojified-display (text-property-any 0 (1- ...) 'emojified t emojified-display)))) (when (and disp emojified-p) (overlay-put ov 'after-string nil) (overlay-put ov 'display (propertize " " 'invisible t)) (overlay-put ov 'after-string emojified-display)))))
  ad-substitute-tree(#f(compiled-function (form) #<bytecode 0x108ba55>) #f(compiled-function (form) #<bytecode 0x2224b71>) ((and emojify-mode emojify-company-tooltips-p (overlayp (bound-and-true-p company-pseudo-tooltip-overlay))) (let* ((ov company-pseudo-tooltip-overlay) (disp (or (overlay-get ov 'display) (overlay-get ov 'after-string))) (emojified-display (when disp (emojify-string disp))) (emojified-p (when emojified-display (text-property-any 0 (1- ...) 'emojified t emojified-display)))) (when (and disp emojified-p) (overlay-put ov 'after-string nil) (overlay-put ov 'display (propertize " " 'invisible t)) (overlay-put ov 'after-string emojified-display)))))
  ad-substitute-tree(#f(compiled-function (form) #<bytecode 0x108ba55>) #f(compiled-function (form) #<bytecode 0x2224b71>) (when (and emojify-mode emojify-company-tooltips-p (overlayp (bound-and-true-p company-pseudo-tooltip-overlay))) (let* ((ov company-pseudo-tooltip-overlay) (disp (or (overlay-get ov 'display) (overlay-get ov 'after-string))) (emojified-display (when disp (emojify-string disp))) (emojified-p (when emojified-display (text-property-any 0 (1- ...) 'emojified t emojified-display)))) (when (and disp emojified-p) (overlay-put ov 'after-string nil) (overlay-put ov 'display (propertize " " 'invisible t)) (overlay-put ov 'after-string emojified-display)))))
  ad-substitute-tree(#f(compiled-function (form) #<bytecode 0x108ba55>) #f(compiled-function (form) #<bytecode 0x2224b71>) ((when (and emojify-mode emojify-company-tooltips-p (overlayp (bound-and-true-p company-pseudo-tooltip-overlay))) (let* ((ov company-pseudo-tooltip-overlay) (disp (or (overlay-get ov ...) (overlay-get ov ...))) (emojified-display (when disp (emojify-string disp))) (emojified-p (when emojified-display (text-property-any 0 ... ... t emojified-display)))) (when (and disp emojified-p) (overlay-put ov 'after-string nil) (overlay-put ov 'display (propertize " " 'invisible t)) (overlay-put ov 'after-string emojified-display)))) ad-return-value))
  ad-substitute-tree(#f(compiled-function (form) #<bytecode 0x108ba55>) #f(compiled-function (form) #<bytecode 0x2224b71>) ((setq ad-return-value (with-no-warnings (funcall ad--addoit-function))) (when (and emojify-mode emojify-company-tooltips-p (overlayp (bound-and-true-p company-pseudo-tooltip-overlay))) (let* ((ov company-pseudo-tooltip-overlay) (disp (or (overlay-get ov ...) (overlay-get ov ...))) (emojified-display (when disp (emojify-string disp))) (emojified-p (when emojified-display (text-property-any 0 ... ... t emojified-display)))) (when (and disp emojified-p) (overlay-put ov 'after-string nil) (overlay-put ov 'display (propertize " " 'invisible t)) (overlay-put ov 'after-string emojified-display)))) ad-return-value))
  ad-substitute-tree(#f(compiled-function (form) #<bytecode 0x108ba55>) #f(compiled-function (form) #<bytecode 0x2224b71>) ((ad-return-value) (setq ad-return-value (with-no-warnings (funcall ad--addoit-function))) (when (and emojify-mode emojify-company-tooltips-p (overlayp (bound-and-true-p company-pseudo-tooltip-overlay))) (let* ((ov company-pseudo-tooltip-overlay) (disp (or (overlay-get ov ...) (overlay-get ov ...))) (emojified-display (when disp (emojify-string disp))) (emojified-p (when emojified-display (text-property-any 0 ... ... t emojified-display)))) (when (and disp emojified-p) (overlay-put ov 'after-string nil) (overlay-put ov 'display (propertize " " 'invisible t)) (overlay-put ov 'after-string emojified-display)))) ad-return-value))
  ad-substitute-tree(#f(compiled-function (form) #<bytecode 0x108ba55>) #f(compiled-function (form) #<bytecode 0x2224b71>) (let (ad-return-value) (setq ad-return-value (with-no-warnings (funcall ad--addoit-function))) (when (and emojify-mode emojify-company-tooltips-p (overlayp (bound-and-true-p company-pseudo-tooltip-overlay))) (let* ((ov company-pseudo-tooltip-overlay) (disp (or (overlay-get ov ...) (overlay-get ov ...))) (emojified-display (when disp (emojify-string disp))) (emojified-p (when emojified-display (text-property-any 0 ... ... t emojified-display)))) (when (and disp emojified-p) (overlay-put ov 'after-string nil) (overlay-put ov 'display (propertize " " 'invisible t)) (overlay-put ov 'after-string emojified-display)))) ad-return-value))
  ad-substitute-tree(#f(compiled-function (form) #<bytecode 0x108ba55>) #f(compiled-function (form) #<bytecode 0x2224b71>) ((let (ad-return-value) (setq ad-return-value (with-no-warnings (funcall ad--addoit-function))) (when (and emojify-mode emojify-company-tooltips-p (overlayp (bound-and-true-p company-pseudo-tooltip-overlay))) (let* ((ov company-pseudo-tooltip-overlay) (disp (or ... ...)) (emojified-display (when disp ...)) (emojified-p (when emojified-display ...))) (when (and disp emojified-p) (overlay-put ov 'after-string nil) (overlay-put ov 'display (propertize " " ... t)) (overlay-put ov 'after-string emojified-display)))) ad-return-value)))
  ad-substitute-tree(#f(compiled-function (form) #<bytecode 0x108ba55>) #f(compiled-function (form) #<bytecode 0x2224b71>) ((ad--addoit-function &rest ignored) (let (ad-return-value) (setq ad-return-value (with-no-warnings (funcall ad--addoit-function))) (when (and emojify-mode emojify-company-tooltips-p (overlayp (bound-and-true-p company-pseudo-tooltip-overlay))) (let* ((ov company-pseudo-tooltip-overlay) (disp (or ... ...)) (emojified-display (when disp ...)) (emojified-p (when emojified-display ...))) (when (and disp emojified-p) (overlay-put ov 'after-string nil) (overlay-put ov 'display (propertize " " ... t)) (overlay-put ov 'after-string emojified-display)))) ad-return-value)))
  ad-substitute-tree(#f(compiled-function (form) #<bytecode 0x108ba55>) #f(compiled-function (form) #<bytecode 0x2224b71>) (lambda (ad--addoit-function &rest ignored) (let (ad-return-value) (setq ad-return-value (with-no-warnings (funcall ad--addoit-function))) (when (and emojify-mode emojify-company-tooltips-p (overlayp (bound-and-true-p company-pseudo-tooltip-overlay))) (let* ((ov company-pseudo-tooltip-overlay) (disp (or ... ...)) (emojified-display (when disp ...)) (emojified-p (when emojified-display ...))) (when (and disp emojified-p) (overlay-put ov 'after-string nil) (overlay-put ov 'display (propertize " " ... t)) (overlay-put ov 'after-string emojified-display)))) ad-return-value)))
  ad-insert-argument-access-forms((lambda (ad--addoit-function &rest ignored) (let (ad-return-value) (setq ad-return-value (with-no-warnings (funcall ad--addoit-function))) (when (and emojify-mode emojify-company-tooltips-p (overlayp (bound-and-true-p company-pseudo-tooltip-overlay))) (let* ((ov company-pseudo-tooltip-overlay) (disp (or ... ...)) (emojified-display (when disp ...)) (emojified-p (when emojified-display ...))) (when (and disp emojified-p) (overlay-put ov 'after-string nil) (overlay-put ov 'display (propertize " " ... t)) (overlay-put ov 'after-string emojified-display)))) ad-return-value)) (&rest ignored))
  ad-assemble-advised-definition((&rest ignored) nil nil (funcall ad--addoit-function) nil nil ((emojify-display-emojis-in-company-tooltip nil t (advice lambda (&rest ignored) "Advice to display emojis in company mode tooltips...." (when (and emojify-mode emojify-company-tooltips-p (overlayp (bound-and-true-p company-pseudo-tooltip-overlay))) (let* ((ov company-pseudo-tooltip-overlay) (disp ...) (emojified-display ...) (emojified-p ...)) (when (and disp emojified-p) (overlay-put ov ... nil) (overlay-put ov ... ...) (overlay-put ov ... emojified-display))))))))
  ad-make-advised-definition(company-pseudo-tooltip-unhide)
  ad-activate-advised-definition(company-pseudo-tooltip-unhide nil)
  ad-activate-internal(company-pseudo-tooltip-unhide)
  ad--defalias-fset(nil company-pseudo-tooltip-unhide #f(advice-wrapper :around #f(compiled-function () #<bytecode 0x25a20b1>) ad-Advice-company-pseudo-tooltip-unhide))
  apply(ad--defalias-fset nil (company-pseudo-tooltip-unhide #f(advice-wrapper :around #f(compiled-function () #<bytecode 0x25a20b1>) ad-Advice-company-pseudo-tooltip-unhide)))
  #f(advice-wrapper :around nil ad--defalias-fset)(company-pseudo-tooltip-unhide #f(advice-wrapper :around #f(compiled-function () #<bytecode 0x25a20b1>) ad-Advice-company-pseudo-tooltip-unhide))
  advice--defalias-fset(#f(advice-wrapper :around nil ad--defalias-fset) company-pseudo-tooltip-unhide #f(compiled-function () #<bytecode 0x25a20b1>))
  apply(advice--defalias-fset #f(advice-wrapper :around nil ad--defalias-fset) (company-pseudo-tooltip-unhide #f(compiled-function () #<bytecode 0x25a20b1>)))
  #f(advice-wrapper :around #f(advice-wrapper :around nil ad--defalias-fset) advice--defalias-fset)(company-pseudo-tooltip-unhide #f(compiled-function () #<bytecode 0x25a20b1>))
  defalias(company-pseudo-tooltip-unhide #f(compiled-function () #<bytecode 0x25a20b1>))
  company()
  run-hooks(global-company-mode-hook global-company-mode-on-hook)

emojify-delete-emoji misbehaving

steps to reproduce

  1. open emacs
  2. write in a text buffer
    plain
  3. activate emojify-mode
    emoji
  4. put the cursor between the 🐘 and the 🐳 (whale is highlighted)
  5. press delete key

expected outcome

whale is deleted

actual outcome

a : character takes the whale's place.
deleted

observations

Turning off emojify-mode after step 5 reveals that there is no extra : character inserted into the buffer. Re-engaging emojify-mode does not reintroduce the stray marks.

using

  • emojify 20151122.813
  • Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8) of 2015-11-21

Cannot download emojis images

I'm using Cask to manage my emacs packages, and after installing emojify I always get this:

[emojify] Emoji images not available should I download them now? (y or n) y
Contacting host: github.com:443
Error in post-command-hook (global-emojify-mode-check-buffers): (file-error "Opening output file" "Permission denied" "/tmp11887_vo")

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.