Text editors to delete SGML

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Text editors to delete SGML

IHR Christopher Currie
Michaeol Sperberg-McQueen suggests that any text editor worth its salt
should be able to delete automatically from one angle bracket to the
next.

Can he tell us of a text editor running under MS-DOS which can be EASILY
set up to perform this operation GLOBALLY, without the operator having to
stop at each pair of angle brackets, and whatever the length of the
strings between the brackets? If it exists, what does it cost?

How is an editor to distinguish between angle brackets which are part
of SGML mark-up and those which are part of a text?

Christopher

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Text editors to delete SGML

koontz
In response to Christopher Currie's enquiry on text editors than can delete
an expanse of material enclosed by <>, any text editor that can handle what
are called regular expressions can, e.g., on DOS systems, Solution Systems'
Brief, Lugaru's Epsilon, Multi-Edit (I forget the publisher), and any of
various more or less straight EMACS editors.  Typical costs of the
commercial products are c. $160 at discount, up to c. $200 list price.
Multi-Edit is actually distributed as shareware, or was when last I heard of
it, so it can be tried out for the cost of receiving a diskette in the mail.
The registration fee is c. $100 for Multi-Edit.  I think that some of the
EMACS clones are free, but don't keep very good track of them.

The expression that matches <...> in Brief is:  \<*\>  The \\ are used to
prevent < and > from being interpreted as the patterns that match beginning
of line and end of line.  The * matches "zero or more of any character
except newline."  Thus this pattern matches <...> that doesn't cross an end
of line.  It would be possible to write a more elaborate pattern that
matches across an end of line.  To write a pattern that doesn't match <...>
that is text as opposed to an SGML marker it would be necessary to know how
SGML encodes <> so that they aren't mistaken for SGML tag brackets,
information I lack!

To delete <...> replace <...> with zip.  The replace command in Brief can be
executed from the command line or called up with F6.  In the F6 version it
begins making changes in a mode in which it queries you before each change
as to whether it should make the change, not make it, or make all remaining
changes without queries.  In neither case is it necessary to delete the
<...> material oneself.  That is taken care of by the replacement
specification.


Apart from text editors, the AWK programming language can also be used to
delete material matched by regular expressions.  There are three or more
implementations of AWK for DOS.  One is freeware, two are commercial
products available for c. $80-$100.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Text editors to delete SGML

Michael S. Hart-2
In reply to this post by IHR Christopher Currie
On Wed, 3 Oct 90 11:05:16 GMT IHR Christopher Currie said:

>Michaeol Sperberg-McQueen suggests that any text editor worth its salt
>should be able to delete automatically from one angle bracket to the
>next.
>
>Can he tell us of a text editor running under MS-DOS which can be EASILY
>set up to perform this operation GLOBALLY, without the operator having to
>stop at each pair of angle brackets, and whatever the length of the
>strings between the brackets? If it exists, what does it cost?
>
>How is an editor to distinguish between angle brackets which are part
>of SGML mark-up and those which are part of a text?
>
>Christopher

I hope my position as my own Devil's Advocate will be appreciated,
and also that once again my main point has been misunderstood:
what I want is for etexts to be available both WITH and WITHOUT markup.

Most WP's have global search and replace.  Some even let you leave out the
replace part which then deletes the offending characters.  Some have built
in macros which allow highlighting blocks then deleling them.

Example:  Search for <<
back up a space or two (depends on where search leaves cursor)
turn on highlight
search for >>
delete highlighted portion.              Michael S. Hart

Loading...