Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

jasspa · JASSPA's MicroEmacs

The Yahoo! Groups Product Blog

Check it out!

Group Information

  • Members: 127
  • Category: Cyberculture
  • Founded: Jul 7, 1999
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Messages

Advanced
Messages Help
Messages 1537 - 1566 of 2695   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#1537 From: Meino Christian Cramer <Meino.Cramer@...>
Date: Fri Jul 8, 2005 5:16 pm
Subject: copy-rectangle editing "problem"
Meino.Cramer@...
Send Email Send Email
 
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

#1538 From: Thomas Hundt <thundt@...>
Date: Fri Jul 8, 2005 6:58 pm
Subject: Re: copy-rectangle editing "problem"
thundt
Send Email Send Email
 
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

#1539 From: Thomas Hundt <thundt@...>
Date: Fri Jul 8, 2005 7:00 pm
Subject: Re: Newbie Q: Narrow-to-region
thundt
Send Email Send Email
 
Without trying to figure out your exact problem, let me say that
sometimes you end up using the technique: copy stuff to a temporary
buffer, do some work on it, and copy it back.  Maybe that will help.

-Th


Phillips, Steven wrote:
>> Now your macro does the following sequence, starting at the beginnig
>> of the text:
>>
>> search-forward "d"
>> beginning-of-line
>> set-mark
>> end-of-line
>> 4 narrow-buffer
>>
>> with the last command it fails with
>>
>> "illegal narrow"
>
>
> The narrow command works on lines, not part of lines, i.e. if I set the
> mark half way along this line and then did forward-line then 4
> narrow-buffer the whole line would be narrowed. Your region did not span
> a line so there were no lines to narrow.
>
>
>> and:
>> If a file has no final CR/LF or LF the last line cannot be
>> narrowed...or am I wrong (as usual... ;)
>
>
> ME has a line flag which tells it whether to write out a line
> termination or not, it sets this flag to no when it has to split a long
> line (greater that 65520) or if the last line does not have a CR. ME
> always inserts a blank line at the end so alas you are wrong, you will
> always be able to narrow the last text containing line.
>
> Steve

#1540 From: Steven Phillips <bill@...>
Date: Fri Jul 8, 2005 7:22 pm
Subject: Re[2]: copy-rectangle editing "problem"
bill@...
Send Email Send Email
 
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


> __________________________________________________________________________

> This is an unmoderated list. JASSPA is not responsible for the content of
> any material posted to this list.

> To unsubscribe, send a mail message to

>     mailto:jasspa-unsubscribe@yahoogroups.com

> or visit http://groups.yahoo.com/group/jasspa and
> modify your account settings manually.



> Yahoo! Groups Links

#1541 From: Meino Christian Cramer <Meino.Cramer@...>
Date: Fri Jul 8, 2005 11:10 pm
Subject: Re: copy-rectangle editing "problem"
Meino.Cramer@...
Send Email Send Email
 
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
>
>
> > __________________________________________________________________________
>
> > This is an unmoderated list. JASSPA is not responsible for the content of
> > any material posted to this list.
>
> > To unsubscribe, send a mail message to
>
> >     mailto:jasspa-unsubscribe@yahoogroups.com
>
> > or visit http://groups.yahoo.com/group/jasspa and
> > modify your account settings manually.
>
>
>
> > Yahoo! Groups Links
>
>
>
>
>
>
>
>
> __________________________________________________________________________
>
> This is an unmoderated list. JASSPA is not responsible for the content of
> any material posted to this list.
>
> To unsubscribe, send a mail message to
>
>     mailto:jasspa-unsubscribe@yahoogroups.com
>
> or visit http://groups.yahoo.com/group/jasspa and
> modify your account settings manually.
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
2

#1542 From: Thomas Hundt <thundt@...>
Date: Fri Jul 8, 2005 11:42 pm
Subject: Re: copy-rectangle editing "problem"
thundt
Send Email Send Email
 
>  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
>>
>>

#1543 From: Meino Christian Cramer <Meino.Cramer@...>
Date: Sat Jul 9, 2005 3:06 am
Subject: Re: copy-rectangle editing "problem"
Meino.Cramer@...
Send Email Send Email
 
From: Thomas Hundt <thundt@...>
Subject: Re: [jasspa] copy-rectangle editing "problem"
Date: Fri, 08 Jul 2005 16:42:58 -0700

Hi Thomas,

>  >  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

   I will never 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.)

   Will pay attention to it, thanks.

>  > 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

   Ok, conclusion is, that inserting a lot of spaces just to cut out a
   rectanlge is the way to go. Aferwards I have to remove it again.

   Meino


>
> 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
> >>
> >>
>
>
> __________________________________________________________________________
>
> This is an unmoderated list. JASSPA is not responsible for the content of
> any material posted to this list.
>
> To unsubscribe, send a mail message to
>
>     mailto:jasspa-unsubscribe@yahoogroups.com
>
> or visit http://groups.yahoo.com/group/jasspa and
> modify your account settings manually.
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>

#1544 From: Steven Phillips <bill@...>
Date: Sat Jul 9, 2005 6:51 pm
Subject: Re[2]: copy-rectangle editing "problem"
bill@...
Send Email Send Email
 
Removing is easy - see docs on the command 'clean'

Steve

> Subject: [jasspa] copy-rectangle editing "problem"
> From: Meino Christian Cramer <Meino.Cramer@...>
> Date: Saturday, July 9, 2005, 4:06:21 AM
> To: jasspa@yahoogroups.com, thundt@...
> From: Thomas Hundt <thundt@...>
> Subject: Re: [jasspa] copy-rectangle editing "problem"
> Date: Fri, 08 Jul 2005 16:42:58 -0700

> Hi Thomas,

>>  >  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

>   I will never 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.)

>   Will pay attention to it, thanks.

>>  > 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

>   Ok, conclusion is, that inserting a lot of spaces just to cut out a
>   rectanlge is the way to go. Aferwards I have to remove it again.

>   Meino


>>
>> 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
>> >>
>> >>
>>
>>
>> __________________________________________________________________________
>>
>> This is an unmoderated list. JASSPA is not responsible for the content of
>> any material posted to this list.
>>
>> To unsubscribe, send a mail message to
>>
>>     mailto:jasspa-unsubscribe@yahoogroups.com
>>
>> or visit http://groups.yahoo.com/group/jasspa and
>> modify your account settings manually.
>>
>>
>>
>> Yahoo! Groups Links
>>
>>
>>
>>
>>
>>


> __________________________________________________________________________

> This is an unmoderated list. JASSPA is not responsible for the content of
> any material posted to this list.

> To unsubscribe, send a mail message to

>     mailto:jasspa-unsubscribe@yahoogroups.com

> or visit http://groups.yahoo.com/group/jasspa and
> modify your account settings manually.



> Yahoo! Groups Links

#1545 From: Meino Christian Cramer <Meino.Cramer@...>
Date: Sat Jul 9, 2005 7:29 pm
Subject: Graceful kill
Meino.Cramer@...
Send Email Send Email
 
Hi,

  is there a way to quickly kill the contents of a buffer except those
  few lines, which are narrowed out (invisible, 4 narrow-buffer used) ?

  Keep microemacsing!
  Meino

#1546 From: Thomas Hundt <thundt@...>
Date: Sat Jul 9, 2005 10:56 pm
Subject: Re: Graceful kill
thundt
Send Email Send Email
 
The obvious thing to try is

	 beginning-of-buffer
	 set-mark
	 end-of-buffer
	 kill-region

Did you try this?  It seems pretty "quick" to me.

Another obvious way is to copy the part you've narrowed to somewhere
else, and kill the buffer.





Meino Christian Cramer wrote:
> Hi,
>
>  is there a way to quickly kill the contents of a buffer except those
>  few lines, which are narrowed out (invisible, 4 narrow-buffer used) ?
>
>  Keep microemacsing!
>  Meino

#1547 From: Meino Christian Cramer <Meino.Cramer@...>
Date: Sun Jul 10, 2005 4:50 am
Subject: Re: Graceful kill
Meino.Cramer@...
Send Email Send Email
 
From: Thomas Hundt <thundt@...>
Subject: Re: [jasspa] Graceful kill
Date: Sat, 09 Jul 2005 15:56:09 -0700

Hi Thomas,

  This was my first try also....
  But it kills the narrowed parts also.

  I am trying to get this two working (first works in the meanwhile...)


     ;------------------------------------------------------------
     ; delete-matching-lines
     ;
     ;------------------------------------------------------------
     define-macro delete-matching-lines
         !force search-forward @mna
         !while $status
             beginning-of-line
             kill-line
             !force hunt-forward
         !done
     !emacro

     ;------------------------------------------------------------
     ; delete-not-matching-lines
     ;
     ;------------------------------------------------------------
     define-macro delete-non-matching-lines
     ;;    set-variable $debug 1
         !force search-forward @mna
         !if $status
             set-variable #l1 1
         !else
             set-variable #l1 0
         !endif
         !while $status
             beginning-of-line
             set-mark
             forward-line
             4 narrow-buffer
             !force hunt-forward
         !done
         !if #l1
             beginning-of-buffer
             set-mark
             end-of-buffer
             kill-region
             0 narrow-buffer
         !endif
     ;;    set-variable $debug 0
     !emacro


  Have a nice weekend and keep microemacsing! ;)
  Meino






> The obvious thing to try is
>
>  beginning-of-buffer
>  set-mark
>  end-of-buffer
>  kill-region
>
> Did you try this?  It seems pretty "quick" to me.
>
> Another obvious way is to copy the part you've narrowed to somewhere
> else, and kill the buffer.
>
>
>
>
>
> Meino Christian Cramer wrote:
> > Hi,
> >
> >  is there a way to quickly kill the contents of a buffer except those
> >  few lines, which are narrowed out (invisible, 4 narrow-buffer used) ?
> >
> >  Keep microemacsing!
> >  Meino
>
>
> __________________________________________________________________________
>
> This is an unmoderated list. JASSPA is not responsible for the content of
> any material posted to this list.
>
> To unsubscribe, send a mail message to
>
>     mailto:jasspa-unsubscribe@yahoogroups.com
>
> or visit http://groups.yahoo.com/group/jasspa and
> modify your account settings manually.
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>

#1548 From: "Phillips, Steven" <sphillips@...>
Date: Mon Jul 11, 2005 6:56 am
Subject: RE: Graceful kill
sphillips@...
Send Email Send Email
 
Without knowing where the narrow(s) are then its not trivial - see
below, if you did then Thomas' suggestion to kill the required text
first and then empty the buffer is a good solution.

The best way I can to think of to implement the general case (i.e. where
there may be zero or more narrows and you don't know where) is to use
$line-scheme.

1) Create a new color scheme which is used only for this operation
(%kill-scheme say) - done once.

2) In the buffer set every visible line's $line-scheme to %kill-scheme.

3) Remove all narrows.

4) Kill every line whose $line-scheme is %kill-scheme.

Job done.

> -----Original Message-----
> From: jasspa@yahoogroups.com [mailto:jasspa@yahoogroups.com] On Behalf
Of
> Meino Christian Cramer
> Sent: Saturday, July 09, 2005 8:29 PM
> To: jasspa@yahoogroups.com
> Subject: [jasspa] Graceful kill
>
>
> Hi,
>
>  is there a way to quickly kill the contents of a buffer except those
>  few lines, which are narrowed out (invisible, 4 narrow-buffer used) ?
>
>  Keep microemacsing!
>  Meino
>
>
>
________________________________________________________________________
__
>
> This is an unmoderated list. JASSPA is not responsible for the content
of
> any material posted to this list.
>
> To unsubscribe, send a mail message to
>
>     mailto:jasspa-unsubscribe@yahoogroups.com
>
> or visit http://groups.yahoo.com/group/jasspa and
> modify your account settings manually.
>
>
>
> Yahoo! Groups Links
>
>
>
>

#1549 From: "Phillips, Steven" <sphillips@...>
Date: Mon Jul 11, 2005 7:08 am
Subject: RE: Graceful kill
sphillips@...
Send Email Send Email
 
One thing both macros may be missing is a beginning-of-buffer to start
with.

The second macro is very inefficient, I suggest you change this one
completely. You do not need to use narrows to achieve this, you just
need to kill all but matching lines:

define-macro delete-non-matching-lines
     set-variable #l1 @ml05 "delete-non-matching-lines"
     beginning-of-buffer
     set-mark
     !repeat
         !force search-forward #l1
         !if $status
             beginning-of-line
             -1 kill-region
             forward-line
             set-mark
         !endif
     !until ¬ $status
     end-of-buffer
     -1 kill-region
     beginning-of-buffer
!emacro

Not tested this thoroughly but first indications are promising. The
version will not handle search strings that span multiple lines. It may
also fail to handle regex "^..." (start of line) searches correctly, you
should test this thoroughly before you rely on this working correctly.

Steve

> -----Original Message-----
> From: jasspa@yahoogroups.com [mailto:jasspa@yahoogroups.com] On Behalf
Of
> Meino Christian Cramer
> Sent: Sunday, July 10, 2005 5:51 AM
> To: jasspa@yahoogroups.com; thundt@...
> Subject: Re: [jasspa] Graceful kill
>
> From: Thomas Hundt <thundt@...>
> Subject: Re: [jasspa] Graceful kill
> Date: Sat, 09 Jul 2005 15:56:09 -0700
>
> Hi Thomas,
>
>  This was my first try also....
>  But it kills the narrowed parts also.
>
>  I am trying to get this two working (first works in the meanwhile...)
>
>
>     ;------------------------------------------------------------
>     ; delete-matching-lines
>     ;
>     ;------------------------------------------------------------
>     define-macro delete-matching-lines
>         !force search-forward @mna
>         !while $status
>             beginning-of-line
>             kill-line
>             !force hunt-forward
>         !done
>     !emacro
>
>     ;------------------------------------------------------------
>     ; delete-not-matching-lines
>     ;
>     ;------------------------------------------------------------
>     define-macro delete-non-matching-lines
>     ;;    set-variable $debug 1
>         !force search-forward @mna
>         !if $status
>             set-variable #l1 1
>         !else
>             set-variable #l1 0
>         !endif
>         !while $status
>             beginning-of-line
>             set-mark
>             forward-line
>             4 narrow-buffer
>             !force hunt-forward
>         !done
>         !if #l1
>             beginning-of-buffer
>             set-mark
>             end-of-buffer
>             kill-region
>             0 narrow-buffer
>         !endif
>     ;;    set-variable $debug 0
>     !emacro
>
>
>  Have a nice weekend and keep microemacsing! ;)
>  Meino
>
>
>
>
>
>
> > The obvious thing to try is
> >
> >  beginning-of-buffer
> >  set-mark
> >  end-of-buffer
> >  kill-region
> >
> > Did you try this?  It seems pretty "quick" to me.
> >
> > Another obvious way is to copy the part you've narrowed to somewhere
> > else, and kill the buffer.
> >
> >
> >
> >
> >
> > Meino Christian Cramer wrote:
> > > Hi,
> > >
> > >  is there a way to quickly kill the contents of a buffer except
those
> > >  few lines, which are narrowed out (invisible, 4 narrow-buffer
used) ?
> > >
> > >  Keep microemacsing!
> > >  Meino
> >
> >
> >
>
________________________________________________________________________
__
> >
> > This is an unmoderated list. JASSPA is not responsible for the
content
> of
> > any material posted to this list.
> >
> > To unsubscribe, send a mail message to
> >
> >     mailto:jasspa-unsubscribe@yahoogroups.com
> >
> > or visit http://groups.yahoo.com/group/jasspa and
> > modify your account settings manually.
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
>
>
>
________________________________________________________________________
__
>
> This is an unmoderated list. JASSPA is not responsible for the content
of
> any material posted to this list.
>
> To unsubscribe, send a mail message to
>
>     mailto:jasspa-unsubscribe@yahoogroups.com
>
> or visit http://groups.yahoo.com/group/jasspa and
> modify your account settings manually.
>
>
>
> Yahoo! Groups Links
>
>
>
>

#1550 From: Meino Christian Cramer <Meino.Cramer@...>
Date: Tue Jul 12, 2005 1:33 am
Subject: Re: Graceful kill
Meino.Cramer@...
Send Email Send Email
 
From: "Phillips, Steven" <sphillips@...>
Subject: RE: [jasspa] Graceful kill
Date: Mon, 11 Jul 2005 03:08:43 -0400

Hi STeven,

  thank you very much for helping me with the macro !!! :)

  I missed out the "beginning-of-buffer" intentionally, just to give
  the user the possibily to decide by her/himself, from where to delete
  all (non) matching lines.

  Your solution is by far more elegant than mine ! :)

  I will check it.

  Thanks a lot!

  Keep microemacsing!
  Meino


> One thing both macros may be missing is a beginning-of-buffer to start
> with.
>
> The second macro is very inefficient, I suggest you change this one
> completely. You do not need to use narrows to achieve this, you just
> need to kill all but matching lines:
>
> define-macro delete-non-matching-lines
>     set-variable #l1 @ml05 "delete-non-matching-lines"
>     beginning-of-buffer
>     set-mark
>     !repeat
>         !force search-forward #l1
>         !if $status
>             beginning-of-line
>             -1 kill-region
>             forward-line
>             set-mark
>         !endif
>     !until ¬ $status
>     end-of-buffer
>     -1 kill-region
>     beginning-of-buffer
> !emacro
>
> Not tested this thoroughly but first indications are promising. The
> version will not handle search strings that span multiple lines. It may
> also fail to handle regex "^..." (start of line) searches correctly, you
> should test this thoroughly before you rely on this working correctly.
>
> Steve
>
> > -----Original Message-----
> > From: jasspa@yahoogroups.com [mailto:jasspa@yahoogroups.com] On Behalf
> Of
> > Meino Christian Cramer
> > Sent: Sunday, July 10, 2005 5:51 AM
> > To: jasspa@yahoogroups.com; thundt@...
> > Subject: Re: [jasspa] Graceful kill
> >
> > From: Thomas Hundt <thundt@...>
> > Subject: Re: [jasspa] Graceful kill
> > Date: Sat, 09 Jul 2005 15:56:09 -0700
> >
> > Hi Thomas,
> >
> >  This was my first try also....
> >  But it kills the narrowed parts also.
> >
> >  I am trying to get this two working (first works in the meanwhile...)
> >
> >
> >     ;------------------------------------------------------------
> >     ; delete-matching-lines
> >     ;
> >     ;------------------------------------------------------------
> >     define-macro delete-matching-lines
> >         !force search-forward @mna
> >         !while $status
> >             beginning-of-line
> >             kill-line
> >             !force hunt-forward
> >         !done
> >     !emacro
> >
> >     ;------------------------------------------------------------
> >     ; delete-not-matching-lines
> >     ;
> >     ;------------------------------------------------------------
> >     define-macro delete-non-matching-lines
> >     ;;    set-variable $debug 1
> >         !force search-forward @mna
> >         !if $status
> >             set-variable #l1 1
> >         !else
> >             set-variable #l1 0
> >         !endif
> >         !while $status
> >             beginning-of-line
> >             set-mark
> >             forward-line
> >             4 narrow-buffer
> >             !force hunt-forward
> >         !done
> >         !if #l1
> >             beginning-of-buffer
> >             set-mark
> >             end-of-buffer
> >             kill-region
> >             0 narrow-buffer
> >         !endif
> >     ;;    set-variable $debug 0
> >     !emacro
> >
> >
> >  Have a nice weekend and keep microemacsing! ;)
> >  Meino
> >
> >
> >
> >
> >
> >
> > > The obvious thing to try is
> > >
> > >  beginning-of-buffer
> > >  set-mark
> > >  end-of-buffer
> > >  kill-region
> > >
> > > Did you try this?  It seems pretty "quick" to me.
> > >
> > > Another obvious way is to copy the part you've narrowed to somewhere
> > > else, and kill the buffer.
> > >
> > >
> > >
> > >
> > >
> > > Meino Christian Cramer wrote:
> > > > Hi,
> > > >
> > > >  is there a way to quickly kill the contents of a buffer except
> those
> > > >  few lines, which are narrowed out (invisible, 4 narrow-buffer
> used) ?
> > > >
> > > >  Keep microemacsing!
> > > >  Meino
> > >
> > >
> > >
> >
> ________________________________________________________________________
> __
> > >
> > > This is an unmoderated list. JASSPA is not responsible for the
> content
> > of
> > > any material posted to this list.
> > >
> > > To unsubscribe, send a mail message to
> > >
> > >     mailto:jasspa-unsubscribe@yahoogroups.com
> > >
> > > or visit http://groups.yahoo.com/group/jasspa and
> > > modify your account settings manually.
> > >
> > >
> > >
> > > Yahoo! Groups Links
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
> ________________________________________________________________________
> __
> >
> > This is an unmoderated list. JASSPA is not responsible for the content
> of
> > any material posted to this list.
> >
> > To unsubscribe, send a mail message to
> >
> >     mailto:jasspa-unsubscribe@yahoogroups.com
> >
> > or visit http://groups.yahoo.com/group/jasspa and
> > modify your account settings manually.
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
>
>
> __________________________________________________________________________
>
> This is an unmoderated list. JASSPA is not responsible for the content of
> any material posted to this list.
>
> To unsubscribe, send a mail message to
>
>     mailto:jasspa-unsubscribe@yahoogroups.com
>
> or visit http://groups.yahoo.com/group/jasspa and
> modify your account settings manually.
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>

#1551 From: Meino Christian Cramer <Meino.Cramer@...>
Date: Thu Jul 14, 2005 3:42 am
Subject: Need again help with tag files...
Meino.Cramer@...
Send Email Send Email
 
Hi,

  currently I am trying to replace the bulky EMacs with Microemacs at
  my daily work in the office.

  It works so far, but the usage of tag files still does not work for
  me....

  The C-sources I am working with are spread over a huge source
  tree. Therefore I wanted to build one big tags file in the root of
  the source tree.

  My settings so far:
  %tag-option      set to "mrc" (I also tried permutations of this)
  %tag-file        set to the root of the sourcetree where my tagfile is
			       plus its name
  %tag-template    I leave this untouched at its default.

  I build the tag-file itsself with the menu entry and alternatively by
  hand according to the instructions.


  But....
  Most of the time I get error messages stateing something like "tag
  not found" but also I got sometime "tagfile not found".

  Doing all this locally to that directory I am currently working in is
  no problem....but too many reference are unresolved then in the
  tag-file.


  I would help me A LOT if I could get this working finally :)

  Thank you very much in advance for any help !

  Have a nice day!
  Meino

#1552 From: "Phillips, Steven" <sphillips@...>
Date: Thu Jul 14, 2005 7:36 am
Subject: RE: Need again help with tag files...
sphillips@...
Send Email Send Email
 
It looks like you have found a problem and I suggest we take this off
line so we don't clutter the news group, i.e. rely directly to me.

The first thing we need to establish is whether the problem lies in the
tags file generation or in find-tag. This is simple to do, find a tag
that does not work then manually look for the tag in the tags files.

ME supports a hierarchy of tags, so it will first look in ./tags, then
../tags then ../../tags etc, check each in turn, can you find a line
which starts with your tag name? If so the issue lies in find-tag, if
not the problem is with the tag generation.

Can you do this and let me know what the tag name is, the path to the
source file and the path to the file in which you ran find-tag,

Steve

> -----Original Message-----
> From: jasspa@yahoogroups.com [mailto:jasspa@yahoogroups.com] On Behalf
Of
> Meino Christian Cramer
> Sent: Thursday, July 14, 2005 4:43 AM
> To: jasspa@yahoogroups.com
> Subject: [jasspa] Need again help with tag files...
>
> Hi,
>
>  currently I am trying to replace the bulky EMacs with Microemacs at
>  my daily work in the office.
>
>  It works so far, but the usage of tag files still does not work for
>  me....
>
>  The C-sources I am working with are spread over a huge source
>  tree. Therefore I wanted to build one big tags file in the root of
>  the source tree.
>
>  My settings so far:
>  %tag-option      set to "mrc" (I also tried permutations of this)
>  %tag-file        set to the root of the sourcetree where my tagfile
is
> 			      plus its name
>  %tag-template    I leave this untouched at its default.
>
>  I build the tag-file itsself with the menu entry and alternatively by
>  hand according to the instructions.
>
>
>  But....
>  Most of the time I get error messages stateing something like "tag
>  not found" but also I got sometime "tagfile not found".
>
>  Doing all this locally to that directory I am currently working in is
>  no problem....but too many reference are unresolved then in the
>  tag-file.
>
>
>  I would help me A LOT if I could get this working finally :)
>
>  Thank you very much in advance for any help !
>
>  Have a nice day!
>  Meino
>
>
>
________________________________________________________________________
__
>
> This is an unmoderated list. JASSPA is not responsible for the content
of
> any material posted to this list.
>
> To unsubscribe, send a mail message to
>
>     mailto:jasspa-unsubscribe@yahoogroups.com
>
> or visit http://groups.yahoo.com/group/jasspa and
> modify your account settings manually.
>
>
>
> Yahoo! Groups Links
>
>
>
>

#1553 From: Meino Christian Cramer <Meino.Cramer@...>
Date: Sun Jul 17, 2005 3:10 pm
Subject: some little questions
Meino.Cramer@...
Send Email Send Email
 
Hi,

  I have some little questions concerning things of easy handling
  Microemacs.

  *** I am often editing a couple of files -- mainly config-files of
      some programs in my $HOME but not exclusivly.  To not to do a
      "find-file ... enter path/file ... <return>" -dance every time, I
      add macros, which do this for me. For example to edit the
      $HOME/.jasspa/mccramer.emf-file I have a macro called "emf",
      which loads this file for editing.

	  Now I found something about bookmarks in the ME-docus:

       * bookmark.emf - The bookmark tool.

	  Unfortunately, it is the only entry about bookmarks I could found.

	  Is there any more elegant/convenient way to load file for editing,
	  which are chnaged often?

  *** Can I call "General Help" via the command line (skipping the
      OSD)...mousing isn't my thing that much...

  *** Is there a way to convince "General Help" to open in a full new
      frame instead of a half window in the same frame? There is nearly
      no situation, where I have to look at my currently edited file
      *and* the help text simultanously.

  *** Same for find-tag: Is there a way to open a new frame with the
      found tag? I tried things like:


      define-macro find-tag-other-frame
          find-tag @mna
          2 create-frame
      !emacro


      ...and found a lot of ways of doing that the wrong way (I got very
      intersting patterns of frames and windows though...;)...but...


  Any help would help a lot...

  Thank you very much for any help in advance!

  Have a nice weekend and
  keep microemacsing!
  Meino

#1554 From: Meino Christian Cramer <Meino.Cramer@...>
Date: Sun Jul 17, 2005 3:53 pm
Subject: Fill-paragraph with not more than oine space
Meino.Cramer@...
Send Email Send Email
 
Hi,

  how can I convince (i)fill-pagraph not to insert extra spaces between
  words to do its job?

  I didn't found anything appropiate in the docs...

  Keep microemacsing!
  Meino

#1555 From: Jon Green <jon@...>
Date: Sun Jul 17, 2005 4:21 pm
Subject: Re: Fill-paragraph with not more than oine space
bigfatmrmoose
Send Email Send Email
 
Meino Christian Cramer wrote:
> Hi,
>
>  how can I convince (i)fill-pagraph not to insert extra spaces between
>  words to do its job?
>
>  I didn't found anything appropiate in the docs...
>
>  Keep microemacsing!
>  Meino
>

Change the fill-mode.

If you always want it to be left then set $fill-mode in your <user>.emf file to
"L".

If it is in a document type file then you can change the indentation (see the
help esc-h)

Jon.

#1556 From: Jon Green <jon@...>
Date: Sun Jul 17, 2005 4:46 pm
Subject: Re: some little questions
bigfatmrmoose
Send Email Send Email
 
Meino Christian Cramer wrote:
> Hi,
>
>  I have some little questions concerning things of easy handling
>  Microemacs.
>
>  *** I am often editing a couple of files -- mainly config-files of
>      some programs in my $HOME but not exclusivly.  To not to do a
>      "find-file ... enter path/file ... <return>" -dance every time, I
>      add macros, which do this for me. For example to edit the
>      $HOME/.jasspa/mccramer.emf-file I have a macro called "emf",
>      which loads this file for editing.
>
> 	 Now I found something about bookmarks in the ME-docus:
>
>       * bookmark.emf - The bookmark tool.
>
> 	 Unfortunately, it is the only entry about bookmarks I could found.
>
> 	 Is there any more elegant/convenient way to load file for editing,
> 	 which are chnaged often?
>

Possibly need File->Favorites can add and delete buffers to this list.

I always start me with the -c option so the file is typically in my buffer list
when I
re-start the session. Only when I have a couple of hundred files in the buffer
list I might
decide to purge the buffer list and start again.

>  *** Can I call "General Help" via the command line (skipping the
>      OSD)...mousing isn't my thing that much...

M-x osd-help to bring up the dialog or M-x help to bring up the help page.

>
>  *** Is there a way to convince "General Help" to open in a full new
>      frame instead of a half window in the same frame? There is nearly
>      no situation, where I have to look at my currently edited file
>      *and* the help text simultanously.

Ooooh - do not know would have to look at this. Might be easier to open a new ME
session
just to do help in which is what I do when I need to run through the help a lot.

If you are using the command line to get it then you can create your own command
to create
the frame and bring up the help - call yours instead of the system one.

>
>  *** Same for find-tag: Is there a way to open a new frame with the
>      found tag? I tried things like:
>
>
>      define-macro find-tag-other-frame
>          find-tag @mna
>          2 create-frame
>      !emacro
>

You seriously want to open a new external frame on every find tag ? Why ? You
are
potentially going to get a serious number of external frames - is this really
what you want
to do ? I'm not sure that it is ?

>
>      ...and found a lot of ways of doing that the wrong way (I got very
>      intersting patterns of frames and windows though...;)...but...
>
>
>  Any help would help a lot...
>
>  Thank you very much for any help in advance!
>
>  Have a nice weekend and
>  keep microemacsing!
>  Meino

Some wierd questions here on usability, maybe I'm not understanding something ?
Jon.

#1557 From: Meino Christian Cramer <Meino.Cramer@...>
Date: Sun Jul 17, 2005 4:45 pm
Subject: Re: Fill-paragraph with not more than oine space
Meino.Cramer@...
Send Email Send Email
 
From: Jon Green <jon@...>
Subject: Re: [jasspa] Fill-paragraph with not more than oine space
Date: Sun, 17 Jul 2005 17:21:07 +0100

Uuuuh...Aaahhh!

I read about this Left/Middle/Center thingy...but unfortunately I
didn't find the right conclusion of that....(sorry...Sunday...my brain
is half-powered... ;O)

Thanks a lot for the hint, Jon!

Meino


> Meino Christian Cramer wrote:
> > Hi,
> >
> >  how can I convince (i)fill-pagraph not to insert extra spaces between
> >  words to do its job?
> >
> >  I didn't found anything appropiate in the docs...
> >
> >  Keep microemacsing!
> >  Meino
> >
>
> Change the fill-mode.
>
> If you always want it to be left then set $fill-mode in your <user>.emf file
to "L".
>
> If it is in a document type file then you can change the indentation (see the
help esc-h)
>
> Jon.
>
>
> __________________________________________________________________________
>
> This is an unmoderated list. JASSPA is not responsible for the content of
> any material posted to this list.
>
> To unsubscribe, send a mail message to
>
>     mailto:jasspa-unsubscribe@yahoogroups.com
>
> or visit http://groups.yahoo.com/group/jasspa and
> modify your account settings manually.
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>

#1558 From: Meino Christian Cramer <Meino.Cramer@...>
Date: Sun Jul 17, 2005 5:18 pm
Subject: Re: some little questions
Meino.Cramer@...
Send Email Send Email
 
From: Jon Green <jon@...>
Subject: Re: [jasspa] some little questions
Date: Sun, 17 Jul 2005 17:46:01 +0100

Hi Jon,

  thank you for your replies ! :O)

> Meino Christian Cramer wrote:
> > Hi,
> >
> >  I have some little questions concerning things of easy handling
> >  Microemacs.
> >
> >  *** I am often editing a couple of files -- mainly config-files of
> >      some programs in my $HOME but not exclusivly.  To not to do a
> >      "find-file ... enter path/file ... <return>" -dance every time, I
> >      add macros, which do this for me. For example to edit the
> >      $HOME/.jasspa/mccramer.emf-file I have a macro called "emf",
> >      which loads this file for editing.
> >
> > 	 Now I found something about bookmarks in the ME-docus:
> >
> >       * bookmark.emf - The bookmark tool.
> >
> > 	 Unfortunately, it is the only entry about bookmarks I could found.
> >
> > 	 Is there any more elegant/convenient way to load file for editing,
> > 	 which are chnaged often?
> >
>
> Possibly need File->Favorites can add and delete buffers to this list.
>
> I always start me with the -c option so the file is typically in my buffer
list when I
> re-start the session. Only when I have a couple of hundred files in the buffer
list I might
> decide to purge the buffer list and start again.

   I think it was missleading, what I had said...

   The files I want to load often - but not in sense of "part of a
   session" -- are mostly *rc-files and such. I have some software
   installed, which I recently try to use more seriously and more
   in-depth. Icewm, ZSH and MicroEmacs are some of them.

   Sometimes a struggle across ("about"? "over"?) a feature, which I
   want switch off or on. Then I want to have a handy way to quickly
   load that *rc file.

   The Files->Favourites thingy seems to be close to that what I want.

   Is it also possible to add directories instead of files there ?



>
> >  *** Can I call "General Help" via the command line (skipping the
> >      OSD)...mousing isn't my thing that much...
>
> M-x osd-help to bring up the dialog or M-x help to bring up the help page.

   ...then I have the osd-dialog again...
   Is there a commandline based dialog available instead of the
   OSD-dialog?

   By the way: After entering a search criteria and press <RETURN> the
   "Search" button is activated. Then one has to grab the mouse to
   click on it. Is it possible to bind "Search" to the <RETURN> button?


> >
> >  *** Is there a way to convince "General Help" to open in a full new
> >      frame instead of a half window in the same frame? There is nearly
> >      no situation, where I have to look at my currently edited file
> >      *and* the help text simultanously.
>
> Ooooh - do not know would have to look at this. Might be easier to open a new
ME session
> just to do help in which is what I do when I need to run through the help a
lot.

   Hmmmm....Starting a second ME-processs....hmmmm....I tought it would
   be "easier" (not thinking that starting ME is difficult in any way
   ;)

> If you are using the command line to get it then you can create your own
command to create
> the frame and bring up the help - call yours instead of the system one.
>
> >
> >  *** Same for find-tag: Is there a way to open a new frame with the
> >      found tag? I tried things like:
> >
> >
> >      define-macro find-tag-other-frame
> >          find-tag @mna
> >          2 create-frame
> >      !emacro
> >
>
> You seriously want to open a new external frame on every find tag ? Why ? You
are
> potentially going to get a serious number of external frames - is this really
what you want
> to do ? I'm not sure that it is ?

   YES ! I WANT IT ! :O) :O)

   Currently I often have to find-tag just for variable declarations
   and function definition for browsing that code -- I am still
   learning what the previous programmer has implemented.

   I just dont want to REPLACE the "old behaviour" of find-tag with the
   new-frame-thingy. I just want to have the possibility to choose
   between them !


> >
> >      ...and found a lot of ways of doing that the wrong way (I got very
> >      intersting patterns of frames and windows though...;)...but...
> >
> >
> >  Any help would help a lot...
> >
> >  Thank you very much for any help in advance!
> >
> >  Have a nice weekend and
> >  keep microemacsing!
> >  Meino
>
> Some wierd questions here on usability, maybe I'm not understanding something
?
> Jon.

   Sorry for asking weird things, Jon... ;O)
   Hopefully above explanations do not add additinal weirdness... X-)

   Meino


>
> __________________________________________________________________________
>
> This is an unmoderated list. JASSPA is not responsible for the content of
> any material posted to this list.
>
> To unsubscribe, send a mail message to
>
>     mailto:jasspa-unsubscribe@yahoogroups.com
>
> or visit http://groups.yahoo.com/group/jasspa and
> modify your account settings manually.
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>

#1559 From: Thomas Hundt <thundt@...>
Date: Sun Jul 17, 2005 7:48 pm
Subject: Open help in new frame (window)
thundt
Send Email Send Email
 
> I always start me with the -c option so the file is typically in my buffer
list when I
> re-start the session. Only when I have a couple of hundred files in the buffer
list I might
> decide to purge the buffer list and start again.

You guys are funny.  I'm going to have to try this one of these days.  I
never have more than a few open, say pertaining to just one project, and
then open other unrelated things in other instances of ME.  But, I see
where you're going, I could do the same thing but have different frames
open in the same instance.  Hmmm.

(The other thing I like to do is flip back and forth through the
buffers, using C-page-up and C-page-down which I have bound to '-1
next-buffer' and 'next-buffer' respectively.  Having hundreds of buffers
open would slow down the search process.)

BTW: What are these "internal frames" for?  (Cf. the docs for
create-frame.)  They hide the existing frame when you create one?
Yikes. :-)


>> *** Is there a way to convince "General Help" to open in a full new
>>     frame instead of a half window in the same frame? There is nearly
>>     no situation, where I have to look at my currently edited file
>>     *and* the help text simultanously.
>
> Ooooh - do not know would have to look at this. Might be easier to open a new
ME session
> just to do help in which is what I do when I need to run through the help a
lot.

Yeah this is a nice idea.  I, too, usually open another ME instance or
the Windows help file when doing ME hacking.

I added this to myosd.emf and my company file and it seems to work:

;; ADD TO COMPANY FILE:
;------------------------------------------------------------
; help-in-new-frame: spawn a new frame (gui window) and open help in it
;------------------------------------------------------------
define-macro help-in-new-frame
      2 create-frame
      help
      delete-window
!emacro
global-bind-key help-in-new-frame  C-f1

;; ADD TO MYOSD.EMF:
; Add to existing Help menu
osd 9 1 "" "Help in new frame" f help-in-new-frame



-Th

#1560 From: Jon Green <jon@...>
Date: Sun Jul 17, 2005 8:27 pm
Subject: Re: Open help in new frame (window)
bigfatmrmoose
Send Email Send Email
 
Thomas Hundt wrote:
>>I always start me with the -c option so the file is typically in my buffer
list when I
>>re-start the session. Only when I have a couple of hundred files in the buffer
list I might
>>decide to purge the buffer list and start again.
>
>
> You guys are funny.  I'm going to have to try this one of these days.  I
> never have more than a few open, say pertaining to just one project, and
> then open other unrelated things in other instances of ME.  But, I see
> where you're going, I could do the same thing but have different frames
> open in the same instance.  Hmmm.
>
> (The other thing I like to do is flip back and forth through the
> buffers, using C-page-up and C-page-down which I have bound to '-1
> next-buffer' and 'next-buffer' respectively.  Having hundreds of buffers
> open would slow down the search process.)
>
> BTW: What are these "internal frames" for?  (Cf. the docs for
> create-frame.)  They hide the existing frame when you create one?
> Yikes. :-)

Internal frames are like a new window canvas which you can split up with sub
windows, the
frames are layered and you can swap between the frames. The advantage is when
you swap
frames then all of the windows of the frame are still in their original position
as when you
left it.

Try "M-x notes" and then exit notes you will get your original window
configuration back,
the notes is displayed in a separate frame.

Frames are still pretty new so there is not much stuff using them at the moment.

Jon.

>
>
>
>>>*** Is there a way to convince "General Help" to open in a full new
>>>    frame instead of a half window in the same frame? There is nearly
>>>    no situation, where I have to look at my currently edited file
>>>    *and* the help text simultanously.
>>
>>Ooooh - do not know would have to look at this. Might be easier to open a new
ME session
>>just to do help in which is what I do when I need to run through the help a
lot.
>
>
> Yeah this is a nice idea.  I, too, usually open another ME instance or
> the Windows help file when doing ME hacking.
>
> I added this to myosd.emf and my company file and it seems to work:
>
> ;; ADD TO COMPANY FILE:
> ;------------------------------------------------------------
> ; help-in-new-frame: spawn a new frame (gui window) and open help in it
> ;------------------------------------------------------------
> define-macro help-in-new-frame
>      2 create-frame
>      help
>      delete-window
> !emacro
> global-bind-key help-in-new-frame  C-f1
>
> ;; ADD TO MYOSD.EMF:
> ; Add to existing Help menu
> osd 9 1 "" "Help in new frame" f help-in-new-frame
>
>
>
> -Th
>

#1561 From: Thomas Hundt <thundt@...>
Date: Thu Jul 21, 2005 3:11 am
Subject: Possible feature request: regexp nongreedy matching
thundt
Send Email Send Email
 
I love the availability of regular expressions in search and replace
operations.  And I'm glad that they are becoming more "standard" (e.g.,
use of \d and \D instead of that stuff I could never remember before).

I'd love it even more if it had the ability to specify nongreedy
matching.  (In Perl this is the '?' after a '+' or '*'.)

Example of where it would be useful:  I wanted to remove the HTML from
some text, like this (note these lines are wrapped, each begins with
"<div" and ends with "</div>"):

<div style="position:absolute;top:14500;left:108"><nobr>these barriers,
some interesting information </nobr></div>
<div style="position:absolute;top:14520;left:108"><nobr>was gathered.
</nobr></div>
<div style="position:absolute;top:14562;left:108"><nobr>CVPD officers
administered the surveys. </nobr></div>
<div style="position:absolute;top:14582;left:108"><nobr>They found that
many of the offenders liked </nobr></div>
<div style="position:absolute;top:14603;left:108"><nobr>to target
parking lots since they offered so </nobr></div>
<div style="position:absolute;top:14624;left:108"><nobr>many vehicle
choices in unguarded settings. </nobr></div>
<div style="position:absolute;top:14644;left:108"><nobr>Many said they
took orders from “higher-</nobr></div>
<div style="position:absolute;top:14665;left:108"><nobr>ups” for
specific vehicles, makes, and </nobr></div>
<div style="position:absolute;top:14686;left:108"><nobr>models. Many
worked with a second person </nobr></div>

The quick and dirty way is to do a search and replace of <.+> with an
empty string.  However, this doesn't work: It insists on matching as
greedily as possible, i.e., the longest string possible.  (This is
documented and not unexpected.)  So, I changed it to <.*> which
supposedly matches the shortest string possible.  This still didn't do
what I wanted -- it matched more than one tag at a time, and included
some non-tag text.  I'm not even sure why.  It seemed to work okay on
the first line I ran it against, and then wanted to match the entire
next line.  Very strange.  (Perhaps it's getting confused with the "\>"
construct which matches an empty string?)

I ended up writing the buffer to a file and running Perl against it:
	 perl -nwe "s/\<.+?>//g; print " <foo.txt
which did exactly what I wanted, namely, spitting out this text ('>'
added by me):
      these barriers, some interesting information
      was gathered.
      CVPD officers administered the surveys.
      They found that many of the offenders liked
      to target parking lots since they offered so
      many vehicle choices in unguarded settings.
      Many said they took orders from ōhigher-
      upsö for specific vehicles, makes, and
      models. Many worked with a second person

Side note: There used to be a way to pipe a buffer through a command but
I couldn't get it to work in this case (ipipe-shell-command).  Probably
it's too much to ask for a poor Windoze system to do stuff like this
properly. ;-)  Or it's a paths/environment problem.  I'm not as
concerned about this, I'm just mentioning it as an fyi in case there are
known issues around this.

Thanks for your consideration

-Tom Hundt

#1562 From: "Phillips, Steven" <sphillips@...>
Date: Thu Jul 21, 2005 8:30 am
Subject: RE: Possible feature request: regexp nongreedy matching
sphillips@...
Send Email Send Email
 
Tom,

The '*' operator is exactly the same as the '+' operator in regex except it will
match no matches, i.e. its equivalent to a '+' and '?' combined. It is just as
greedy as the '+' so MEs regex behaviour is as I would expect.

This is a common problem which sometimes has no easy solution but usually it
does, you just need to get a little more perverse! For example your problem
below is easily solved by using "<[^>]*>" this works in most situations.

It starts to have a few problems when you want to match the following (in C):

    { "string with } oh dear" }

Not a problem for html (as a string would contain >) but is a common problem
in other languages. In this case get the regex to match the string within the
{...} tag so it will skip over the '}' in the string, to do this use
"{\([^}"]\|"[^"]*"\)*}"

Now lets make it a little harder, the string can contain quotes which would
break the above, e.g.:

    { "string with } \" oh dear" }

So now we use "{\([^}"]\|"\([^"\\]\|\\.\)*"\)*}", and so it goes on. Where you
do tend to get really stuck is when the end 'tag' is a string, for example
consider matching '<div>...</div>', you have to use something like
"<div>\([^<]\|<[^/]\|</[^d]\|</d[^i]\|</di[^v]\|</div[^>]\)*</div>", this is
where ".*?" would be most useful as the above could be done as just
"<div>.*?</div>".

Steve


> -----Original Message-----
> From: jasspa@yahoogroups.com [mailto:jasspa@yahoogroups.com] On Behalf Of
> Thomas Hundt
> Sent: Thursday, July 21, 2005 4:12 AM
> To: JASSPA MicroEmacs Mailing List (W)
> Subject: [jasspa] Possible feature request: regexp nongreedy matching
>
> I love the availability of regular expressions in search and replace
> operations.  And I'm glad that they are becoming more "standard" (e.g.,
> use of \d and \D instead of that stuff I could never remember before).
>
> I'd love it even more if it had the ability to specify nongreedy
> matching.  (In Perl this is the '?' after a '+' or '*'.)
>
> Example of where it would be useful:  I wanted to remove the HTML from
> some text, like this (note these lines are wrapped, each begins with
> "<div" and ends with "</div>"):
>
> <div style="position:absolute;top:14500;left:108"><nobr>these barriers,
> some interesting information </nobr></div>
> <div style="position:absolute;top:14520;left:108"><nobr>was gathered.
> </nobr></div>
> <div style="position:absolute;top:14562;left:108"><nobr>CVPD officers
> administered the surveys. </nobr></div>
> <div style="position:absolute;top:14582;left:108"><nobr>They found that
> many of the offenders liked </nobr></div>
> <div style="position:absolute;top:14603;left:108"><nobr>to target
> parking lots since they offered so </nobr></div>
> <div style="position:absolute;top:14624;left:108"><nobr>many vehicle
> choices in unguarded settings. </nobr></div>
> <div style="position:absolute;top:14644;left:108"><nobr>Many said they
> took orders from "higher-</nobr></div>
> <div style="position:absolute;top:14665;left:108"><nobr>ups" for
> specific vehicles, makes, and </nobr></div>
> <div style="position:absolute;top:14686;left:108"><nobr>models. Many
> worked with a second person </nobr></div>
>
> The quick and dirty way is to do a search and replace of <.+> with an
> empty string.  However, this doesn't work: It insists on matching as
> greedily as possible, i.e., the longest string possible.  (This is
> documented and not unexpected.)  So, I changed it to <.*> which
> supposedly matches the shortest string possible.  This still didn't do
> what I wanted -- it matched more than one tag at a time, and included
> some non-tag text.  I'm not even sure why.  It seemed to work okay on
> the first line I ran it against, and then wanted to match the entire
> next line.  Very strange.  (Perhaps it's getting confused with the "\>"
> construct which matches an empty string?)
>
> I ended up writing the buffer to a file and running Perl against it:
>  perl -nwe "s/\<.+?>//g; print " <foo.txt
> which did exactly what I wanted, namely, spitting out this text ('>'
> added by me):
>      these barriers, some interesting information
>      was gathered.
>      CVPD officers administered the surveys.
>      They found that many of the offenders liked
>      to target parking lots since they offered so
>      many vehicle choices in unguarded settings.
>      Many said they took orders from ōhigher-
>      upsö for specific vehicles, makes, and
>      models. Many worked with a second person
>
> Side note: There used to be a way to pipe a buffer through a command but
> I couldn't get it to work in this case (ipipe-shell-command).  Probably
> it's too much to ask for a poor Windoze system to do stuff like this
> properly. ;-)  Or it's a paths/environment problem.  I'm not as
> concerned about this, I'm just mentioning it as an fyi in case there are
> known issues around this.
>
> Thanks for your consideration
>
> -Tom Hundt
>
>
>
>
>
>
>
>
> __________________________________________________________________________
>
> This is an unmoderated list. JASSPA is not responsible for the content of
> any material posted to this list.
>
> To unsubscribe, send a mail message to
>
>     mailto:jasspa-unsubscribe@yahoogroups.com
>
> or visit http://groups.yahoo.com/group/jasspa and
> modify your account settings manually.
>
>
>
> Yahoo! Groups Links
>
>
>
>

#1563 From: Meino Christian Cramer <Meino.Cramer@...>
Date: Sat Jul 30, 2005 5:48 am
Subject: How to edit files of specific types ?
Meino.Cramer@...
Send Email Send Email
 
Hi,

  duie to an install error I had to edit the /usr/shre/info/dir file,
  which conatins a summary of all info-files of my Linux system.

  I loaded it into MicroEmacs and tried to insert a blank line.
  Nothing happens...instead ME said : "Invalid symlink"...ME thought,
  I would like to jump'n'run in an info-adventure game.

  Hmmm....

  Okay....wrong mode. I fired up "buffer-mode <TAB> <TAB>" and got a
  list of available modes. I tried "edit" but this didn't work. In
  Emacs I would give the command "text-mode"...but...

  In "General Help" under "mode" I found nothing about urgeing ME to
  recognize a file to be of another "wrong" type....

  How can I hack that ? ;)

  Keep microemacsing and have a nice weekend !
  Meino

#1564 From: Meino Christian Cramer <Meino.Cramer@...>
Date: Sat Aug 6, 2005 3:54 am
Subject: Filetypes
Meino.Cramer@...
Send Email Send Email
 
Hi,

  Is it possible to urge ME to think that a loaded file is of
  a certain different type than what ME thinks that it is ?

  Have a nice weekend!
  Meino

#1565 From: Steven Phillips <bill@...>
Date: Sat Aug 6, 2005 6:54 am
Subject: Re: Filetypes
bill@...
Send Email Send Email
 
In the buffer, simply running the correct fhook command should do it, i.e. if
the file is really a 'C' source file do:

     esc x fhook-c

Note you may not have loaded the fhook yet so ME will not have the command
defined, to do this do:

     esc x execute-file hkc

If you don't know the name of the hook you want, load a file which uses the
right hook and look at the value of $buffer-fhook (use list-variables).

Steve

> Subject: [jasspa] Filetypes
> From: Meino Christian Cramer <Meino.Cramer@...>
> Date: Saturday, August 6, 2005, 4:54:50 AM
> To: jasspa@yahoogroups.com
> Hi,

>  Is it possible to urge ME to think that a loaded file is of
>  a certain different type than what ME thinks that it is ?

>  Have a nice weekend!
>  Meino




> __________________________________________________________________________

> This is an unmoderated list. JASSPA is not responsible for the content of
> any material posted to this list.

> To unsubscribe, send a mail message to

>     mailto:jasspa-unsubscribe@yahoogroups.com

> or visit http://groups.yahoo.com/group/jasspa and
> modify your account settings manually.


>
> Yahoo! Groups Links



>

#1566 From: "ricmwar" <ric.yeates@...>
Date: Mon Aug 15, 2005 9:53 pm
Subject: Going to a column
ricmwar
Send Email Send Email
 
I have a program that I use that wants to open files via MicroEMACS
and specify an initial line and column. Is there a good solution for
this? I'm tired of changing the source code every time I get a new
source drop.

If anyone's interested, I've got a 050505 version of the source that
accepts an optional ",<col>" to the -l or + option so you can specify
the column.

Can I request a permanent change? There may be (read: probably is) a
better way than how I do it, but it works fine for me.

Ric

Messages 1537 - 1566 of 2695   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help