Wilfred / helpful

A better Emacs *help* buffer
1.12k stars 62 forks source link

`helpful-mode` doesn't work with `ivy-resume` #156

Open narendraj9 opened 6 years ago

narendraj9 commented 6 years ago

I am not sure if this is the right repository to file this issue. helpful-function uses a simple completing-read that doesn't help ivy restore the done action on resume. So nothing happens on hitting RET on resume because the default action for ivy-read is identity.

Wilfred commented 6 years ago

I'm a big fan of ivy, but I haven't used this particular feature. What would you expect to happen when you call ivy-resume?

narendraj9 commented 6 years ago

I expected ivy-resume to be able to find definition for the new item that I select after ivy-resume. Currently, the action that ivy-resume uses is identity and it doesn't call helpful-function after resume.

This is happening because ivy-resume can work only if ivy-read is used because that is how it sets its state. The change required is probably in ivy-read. I am not sure how it changes completing-read to use its own UI.

zhenwenc commented 5 years ago

In case if someone still having this issue, here is a workaround:

(setq counsel-describe-function-function #'helpful-callable)
(setq counsel-describe-variable-function #'helpful-variable)
Wilfred commented 5 years ago

Thanks, I've added a note in the README.md suggesting that configuration.

https://oremacs.com/swiper/#counsel-commands specifically mentions that an advantage of counsel-* commands is that they support ivy-resume. However, I think we could support ivy-resume directly by making helpful--read-symbol call ivy-read directly when ivy-mode is active.