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

Disable symbol documentation in minibuffer? #1782

Closed
vspinu opened this issue Jun 13, 2016 · 19 comments
Closed

Disable symbol documentation in minibuffer? #1782

vspinu opened this issue Jun 13, 2016 · 19 comments

Comments

@vspinu
Copy link
Contributor

vspinu commented Jun 13, 2016

I find display of the documentation in the minibuffer a non-feature. It's almost never useful, interferes with eldoc, and it constantly resizes/recenteres the display. How do I disable that? Thanks.

@ckoparkar
Copy link
Contributor

@vspinu Are you referring to the docs which are displayed for def'd vars ? Right now that is tied together with eldoc for functions, so there's no way to disable it independently. You'll have to disable entire eldoc for this. Although it would be easy to add a defcustom to control this. @bbatsov @Malabarba ?

@bbatsov
Copy link
Member

bbatsov commented Jun 14, 2016

I find display of the documentation in the minibuffer a non-feature. It's almost never useful, interferes with eldoc, and it constantly resizes/recenteres the display. How do I disable that? Thanks.

This is exactly how Elisp's eldoc works, although it shouldn't resize or recenter the display. Can you share some repro steps for this?

Although it would be easy to add a defcustom to control this. @bbatsov @Malabarba ?

Obviously we can do this, but I don't want to add a config option for absolutely anything someone might have an issue with. If more people find this behaviour problematic then a defcustom would make more sense. Right now I'd rather focus on what exactly is problematic for @vspinu and try to address it.

@vspinu
Copy link
Contributor Author

vspinu commented Jun 14, 2016

Are you referring to the docs which are displayed for def'd vars ?

Not only. I am seeing blinking doc for functions as well. For instance when I navigate to (count ...) I see a blinking full size docstring and immediately after the eldoc argument string.

This blinking is not comming from eldoc. It shows as a message in the *Messages* buffer. Eldoc inhibits pollution of *Messages* buffer so it's either something else or eldoc breaks somewhere.

This is exactly how Elisp's eldoc works,

Not quite. Elisp eldoc never shows the full docstring, only the first line. This doesn't resize minibufer or recenter the display. BTW, eldoc function should respect eldoc-echo-area-use-multiline-p which cider currently doesn't.

Can you share some repro steps for this?

For example

(def blabla 
  "Some doc.

  Another line.
  Another line"
  nil)

Go to last visible line in the script window and insert (count blabla). When cursor is moved over count I see the doc of count for a fraction of a second and window is recentered. Same happens when you go over blabla. First I see blabla doc for a fraction of a second, then count argumetns. The behavior is somewhat non-systematic, due to caching I guess.

The blinking of blabla doc happens even when cider-eldoc-display-for-symbol-at-point is set to nil.

In the repl the behavior is different. I don't see the blinking doc here but the behavior is still incorrect. Go to repl and center the buffer such that the last line is on the bottom (3 times C-l). Now type blabla. Nothing happens. Make it (blabla). The eldoc shows the documentation of blabla and recenters the window. I think this is the opposite of what should happen because blabla is not a function. Now, make it (count blabla). Thing behave normally now. That is, if cider-eldoc-display-for-symbol-at-point is nil, no doc is displayed on blabla, only the arguments of count.

I am on master's head both for cider and cider-nrepl.

@bbatsov
Copy link
Member

bbatsov commented Jun 14, 2016

Show me a screenshot, as I'm having a hard-time figuring out what exactly are you seeing.

@vspinu
Copy link
Contributor Author

vspinu commented Jun 14, 2016

Seems like it's my problem only. I will track it down myself.

This is what I see. It's a plain message (no eldoc color) with output to *Message* buffer

eldoc

@ckoparkar
Copy link
Contributor

ckoparkar commented Jun 14, 2016

@vspinu This should be a problem for everyone IMO. https://github.com/clojure-emacs/cider/blob/master/cider-eldoc.el#L150 is what you're looking for, till we consider eldoc-echo-area-use-multiline-p.

@bbatsov
Copy link
Member

bbatsov commented Jun 14, 2016

@cskksc weren't we supposed to show just the first line exactly like Elisp's eldoc works? Something looks pretty wrong to me here.

@bbatsov
Copy link
Member

bbatsov commented Jun 14, 2016

The font faces always look off and there should definitely be nothing in *Messages*. I only wonder why more people haven't complained about this so far.

@ckoparkar
Copy link
Contributor

ckoparkar commented Jun 14, 2016

@bbatsov I'm working on the multiline docstring. We've not considered eldoc-echo-area-use-multiline-p.
However, on my setup, it doesn't post anything in *Messages* buffer. Does this behave like @vspinu for you too?

@Malabarba
Copy link
Member

Hey there. Looks like it's an issue with the mouse-over functionality.

@ckoparkar ckoparkar mentioned this issue Jun 14, 2016
7 tasks
@ckoparkar
Copy link
Contributor

@Malabarba You're saying, eldoc strings being printed in *Messages* could be related to mouse-over ? I'm not able to reproduce it.

@Malabarba
Copy link
Member

I got interrupted while writing that message, so I couuldn't finish.

@vspinu The message you're seeing looks a lot like the message that gets displayed as a tooltip when the user mouses-over a symbol. Maybe you've configured your emacs to show tooltips in the echo area and show echo-messages according to cursor position (instead of mouse position)?
I'm not saying you're wrong to do that, I'm just trying to understand what's hapenning.

@vspinu
Copy link
Contributor Author

vspinu commented Jun 14, 2016

Maybe you've configured your emacs to show tooltips in the echo area and show echo-messages according to cursor position (instead of mouse position)?

Hmm. Not what I am aware of. I have a couple of tooltip settings but all those are innocent AFAICT. Also when I move my mouse over a symbol I do see a proper tool tip with the doc. So it's not that, but might be related. I am almost sure it's not eldoc as it happens before eldoc function enters. I will debug it in the night.

@vspinu
Copy link
Contributor Author

vspinu commented Jun 14, 2016

@Malabarba hit the nail on the head. I tracked it down to help-at-pt-display-when-idle which I set to t some time ago to see messages that eclim puts on java error locations. As cider now places help-echo property on the entire buffer I found myself bombarded with the help messages.

I guess there is nothing cider can do about it as there is no way to distinguish between tooltip and other consumers of help-echo. So please consider this part fixed.

@Malabarba
Copy link
Member

Given that the feature is super intrusive in that case, and given that it's a built-in emacs option, maybe we should disable the tooltip when that variable is the.

@bbatsov
Copy link
Member

bbatsov commented Jun 15, 2016

Given that the feature is super intrusive in that case, and given that it's a built-in emacs option, maybe we should disable the tooltip when that variable is the.

Makes sense.

@bbatsov
Copy link
Member

bbatsov commented Jul 10, 2016

@cskksc Did we ever add a check for the current value of help-at-pt-display-when-idle?

@ckoparkar
Copy link
Contributor

ckoparkar commented Jul 10, 2016

@bbastov I dint get a chance to work on anything in the last couple of days. Let's finish this too, before 0.13 ? This shouldn't take a lot of time. The other upgrade ticket would be done by Tuesday. I'll finish this off after that.

@bbatsov
Copy link
Member

bbatsov commented Jul 10, 2016

Sounds good.

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