[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#59785: 30.0.50; mouse-2 > (wrong-type-argument listp #<frame *Calend
From: |
Michael Heerdegen |
Subject: |
bug#59785: 30.0.50; mouse-2 > (wrong-type-argument listp #<frame *Calendar* 0x...>) |
Date: |
Sat, 03 Dec 2022 18:22:22 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Eli Zaretskii <eliz@gnu.org> writes:
> Do you get the exact same error and the same backtrace? If the
> backtrace is different, please post it.
I got the org-capture issue suppressed by doing this:
*** /tmp/ediffrfOigd 2022-12-03 18:09:46.243866776 +0100
--- /home/micha/software/emacs/lisp/mouse-drag.el 2022-12-03
18:02:14.743207682 +0100
***************
*** 283,316 ****
window-last-col (- (window-width) 2))
(track-mouse
;; Set 'track-mouse' to something neither nil nor t (Bug#51794).
! (setq track-mouse 'drag-dragging)
! (while (progn
! (setq event (read--potential-mouse-event)
! end (event-end event)
! row (cdr (posn-col-row end))
! col (car (posn-col-row end)))
! (or (mouse-movement-p event)
! (eq (car-safe event) 'switch-frame)))
! ;; Scroll if see if we're on the edge.
! ;; FIXME: should handle mouse-in-other window.
! (cond
! ((not (eq start-window (posn-window end)))
! t) ; wait for return to original window
! ((<= row 0) (mouse-drag-repeatedly-safe-scroll -1 0))
! ((>= row window-last-row) (mouse-drag-repeatedly-safe-scroll 1 0))
! ((and col-scrolling-p (<= col 1)) (mouse-drag-repeatedly-safe-scroll 0
-1))
! ((and col-scrolling-p (>= col window-last-col))
(mouse-drag-repeatedly-safe-scroll 0 1))
! (t
! (setq scroll-delta (- row start-row)
! start-row row)
! (if col-scrolling-p
! (setq scroll-col-delta (- col start-col)
! start-col col))
! (if (or (/= 0 scroll-delta)
! (/= 0 scroll-col-delta))
! (progn
! (setq have-scrolled t)
! (mouse-drag-safe-scroll scroll-delta scroll-col-delta)))))))
;; If it was a click and not a drag, prepare to pass the event on.
;; Is there a more correct way to reconstruct the event?
(if (and (not have-scrolled)
--- 283,319 ----
window-last-col (- (window-width) 2))
(track-mouse
;; Set 'track-mouse' to something neither nil nor t (Bug#51794).
! (setq track-mouse 'drag-dragging)
! (while (progn
! (setq event (read--potential-mouse-event)
! end (event-end event)
! row (and (not (eq (car-safe event) 'switch-frame))
! (cdr (posn-col-row end)))
! col (and (not (eq (car-safe event) 'switch-frame))
! (car (posn-col-row end))))
! (or (mouse-movement-p event)
! (eq (car-safe event) 'switch-frame)))
! ;; Scroll if see if we're on the edge.
! ;; FIXME: should handle mouse-in-other window.
! (cond
! ((eq (car-safe event) 'switch-frame))
! ((not (eq start-window (posn-window end)))
! t) ; wait for return to original window
! ((<= row 0) (mouse-drag-repeatedly-safe-scroll -1 0))
! ((>= row window-last-row) (mouse-drag-repeatedly-safe-scroll 1 0))
! ((and col-scrolling-p (<= col 1)) (mouse-drag-repeatedly-safe-scroll
0 -1))
! ((and col-scrolling-p (>= col window-last-col))
(mouse-drag-repeatedly-safe-scroll 0 1))
! (t
! (setq scroll-delta (- row start-row)
! start-row row)
! (if col-scrolling-p
! (setq scroll-col-delta (- col start-col)
! start-col col))
! (if (or (/= 0 scroll-delta)
! (/= 0 scroll-col-delta))
! (progn
! (setq have-scrolled t)
! (mouse-drag-safe-scroll scroll-delta scroll-col-delta)))))))
;; If it was a click and not a drag, prepare to pass the event on.
;; Is there a more correct way to reconstruct the event?
(if (and (not have-scrolled)
With that the issue is gone.
The help related problem seems to be different indeed, and is not fixed
by the above, or by your change. I don't get a different backtrace as
before. And AFAIU changing `help--binding-undefined-p' is not enough:
the call is wrapped around the code that errors. I didn't try it but
verified with the tracer that it is not called before the error occurs
(i.e., it's never called due to the error), and reading the code also
suggests that this is too simple.
I don't know the logic of this code so I don't want to propose a
patch. It seems we must filter out that event but at some other place.
I'm not sure if your change in subr.el had an effect or it was an
illusion, maybe the effect differs each time, depending if I move the
mouse while clicking or whatever. I don't understand why it should have
an effect. Maybe it catched something happening later, dunno. Could
retry if you think it's worth it.
Ok, so we have now different scenarios and different proposed cures.
What concretely would help further? Did you try to reproduce the
problem btw? I don't feel like I'm the best choice to work on this, I
do know only partially what I am doing.
Michael.
- bug#59785: 30.0.50; mouse-2 > (wrong-type-argument listp #<frame *Calendar* 0x...>), Michael Heerdegen, 2022/12/02
- bug#59785: 30.0.50; mouse-2 > (wrong-type-argument listp #<frame *Calendar* 0x...>), Eli Zaretskii, 2022/12/02
- bug#59785: 30.0.50; mouse-2 > (wrong-type-argument listp #<frame *Calendar* 0x...>), Eli Zaretskii, 2022/12/02
- bug#59785: 30.0.50; mouse-2 > (wrong-type-argument listp #<frame *Calendar* 0x...>), Michael Heerdegen, 2022/12/03
- bug#59785: 30.0.50; mouse-2 > (wrong-type-argument listp #<frame *Calendar* 0x...>), Michael Heerdegen, 2022/12/03
- bug#59785: 30.0.50; mouse-2 > (wrong-type-argument listp #<frame *Calendar* 0x...>), Eli Zaretskii, 2022/12/03
- bug#59785: 30.0.50; mouse-2 > (wrong-type-argument listp #<frame *Calendar* 0x...>), Michael Heerdegen, 2022/12/03
- bug#59785: 30.0.50; mouse-2 > (wrong-type-argument listp #<frame *Calendar* 0x...>), Eli Zaretskii, 2022/12/03
- bug#59785: 30.0.50; mouse-2 > (wrong-type-argument listp #<frame *Calendar* 0x...>),
Michael Heerdegen <=
- bug#59785: 30.0.50; mouse-2 > (wrong-type-argument listp #<frame *Calendar* 0x...>), Michael Heerdegen, 2022/12/03
- bug#59785: 30.0.50; mouse-2 > (wrong-type-argument listp #<frame *Calendar* 0x...>), Eli Zaretskii, 2022/12/03
- bug#59785: 30.0.50; mouse-2 > (wrong-type-argument listp #<frame *Calendar* 0x...>), Eli Zaretskii, 2022/12/03
- bug#59785: 30.0.50; mouse-2 > (wrong-type-argument listp #<frame *Calendar* 0x...>), Michael Heerdegen, 2022/12/03
- bug#59785: 30.0.50; mouse-2 > (wrong-type-argument listp #<frame *Calendar* 0x...>), Michael Heerdegen, 2022/12/03
- bug#59785: 30.0.50; mouse-2 > (wrong-type-argument listp #<frame *Calendar* 0x...>), Eli Zaretskii, 2022/12/04
- bug#59785: 30.0.50; mouse-2 > (wrong-type-argument listp #<frame *Calendar* 0x...>), Eli Zaretskii, 2022/12/04
- bug#59785: 30.0.50; mouse-2 > (wrong-type-argument listp #<frame *Calendar* 0x...>), Michael Heerdegen, 2022/12/04
- bug#59785: 30.0.50; mouse-2 > (wrong-type-argument listp #<frame *Calendar* 0x...>), Eli Zaretskii, 2022/12/05
- bug#59785: 30.0.50; mouse-2 > (wrong-type-argument listp #<frame *Calendar* 0x...>), Michael Heerdegen, 2022/12/05