On Thu, Jul 1, 2021 at 2:48 PM Rich Shepard <rshep...@appl-ecosys.com>
wrote:

> I know how to define and manipulate rectangular regions in emacs yet I'm
> not
> getting the results I need appending two columns to build a testing
> database.
>
> Using factory I created lists of SSNs, names, and addreses. Now I want to
> combine the SSNs and names, row-by-row, as they're in the same database
> table.
>
> Here are short versions of the lists
> ssn.dat:
> (155-02-5827,
> (795-61-4130,
> (833-38-7251,
> (302-37-0777,
> (360-19-8292,
>
> names.dat:
> Richard Chen);
> James Peterson);
> Dana Brown);
> Misty Mills);
> James Swanson);
>
> When I select the names and mark the rectangle for copying (C-x r M-w),
> then
> yank them in the ssn.dat file the first name is appended to the first ssn,
> but the rest of the names are placed between the second and last ssns in
> the
> list.
>
> I'm sure there's a way of appending each name to its ssn but I've not found
> it in my web searches.
>
> Help's appreciated,
>
> Rich
>
> Works for me.

You do have to be careful with rectangle cut-n-paste though, to space out
far enough to clear the other columns before doing the paste.  Otherwise it
can get  confused and mess the columns up.

Also, I found when I was looking up this new-fangled rectangular copy
without killing that you're using, there's an even newer rectangle
command.  C-x SPC sets (toggles really) the rectangle mark.  Once you do
that then you can use normal non-rectangular kill and yank commands on the
rectangle.

Reply via email to