Closed pradyparanjpe closed 1 month ago
Cannot reproduce.
(Correction)
The error is thrown upon hovering on a variable. (May be while its docstring is being sought.) The documentation sub-window doesn't appear.
This has started happening since I upgraded to emacs v 28.1.
This appears to be a general issue with display of docstrings; since the same error message appears with R (ess-r-mode) and bash scripts (shell-script-mode) while hovering over documented symbols.
(lsp :variables
lsp-lens-enable t
lsp-use-lsp-ui t
lsp-ui-doc-show-with-cursor t)
Not reproducible.
In the last 24 hours I've used LSP in three languages and lsp-ui-doc works fine.
You have not mentioned that you are running emacs in a daemon.
I tried it nevertheless and still the problem cannot be reproduced.
Note that term-cursor
mode is loaded on when you there's no graphical system. So I also tried daemon + terminal Emacs. Still not reproducible.
Strange. I got this error just a few hours ago when I noticed lsp getting nonresponsive and a symbol was kept selected after moving the cursor away.
The only change I did was in layers
html
to
(html :variable css-enable-lsp t less-enable-lsp t scss-enable-lsp t html-enable-lsp t web-fmt-tool 'web-beautify)
Disabling term-cursor-mode made the issue go away. Those layer variables set global-term-cursor-mode to 1.
emacsclient -c -a=""
Apology for not having mentioned that I am running emacs in a daemon. Following is my system info.
System Info :computer:
I plan not to use the graphical daemon mode. So you may mark this issue and close it as not-planned.
I will check html layer.
Maybe I was wrong about the html layer, it doesn't make sense for it to affect any cursors.
Another layer I added recently, but not sure if it was days ago or yesterday, was spacemacs-editing-visual
which has this in packages.el:
(term-cursor :location (recipe :fetcher github :repo "h0d/term-cursor.el"))
term-cursor is only turned on in terminal. It is installed by default unless you use spacemacs-base.
Alright, I admit I'm not knowledgable enough. All I know is that it's loaded at GUI start Loading term-cursor (native compiled elisp)...done
and when I checked customize, it said global-term-cursor-mode
was changed outside customize. What I don't know is whether it was always enabled and just the error is recent, but I haven't upgraded any packages in a while.
@psisis
Impossible. It never loads in GUI Emacs.
Well I don't know. That layer, by rgrep, is the only one that uses package term-cursor
. Commenting out that func in packages.el will uninstall term-cursor. Even disabling the layer but keeping the files original, will insist on installing (and for me) loading it.
I just saw that it's a recent commit, made by you. I did git pull a few days ago, so it must be responsible.
On the record: 99933b1fb37a51a41656a6c3d8cdbdbb02449bfc
Checking out the layer pre-commit will uninstall term-cursor
, install evil-terminal-cursor-changer
and solve this specific issue.
@psisis
deleting that line won't uninstall it. It just never gets loaded.
removing spacemaca-editing won't have any effect unless you use spacemacs-base as I explained before.
So there's no bug.
@psisis
deleting that line won't uninstall it. It just never gets loaded.
removing spacemaca-editing won't have any effect unless you use spacemacs-base as I explained before.
So there's no bug.
What are you talking about. I just said that undoing your commits from 17 days ago will solve this issue.
@psisis
Commenting out that func in packages.el will uninstall term-cursor. Even disabling the layer but keeping the files original, will insist on installing (and for me) loading it.
These two sentences are both false.
Fact A: your commit caused this. What more is there to say.
@pradyparanjpe
If you want a solution. Cd to .emacs.d and run git checkout 77ba076f697d270b011586944004ce8dfb6f61a4 -- .\layers\+spacemacs\spacemacs-editing-visual\*
in shell.
@psisis I cannot reproduce this issue.
@lebensterben I know, you've stated that already. That doesn't mean your commit is blameless. If OP didn't have the same issue I wouldn't have known this, but your arrogance really astounds me.
Let's wait for OP, if checking out pre-commit will solve it for him then at the very least I'll always know to check your commits next time I get a bug.
Read that commit carefully, you will see the only change is that term-cursor would not be installed if you use evil, but after the commit it's always installed.
Installing the package won't get it loaded automatically. It takes two more steps to have it loaded.
First it must be declared in a layer's xxx-packages list and that layer must be enabled. In this case it's in spacemaca-editing-packages, and spacemaca-editing layer is always enabled unless you use spacemacs-base which requires manual enabling.
Second there must be a package init function, in which the package is loaded via a use-package call. And in this case the :if
argument makes sure it won't be loaded in GUI Emacs.
Why do you say I am arrogant? I'm walking over these facts again and again with you without making any judgement on you.
Also note that reverting that commit IS NOT A FIX, it's not even a workaround.
term-cursor would still be installed for non-evil users.
So if I understand this correctly. There are two commits, d48bc8d90bb834fee2140499fee3b3f43f170320 and 99933b1fb37a51a41656a6c3d8cdbdbb02449bfc. Before these we had
(term-cursor :location (recipe :fetcher github :repo "h0d/term-cursor.el")
:toggle (not (configuration-layer/package-used-p 'evil)))
now we have
(term-cursor :location (recipe :fetcher github :repo "h0d/term-cursor.el"))
There is no toggle anymore to install the package (since I used evil, it wouldn't install before). Meaning it will always be installed now but not necessarily loaded. So the main issue is, why is it loaded.
Since spacemacs-editing-visual/init-term-cursor
wasn't changed at all, the problem is not here (it probably would have thrown an error if package was not found). Something else is loading term-cursor. I even added (setq graphicp (display-graphic-p))
to that func to debug, and it was accurately t
.
The only files I have that ever mention the phrase "term-cursor" are:
"term-cursor/*" , "spacemacs-editing-visual/packages.el" and dotspacemacs/custom-settings/'(package-selected-packages ...term-cursor)
Nothing else in .emacs.d/ I have wants to remotely enable term-cursor. I even searched for non-.el files.
This is the only information I can give to this issue. I don't know what's responsible, but when editing-visual installs term-cursor, it gets loaded for me. I think you're arrogant because even if you didn't mean for it to be loaded your commit was a big change for evil users and highly relevant and you could have mentioned it.
@psisis
Commenting out that func in packages.el will uninstall term-cursor. Even disabling the layer but keeping the files original, will insist on installing (and for me) loading it.
These two sentences are both false.
How are they false. So you think I'm lying. In the second sentence I stated (for me). In the first I said commenting out use-package will uninstall it, which it still does. This is arrogance.
(Spacemacs) Warning: package term-cursor not initialized in layer spacemacs-editing-visual, you may consider removing this package from the package list or use the :toggle keyword instead of a `when' form.
(Spacemacs) --> deleting term-cursor... [1/1]
Package ‘term-cursor-20190515.41’ deleted.
@pradyparanjpe
If you want a solution. Cd to .emacs.d and run
git checkout 77ba076f697d270b011586944004ce8dfb6f61a4 -- .\layers\+spacemacs\spacemacs-editing-visual\*
in shell.
@psisis,
I'm travelling to my hometown this weekend, so I'll be on and off my computer(s) sporadically. I'll try that solution and get back as soon as I can.
Thanks for the prospective solution. :thumbsup:
By the attitude. (And that's a parliamentary word)
While in my hometown, I'll evaluate a prospective switch to doom-emacs, crafted-emacs or even vanila-emacs. But even if I do switch, I'll try your solution and confirm if it solves the problem.
@pradyparanjpe
If you want a solution. Cd to .emacs.d and run
git checkout 77ba076f697d270b011586944004ce8dfb6f61a4 -- .\layers\+spacemacs\spacemacs-editing-visual\*
in shell.
:+1:
I could reproduce that.
I'm closing the issue, If anyone wants to repoen it, they are welcome; I am dropping out from the discussion.
This issue is still present, should be reproducible with daemon + gui frame(i use pgtk
). I changed the condition to (unless (or (daemonp) (display-graphic-p)) (global-term-cursor-mode))
as a workaround.
As to why: See: https://stackoverflow.com/a/5801740 . display-graphics-p
is nil
in daemon mode, so checking that alone is not ideal.
This issue is still present, should be reproducible with daemon + gui frame(i use
pgtk
).
I can confirm this. A more user-friendly workaround is to add term-cursor
to dotspacemacs-excluded-packages
.
Wouldn't be a proper fix be to change term-cursor
such that it is only active in GUI frames?
By the way, this issue me figure out that my spacemacs is so much snappier after disabling term-cursor-mode
(also in GUI, where the mode was active but not effective). Maybe it's just my config, but if others have the same experience, it could make sense to get rid of it entirely.
I also have this issue. Seems the fix that StreakyCobra has done in their fork might be a good way to resolve the issue. Though, for now I may blacklist term-cursor as that seems the simplest fix.
I have been having this issue with LSP lens in rust-mode (running 29.0.91 daemon + gui frame on darwin); I can confirm that applying the change from StreakyCobra's fork has fixed it.
I have been having that issue too (only in client mode), in particular purescript lsp-ui-doc not showing up the popup window, but showing the above error message.
Adding term-cursor
to the dotspacemacs-excluded-packages
fixes that for me.
Got the same error, freezes emacs on daemon mode
I've also added term-cursor to excluded packages a long time ago, but I think it would be nice to fix this, and in particular have term-cursor-mode disabled by default if there is no terminal frame. I'm working on it.
Description :octocat:
Python mode
Reproduction guide :beetle:
Observed behaviour: :eyes: :broken_heart:
Expected behaviour: :heart: :smile:
System Info :computer:
Backtrace :paw_prints: