GNU bug report logs - #21885
24.5; Transposing things with a negative argument

Previous Next

Package: emacs;

Reported by: Eli Barzilay <eli <at> barzilay.org>

Date: Thu, 12 Nov 2015 08:13:02 UTC

Severity: normal

Merged with 14037, 20698

Found in versions 24.3.50, 24.5, 25.0.50

Fixed in version 25.1

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Eli Barzilay <eli <at> barzilay.org>
Subject: bug#21885: closed (Re: bug#21885: 24.5; Transposing things with a
 negative argument)
Date: Fri, 13 Nov 2015 09:49:03 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#21885: 24.5; Transposing things with a negative argument

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 21885 <at> debbugs.gnu.org.

-- 
21885: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=21885
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Eli Zaretskii <eliz <at> gnu.org>
To: Eli Barzilay <eli <at> barzilay.org>
Cc: 21885-done <at> debbugs.gnu.org, stephen_leake <at> stephe-leake.org, rudalics <at> gmx.at
Subject: Re: bug#21885: 24.5; Transposing things with a negative argument
Date: Fri, 13 Nov 2015 11:47:54 +0200
> Date: Thu, 12 Nov 2015 14:27:07 -0500
> From: Eli Barzilay <eli <at> barzilay.org>
> Cc: Stephen Leake <stephen_leake <at> stephe-leake.org>, 21885 <at> debbugs.gnu.org, 
> 	martin rudalics <rudalics <at> gmx.at>
> 
> On Thu, Nov 12, 2015 at 1:24 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> >> From: Stephen Leake <stephen_leake <at> stephe-leake.org>
> >> Date: Thu, 12 Nov 2015 12:11:42 -0600
> >> Cc: 21885 <at> debbugs.gnu.org
> >>
> >> Eli Barzilay <eli <at> barzilay.org> writes:
> >>
> >> > In the past (IIRC, up to around v24.3) transposing things (chars,
> >> > words, sexprs, lines) would always leave the point after the
> >> > transposed thing. ...  This is no longer happenning.
> > [...]
> >
> > I think I know the answer: the difference is visible only if you
> > invoke C-t with a negative argument, as in "C-- C-t".
> 
> Yes, exactly -- and yes, this is the same bug as #20698.  I looked at
> the code a bit more since then, and I think that my patch is a fine fix.

Thanks, pushed.

[Message part 3 (message/rfc822, inline)]
From: Eli Barzilay <eli <at> barzilay.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.5; Transposing things with a negative argument
Date: Thu, 12 Nov 2015 03:12:07 -0500
[Message part 4 (text/plain, inline)]
In the past (IIRC, up to around v24.3) transposing things (chars,
words, sexprs, lines) would always leave the point after the
transposed thing.  This means that I could always use a `C--' prefix
to "drag" the current thing backwards in the same way that the default
action drags it forwards.  This is no longer happenning.

After a few trials the thing that seems to fix it is adding this line
at the end of the `transpose-subr' definition:

    (goto-char (+ (car pos2) (- (cdr pos1) (car pos1))))

To be clear, this is not a backward incompatible change -- it fixes
the *current* incompatible change.

Patch file attached.

[0001-Fix-transpose-subr-with-a-negative-argument.patch (application/octet-stream, attachment)]
[Message part 6 (text/plain, inline)]
-- 
                    ((x=>x(x))(x=>x(x)))                   Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

This bug report was last modified 9 years and 195 days ago.

Previous Next


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