Closed CsBigDataHub closed 4 years ago
@CsBigDataHub I think it was caused by https://github.com/emacs-lsp/lsp-ui/commit/6f64b85e4df3e1346aca5a3e7acfd6ad3d9d32e3. It should be fixed with https://github.com/emacs-lsp/lsp-ui/commit/815d0c6f5003f85974d82ee9d8872a342f5fadf4
I am getting something similar:
Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
lsp-ui-doc--mv-at-point(160 24 720 0)
lsp-ui-doc--move-frame(#<frame 0x7ff0fb85ba60>)
lsp-ui-doc--handle-scroll(#<window 3 on filename.py> 1)
redisplay_internal\ \(C\ function\)()
Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
lsp-ui-doc--mv-at-point(216 24 8 802)
lsp-ui-doc--move-frame(#<frame 0x7fb6a628a120>)
lsp-ui-doc--handle-scroll(#<window 3 on filename.py> 1)
redisplay_internal\ \(C\ function\)()
read-from-minibuffer(#("Find files or url: " 0 19 (face helm-minibuffer-prompt)) "/Users/........." (keymap (26 . helm-select-action) (tab . helm-execute-persistent-action) (f13 lambda nil (interactive) (helm-select-nth-action 12)) (f12 lambda nil (interactive) (helm-select-nth-action 11)) (f11 lambda nil (interactive) (helm-select-nth-action 10)) (f10 lambda nil (interactive) (helm-select-nth-action 9)) (f9 lambda nil (interactive) (helm-select-nth-action 8)) (f8 lambda nil (interactive) (helm-select-nth-action 7)) (f7 lambda nil (interactive) (helm-select-nth-action 6)) (f6 lambda nil (interactive) (helm-select-nth-action 5)) (f5 lambda nil (interactive) (helm-select-nth-action 4)) (f4 lambda nil (interactive) (helm-select-nth-action 3)) (f3 lambda nil (interactive) (helm-select-nth-action 2)) (f2 lambda nil (interactive) (helm-select-nth-action 1)) (menu-bar keymap (help-menu keymap (describe keymap (describe-mode . helm-help)))) (help keymap (109 . helm-help)) (23 . #f(compiled-function () (interactive nil) #<bytecode 0x1fedaab07f75>)) (f1 lambda nil (interactive) (helm-select-nth-action 0)) (8 keymap (109 . helm-help) (104 . undefined) (8 . undefined) (99 . helm-customize-group) (4 . helm-enable-or-switch-to-debug)) (20 . helm-toggle-resplit-and-swap-windows) (C-tab . undefined) (67108897 . helm-toggle-suspend-update) (3 keymap (57 . helm-execute-selection-action-at-nth-+9) (56 . helm-execute-selection-action-at-nth-+8) (55 . helm-execute-selection-action-at-nth-+7) (54 . helm-execute-selection-action-at-nth-+6) (53 . helm-execute-selection-action-at-nth-+5) (52 . helm-execute-selection-action-at-nth-+4) (51 . helm-execute-selection-action-at-nth-+3) (50 . helm-execute-selection-action-at-nth-+2) (49 . helm-execute-selection-action-at-nth-+1) (63 . helm-help) (110 . #f(compiled-function () (interactive nil) #<bytecode 0x1fedaab07bdd>)) (108 . helm-display-line-numbers-mode) (62 . helm-toggle-truncate-line) (21 . helm-refresh) (6 . helm-follow-mode) (9 . helm-copy-to-buffer) (11 . helm-kill-selection-and-quit) (25 . helm-yank-selection) (37 . helm-exchange-minibuffer-and-header-line) (95 . helm-toggle-full-frame) (45 . helm-swap-windows)) (67108987 . helm-enlarge-window) (67108989 . helm-narrow-window) (19 . undefined) (24 keymap (57 . helm-execute-selection-action-at-nth-+9) (56 . helm-execute-selection-action-at-nth-+8) (55 . helm-execute-selection-action-at-nth-+7) (54 . helm-execute-selection-action-at-nth-+6) (53 . helm-execute-selection-action-at-nth-+5) (52 . helm-execute-selection-action-at-nth-+4) (51 . helm-execute-selection-action-at-nth-+3) (50 . helm-execute-selection-action-at-nth-+2) (49 . helm-execute-selection-action-at-nth-+1) (2 . helm-resume-list-buffers-after-quit) (98 . helm-resume-previous-session-after-quit) (6 . helm-quit-and-find-file)) (11 . helm-delete-minibuffer-contents) (67108896 . helm-toggle-visible-mark-forward) (0 . helm-toggle-visible-mark) (C-M-up . helm-scroll-other-window-down) (C-M-down . helm-scroll-other-window) (M-prior . helm-scroll-other-window-down) (M-next . helm-scroll-other-window) (12 . helm-recenter-top-bottom-other-window) (left . helm-previous-source) (right . helm-next-source) (15 . helm-next-source) (10 . helm-execute-persistent-action) (9 . helm-execute-persistent-action) (13 . helm-maybe-exit-minibuffer) (7 . helm-keyboard-quit) (22 . helm-next-page) (27 keymap (110 . next-history-element) (112 . previous-history-element) (115 . undefined) (5 . helm-display-all-sources) (1 . helm-show-all-candidates-in-source) (85 . helm-unmark-all) (97 . helm-mark-all) (109 . helm-toggle-all-marks) (41 . helm-next-visible-mark) (40 . helm-prev-visible-mark) (91) (32 . helm-toggle-visible-mark-backward) (33554454 . helm-scroll-other-window-down) (25 . helm-scroll-other-window-down) (22 . helm-scroll-other-window) (12 . helm-reposition-window-other-window) (111 . helm-previous-source) (62 . helm-end-of-buffer) (60 . helm-beginning-of-buffer) (118 . helm-previous-page)) (next . helm-next-page) (prior . helm-previous-page) (C-up . helm-follow-action-backward) (C-down . helm-follow-action-forward) (16 . helm-previous-line) ...) nil nil "/Users/........." t)
helm-read-pattern-maybe("Find files or url: " "/Users/........." "^filename\\.py" nil nil "/Users/........." nil)
helm-internal(helm-source-find-files "/Users/........." "Find files or url: " nil "^filename\\.py" "*helm find files*" nil "/Users/........." nil)
apply(helm-internal (helm-source-find-files "/Users/........." "Find files or url: " nil "^filename\\.py" "*helm find files*" nil "/Users/........." nil))
helm(helm-source-find-files "/Users/........." "Find files or url: " nil "^filename\\.py" "*helm find files*" nil "/Users/........." nil)
apply(helm (helm-source-find-files "/Users/........." "Find files or url: " nil "^filename\\.py" "*helm find files*" nil "/Users/........." nil))
helm(:sources helm-source-find-files :input "/Users/........." :case-fold-search t :preselect "^filename\\.py" :ff-transformer-show-only-basename t :default "/Users/........." :prompt "Find files or url: " :buffer "*helm find files*")
helm-find-files-1("/Users/........." "^filename\\.py")
helm-find-files(nil)
funcall-interactively(helm-find-files nil)
call-interactively(helm-find-files nil nil)
command-execute(helm-find-files)
@elbaulp , can you please check if you are using the latest version of the package.
This is the latest version in Melpa 20200901.1649
. Please confirm.
How can I do that? I am using straight
, so the repo is up to date, this is the HEAD of my local repo right now
815d0c6 (HEAD -> master, origin/master, origin/HEAD) [lsp-ui-doc] Handle when point changed after scroll #495
@elbaulp , if you use straight and want to get the latest version you will need
straight-pull-package
to pull latest changesstraight-rebuild-package
to rebuild the package with latest changes.since you already have latest changes try straight-rebuild-package
and restart Emacs to check if the issue still persists.
Yes, it persists, but seems to be gone if I configure lsp-us-doc to show the information on the top-right corner of the window. -- Alejandro Alcalde - elbauldelprogramador.com http://elbauldelprogramador.com/en
On Thu, Sep 3, 2020 at 6:19 PM CsBigDataHub notifications@github.com wrote:
@elbaulp https://github.com/elbaulp , if you use straight and want to get the latest version you will need
- straight-pull-package to pull latest changes
- straight-rebuild-package to rebuild the package with latest changes.
since you already have latest changes try straight-rebuild-package and restart Emacs to check if the issue still persists.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/emacs-lsp/lsp-ui/issues/495#issuecomment-686603168, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADAMLOMWTX5EWDFZSCEGE3SD66YRANCNFSM4QR4ULAQ .
@elbaulp I'm not sure how straight works, but can you try to recompile lsp-ui
with: (M-:
)
(byte-recompile-directory (file-name-directory (find-library-name "lsp-ui")) 0 t)
See if the issue still occurs
I am getting error too because have multiple windows at a time. I guess there is some kind of miscalculation when multiple windows coexist.
I am also getting this weird behaviour. See gif file below.
You can see the tooltip isn't in the correct position. I am setting lsp-ui-doc-position
to 'at-point
. Notice if I switch one of the buffer without lsp-mode
enabled; everything goes fine.
I am getting error too because have multiple windows at a time. I guess there is some kind of miscalculation when multiple windows coexist.
This is about the original issue, right ? If so, can you please make a gif of when this happens and also provide a backtrace (with M-x toggle-debug-on-error
), unless it's the same than posted by @elbaulp and @CsBigDataHub .
You can see the tooltip isn't in the correct position. I am setting lsp-ui-doc-position to 'at-point. Notice if I switch one of the buffer without lsp-mode enabled; everything goes fine.
I'm also using different windows and I just made some tests, I can't reproduce the behavior I see on the gif. Could you try to disable your other packages and see if it still occurs. Also, what emacs version are you using, and what windows manager ?
Modifying lsp-ui-doc--handle-scroll
fix it for Helm:
diff --git a/lsp-ui-doc.el b/lsp-ui-doc.el
index 2dac778..d04b600 100644
--- a/lsp-ui-doc.el
+++ b/lsp-ui-doc.el
@@ -825,6 +825,7 @@ before, or if the new window is the minibuffer."
(eq lsp-ui-doc-position 'at-point)
(frame-visible-p frame)
(if (and lsp-ui-doc--bounds
+ (not (minibufferp (window-buffer)))
(>= (point) (car lsp-ui-doc--bounds))
(<= (point) (cdr lsp-ui-doc--bounds)))
(lsp-ui-doc--move-frame frame)
@thierryvolpiatto You are amazing! This does solve the issue!
This is about the original issue, right ? If so, can you please make a gif of when this happens and also provide a backtrace (with M-x toggle-debug-on-error), unless it's the same than posted by @elbaulp and @CsBigDataHub .
Sorry that I haven't have time to test. But I think @thierryvolpiatto has solved it.
Thank you @thierryvolpiatto, it should be fixed on master with https://github.com/emacs-lsp/lsp-ui/commit/b69922a7fb6793c2ba1ad6aa9bcee0a24211ae06
Thank you @thierryvolpiatto !!
Thanks @thierryvolpiatto. @sebastiencs you can close the issue if it is fixed. Thanks all for your effort.
Sebastien Chapuis notifications@github.com writes:
Thank you @thierryvolpiatto, it should be fixed on master with b69922a
(eq (window-buffer) (frame-parameter frame 'lsp-ui-doc--buffer-origin))
This is true when position of lsp-ui-doc frame is on the new buffer (helm or whatever), as a result if frame is outside it is not hidden. Whereas (not (minibufferp (window-buffer))) test hide the frame in any case (always true).
-- Thierry
This become annoying when one for example run in helm a persistent action. Start for example helm-M-x, the child frame is here but not annoying: but become annoying when execute persistent action:
@thierryvolpiatto Good point, thanks
I meant you should not check at all (eq (window-buffer) (frame-parameter frame 'lsp-ui-doc--buffer-origin))
, with this it changes nothing.
diff --git a/lsp-ui-doc.el b/lsp-ui-doc.el
index 331676e..d04b600 100644
--- a/lsp-ui-doc.el
+++ b/lsp-ui-doc.el
@@ -825,7 +825,6 @@ before, or if the new window is the minibuffer."
(eq lsp-ui-doc-position 'at-point)
(frame-visible-p frame)
(if (and lsp-ui-doc--bounds
- (eq (window-buffer) (frame-parameter frame 'lsp-ui-doc--buffer-origin))
(not (minibufferp (window-buffer)))
(>= (point) (car lsp-ui-doc--bounds))
(<= (point) (cdr lsp-ui-doc--bounds)))
Thanks.
No, finally I am wrong, it changes nothing when the child frame is located on the very top of parent frame, so forget it, it is really usable like this. Think I have finished configuring lsp for now, thanks all for lsp-mode.
I have been getting
lsp-ui-doc--move-frame: Wrong type argument: number-or-marker-p, nil
probably after 17f015e commit.This happens when I run
swiper
onword-at-point
debug-on-error
gives me