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

Discussion: helpful-mode: derive from help-mode? #263

Open
nbfalcon opened this issue Mar 11, 2021 · 3 comments
Open

Discussion: helpful-mode: derive from help-mode? #263

nbfalcon opened this issue Mar 11, 2021 · 3 comments

Comments

@nbfalcon
Copy link
Contributor

Given that the Emacs-built-in describe-* commands create buffers that are in help-mode, and since helpful basically creates function help buffers, I would like propose for helpful-mode to be derived from help-mode as well. This would allow keybindings made for help-mode to be available in it automatically as well (in DOOM, q to close the window for example).

@rileyrg
Copy link

rileyrg commented Apr 18, 2021

Seconded. Alternatively, have helpful at least use the same helpful mode buffer or have an option to do so. Setting helpful max buffers doesn't reuse existing visible buffer, it deletes it an created a new one which appears in a new place.

@amno1
Copy link

amno1 commented Oct 5, 2021

Built-in help and Helpful use completely different infrastructure to accomplish what they do. To make each one integrate efficiently with another would mean it has to be re-written in terms of the other. Otherwise, one could copy-paste buffer content, but that wouldn't be very efficient use of resources.

This would allow keybindings made for help-mode to be available in it automatically as well (in DOOM, q to close the window for example).

Built-in help offers very few keybindings, you can use s to open the source, i to open info-node, tab to jump between links and 6 different buttons to navigate back and forth between visited symbols :).

Helpful already gives you a key to open the source code file, RET, and you can jump between links with tab or 'p' and 'n'.

Helpful does not have stack of visited items, so this would need more work, but you can easily define key to open source or info node.:

(define-key helpful-mode-map (kbd "i")
  (lambda nil (interactive) (info-lookup 'symbol helpful--sym #'emacs-lisp-mode)))

So there you have your keys :).

Setting helpful max buffers doesn't reuse existing visible buffer

Yes, that one is a bit unfortunate. You could maybe use display-buffer-alist to specify where and how helpful buffer is placed.

@PhilHudson
Copy link

I came here to see if anyone had requested adding the 'c' (customize), 'i' (info), and 's' (source) help-mode bindings. Nice find, that 'i' binding above. I'm afraid it's not obvious to me how to implement the other two ('c' and 's') based on this though. Any tips?

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

No branches or pull requests

4 participants