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

Compatibility with auto-complete #21

Closed
root42 opened this issue Jul 5, 2012 · 22 comments
Closed

Compatibility with auto-complete #21

root42 opened this issue Jul 5, 2012 · 22 comments

Comments

@root42
Copy link

root42 commented Jul 5, 2012

When using auto-complete, the code hints of auto-complete become garbled, like shown in the screenshot below:

Bug triggered when using fci-mode and auto-complete

When disabling fci-mod, the bug disappears:

No bug when fci-mode disabled

@alpaker
Copy link
Owner

alpaker commented Jul 5, 2012

Thanks for the report. I'll look into a fix, but it will take me some time to read through the auto-complete sources and understand the nature of the incompatibility (the main routine of auto-complete looks to be fairly intricate).

@purcell
Copy link

purcell commented Jul 9, 2012

I've observed this too, and it's the only reason I'm not using fci-mode. I believe all the auto-complete popups are drawn by popup.el -- https://github.com/m2ym/popup-el

-Steve

@purcell
Copy link

purcell commented Jul 13, 2012

I just wanted to note, particularly for the benefit of @alpaker, that you can work around this problem by temporarily suspending fci-mode while popups are being displayed:

(defvar sanityinc/fci-mode-suppressed nil)
(defadvice popup-create (before suppress-fci-mode activate)
  "Suspend fci-mode while popups are visible"
  (set (make-local-variable 'sanityinc/fci-mode-suppressed) fci-mode)
  (when fci-mode
    (turn-off-fci-mode)))
(defadvice popup-delete (after restore-fci-mode activate)
  "Restore fci-mode when all popups have closed"
  (when (and (not popup-instances) sanityinc/fci-mode-suppressed)
    (setq sanityinc/fci-mode-suppressed nil)
    (turn-on-fci-mode)))

@alpaker
Copy link
Owner

alpaker commented Jul 13, 2012

Thanks. I haven't had a chance to get to this bug yet, but I'm hoping
to look into it this weekend.

On Fri, Jul 13, 2012 at 6:38 AM, Steve Purcell
reply@reply.github.com
wrote:

I just wanted to note, particularly for the benefit of @alpaker, that you can work around this problem by temporarily suspending fci-mode while popups are being displayed:

(defvar sanityinc/fci-mode-suppressed nil)
(defadvice popup-create (before suppress-fci-mode activate)
  "Suspend fci-mode while popups are visible"
  (set (make-local-variable 'sanityinc/fci-mode-suppressed) fci-mode)
  (when fci-mode
    (turn-off-fci-mode)))
(defadvice popup-delete (after restore-fci-mode activate)
  "Restore fci-mode when all popups have closed"
  (when (and (not popup-instances) sanityinc/fci-mode-suppressed)
    (setq sanityinc/fci-mode-suppressed nil)
    (turn-on-fci-mode)))

Reply to this email directly or view it on GitHub:
#21 (comment)

@purcell
Copy link

purcell commented Jul 13, 2012

I'd love to investigate it myself, but I'm a bit flat out right now. Thanks for your work on fci-mode; I only recently realised I've wanted it for a long time. ;-)

@alpaker
Copy link
Owner

alpaker commented Jul 13, 2012

I'm having trouble reproducing this. I can see a couple of transient irregularities when using fci-mode together with auto-complete, but nothing as drastic as the above. When either of you has a chance, could you supply a recipe starting from Emacs -Q? Also, it would be helpful if you could supply the value of the variable emacs-version and, if you're running 24, also that of emacs-bzr-version.

@purcell
Copy link

purcell commented Jul 14, 2012

I see the behaviour in both the latest Emacs from the emacs-24 branch and HEAD (but I'm building from a git mirror, so no emacs-bzr-version here...). And that's with auto-complete and popup from git too (or Melpa packages, which are basically the same thing: http://melpa.milkbox.net).

-Steve

@alpaker
Copy link
Owner

alpaker commented Jul 15, 2012

Thanks, but I should have been more clear on one point: I was hoping to get a test file or code snippet that triggers behavior like that in the screenshots the OP provided, as I haven't been able to reproduce anything that looks like that. (I can produce some transient cursor movement problems and the like, but not anything like the corruption of the popup completion menu shown in the screenshots.)

@root42
Copy link
Author

root42 commented Jul 16, 2012

I just tested ac + fci-mode on my home-Mac, running Emacs 24, and I don't get that problem either. Using Emacs 23 at work, I have the problem as shown in the screenshot. So I guess this is a problem with the older Emacs.

@alpaker
Copy link
Owner

alpaker commented Jul 18, 2012

D'oh, I didn't try it with v23. I'll look into that.

@beloglazov
Copy link

I'm facing a similar issue on Emacs 24.1.1 with the latest versions of auto-complete and fci-mode. I've submitted an issue in auto-complete's issue tracker: https://github.com/m2ym/auto-complete/issues/135

Here is how it looks:

It happens not only in python-mode, here is an example in emacs-lisp-mode:

My configuration for auto-complete (as seen on the screenshots) is simple:

(require 'auto-complete-config)
(add-to-list 'ac-dictionary-directories "~/.emacs.d/modes/auto-complete/dict")
(ac-config-default)
(setq ac-delay 0)
(setq ac-quick-help-delay 0)
(setq ac-use-fuzzy t)

Please let me know if you need more information.

Thanks,
Anton

@alpaker
Copy link
Owner

alpaker commented Aug 23, 2012

Thanks. Unfortunately, I'm 99% sure at this point that this is due to a
bug in the way overlays are processed by the C-level display code, so
there's no way to fix the problem with changes in Lisp code. I haven't
tracked down exactly where the problem is, unfortunately (if you take a
look at src/xdisp.c you'll get a sense of the difficulties in doing that
:).

I am working on it, but gradually.

On Wed, Aug 22, 2012 at 9:08 PM, Anton Beloglazov
notifications@git.luolix.topwrote:

I'm facing a similar issue on Emacs 24.1.1 with the latest versions of
auto-complete and fci-mode. I've submitted an issue in auto-complete's
issue tracker: https://github.com/m2ym/auto-complete/issues/135

Here is how it looks:

It happens not only in python-mode, here is an example in emacs-lisp-mode:

My configuration for auto-complete (as seen on the screenshots) is simple:

(require 'auto-complete-config)(add-to-list 'ac-dictionary-directories "~/.emacs.d/modes/auto-complete/dict")(ac-config-default)(setq ac-delay 0)(setq ac-quick-help-delay 0)(setq ac-use-fuzzy t)

Please let me know if you need more information.

Thanks,
Anton


Reply to this email directly or view it on GitHubhttps://github.com//issues/21#issuecomment-7957250.

@beloglazov
Copy link

Thanks for looking into this, Alp!

@beloglazov
Copy link

Hi Alp,

FYI, I've just found that this patch https://github.com/m2ym/popup-el/pull/8 partially solves the problem. Here is how it looks with the patch applied: http://i.imgbox.com/acz85JgX.jpg I've posted about it in the following issue: https://github.com/m2ym/auto-complete/issues/135

Thanks,
Anton

@alpaker
Copy link
Owner

alpaker commented Aug 28, 2012

Hi Anton. Thanks for pointing that out. I'll take a look at what's going
on, but it'll be a bit before I can do so. (I'm moving this week, and then
starting a new job next week, so things are a bit hectic.)

On Mon, Aug 27, 2012 at 3:23 AM, Anton Beloglazov
notifications@git.luolix.topwrote:

Hi Alp,

FYI, I've just found that this patch
https://github.com/m2ym/popup-el/pull/8 partially solves the problem.
Here is how it looks with the patch applied:
http://i.imgbox.com/acz85JgX.jpg I've posted about it in the following
issue: https://github.com/m2ym/auto-complete/issues/135

Thanks,
Anton


Reply to this email directly or view it on GitHubhttps://github.com//issues/21#issuecomment-8048627.

@mbrgm
Copy link

mbrgm commented Dec 30, 2014

Is this fixed or is there a known workaround for auto-complete/fci compatibility? Cause I'm still having a distorted auto-complete menu when fci-mode is enabled.

Edit: This is how it looks with (fci-mode 1):
bildschirmfoto 2014-12-30 um 13 31 13

@purcell
Copy link

purcell commented Dec 30, 2014

@mbrgm See my workaround above.

@mbrgm
Copy link

mbrgm commented Dec 30, 2014

@purcell I tried it, but it does not turn on fci-mode again when the popup is gone.

@purcell
Copy link

purcell commented Dec 30, 2014

@mbrgm Odd. I haven't been using fci for a long time, but I just tried it now with the workaround, and it works fine. The version of the workaround I'm using is here -- perhaps it differs slightly from the one above.

@alpaker
Copy link
Owner

alpaker commented Dec 30, 2014

I honestly haven't been working much on this (I've had very little time for
hacking the last few months). At the time of the original report I looked
into what would be required for a fix: A full fix is going to to require
some changes to Emacs's display engine. I'll try to look into it next week.

On Tue, Dec 30, 2014 at 7:57 AM, Steve Purcell notifications@github.com
wrote:

@mbrgm https://github.com/mbrgm Odd. I haven't been using fci for a
long time, but I just tried it now with the workaround, and it works fine.
The version of the workaround I'm using is here
https://github.com/purcell/emacs.d/blob/d02323adcdea7f00ad26bc308bf06ce8d1eefb3b/lisp/init-editing-utils.el#L198-L230
-- perhaps it differs slightly from the one above.


Reply to this email directly or view it on GitHub
#21 (comment)
.

@alpaker
Copy link
Owner

alpaker commented Jan 29, 2019

Just FYI, I'm abandoning this package and welcoming requests to be take over as maintainer.

@alpaker
Copy link
Owner

alpaker commented Aug 6, 2020

The functionality provided by this package has now been implemented natively in Emacs as display-fill-column-indicator-mode, available as of version 27.0.90. Unless you are forced to use an older Emacs, you should use the native implementation instead of fci-mode. The former is unaffected by most of the compatibility issues that this add-on has.

@alpaker alpaker closed this as completed Aug 6, 2020
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

5 participants