Open kostafey opened 9 years ago
Another disadvantage of using posn-at-point
is different column positions of menu items. It seems, early used popup-current-physical-column
looks better for many reasons.
I'm also encountering this error a lot of times:
Debugger entered--Lisp error: (wrong-type-argument windowp #<frame emacs@rz-agflow.site 0x2d8b1c0>)
window-buffer(#<frame emacs@rz-agflow.site 0x2d8b1c0>)
posn-col-row((#<frame emacs@rz-agflow.site 0x2d8b1c0> nil (0 . 0) 0))
popup-create(nil 46 15 :min-height nil :max-width nil :around t :margin-left nil :margin-right nil :scroll-bar nil :face popup-tip-face :parent nil :parent-offset nil)
popup-tip("pgu.UUID composite literal uses unkeyed fields")
flycheck-pos-tip-error-messages(([cl-struct-flycheck-error #<buffer sort_test.go> go-vet "/home/robert/agflow/projects/web/go-lib/model/quote/sort_test.go" 21 nil "pgu.UUID composite literal uses unkeyed fields" warning nil]))
flycheck-display-errors(([cl-struct-flycheck-error #<buffer sort_test.go> go-vet "/home/robert/agflow/projects/web/go-lib/model/quote/sort_test.go" 21 nil "pgu.UUID composite literal uses unkeyed fields" warning nil]))
#[0 "\301 \210\205
@robert-zaremba Could you tell us how to reproduce your issue ?
@robert-zaremba, Im my case you should create popup menu after ^L char in TAGS buffer. Probably, it may be any other buffer with special (non-text) characters.
Im my case you should create popup menu after ^L char in TAGS buffer.
I cannot reproduce by this way.
UPD: Is seems, it's hard to reproduce it any time. I'll try to find permanent reproduction steps. The last case here.
UPD2: full repro seps:
emacs -Q
popup-el
, clojure-mode
, fill-column-indicator
packages, eval:(package-initialize)
(with-eval-after-load "popup-el")
(require 'popup)
(with-eval-after-load "fill-column-indicator")
(with-eval-after-load "clojure-mode")
(require 'fill-column-indicator)
(setq-default fill-column 80)
(setq-default fci-rule-column fill-column)
(setq fci-rule-width 1)
(define-globalized-minor-mode global-fci-mode fci-mode (lambda () (fci-mode 1)))
(global-fci-mode 1)
(global-linum-mode)
(set-face-font 'default "FiraMono-12.5:antialias=subpixel")
C-x 3
. Open positions_searcher.clj
at the right window, put cursor to (def ^{:dynamic true}
and run M-: (popup-tip "qwe")
(see below tiny screencast for details).However, I'm afraid the result depends on your screen resolution and font size.
Reproduction file example: https://github.com/kostafey/clucy/blob/master/src/clucy/positions_searcher.clj
Trace:
Debugger entered--Lisp error: (wrong-type-argument windowp #<frame : 0x1149ad8>)
window-buffer(#<frame : 0x1149ad8>)
posn-col-row((#<frame : 0x1149ad8> nil (0 . 0) 0))
popup-create(nil 3 15 :min-height nil :max-width nil :around t :margin-left nil :margin-right nil :scroll-bar nil :face popup-tip-face :parent nil :parent-offset nil)
popup-tip("qwe")
eval((popup-tip "qwe") nil)
eval-expression((popup-tip "qwe") nil)
call-interactively(eval-expression nil nil)
command-execute(eval-expression)
Picture:
In common cases
(posn-at-point)
returns structure like:(#<window 12 on TAGS<idid>> 90 (0 . 100) 0 nil 90 (0 . 5) nil (0 . 0) (10 . 20))
In rare cases
(posn-at-point)
returns:(#<frame : 0x1149ad8> nil (0 . 0) 0)
E.g. after
^L
char inTAGS
buffers.This leads to error on
popup-create
call:The early used
(popup-current-physical-column)
(see: https://github.com/kenbeese/popup-el/commit/c02ec730101184481d90df143524c88801a5b015#diff-99b97c0478ea73bf04732050d7160dc4L539) don't have such problems.Is it possible to return previous
(popup-current-physical-column)
usage or any other solutions to get current point position correctly in all cases?