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

UI freezes when you type in Emacs 25 #7038

Closed
agzam opened this issue Sep 5, 2016 · 18 comments
Closed

UI freezes when you type in Emacs 25 #7038

agzam opened this issue Sep 5, 2016 · 18 comments

Comments

@agzam
Copy link
Contributor

agzam commented Sep 5, 2016

Description :octocat:

Emacs-lisp mode in Emacs 25 freezes. I suspect it has something to do with company-mode.
I do not see this in Emacs 24.
I am not sure yet, but I think disabling company-mode "fixes" this. It might be an upstream issue with company.el

emacs-25-company

Reproduction guide 🪲

  • Start Emacs
  • Open any emacs-lisp mode file. Start typing

Observed behaviour: 👀 💔
there are messages in mini-buffer about parsing and compiling things and that process is blocking Emacs's main UI

System Info 💻

  • OS: darwin
  • Emacs: 25.1.1
  • Spacemacs: 0.105.22
  • Spacemacs branch: develop (rev. 107fe46)
  • Graphic display: t
  • Distribution: spacemacs
  • Editing style: vim
  • Completion: helm
  • Layers:
((org :variables org-enable-reveal-js-support t)
 (auto-completion :variables auto-completion-tab-key-behavior 'cycle)
 emacs-lisp javascript html markdown shell-scripts clojure lua react
 (ruby :variables ruby-enable-enh-ruby-mode t ruby-version-manager 'rvm)
 ruby-on-rails
 (auto-completion :variables auto-completion-enable-snippets-in-popup t auto-completion-enable-help-tooltip t auto-completion-enable-sort-by-usage t)
 syntax-checking spell-checking helm
 (shell :variables shell-enable-smart-eshell t shell-default-term-shell "/bin/zsh")
 (deft :variables deft-directory "~/Google Drive/deft" deft-auto-save-interval 60)
 fasd ibuffer osx chrome semantic restclient emoji ranger search-engine imenu-list pdf-tools git
 (version-control :variables version-control-diff-tool 'diff-hl version-control-global-margin t)
 (github :variables gist-view-gist t)
 agzam ag-dash synonyms)
@agzam agzam changed the title Freezing while typing in Emacs 25 UI freezing while typing in Emacs 25 Sep 5, 2016
@agzam agzam changed the title UI freezing while typing in Emacs 25 UI freezes when you type in Emacs 25 Sep 5, 2016
@aijony
Copy link
Contributor

aijony commented Sep 5, 2016

Hey agzam it's a lot more helpful for me to see the issue. Now I think that could be an issue with the 'spell-checking' layer, because it says starting new ispell process. Try disabling that, I know it has given me similar issues. If that doesn't solve it then my second guess is that it's a problem with emacs 25 async.

@zilongshanren
Copy link
Contributor

@agzam I think you could disable semantic-mode in emacs-lisp-mode to get rid of this issue.

@sooheon
Copy link

sooheon commented Sep 9, 2016

For me, this only happens inside strings/comments, as well. As far as I can tell, it's not really to do with company or ispell, but semantic is the main culprit like @zilongshanren says.

@syl20bnr
Copy link
Owner

syl20bnr commented Sep 9, 2016

To disable the semantic layer support in emacs-lisp layer you should be able to use this declaration:

(semantic :disabled-for emacs-lisp)

@agzam
Copy link
Contributor Author

agzam commented Sep 12, 2016

Yup it worked... should we close this, or maybe think about implementing a flag of some sort, so people switching to 25 struggle less?

@TheBB
Copy link
Collaborator

TheBB commented Sep 12, 2016

Would :toggle work for non-owned packages in a layer?

@syl20bnr
Copy link
Owner

syl20bnr commented Sep 12, 2016

Yes :toggle should be overridable by non owning layers in current develop. It was not the case before my last few commits on the layer system, I made a few changes like the variable to inhibit side effects when SPC h SPC is invoked (which parses all the layers to gather information), it allows to have consistent capability to override any keywords without their side effects to be active with SPC h SPC.

@JAremko
Copy link
Collaborator

JAremko commented Oct 18, 2016

Still happening to me 😢

@d12frosted
Copy link
Collaborator

@JAremko have you tried disabling semantic layer?

@JAremko
Copy link
Collaborator

JAremko commented Oct 18, 2016

@d12frosted As soon as I saw it(like after using emacs 25 for 5 minutes.) I switched back to 24, assuming that it's just a beginning 😄

But this will be a problem for "the thing"

@syl20bnr
Copy link
Owner

I have the same issue with Emacs 25 in comments in elisp.

@d12frosted
Copy link
Collaborator

The same here. But only when I enable semantic layer.

@ninjarai4
Copy link

I found a workaround to this issue without disabling auto-completion or semantic by putting this in my user-config:

(with-eval-after-load 'semantic
    (cl-delete-if (lambda (x) (string-match-p "^semantic-" (symbol-name x))) completion-at-point-functions))

There is some more disscussion here

@ninjarai4
Copy link

ninjarai4 commented Oct 20, 2016

Correcting the code in my previous comment:

(eval-after-load 'semantic
    (add-hook 'semantic-mode-hook
              (lambda ()
                (dolist (x (default-value 'completion-at-point-functions))
                  (when (string-prefix-p "semantic-" (symbol-name x))
                    (remove-hook 'completion-at-point-functions x))))))

Without the add-hook it won't always work.

@sooheon
Copy link

sooheon commented Oct 20, 2016

Thank you, but semantic-mode-hook should be quoted I think!

@ninjarai4
Copy link

Wow, I have no idea how that was working before. I've edited my comment with the correct code, thanks for the help.

@agzam
Copy link
Contributor Author

agzam commented Oct 20, 2016

Sorry, late to the party, couple of questions:

  • Could this be included in the semantic layer?
  • What are the benefits of enabling semantic for emacs-lisp mode? I have disabled it and I don't feel like missing anything
  • Why the hell it's messing up to begin with? Semantic is a built-in package (I doubt that it is buggy), does that mean something else needs to be fixed?

@agzam agzam closed this as completed Apr 25, 2017
@aijony
Copy link
Contributor

aijony commented Aug 21, 2017

I was still having this issue on the develop branch.

This snippet did not work for me:

(eval-after-load 'semantic
    (add-hook 'semantic-mode-hook
              (lambda ()
                (dolist (x (default-value 'completion-at-point-functions))
                  (when (string-prefix-p "semantic-" (symbol-name x))
                    (remove-hook 'completion-at-point-functions x))))))

This one did:

(semantic :disabled-for emacs-lisp)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Bugs
To close
Development

No branches or pull requests

9 participants