Loading ...
Sorry, an error occurred while loading the content.

1542Re: [jasspa] copy-rectangle editing "problem"

Expand Messages
  • Thomas Hundt
    Jul 8, 2005
    • 0 Attachment
      > P23456789 P=set-mark position
      > 123456789 X=actual position of the cursor
      > 123456X89
      >
      > [After] kill-rectangle [you] will [have]:
      >
      > 789
      > 789
      > 789

      Yes. This is logical. Please think of the cursor (and the mark) being
      the (zero-width!) space between chars. The box on your screen is just a
      way of displaying that, held over from TV typewriter days. Run Word and
      look at the cursor it uses. It's more illustrative of what's really
      going on.

      (Also, if I may correct you on one thing, German "aktuell" does not mean
      the same as English "actual". Aktuell = current. Actual = wirklich. I
      see this a lot.)

      > you may end up in inserting
      > A LOT unused space -- just to get sure --, which you have to remove
      > later again.

      Yes. This is what I usually do. There's the other option of using the
      mouse as was just pointed out, which I haven't tried yet.

      Also: it's easy to insert a bunch of spaces, just type ^U^U^U and hit
      the spacebar. I have a macro that truncates EOL whitespace, so cleaning
      it up is even quicker. (Probably there's a built-in one, too.)

      -Th


      Meino Christian Cramer wrote:
      > From: Steven Phillips <bill@...>
      > Subject: Re[2]: [jasspa] copy-rectangle editing "problem"
      > Date: Fri, 8 Jul 2005 20:22:01 +0100
      >
      > Hi Steven, Hi Thomas!
      >
      > There is still a little annoyence in this handling of that problem.
      >
      > Think of a file (may be something automatically generated...a log
      > file...or a data dump or such) with some hundreds of lines with very
      > different lengths of the entries of the last column.
      >
      > Being at the end of the file you have to decide how far you have to
      > move right (inserting spaces directly or inderectly) to not to cut
      > off one of the hundreds of lines above....you may end up in inserting
      > A LOT unused space -- just to get sure --, which you have to remove
      > later again.
      >
      > Or do I miss someting ?
      >
      > A solution (thinking of a newbie...DANGER!) may be the following
      > algorithm for the rectangle commands:
      > The described "problem" only appears when doing something rectanglish
      > with the last column of a text.
      > Currently everything from the set-mark position (upper left) to the
      > position *before* the cursor (lower right) is take into account:
      >
      > P23456789 P=set-mark position
      > 123456789 X=actual position of the cursor
      > 123456789
      > 123456789
      > 123456789
      > 123456789
      > 123456X89
      >
      > Using kill-rectangle will be given you this one:
      >
      > 789
      > 789
      > 789
      > 789
      > 789
      > 789
      > 789
      >
      > When this behaviour of the rectanglish commands would be changed to
      > *include* the position of the cursor in determination the rectangle
      > (which appears also more logical to me, since the set-mark command
      > for setting the upper left corener do this the same way...) one were
      > enabled to """include""" the CR/LF (or LF) as part of the
      > rectangle. Doing so would *NOT* copy the EOL sign as such but
      > instruct the rectanglish command automatically to copy all lines up
      > to their EOL -- even if they are of different length -- OR insert the
      > currect -- but not to much or too less -- ammount of spaces to
      > correctly handle the rectangle.
      >
      > What do you think?
      >
      > Keep microemacsing and have a nice weekend!
      > Meino
      >
      >
      >
      >
      >>There is a new and improved solution to this problem. The mouse now supports
      >>copy and kill rectangle, see user-setup -> mouse. Use one of these to do
      >>this; it is an improvement because the mouse is not constrained in the same
      >>way the cursor is so you do not need to insert lots of spaces first.
      >>
      >>Steve
      >>
      >>
      >>>Subject: [jasspa] copy-rectangle editing "problem"
      >>>From: Thomas Hundt <thundt@...>
      >>>Date: Friday, July 8, 2005, 7:58:52 PM
      >>>To: jasspa@yahoogroups.com
      >>>What you have to know is: the rectangle commands cut EXACTLY from the
      >>>x,y of the point to the x,y of the mark. No special handling if one or
      >>>the other happens to be at EOL. Also no notion of whitespace or
      >>>anything else. Just pure x,y - x,y (with skipping of empty space).
      >>
      >>>So. If you want to cut all of the second column here:
      >>
      >> >> a ggggggggg
      >> >> b h
      >> >> c i
      >> >> d j
      >> >> e k
      >> >> f lllll
      >>
      >>
      >>>you have to put your mark on the first 'g' and the point off to the
      >>>right of the last 'l' -- BY TYPING A BUNCH OF EXTRA SPACES. Like this
      >>>(with <m> being the mark and <p> the cursor or point)
      >>
      >> >> a <m>ggggggggg
      >> >> b h
      >> >> c i
      >> >> d j
      >> >> e k
      >> >> f lllll <p>
      >>
      >>>NOW you execute the kill-rectangle command.
      >>
      >>>And if you want the leading spaces to be included as in your example
      >>>below, you have to put the mark before the first space:
      >>
      >> >> a<m> ggggggggg
      >>
      >>
      >>>(I love the rectangle commands :-) .)
      >>
      >>>-Th
      >>
      >>
      >>
      >>>Meino Christian Cramer wrote:
      >>>
      >>>>Hi,
      >>>>
      >>>> I have a longish file consisting of two rows of commands, ordered
      >>>> like that (but a lot more entries!)
      >>>>
      >>>> a g
      >>>> b h
      >>>> c i
      >>>> d j
      >>>> e k
      >>>> f l
      >>>>
      >>>> Now I want to become the file to look as this:
      >>>>
      >>>> a
      >>>> b
      >>>> c
      >>>> d
      >>>> e
      >>>> f
      >>>> g
      >>>> h
      >>>> i
      >>>> j
      >>>> k
      >>>> l
      >>>>
      >>>> I know that all this can be done by using several tools of the UNIX
      >>>> environment (the problem is not the newest one...;) but I want to
      >>>> try to solve it by copy-rectangle.
      >>>>
      >>>> Unfortunately, the file filled up a lot of pages and the length of
      >>>> the entries let me struggle.....:
      >>>>
      >>>> first-entry later-very-long-entry-of-that-file
      >>>> <pages of entries following here>
      >>>> <pages of entries following here>
      >>>> <pages of entries following here>
      >>>> <pages of entries following here>
      >>>> <pages of entries following here>
      >>>> mid-entry last-short-one
      >>>>
      >>>>
      >>>>
      >>>> Hmmmm...I did a set-mark at the "l" of
      >>>> "later-very-long-entry-of-that-file", move down the pages and then
      >>>> could not go beyond the point right after the "e" of
      >>>> "last-short-one". This way I would cut all longer entries than
      >>>> "last-short-one"... ??? Isn't it ???
      >>>>
      >>>> Or is the problem again sitting in front of my monitor ??? ;o)
      >>>>
      >>>> Have a nice weekend!
      >>>> Meino
      >>
      >>
    • Show all 7 messages in this topic