Path: utzoo!mnetor!uunet!husc6!rutgers!columbia!cunixc!evan From: evan@cunixc.columbia.edu (Evan Bigall) Newsgroups: comp.emacs Subject: Re: transpose,rotate,mirror,reverse text... Message-ID: <303@cunixc.columbia.edu> Date: 9 Dec 87 19:48:17 GMT References: <8129@steinmetz.steinmetz.UUCP> Reply-To: evan@cunixc.columbia.edu (Evan Bigall) Organization: Columbia University Lines: 30 Keywords: apl Summary: Not what you wanted but. . . | 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 I know this is not exactly what you wanted, but if you just want to get it done what I would do is: run apl in a subshell under emacs cut the text from the file into the shell and assign it to an apl variable. use the apl transpose primitive function to transpose it (or rotate it, or whatever you want, apl can do it all) cut the result back into the file This is how I would do it, but then I like apl. Send me mail if you want the details of how to do the apl stuff. evan -- evan@cunixc.columbia.edu or EJB@yktvmh.bitnet (914)789-7027 APL is a mistake, carried through to perfection. It is the language of the future for the programming techniques of the past. - Edsger Dijkstra