GNU bug report logs - #23999
25.0.95; Emacs hangs in rectangle-mark-mode with numeric prefix argument to `C-f'

Previous Next

Package: emacs;

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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 23999 in the body.
You can then email your comments to 23999 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#23999; Package emacs. (Fri, 15 Jul 2016 22:27:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to nljlistbox2 <at> gmail.com (N. Jackson):
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 15 Jul 2016 22:27:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: nljlistbox2 <at> gmail.com (N. Jackson)
To: bug-gnu-emacs <at> gnu.org
Subject: 25.0.95;
 Emacs hangs in rectangle-mark-mode with numeric prefix argument to
 `C-f'
Date: Fri, 15 Jul 2016 19:25:52 -0300
emacs -Q
C-<home>	; Go to top left corner of scratch buffer.
C-x <SPC>	; Start a rectangular selection.
C-3 C-f		; Extend the selection to the right by 3 characters.

Expected result:  Emacs creates a rectangular selection one character
high and three characters wide.

Actual result:  Emacs hangs. (C-g quits.)

With debug-on-quit on, I then get:

    Debugger entered--Lisp error: (quit)
      rectangle--*-char(forward-char 3 backward-char)
      rectangle-forward-char(3)
      funcall-interactively(rectangle-forward-char 3)
      call-interactively(rectangle-forward-char nil nil)
      command-execute(rectangle-forward-char)

On the other hand, the following recipe works as expected:

emacs -Q
C-<home>	; Go to top left corner of scratch buffer.
C-x <SPC>	; Start a rectangular selection.
C-f C-f C-f	; Extend the selection to the right by 3 characters.

Note 1:  The exact position in the scratch buffer seems to be unimportant.

Note 2:  `C-n' with a numeric prefix argument seems to work fine to extend
the rectangular region downwards.

Note 3: I see this with the Emacs 25.0.95 pre-test tarball [and with the
25.0.90 pre-test for that matter]. The problem is still present in the
Emacs 25 branch as of earlier this afternoon. I do not see the problem
with Emacs 24.5.

Please let me know if any further information is required. Thanks.


In GNU Emacs 25.0.95.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.9)
 of 2016-07-15 built on moondust
Repository revision: 916abe91fd250fc5ed27ec0be7d57421e7908111
Windowing system distributor 'Fedora Project', version 11.0.11803000
System Description:	Fedora release 23 (Twenty Three)

Configured using:
 'configure --prefix=/home/nlj/local/ --enable-checking=yes,glyphs
 --enable-check-lisp-object-type 'CFLAGS=-O2 -g3 -gdwarf-4''

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GCONF GSETTINGS NOTIFY
ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11

Important settings:
  value of $LC_MONETARY: en_DK.utf8
  value of $LC_NUMERIC: en_DK.utf8
  value of $LC_TIME: en_DK.utf8
  value of $LANG: en_CA.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23999; Package emacs. (Sat, 16 Jul 2016 10:25:02 GMT) Full text and rfc822 format available.

Message #8 received at 23999 <at> debbugs.gnu.org (full text, mbox):

From: Stephen Berman <stephen.berman <at> gmx.net>
To: nljlistbox2 <at> gmail.com (N. Jackson)
Cc: 23999 <at> debbugs.gnu.org
Subject: Re: bug#23999: 25.0.95;
 Emacs hangs in rectangle-mark-mode with numeric prefix argument to
 `C-f'
Date: Sat, 16 Jul 2016 12:24:41 +0200
On Fri, 15 Jul 2016 19:25:52 -0300 nljlistbox2 <at> gmail.com (N. Jackson) wrote:

> emacs -Q
> C-<home>	; Go to top left corner of scratch buffer.
> C-x <SPC>	; Start a rectangular selection.
> C-3 C-f		; Extend the selection to the right by 3 characters.
>
> Expected result:  Emacs creates a rectangular selection one character
> high and three characters wide.
>
> Actual result:  Emacs hangs. (C-g quits.)
>
> With debug-on-quit on, I then get:
>
>     Debugger entered--Lisp error: (quit)
>       rectangle--*-char(forward-char 3 backward-char)
>       rectangle-forward-char(3)
>       funcall-interactively(rectangle-forward-char 3)
>       call-interactively(rectangle-forward-char nil nil)
>       command-execute(rectangle-forward-char)
>
> On the other hand, the following recipe works as expected:
>
> emacs -Q
> C-<home>	; Go to top left corner of scratch buffer.
> C-x <SPC>	; Start a rectangular selection.
> C-f C-f C-f	; Extend the selection to the right by 3 characters.
>
> Note 1:  The exact position in the scratch buffer seems to be unimportant.
>
> Note 2:  `C-n' with a numeric prefix argument seems to work fine to extend
> the rectangular region downwards.
>
> Note 3: I see this with the Emacs 25.0.95 pre-test tarball [and with the
> 25.0.90 pre-test for that matter]. The problem is still present in the
> Emacs 25 branch as of earlier this afternoon. I do not see the problem
> with Emacs 24.5.

This is due to using save-excursion in rectangle--*-char.  Replacing
that with progn makes it work with a numeric prefix argument AFAICT, and
I have not seen any resulting problems, but maybe Stefan Monnier, who
made the changes in commit 7e74ad0 that caused this regression, had a
particular case in mind that the save-excursion was intended to deal
with.  If not, I think this change should go into emacs-25 (since it is
a regression from 24.5).

diff --git a/lisp/rect.el b/lisp/rect.el
index 43621d9..9dd5db4 100644
--- a/lisp/rect.el
+++ b/lisp/rect.el
@@ -644,7 +644,7 @@ rectangle--*-char
                (curcol (current-column))
                (nextcol
                 (condition-case nil
-                    (save-excursion
+                    (progn
                       (funcall cmd 1)
                       (cond
                        ((> bol (point)) (- curcol 1))

Steve Berman




Added indication that bug 23999 blocks19759 Request was from Kaushal Modi <kaushal.modi <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 20 Jul 2016 17:18:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23999; Package emacs. (Wed, 20 Jul 2016 17:20:01 GMT) Full text and rfc822 format available.

Message #13 received at 23999 <at> debbugs.gnu.org (full text, mbox):

From: Kaushal Modi <kaushal.modi <at> gmail.com>
To: 23999 <at> debbugs.gnu.org
Subject: 25.0.95; Emacs hangs in rectangle-mark-mode with numeric prefix
 argument to `C-f'
Date: Wed, 20 Jul 2016 17:19:04 +0000
[Message part 1 (text/plain, inline)]
I confirm this bug too.
-- 

Kaushal Modi
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23999; Package emacs. (Fri, 22 Jul 2016 07:02:02 GMT) Full text and rfc822 format available.

Message #16 received at 23999 <at> debbugs.gnu.org (full text, mbox):

From: Stephen Berman <stephen.berman <at> gmx.net>
To: 23999 <at> debbugs.gnu.org
Cc: jwiegley <at> gmail.com, eliz <at> gnu.org, monnier <at> iro.umontreal.ca
Subject: Re: bug#23999: 25.0.95;
 Emacs hangs in rectangle-mark-mode with numeric prefix argument to
 `C-f'
Date: Fri, 22 Jul 2016 09:01:12 +0200
Ping!  (This was made a blocking bug for 25.1.)

On Sat, 16 Jul 2016 12:24:41 +0200 Stephen Berman <stephen.berman <at> gmx.net> wrote:

> On Fri, 15 Jul 2016 19:25:52 -0300 nljlistbox2 <at> gmail.com (N. Jackson) wrote:
>
>> emacs -Q
>> C-<home>	; Go to top left corner of scratch buffer.
>> C-x <SPC>	; Start a rectangular selection.
>> C-3 C-f		; Extend the selection to the right by 3 characters.
>>
>> Expected result:  Emacs creates a rectangular selection one character
>> high and three characters wide.
>>
>> Actual result:  Emacs hangs. (C-g quits.)
>>
>> With debug-on-quit on, I then get:
>>
>>     Debugger entered--Lisp error: (quit)
>>       rectangle--*-char(forward-char 3 backward-char)
>>       rectangle-forward-char(3)
>>       funcall-interactively(rectangle-forward-char 3)
>>       call-interactively(rectangle-forward-char nil nil)
>>       command-execute(rectangle-forward-char)
>>
>> On the other hand, the following recipe works as expected:
>>
>> emacs -Q
>> C-<home>	; Go to top left corner of scratch buffer.
>> C-x <SPC>	; Start a rectangular selection.
>> C-f C-f C-f	; Extend the selection to the right by 3 characters.
>>
>> Note 1:  The exact position in the scratch buffer seems to be unimportant.
>>
>> Note 2:  `C-n' with a numeric prefix argument seems to work fine to extend
>> the rectangular region downwards.
>>
>> Note 3: I see this with the Emacs 25.0.95 pre-test tarball [and with the
>> 25.0.90 pre-test for that matter]. The problem is still present in the
>> Emacs 25 branch as of earlier this afternoon. I do not see the problem
>> with Emacs 24.5.
>
> This is due to using save-excursion in rectangle--*-char.  Replacing
> that with progn makes it work with a numeric prefix argument AFAICT, and
> I have not seen any resulting problems, but maybe Stefan Monnier, who
> made the changes in commit 7e74ad0 that caused this regression, had a
> particular case in mind that the save-excursion was intended to deal
> with.  If not, I think this change should go into emacs-25 (since it is
> a regression from 24.5).
>
> diff --git a/lisp/rect.el b/lisp/rect.el
> index 43621d9..9dd5db4 100644
> --- a/lisp/rect.el
> +++ b/lisp/rect.el
> @@ -644,7 +644,7 @@ rectangle--*-char
>                 (curcol (current-column))
>                 (nextcol
>                  (condition-case nil
> -                    (save-excursion
> +                    (progn
>                        (funcall cmd 1)
>                        (cond
>                         ((> bol (point)) (- curcol 1))
>
> Steve Berman




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23999; Package emacs. (Fri, 22 Jul 2016 07:15:01 GMT) Full text and rfc822 format available.

Message #19 received at 23999 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stephen Berman <stephen.berman <at> gmx.net>
Cc: jwiegley <at> gmail.com, monnier <at> iro.umontreal.ca, 23999 <at> debbugs.gnu.org
Subject: Re: bug#23999: 25.0.95;
 Emacs hangs in rectangle-mark-mode with numeric prefix argument to
 `C-f'
Date: Fri, 22 Jul 2016 10:14:39 +0300
unblock 19759 by 23999
thanks

> From: Stephen Berman <stephen.berman <at> gmx.net>
> Cc: eliz <at> gnu.org, jwiegley <at> gmail.com, monnier <at> iro.umontreal.ca
> Date: Fri, 22 Jul 2016 09:01:12 +0200
> 
> Ping!  (This was made a blocking bug for 25.1.)

I'd appreciate if people who think some bug needs to block the release
asked for my and John's agreement first.

In this case, I don't agree that this should block the release, since
a very simple workaround is available.

> > diff --git a/lisp/rect.el b/lisp/rect.el
> > index 43621d9..9dd5db4 100644
> > --- a/lisp/rect.el
> > +++ b/lisp/rect.el
> > @@ -644,7 +644,7 @@ rectangle--*-char
> >                 (curcol (current-column))
> >                 (nextcol
> >                  (condition-case nil
> > -                    (save-excursion
> > +                    (progn
> >                        (funcall cmd 1)
> >                        (cond
> >                         ((> bol (point)) (- curcol 1))

I'm fine with pushing to master if no one objects to this particular
solution.




Removed indication that bug 23999 blocks Request was from Eli Zaretskii <eliz <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 22 Jul 2016 07:15:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23999; Package emacs. (Fri, 22 Jul 2016 07:26:02 GMT) Full text and rfc822 format available.

Message #24 received at 23999 <at> debbugs.gnu.org (full text, mbox):

From: Stephen Berman <stephen.berman <at> gmx.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: jwiegley <at> gmail.com, monnier <at> iro.umontreal.ca, 23999 <at> debbugs.gnu.org
Subject: Re: bug#23999: 25.0.95;
 Emacs hangs in rectangle-mark-mode with numeric prefix argument to
 `C-f'
Date: Fri, 22 Jul 2016 09:25:29 +0200
On Fri, 22 Jul 2016 10:14:39 +0300 Eli Zaretskii <eliz <at> gnu.org> wrote:

> unblock 19759 by 23999
> thanks
>
>> From: Stephen Berman <stephen.berman <at> gmx.net>
>> Cc: eliz <at> gnu.org, jwiegley <at> gmail.com, monnier <at> iro.umontreal.ca
>> Date: Fri, 22 Jul 2016 09:01:12 +0200
>> 
>> Ping!  (This was made a blocking bug for 25.1.)
>
> I'd appreciate if people who think some bug needs to block the release
> asked for my and John's agreement first.

Just to be clear, I didn't make it a blocker.

> In this case, I don't agree that this should block the release, since
> a very simple workaround is available.
>
>> > diff --git a/lisp/rect.el b/lisp/rect.el
>> > index 43621d9..9dd5db4 100644
>> > --- a/lisp/rect.el
>> > +++ b/lisp/rect.el
>> > @@ -644,7 +644,7 @@ rectangle--*-char
>> >                 (curcol (current-column))
>> >                 (nextcol
>> >                  (condition-case nil
>> > -                    (save-excursion
>> > +                    (progn
>> >                        (funcall cmd 1)
>> >                        (cond
>> >                         ((> bol (point)) (- curcol 1))
>
> 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)?

Steve Berman




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23999; Package emacs. (Fri, 22 Jul 2016 09:32:02 GMT) Full text and rfc822 format available.

Message #27 received at 23999 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stephen Berman <stephen.berman <at> gmx.net>
Cc: jwiegley <at> gmail.com, monnier <at> iro.umontreal.ca, 23999 <at> debbugs.gnu.org
Subject: Re: bug#23999: 25.0.95;
 Emacs hangs in rectangle-mark-mode with numeric prefix argument to
 `C-f'
Date: Fri, 22 Jul 2016 12:31:33 +0300
> From: Stephen Berman <stephen.berman <at> gmx.net>
> Cc: 23999 <at> debbugs.gnu.org,  jwiegley <at> gmail.com,  monnier <at> iro.umontreal.ca
> Date: Fri, 22 Jul 2016 09:25:29 +0200
> 
> > I'd appreciate if people who think some bug needs to block the release
> > asked for my and John's agreement first.
> 
> Just to be clear, I didn't make it a blocker.

I know.

> > 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, and because we cannot assume it doesn't
break anything else without prolonging the pretest.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23999; Package emacs. (Fri, 22 Jul 2016 11:20:02 GMT) Full text and rfc822 format available.

Message #30 received at 23999 <at> debbugs.gnu.org (full text, mbox):

From: Stephen Berman <stephen.berman <at> gmx.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: jwiegley <at> gmail.com, monnier <at> iro.umontreal.ca, 23999 <at> debbugs.gnu.org
Subject: Re: bug#23999: 25.0.95;
 Emacs hangs in rectangle-mark-mode with numeric prefix argument to
 `C-f'
Date: Fri, 22 Jul 2016 13:19:14 +0200
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
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)))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23999; Package emacs. (Fri, 22 Jul 2016 11:22:02 GMT) Full text and rfc822 format available.

Message #33 received at 23999 <at> debbugs.gnu.org (full text, mbox):

From: Stephen Berman <stephen.berman <at> gmx.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: jwiegley <at> gmail.com, monnier <at> iro.umontreal.ca, 23999 <at> debbugs.gnu.org
Subject: Re: bug#23999: 25.0.95;
 Emacs hangs in rectangle-mark-mode with numeric prefix argument to
 `C-f'
Date: Fri, 22 Jul 2016 13:21:37 +0200
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)))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23999; Package emacs. (Fri, 22 Jul 2016 13:28:01 GMT) Full text and rfc822 format available.

Message #36 received at 23999 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stephen Berman <stephen.berman <at> gmx.net>
Cc: jwiegley <at> gmail.com, monnier <at> iro.umontreal.ca, 23999 <at> debbugs.gnu.org
Subject: Re: bug#23999: 25.0.95;
 Emacs hangs in rectangle-mark-mode with numeric prefix argument to
 `C-f'
Date: Fri, 22 Jul 2016 16:27:09 +0300
> From: Stephen Berman <stephen.berman <at> gmx.net>
> Cc: 23999 <at> debbugs.gnu.org,  jwiegley <at> gmail.com,  monnier <at> iro.umontreal.ca
> Date: Fri, 22 Jul 2016 13:19:14 +0200
> 
> 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?

Yes.

Also, the situation seems to be rather rare, or else I don't
understand how come we didn't hear about it until now.

> >                              and because we cannot assume it doesn't
> > break anything else without prolonging the pretest.
> 
> Thanks for your healthy scepticism here

No wisdom there, just a lot of gray hair.  Thanks for double-checking.

> 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.

What do others think?  John?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23999; Package emacs. (Fri, 22 Jul 2016 14:18:02 GMT) Full text and rfc822 format available.

Message #39 received at 23999 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Stephen Berman <stephen.berman <at> gmx.net>
Cc: jwiegley <at> gmail.com, eliz <at> gnu.org, 23999 <at> debbugs.gnu.org
Subject: Re: bug#23999: 25.0.95;
 Emacs hangs in rectangle-mark-mode with numeric prefix argument to
 `C-f'
Date: Fri, 22 Jul 2016 10:17:50 -0400
>> @@ -644,7 +644,7 @@ rectangle--*-char
>>                 (curcol (current-column))
>>                 (nextcol
>>                  (condition-case nil
>> -                    (save-excursion
>> +                    (progn
>>                        (funcall cmd 1)
>>                        (cond
>>                         ((> bol (point)) (- curcol 1))

Hmm... this function is quite messy.  Using `progn' here make it even
more messy (e.g. what happens when you jump over some TAB among the
N movements).

My impression is that the whole `save-excursion' thingy should be moved
out of the while loop.  And actually there probably shouldn't be any
such loop at all: we should just do +n or -n directly.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23999; Package emacs. (Fri, 22 Jul 2016 23:26:02 GMT) Full text and rfc822 format available.

Message #42 received at 23999 <at> debbugs.gnu.org (full text, mbox):

From: Kaushal Modi <kaushal.modi <at> gmail.com>
To: "23999 <at> debbugs.gnu.org" <23999 <at> debbugs.gnu.org>,
 Eli Zaretskii <eliz <at> gnu.org>
Subject: 25.0.95; Emacs hangs in rectangle-mark-mode with numeric prefix
 argument to `C-f'
Date: Fri, 22 Jul 2016 23:25:25 +0000
[Message part 1 (text/plain, inline)]
> Eli
> I'd appreciate if people who think some bug needs to block the release
asked for my and John's agreement first.

Will do so. Odd, I did not receive any of the communication followed on
that thread even though I had marked it as a blocker and also had replied
to it.

How do I ensure that I always get emails for a debbugs once I have replied
to it?

I had happened to bookmark this debbugs and visited it just now to see if
anyone had a chance to review it.
-- 

Kaushal Modi
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23999; Package emacs. (Sat, 23 Jul 2016 07:36:02 GMT) Full text and rfc822 format available.

Message #45 received at 23999 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Kaushal Modi <kaushal.modi <at> gmail.com>
Cc: 23999 <at> debbugs.gnu.org
Subject: Re: 25.0.95; Emacs hangs in rectangle-mark-mode with numeric prefix
 argument to `C-f'
Date: Sat, 23 Jul 2016 10:35:54 +0300
> From: Kaushal Modi <kaushal.modi <at> gmail.com>
> Date: Fri, 22 Jul 2016 23:25:25 +0000
> 
> How do I ensure that I always get emails for a debbugs once I have replied to it?

You can't.  The only way is to subscribe to the bug-gnu-emacs mailing
list.




Reply sent to charles <at> aurox.ch (Charles A. Roelli):
You have taken responsibility. (Tue, 19 Dec 2017 19:42:01 GMT) Full text and rfc822 format available.

Notification sent to nljlistbox2 <at> gmail.com (N. Jackson):
bug acknowledged by developer. (Tue, 19 Dec 2017 19:42:01 GMT) Full text and rfc822 format available.

Message #50 received at 23999-done <at> debbugs.gnu.org (full text, mbox):

From: charles <at> aurox.ch (Charles A. Roelli)
To: nljlistbox2 <at> gmail.com (N. Jackson)
Cc: 23999-done <at> debbugs.gnu.org
Subject: Re: bug#23999: 25.0.95;
 Emacs hangs in rectangle-mark-mode with numeric prefix argument to
 `C-f'
Date: Tue, 19 Dec 2017 20:44:27 +0100
> From: nljlistbox2 <at> gmail.com (N. Jackson)
> Date: Fri, 15 Jul 2016 19:25:52 -0300
> 
> emacs -Q
> C-<home>	; Go to top left corner of scratch buffer.
> C-x <SPC>	; Start a rectangular selection.
> C-3 C-f		; Extend the selection to the right by 3 characters.
> 
> Expected result:  Emacs creates a rectangular selection one character
> high and three characters wide.
> 
> Actual result:  Emacs hangs. (C-g quits.)
> 
> With debug-on-quit on, I then get:
> 
>     Debugger entered--Lisp error: (quit)
>       rectangle--*-char(forward-char 3 backward-char)
>       rectangle-forward-char(3)
>       funcall-interactively(rectangle-forward-char 3)
>       call-interactively(rectangle-forward-char nil nil)
>       command-execute(rectangle-forward-char)
> 
> On the other hand, the following recipe works as expected:
> 
> emacs -Q
> C-<home>	; Go to top left corner of scratch buffer.
> C-x <SPC>	; Start a rectangular selection.
> C-f C-f C-f	; Extend the selection to the right by 3 characters.
> 
> Note 1:  The exact position in the scratch buffer seems to be unimportant.
> 
> Note 2:  `C-n' with a numeric prefix argument seems to work fine to extend
> the rectangular region downwards.
> 
> Note 3: I see this with the Emacs 25.0.95 pre-test tarball [and with the
> 25.0.90 pre-test for that matter]. The problem is still present in the
> Emacs 25 branch as of earlier this afternoon. I do not see the problem
> with Emacs 24.5.
> 
> Please let me know if any further information is required. Thanks.
> 
> 
> In GNU Emacs 25.0.95.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.9)
>  of 2016-07-15 built on moondust
> Repository revision: 916abe91fd250fc5ed27ec0be7d57421e7908111
> Windowing system distributor 'Fedora Project', version 11.0.11803000
> System Description:	Fedora release 23 (Twenty Three)
> 
> Configured using:
>  'configure --prefix=/home/nlj/local/ --enable-checking=yes,glyphs
>  --enable-check-lisp-object-type 'CFLAGS=-O2 -g3 -gdwarf-4''
> 
> Configured features:
> XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GCONF GSETTINGS NOTIFY
> ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
> TOOLKIT_SCROLL_BARS GTK3 X11
> 
> Important settings:
>   value of $LC_MONETARY: en_DK.utf8
>   value of $LC_NUMERIC: en_DK.utf8
>   value of $LC_TIME: en_DK.utf8
>   value of $LANG: en_CA.UTF-8
>   value of $XMODIFIERS: @im=ibus
>   locale-coding-system: utf-8-unix

It's fixed since the fix for Bug#25773 (duplicate of this one) was
pushed.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23999; Package emacs. (Tue, 19 Dec 2017 21:56:01 GMT) Full text and rfc822 format available.

Message #53 received at 23999 <at> debbugs.gnu.org (full text, mbox):

From: nljlistbox2 <at> gmail.com (N. Jackson)
To: charles <at> aurox.ch (Charles A. Roelli)
Cc: 23999 <at> debbugs.gnu.org
Subject: Re: bug#23999: 25.0.95;
 Emacs hangs in rectangle-mark-mode with numeric prefix argument to
 `C-f'
Date: Tue, 19 Dec 2017 16:55:08 -0500
At 20:44 +0100 on Tuesday 2017-12-19, Charles A. Roelli wrote:
>
> It's fixed since the fix for Bug#25773 (duplicate of this one) was
> pushed.

Yup, seems to work fine in Emacs 26.0.90 pretest.

Thanks for noticing the duplicate and for tidying it up / closing it.

N.





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 17 Jan 2018 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 155 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.