Subject: bug#78298: [PATCH] Scroll with mouse wheel in calendar

From: Juri Linkov <[email-masked]>
Date: Thu, 15 May 2025 19:16:04 +0300

reopen 78298
thanks

> No... there is a problem with that solution, sorry:
>
> M-x calendar RET
> select the other window again (showing *scratch* if you are in -Q)
> M-mouse-wheel over the calendar window
>
> and you get
>
> | Debugger entered--Lisp error: (void-variable displayed-month)
> |   calendar-cursor-to-date()
> |   calendar-cursor-to-nearest-date()
> |   calendar-forward-month(12)
> |   calendar-forward-year(1)
> |   funcall-interactively(calendar-forward-year 1)
> |   call-interactively(calendar-forward-year nil nil)
> |   command-execute(calendar-forward-year)

Oops, indeed.  Reopening.

While calendar-scroll-right, calendar-scroll-right-three-months,
calendar-scroll-left, calendar-scroll-left-three-months,
all they have the 'event' argument for mouse event,
there is nothing mouse-related for year scrolling.

So Manuel was right, we need calendar-scroll-left-year
and calendar-scroll-right-year.  The only question remains:
should these commands keep point on the same date/month?