Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apropos-emoji #8

Closed
ryanprior opened this issue Nov 15, 2015 · 10 comments
Closed

apropos-emoji #8

ryanprior opened this issue Nov 15, 2015 · 10 comments

Comments

@ryanprior
Copy link

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

@iqbalansari
Copy link
Owner

Sounds useful. Have you tried company-emoji? It kind of does what you want.

@ryanprior
Copy link
Author

company-emoji and ac-emoji are useful and I like them, but they still require you to know at least the first couple letters of the emoji name you want. For example, if I want a rain cloud, I have to know to start typing :cloud-with-rain:. If I start typing :rai it'll offer me :rainbow: and :railway-track: but nothing rain cloud-related.

Of course, we could create duplicate symbols for emojis so that a rain cloud can be found under either cloud-with-rain or rain-cloud. But there would be tons of them. Apropos search is really a better way to help people find the right name.

I might worry that apropos search doesn't really fit in this package. After all, we don't need a single package to serve every possible emoji-related need. But I also think some things in this package will tend to be duplicated in others.

One possibility to resolve this going forward would be to extract reasonably general-purpose emoji data and code into an emoji-common core which this package and others like company-emoji and a hypothetical apropos-emoji can rely upon.

@iqbalansari
Copy link
Owner

I might worry that apropos search doesn't really fit in this package ... One possibility to resolve this going forward would be to extract reasonably general-purpose emoji data and code into an emoji-common core

I agree with you. But for the time being I think we can add it to this package itself, until we feel the package is in a stable state.

@iqbalansari
Copy link
Owner

iqbalansari commented Sep 4, 2016

Hi,

I have added two new commands emojify-apropos-emoji and emojify-insert-emoji. Hopefully they do what you had requested. Could you please try them once MELPA updates?

Thanks

@ryanprior
Copy link
Author

I ran (emojify-apropos-emoji "cat") and got this:

Debugger entered--Lisp error: (wrong-type-argument hash-table-p nil)
  maphash(#[514 "\302   �\"\204\302 \303\304�\"\"\205#\300\305�!\305\303\304�\"!]��E\300\242B\240\207" [(nil) apropos-regexp string-match gethash "name" apropos-score-str] 8 "\n\n(fn KEY VALUE)"] nil)
  emojify-apropos-emoji("cat")
  eval((emojify-apropos-emoji "cat") nil)
  eval-expression((emojify-apropos-emoji "cat") nil)
  funcall-interactively(eval-expression (emojify-apropos-emoji "cat") nil)
  call-interactively(eval-expression nil nil)
  command-execute(eval-expression)

I get the same result when I run the command interactively.

@ryanprior
Copy link
Author

Update: after removing the package and re-installing, then re-downloading the emoji files, the above command works as expected. I tried to reproduce the error but have been so far unsuccessful.

@iqbalansari
Copy link
Owner

Hmm let me see if I can reproduce this, is there any suggestion you have with respect to the functionality?

@iqbalansari
Copy link
Owner

Closed by mistake sorry

@ryanprior
Copy link
Author

The functionality looks good, this is useful. I did manage to reproduce the bug by restarting emacs and using emojify-apropos-emoji before I had enabled emojify-mode in any buffers.

@iqbalansari
Copy link
Owner

iqbalansari commented Sep 7, 2016

I did manage to reproduce the bug by restarting emacs and using emojify-apropos-emoji before I had enabled emojify-mode in any buffers.

I see, I had fixed this but not merged it with master, I have updated master, next MELPA build will have the fixed version. I am closing this issue. Thanks a lot for testing this 👍 , feel free to reopen this in case you face any issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants