Giter Club home page Giter Club logo

Comments (8)

expez avatar expez commented on September 24, 2024

Yeah, I'm aware of this. It works for me 99% of the time, but sometimes I see what you see too. I use this on OS X and on Linux and while it happens rarely on Linux I've seen it.

I'm not sure what to do about it. It works most of the time for me, and when I can't reliable reproduce a problem I can't fix it either.

If you want to get your hands dirty the size and position of the overlay is controlled here:

https://github.com/expez/company-quickhelp/blob/master/company-quickhelp.el#L148-L153

I suspect pos-tip is really just best effort and sometimes pos-tip fails to deliver due to collision detection or whatever.

from company-quickhelp.

pitkali avatar pitkali commented on September 24, 2024

Interesting. When you see that on linux, do you also see a default system tooltip ignoring Emacs' face and colour settings?

Because as far as I can tell, the first problem with the reported issue here is that on mac (x-gtk-use-system-tooltips nil) will have no effect, and so the stock Emacs will use system tooltip, totally messing around with what the tooltip looks like. I have yet to investigate what's going on with the positioning, though.

from company-quickhelp.

expez avatar expez commented on September 24, 2024

When you see that on linux, do you also see a default system tooltip ignoring Emacs' face and colour settings?

No, I get a sense it happens because pos-tip feels there isn't room / something is in the way at the right position.

from company-quickhelp.

pitkali avatar pitkali commented on September 24, 2024

That would probably deserve its own, separate investigation, I suppose. All in good time.

from company-quickhelp.

rthoma avatar rthoma commented on September 24, 2024

Hi guys, thanks for your prompt replies. The point that @pitkali raised is interesting. I didn't know that OS X uses a native tooltip. I would be perfectly happy with a tooltip that didn't match the theme provided it showed up in the right place.

I first started thinking about this because I wanted to recreate the functionality that I saw in this video by Baris Yuksel. I realized later that this was a previous version of elpy that used autocomplete, but I still like the behavior.

Thanks to @expez for pointing out the section of the company-quickhelp code that controls the position of the overlay. I'm new to elisp and Emacs, but if I have some down time this weekend I might fiddle with this section of code on my mac and see what happens.

Would it make sense to use a wrapper like (when (eq system-type 'darwin) ... ) in this case to keep any changes from messing with Linux and Windows?

from company-quickhelp.

pitkali avatar pitkali commented on September 24, 2024

In short, no.

Firstly, I didn't have time to confirm this yesterday, but the problem is unlikely to be mac as an operating system (i.e., 'darwin), but rather one of the 2 UI toolkit implementations used on it, so (when (eq window-system 'ns) ...). Mac-port (which at least used to be distinguishable with window-system being 'mac) is fundamentally different, to the best of my memory, having originated from Carbon emacs, which predates the 'ns toolkit. I specifically remember it having a different tooltip implementation (i.e., different implementation of x-show-tooltip emacs C function that you can see pos-tip using eventually to actually show the tooltip). It should not be assumed it will behave the same way here.

Secondly, I would very much prefer to hide such differences between various toolkits in pos-tip. This may not be feasible in an acceptable way, depending on the actual root cause, but that would be the ideal scenario.

Nonetheless, if the issue is not fixed by the weekend, feel free to see if you can correct coordinates. If you find a way, it is likely to be useful as diagnostic information, helping us better understand what's going on.

from company-quickhelp.

expez avatar expez commented on September 24, 2024

@pitkali can I close this as a problem with pos-tip?

from company-quickhelp.

pitkali avatar pitkali commented on September 24, 2024

It's safe to assume that the problem does not lie with company-quickhelp, as then it should happen on all the platforms.

In short, yes.

from company-quickhelp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.