GNU bug report logs -
#78298
[PATCH] Scroll with mouse wheel in calendar
Previous Next
Full log
View this message in rfc822 format
> From: Manuel Giraud <manuel <at> ledu-giraud.fr>
> Cc: Juri Linkov <juri <at> linkov.net>, Eli Zaretskii <eliz <at> gnu.org>,
> 78298 <at> debbugs.gnu.org
> Date: Fri, 16 May 2025 10:52:36 +0200
>
> Michael Heerdegen <michael_heerdegen <at> web.de> writes:
>
> [...]
>
> > | Debugger entered--Lisp error: (void-variable displayed-month)
>
> Ok. So AFAIU, one (overlooked) difference between backward/forward
> commands and scroll commands is that the latter are taking care of an
> event parameter that is used to execute the command in the context of
> the calendar buffer.
>
> So after all, I think we should be using this "scroll framework" to
> scroll years also. Here is an updated patch that could be applied on
> top of master.
Thanks, but please explain in the doc strings what is meant by "left"
and "right" in this case (AFAIU, it means "back" and "forward",
respectively). Using "left" and "right" might be confusing in
bidirectional context, so we had better spelled that out explicitly.
(I originally thought of changing the command names, but since we
already have calendar-scroll-left/right, I guess replacing that with
"forward" and "back" could adversely affect discoverability.)
> +(defun calendar-scroll-left-year (arg &optional event)
> + "Scroll the displayed calendar window left by 12*ARG months.
> +If ARG is negative the calendar is scrolled right.
Bother: the first and the 2nd sentences contradict each other. Are we
scrolling the window or the text shown in the window? Their
directions are opposite.
> +;;;###cal-autoload
> +(defun calendar-scroll-right-year (arg &optional event)
> + "Scroll the displayed calendar window right by 12*ARG months.
> +If ARG is negative the calendar is scrolled left. Maintains the relative
> +position of the cursor with respect to the calendar as well as possible.
> +EVENT is an event like `last-nonmenu-event'."
Same here.
This bug report was last modified 10 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.