-
-
Notifications
You must be signed in to change notification settings - Fork 448
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
Flycheck and company interfer with each other in C++-mode with emacs in a terminal. #526
Comments
For reference, this is a follow-up from https://emacs.stackexchange.com/questions/3784/is-it-possible-to-make-flycheck-mode-and-company-mode-play-nice-together. |
@Rovanion I see. TTY frames are a different story. You might try to update to Emacs 24.4, but I doubt that this will fix the issue. In fact, I'd not be surprised if it turns out that we can't fix this issue at all, at least in Company or Flycheck. The graphic capabilities of TTY frames are very limited, and I don't even dare to guess what insane hacks Company has to employ to show its popups there. I don't know what could possibly cause this particular issue. I'm inviting @dgutov into this conversation. As the Company maintainer, he might be able to shed some light on this. Don't have too much hope though that we are able to fix this issue. Meanwhile, either use a GUI frame—which I'd recommend you anyway, regardless of this particular issue—or remove |
It might; or if it doesn't, we probably should reduce this to a simple example and file a bug.
No need to guess: just the same hack as in the GUI mode (a multiline overlay, starting at the end of the current line, with So, I believe your overlay somehow makes the |
@dgutov The point is that this only happens in TTY frames. I'm not able to re-produce it in a GUI frame, nor have I ever seen it despite using Flycheck and Company together every day. |
That would be a bug in the display engine as implemented in TTY frames, I guess. |
Especially if you yourself can reproduce it in a TTY frame. |
@dgutov Interesting, I didn't try hitherto, but as a matter of fact, I can't reproduce the issue either on Emacs trunk. @Rovanion Try to update to Emacs 24.4, or—if that doesn't help—build the current Emacs trunk from source and try it. If any of these fixes the issue, it's indeed an upstream bug in Emacs. |
@lunaryorn I'm able to reproduce the issue both with emacs compiled from the 24.4 release and from the master branch on savannah. |
@Rovanion Can you also reproduce it starting with Is the problem the same across different text terminals (e.g. xterm, gnome-console and the ctrl+alt+f1 virtual console)? |
Yes, the issue is still present with only company and flycheck installed The result is the same in both urxvt, gnome-terminal, xterm and virtual 2014-11-25 23:23 GMT+01:00 Dmitry Gutov notifications@github.com:
|
All right, I can reproduce that. Let's see if I can make a reduced test case. |
@dgutov Do you think that it's an issue in Flycheck? I mean, I'm not doing anything special with overlays in Flycheck… |
@lunaryorn I don't think so, but let's wait for a more qualified response: |
And meanwhile, here's another workaround: (setq flycheck-indication-mode nil) There are no fringes in TTY anyway. |
Thank you for the great follow-up on this bug report both of you! |
@Rovanion No problem. @lunaryorn The bug is closed now, the fix will be in 24.5. But to be on the safe side, you may want to replace |
@dgutov Thank you for reporting the issue to Emacs. I was quite surprised to learn that my use of Since this was really an upstream bug, I'm closing this issue as |
Eh, bugs happen. The usual way to add fringe indicators using overlays is definitely a hack ( That's what Eli's "Founding Fathers" remark refers to. |
@dgutov Sorry, I meant no offence. I know that “bugs happen”. I'd not have thought, however, that a core library would use Emacs in a way that it's not supposed to be used. See, you'd think that there is some kind of review process for patches landing in Emacs, but apparently I'm mistaken. Another lesson that Emacs' own code is not always to be followed, I guess, even if it's as recent (relatively) as that code in Flymake. I presume, though, that this hack is the only way to add fringe indicators with an overlay, isn't it? |
You're assuming that it was known in advance that adding bitmap on a fringe using
There is. Even if a patch is installed by someone with commit access without discussion, IME it will at least be read through by someone else. But anyway yes, many built-in packages are not ideal. You can plainly see lots of warnings during Emacs compilation, and, for example, cc-mode is known for lots of non-idiomatic approaches in its code.
Yep, as far as I know. I also use it in |
@dgutov Indeed, that was my assumption, also because Eli tracked it down so fast. But I see that it's a faulty assumption. I'm glad to see, though, that you are using the same approach. That makes me feel comfortable: If you are using it, it should be quite ok for my humble projects as well :) Besides, better not get me started on CC Mode. It's currently giving me pleasures on its own right. Its insane source file tracking breaks on D Mode, and subsequently kills all other CC Mode derivates in the same session (e.g. PHP Mode). Took me a month, literally, to find that out. |
@lunaryorn
No need to be modest: the Flycheck codebase is larger than diff-hl and company combined. ;)
Right, I saw that bug after sending the previous response. There's been some movement in CC Mode in recent months, albeit slowly, since Stefan took an interest. |
Using the below example file in a terminal emacs which isn't able to display the whole file without scrolling:
With C++-mode, flycheck-mode and company-mode (with the clang backend) activated i get the following behaviour when typing in acos into the main function. Note that the company completion starts at one character to highlight the behaviour, though the behaviour is the same with company-minimum-prefix-length set to 1: https://www.youtube.com/watch?v=Lg40mtSk_u8
I'm running:
GNU Emacs 24.3.1 (i686-pc-linux-gnu, GTK+ Version 3.10.7) of 2014-03-07 on toyol, modified by Debian
Flycheck version: 0.21alpha1 (package: 20141020.724)
Company version: 0.8.8-cvs
The text was updated successfully, but these errors were encountered: