From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.bugs Subject: 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 Message-ID: <87vazxc3zy.fsf@gmx.net> References: <87twfq1qtr.fsf@moondust.awandering> <87y4517udy.fsf@gmx.net> <878twucg1z.fsf@gmx.net> <83a8haxhy8.fsf@gnu.org> <874m7icexi.fsf@gmx.net> <834m7ixbm2.fsf@gnu.org> <87zip9c43x.fsf@gmx.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1469186548 27024 80.91.229.3 (22 Jul 2016 11:22:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 22 Jul 2016 11:22:28 +0000 (UTC) Cc: jwiegley@gmail.com, monnier@iro.umontreal.ca, 23999@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 22 13:22:16 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bQYWz-000080-Vo for geb-bug-gnu-emacs@m.gmane.org; Fri, 22 Jul 2016 13:22:14 +0200 Original-Received: from localhost ([::1]:46538 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQYWz-0004b0-9Y for geb-bug-gnu-emacs@m.gmane.org; Fri, 22 Jul 2016 07:22:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35170) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQYWs-0004au-QX for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2016 07:22:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bQYWo-0006M8-Mp for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2016 07:22:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48498) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQYWo-0006Lu-Iv for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2016 07:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bQYWo-0007Cm-Ce for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2016 07:22:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 22 Jul 2016 11:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23999 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23999-submit@debbugs.gnu.org id=B23999.146918650727672 (code B ref 23999); Fri, 22 Jul 2016 11:22:02 +0000 Original-Received: (at 23999) by debbugs.gnu.org; 22 Jul 2016 11:21:47 +0000 Original-Received: from localhost ([127.0.0.1]:60835 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bQYWZ-0007CG-HV for submit@debbugs.gnu.org; Fri, 22 Jul 2016 07:21:47 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:63981) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bQYWX-0007C4-V3 for 23999@debbugs.gnu.org; Fri, 22 Jul 2016 07:21:46 -0400 Original-Received: from rosalinde ([89.245.112.242]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0MWT8s-1boKqn1d7q-00XfBT; Fri, 22 Jul 2016 13:21:39 +0200 In-Reply-To: <87zip9c43x.fsf@gmx.net> (Stephen Berman's message of "Fri, 22 Jul 2016 13:19:14 +0200") User-Agent: Gnus/5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Wl2DLaZrEyTCvz5yxuTFlBHmmRvz6ApE8SlVUw2cNtka8vkJ9l/ZLF8oNUysKFR+lxX X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:121411 Archived-At: On Fri, 22 Jul 2016 13:19:14 +0200 Stephen Berman wrote: > On Fri, 22 Jul 2016 12:31:33 +0300 Eli Zaretskii 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)))