Compatibility with auto-complete
root42 opened this issue · 22 comments
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).
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
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)))
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)
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. ;-)
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
.
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
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.)
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.
D'oh, I didn't try it with v23. I'll look into that.
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:
(fci-mode 1)
: http://i.imgbox.com/adwmK94z.jpg(fci-mode 0)
: http://i.imgbox.com/abvVNlr6.jpg
It happens not only in python-mode, here is an example in emacs-lisp-mode:
(fci-mode 1)
: http://i.imgbox.com/abkb4d5D.jpg(fci-mode 0)
: http://i.imgbox.com/adcX9pRB.jpg
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
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@github.comwrote:
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/135Here is how it looks:
- (fci-mode 1): http://i.imgbox.com/adwmK94z.jpg
- (fci-mode 0): http://i.imgbox.com/abvVNlr6.jpg
It happens not only in python-mode, here is an example in emacs-lisp-mode:
- (fci-mode 1): http://i.imgbox.com/abkb4d5D.jpg
- (fci-mode 0): http://i.imgbox.com/adcX9pRB.jpg
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.
Thanks for looking into this, Alp!
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
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@github.comwrote:
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/135Thanks,
Anton—
Reply to this email directly or view it on GitHubhttps://github.com//issues/21#issuecomment-8048627.
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)
.
Just FYI, I'm abandoning this package and welcoming requests to be take over as maintainer.
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.