Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!steinmetz!moose!nieh
From: nieh@moose.steinmetz (nico nieh)
Newsgroups: comp.emacs
Subject: transpose,rotate,mirror,reverse text...
Message-ID: <8129@steinmetz.steinmetz.UUCP>
Date: Tue, 8-Dec-87 13:23:58 EST
Article-I.D.: steinmet.8129
Posted: Tue Dec  8 13:23:58 1987
Date-Received: Sun, 13-Dec-87 09:32:15 EST
Sender: root@steinmetz.steinmetz.UUCP
Reply-To: nieh@moose.steinmetz (nico nieh)
Organization: General Electric CRD, Schenectady, NY
Lines: 31


The following problems occurred to me yesterday while I was editing
a file which contains matrices.

1. Is there an easy way to transpose a matrix in GNU-Emacs ?

      1 2 3 4 5                 1 6 2 1 9
      6 7 8 9 2                 2 7 4 3 8
      2 4 6 8 0        ====>    3 8 6 5 7
      1 3 5 7 9                 4 9 8 7 6
      9 8 7 6 5                 5 2 0 9 5

2. Is there an easy way to rotate a rectangular of text +90/-90 degrees ?

      1 2 3 4 5                 9 1 2 6 1
      6 7 8 9 2                 8 3 4 7 2
      2 4 6 8 0       =====>    7 5 6 8 3
      1 3 5 7 9                 6 7 8 9 4
      9 8 7 6 5                 5 9 0 2 5

3. Is there an easy way to mirror a rectangular of text (vertical/horizontal) ?
4. How about reverse a line or reverse a region ?

Above questions should be applied to both character and word boundary.

Can anyone out there give me some advices ?
     Ko-Haw Nieh
     General Electric Company 
     Corporate Research and Development
     nieh@ge-crd.arpa
     518-387-7431