Kungsgeten / ryo-modal

Roll your own modal mode

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`which-key` integration does not seem to work

voroskoi opened this issue · comments

Hi,

First of all, thanks for this package, I just started my emacs journey and using kakoune.el helps a lot.

However I would like to report that which-key integration does not work for me. I am using emacs-29.1 with which-key-3.6 and ryo-modal from git master.

Here are my observations:

  1. If I use :ryo with use-package I always end up with hashes only, putting :name into the definition does not seem to do anything.
  2. With (ryo-modal-keys) function if I do not use :name which-key shows the function name.
  3. If I try adding :name which-key shows the hash instead.

So, for now I use (defalias) for creating proper function names to use with (ryo-modal-keys), this way the which-key output looks fine.

I have no idea if this is related to precompiling or not, I call (ryo-modal-keys) in the :config block of use-package.

Thanks,

Hi!

It was quite some time ago I tinkered with ryo (I actually don't use it myself anymore). If I remember correctly a hash is only generated if you use some of the keywords (like :name, or :then), otherwise it will use the original command/function (and its name). This would explain point 2 and 3. Are you putting a string after :name (it is intended as an alias for the original function name)?

I haven't used the :ryo keyword that much with use-package, and if I remember correctly I did not implement it myself (a pull request), so I'm not sure if it works differently from ryo-modal-keys.

Have you tried adding this to your config (from the which-key part of the README)?

(push '((nil . "ryo:.*:") . (nil . "")) which-key-replacement-alist)

It should hide the hash stuff in which-key.

Hi!

Yes, I put a string after :name, I have even tried the examples in the README, but they do not work for me.

I did not try the hiding hash thing, because I would like to see the commands. I am new to emacs and which-key helps a lot with discoverability.

Anyway, thanks for the reply, at least it is not something obvious, so I will try to figure this out while learning elisp.