Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Stop Flycheck on completing #300

Closed
kumar8600 opened this Issue Mar 11, 2014 · 15 comments

Comments

Projects
None yet
3 participants
Contributor

kumar8600 commented Mar 11, 2014

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

Contributor

syohex commented Mar 11, 2014

Why do you think so ? Is there any problem ?

Contributor

kumar8600 commented Mar 11, 2014

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

Problem:
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.

Contributor

syohex commented Mar 12, 2014

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)))

 ;;;###autoload
 (define-minor-mode auto-complete-mode
Contributor

kumar8600 commented Mar 12, 2014

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

Contributor

kumar8600 commented Mar 12, 2014

Thank you.

syohex added a commit that referenced this issue Mar 14, 2014

Merge pull request #301 from auto-complete/improve-flycheck-mode
Disable completing in flycheck-mode same as flymake-mode(#300)
Contributor

syohex commented Mar 14, 2014

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

@syohex syohex closed this Mar 14, 2014

Contributor

kumar8600 commented Mar 14, 2014

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 added a commit to kumar8600/auto-complete that referenced this issue Mar 14, 2014

@syohex syohex reopened this Mar 14, 2014

Contributor

kumar8600 commented Mar 14, 2014

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 added a commit to kumar8600/auto-complete that referenced this issue Mar 14, 2014

Contributor

syohex commented Mar 14, 2014

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

(一旦保留とします. 対応していただいたものも travisがコケているようなので
そのあたりを含め理解してから対応を試みることにします)

Contributor

kumar8600 commented Mar 14, 2014

Copy

(了解です)

Contributor

kumar8600 commented Mar 14, 2014

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

1c0fd2b

(あ…単に焦ってクオートをつけるのを忘れてただけでした…すみません)

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.

Contributor

syohex commented Jul 24, 2014

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

@syohex syohex referenced this issue Jul 26, 2014

Merged

Fix for flycheck #343

@syohex syohex closed this Jul 26, 2014

Contributor

syohex commented Jul 26, 2014

I merged

Contributor

kumar8600 commented Aug 4, 2014

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment