GNU bug report logs -
#23999
25.0.95; Emacs hangs in rectangle-mark-mode with numeric prefix argument to `C-f'
Previous Next
Reported by: nljlistbox2 <at> gmail.com (N. Jackson)
Date: Fri, 15 Jul 2016 22:27:01 UTC
Severity: normal
Found in version 25.0.95
Done: charles <at> aurox.ch (Charles A. Roelli)
Bug is archived. No further changes may be made.
Full log
Message #33 received at 23999 <at> debbugs.gnu.org (full text, mbox):
On Fri, 22 Jul 2016 13:19:14 +0200 Stephen Berman <stephen.berman <at> gmx.net> wrote:
> On Fri, 22 Jul 2016 12:31:33 +0300 Eli Zaretskii <eliz <at> gnu.org> wrote:
>
>>> > I'm fine with pushing to master if no one objects to this particular
>>> > solution.
>>>
>>> Why not emacs-25, given that the behavior is a regression from 24.5 (and
>>> of course assuming the fix doesn't break anything else)?
>>
>> Because a workaround exists,
>
> You mean just repeating a motion command instead of using a numeric
> prefix?
>
>> and because we cannot assume it doesn't
>> break anything else without prolonging the pretest.
>
> Thanks for your healthy scepticism here; I checked again and indeed the
> patch changes the behavior in rectangle-mark-mode when attempting to
> move past bol or eol. The patch tries to rectify this and according to
^
Sorry: below
> my tests, it works with a numeric prefix argument but behaves the same
> as the current version when attempting to move past bol or eol.
>
> If you think this corrected patch should still not go into emacs-25,
> perhaps there should be a note in PROBLEMS, since motion commands in
> general accept a numeric prefix and someone who successfully used
> rectangle-mark-mode that way in 24.5 will naturally assume it works in
> 25.1 and be surprised when Emacs hangs.
>
> Steve Berman
>
> diff --git a/lisp/rect.el b/lisp/rect.el
> index fb85b18..bb01b98 100644
> --- a/lisp/rect.el
> +++ b/lisp/rect.el
> @@ -653,6 +653,12 @@ rectangle--*-char
> (end-of-buffer (+ col (1+ n)))
> (beginning-of-buffer (- curcol 1))))
> (diff (abs (- nextcol col))))
> + ;; Move to the correct column when selecting a rectangular
> + ;; region by passing a numeric prefix argument to a motion
> + ;; command, but stop at bol in any case.
> + (if (wholenump nextcol)
> + (move-to-column nextcol)
> + (goto-char bol))
> (cond
> ((and (< nextcol curcol) (< curcol col))
> (let ((curdiff (- col curcol)))
This bug report was last modified 7 years and 156 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.