Subject: Re: bug#79022: 30.1.90; Shift-select-mode does not appear to work when scroll-lock-mode is enabled
From: Eli Zaretskii <[email-masked]>
To: "John Haman" <[email-masked]>
Cc: [email-masked]
Date: Tue, 15 Jul 2025 16:24:30 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

> Date: Tue, 15 Jul 2025 08:52:45 -0400
> From: "John Haman" <[email-masked]>
> Cc: [email-masked]
> 
> Yep, that patch resolves the bug completely!

Thanks, now installed on the master branch, and closing the bug.

> --
> John T. Haman
> [email-masked]
> 
> On Tue, Jul 15, 2025, at 7:45 AM, Eli Zaretskii wrote:
> >> Date: Mon, 14 Jul 2025 15:54:13 -0400
> >> From: "John Haman" <[email-masked]>
> >> 
> >> In short, I believe there is a bad interaction between scroll-lock-mode
> >> and shift-select-mode that prevent shift-select mode from working as
> >> intended when scroll-lock-mode is active.
> >> 
> >> 1. Emacs -Q
> >> 2. Open a text file.
> >> 3. Enable scroll-lock-mode
> >> 4. Try to highlight some text using C-S-n or C-S-<down>. I expected it
> >> to be selected, but it is not.
> >
> > Thanks.  Does the patch below fix this problem without introducing new
> > problems?
> >
> > diff --git a/lisp/scroll-lock.el b/lisp/scroll-lock.el
> > index 6b99e29..7689ca8 100644
> > --- a/lisp/scroll-lock.el
> > +++ b/lisp/scroll-lock.el
> > @@ -84,7 +84,7 @@ scroll-lock-move-to-column
> > 
> >  (defun scroll-lock-next-line-always-scroll (&optional arg)
> >    "Scroll up ARG lines keeping point fixed."
> > -  (interactive "p")
> > +  (interactive "^p")
> >    (or arg (setq arg 1))
> >    (scroll-lock-update-goal-column)
> >    (condition-case nil
> > @@ -94,7 +94,7 @@ scroll-lock-next-line-always-scroll
> > 
> >  (defun scroll-lock-next-line (&optional arg)
> >    "Scroll up ARG lines keeping point fixed."
> > -  (interactive "p")
> > +  (interactive "^p")
> >    (or arg (setq arg 1))
> >    (scroll-lock-update-goal-column)
> >    (if (pos-visible-in-window-p (point-max))
> > @@ -104,7 +104,7 @@ scroll-lock-next-line
> > 
> >  (defun scroll-lock-previous-line (&optional arg)
> >    "Scroll up ARG lines keeping point fixed."
> > -  (interactive "p")
> > +  (interactive "^p")
> >    (or arg (setq arg 1))
> >    (scroll-lock-update-goal-column)
> >    (condition-case nil
> > @@ -114,7 +114,7 @@ scroll-lock-previous-line
> > 
> >  (defun scroll-lock-forward-paragraph (&optional arg)
> >    "Scroll down ARG paragraphs keeping point fixed."
> > -  (interactive "p")
> > +  (interactive "^p")
> >    (or arg (setq arg 1))
> >    (scroll-lock-update-goal-column)
> >    (scroll-up (count-screen-lines (point) (save-excursion
> > @@ -124,7 +124,7 @@ scroll-lock-forward-paragraph
> > 
> >  (defun scroll-lock-backward-paragraph (&optional arg)
> >    "Scroll up ARG paragraphs keeping point fixed."
> > -  (interactive "p")
> > +  (interactive "^p")
> >    (or arg (setq arg 1))
> >    (scroll-lock-update-goal-column)
> >    (let ((goal (save-excursion (backward-paragraph arg) (point))))
>