help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Transposing words over middle words


From: Joost Kremers
Subject: Re: Transposing words over middle words
Date: Thu, 16 Nov 2017 09:41:50 +0100
User-agent: mu4e 1.0-alpha0; emacs 25.3.50.1


On Thu, Nov 16 2017, Loris Bennett wrote:
Assuming I'm at the end of the three words where the transposition
should take place, I usually do

   Jack and Jill went up the hill.
                ^ point is here: M-b
   Jack and Jill went up the hill.
            ^ point is here: M-t
   Jack Jill and went up the hill.
                ^ point is here: M-b M-b
   Jack Jill and went up the hill.
        ^ point is here: M-t M-t
   Jill and Jack went up the hill.

It seems moderately elegant to me, because it involves a fairly simple ordering of only two different functions. Having said that, I don't do
it that regularly and so still often screw it up.

There is a slightly quicker way of doing it (with | indicating point):

   Jack |and Jill went up the hill.

        M-2 M-t

   and Jill Jack| went up the hill.

       M-2 M-b (or M-b M-b)

   and |Jill Jack went up the hill.

       M-t

   Jill and Jack went up the hill.

But yeah, I've also been in the situation where I wished there were a function 'transpose two words while pretending the word point is on isn't there'...

--
Joost Kremers
Life has its moments



reply via email to

[Prev in Thread] Current Thread [Next in Thread]