jason@VIOLET.BERKELEY.EDU.UUCP (08/11/87)
I sometimes would like to slice out a set of vertical columns in a file for viewing, and do not want to modify the buffer. Has anyone tried to do this? Jason Venner UUCP {tektronix,dual,sun,ihnp4,decvax}!ucbvax!jade!jason New style jason@jade.berkeley.edu ARPA | CSNET jason%jade@Berkeley.ARPA BITNET jason@ucbjade.BITNET
smithln@CS.ROCHESTER.EDU (08/12/87)
You could implement something using the rectangle package - If you copy a rectangle to a register, switch to a new buffer and then copy it out you might achieve what you want. I do agree a narrow-to-rectangle function would be nice to have though (although maybe tough to implement) - Neil Neil Smithline ARPA: smithln@cs.rochester.edu UUCP: ..!{allegra,decvax,seismo}!rochester!smithln Mail: CS Dept., University of Rochester, Rochester NY 14627
jason@VIOLET.BERKELEY.EDU (Jason Venner) (08/13/87)
What I currently do is: I kill the set of columns out as a rectangle, yank them into a new buffer, and then write that buffer out (incase of system or emacs crashes) then I can look at either the killed rectangle, or the buffer with the set of columns missing. This is incredably ugly though. Jason Venner UUCP {tektronix,dual,sun,ihnp4,decvax}!ucbvax!jade!jason New style jason@jade.berkeley.edu ARPA | CSNET jason%jade@Berkeley.ARPA BITNET jason@ucbjade.BITNET
gildea@mit-erl.UUCP (Stephen Gildea) (08/18/87)
Notice: (C) Copyright Jason Venner Tue Aug 11 12:40:51 1987 Date: Tue, 11 Aug 87 13:42:30 PDT From: Jason Venner <jason@violet.Berkeley.EDU> I sometimes would like to slice out a set of vertical columns in a file for viewing, and do not want to modify the buffer. Has anyone tried to do this? If you're just interested in viewing, you could vertically split your screen in two to create a window of the desired width, and then horizontally scroll the columns of interest into the display. < Stephen
gaynor@topaz.rutgers.edu (Silver) (08/18/87)
Jason Venner (venner@violet.berkeley.edu) writes: > I sometimes would like to slice out a set of vertical columns in a > file for viewing, and do not want to modify the buffer. Has anyone > tried to do this? I think the following two functions are what you want, if you do indeed want to extract a rectangular region from text. copy-rectangle-to-register: Copy rectangular region into register REG. With prefix arg, delete as well. Called from program, takes four args: REG, START, END and DELETE-FLAG. START and END are buffer positions giving two corners of rectangle. picture-yank-rectangle-from-register: Overlay rectangle saved in REGISTER. The rectangle is positioned with upper left corner at point, overwriting existing text. With prefix argument, the rectangle is inserted instead, shifting existing text. Leaves mark at one corner of rectangle and point at the other (diagonally opposed) corner. Enjoy, Silver