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

Make Helpful buffers behave better #33

Closed
Townk opened this issue Sep 6, 2017 · 10 comments
Closed

Make Helpful buffers behave better #33

Townk opened this issue Sep 6, 2017 · 10 comments

Comments

@Townk
Copy link

Townk commented Sep 6, 2017

I have essentially two problems with Helpful:

  1. Every time I check a definition using it, Helpful create some persistent buffers (at least 2), one for the searched function source file and one for the Helpful buffer itself.
    I think Helpful should use with-temp-buffer instead of find-file to visit the references (I found this article referencing this trade-off: http://ergoemacs.org/emacs/elisp_find-file_vs_with-temp-buffer.html), this way it wouldn't create a persistent buffer for the source file, and it would be faster.

  2. I can't configure Helpful to play nice with Shackle.
    This point probably spills over the first one (and that is why I didn't open two issues). Helpful is using switch-to-buffer to show its content. Unfortunately, this function does not use the display-buffer-alist and is harder to manage the window/buffers it creates. Also, if Helpful would use a function like display-buffer instead, it would create a persistent buffer for itself.

@Wilfred
Copy link
Owner

Wilfred commented Sep 7, 2017

Thanks for reporting!

Your first issue is a bug with elisp-refs. Would you mind opening an issue there?

The second issue has been fixed in #35 :)

@Wilfred Wilfred closed this as completed Sep 7, 2017
@Townk
Copy link
Author

Townk commented Sep 8, 2017

I'll be more than happy to file a bug on elisp-refs, but can you give me a bit more specifics on it? For instance, why calling find-file should not create a persistent buffer on my Emacs?

If that is the expected behavior, how are you trying to not have the persistent buffer when calling find'file?

@Wilfred
Copy link
Owner

Wilfred commented Sep 10, 2017

OK, I may have misunderstood you. Suppose you look up a function foo-bar in a file foo.el. Are you saying that:

  1. M-x helpful-function RET foo-bar RET is also opening foo.el in a buffer, or:

  2. Pressing RET on a reference in the Helpful buffer is opening foo.el in a buffer?

Option 1 would be a bug, whereas 2 is intended behaviour (but all behaviour is open for discussion if it doesn't fit your workflow).

@Wilfred Wilfred reopened this Sep 10, 2017
@Townk
Copy link
Author

Townk commented Sep 10, 2017

What happens is 1

@naclander
Copy link

naclander commented Sep 25, 2017

@Wilfred this is actually one of the few things that's preventing me moving to helpful full time, can you confirm that this is a bug with helpful?

@Wilfred Wilfred closed this as completed in c2ac1d5 Oct 8, 2017
@Wilfred
Copy link
Owner

Wilfred commented Oct 8, 2017

OK, this should now be fixed. Let me know if not.

@Townk
Copy link
Author

Townk commented Oct 10, 2017

Unfortunately, it's not.

If you open emacs and call describe-function, then choose enable-theme. Helpful will open 2 buffers:

  1. *helpful: enable-theme*
  2. custom.el.gz

I just updated emacs and helpful just to be sure, and the behavior is still the same.
Also, if I describe anything else, hepful will keep one buffer for each "help" I get. I understand that some people might find that useful, but wouldn't be possible to have a flag to make it behave just like plain old help (one buffer for all help messages you can get)?

@Wilfred
Copy link
Owner

Wilfred commented Oct 10, 2017

Sure, I understand creating multiple helpful buffers may not be to everyone's taste :). Would you mind creating a separate issue?

@Townk
Copy link
Author

Townk commented Oct 10, 2017

Sure, just ask as a question. Some project have an adamant opinion about features. Just wanted to get the feel :)

Wilfred added a commit that referenced this issue Oct 14, 2017
@Wilfred
Copy link
Owner

Wilfred commented Oct 14, 2017

Are you sure you'd upgraded? I've added a test too, to confirm this bug is fixed.

Wilfred added a commit that referenced this issue Oct 14, 2017
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

3 participants