Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Stop Flycheck on completing #300

kumar8600 opened this Issue · 15 comments

3 participants


I think this is easy to implement. Just suppress flycheck-handle-change (at line 959 from flycheck.el) by defadvice while completing.


Why do you think so ? Is there any problem ?


Sorry, I don't write long sentences in English well.

Flycheck refresh faces after 0.5 seconds progressed in idle (in default).
This behavior often overwrites Auto Complete's face for inline completion.

Auto Complete has been already ac-stop-flymake-on-completing. So, I think similar popular tool needs to cover.


I don't know flycheck well.
Is this issue fixed by applying following patch ?

diff --git a/auto-complete.el b/auto-complete.el
index 0a49171..188acd2 100644
--- a/auto-complete.el
+++ b/auto-complete.el
@@ -1706,10 +1706,15 @@ that have been made before in this function.  When `buffer-undo-list' is
   (unless ac-clear-variables-every-minute-timer
     (setq ac-clear-variables-every-minute-timer (run-with-timer 60 60 'ac-clear-variables-every-minute)))
   (if ac-stop-flymake-on-completing
-      (defadvice flymake-on-timer-event (around ac-flymake-stop-advice activate)
-        (unless ac-completing
-          ad-do-it))
-    (ad-disable-advice 'flymake-on-timer-event 'around 'ac-flymake-stop-advice)))
+      (progn
+        (defadvice flymake-on-timer-event (around ac-flymake-stop-advice activate)
+          (unless ac-completing
+            ad-do-it))
+        (defadvice flycheck-handle-change (around ac-flycheck-stop-advice activate)
+          (unless ac-completing
+            ad-do-it)))
+    (ad-disable-advice 'flymake-on-timer-event 'around 'ac-flymake-stop-advice)
+    (ad-disable-advice 'flycheck-handle-change 'around 'ac-flycheck-stop-advice)))

 (define-minor-mode auto-complete-mode

Thank you. It's nice. But I noticed flycheck-handle-idle-change is better than flycheck-handle-change.


Thank you.


@kumar8600 I have merged #301. Please reopen this issue if you still have problem.
Thanks for reporting.

@syohex syohex closed this

Sorry, I overlooked behavior when completion is aborted. I'm ready for pull-request. But I'm not a collaborator, so I can't reopen this issue. Please reopen this issue.

@kumar8600 kumar8600 referenced this issue from a commit in kumar8600/auto-complete
@kumar8600 kumar8600 Fixed flycheck workaround when completion is aborted(#300) e0164e7
@syohex syohex reopened this

Thank you for issue reopening. I pushed pull-request(#302). I fixed behavior when completion is aborted.

Fixed points:

  • I made to start flycheck's syntax checking when completion is aborted too.
    • I add timer to detect completion is aborted.
    • I add user customizable variable to custom above timer's polling interval.
  • I made to load Flymake and Flycheck (if exist) before defadvice.
  • I splited function ac-setup for ac-syntax-checker-workaround because it becomes long.
@kumar8600 kumar8600 referenced this issue from a commit in kumar8600/auto-complete
@kumar8600 kumar8600 Fixed flycheck workaround to don't use defvar-local(#300) c917992

Sorry I revert commit for flycheck. I try to understand flycheck and try to tackle this issue.

(一旦保留とします. 対応していただいたものも travisがコケているようなので





Oh... I forgot to quote variable name for parameter of make-variable-buffer-local... Sorry...




What is the status of this issue? I am using flycheck and auto-complete has stopped working. I have enabled ac-flyspell-workaround but without any change.


@vincentbernat I'll try to apply this fix this week end.

@syohex syohex referenced this issue

Fix for flycheck #343

@syohex syohex closed this

I merged


Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.