* Editing Control Characters, Linefeeds, Etc.
@ Karl Dahlke
0 siblings, 0 replies; 5+ messages in thread
From: Karl Dahlke @ UTC (permalink / raw)
To: blinux-list
I don't know precisely what you want to do,
but I guarantee, edbrowse can do it.
You can edit an executable file,
find the string "hello world",
change the w to a j,
write the file, and run it, and get the output:
hello jorld
To undos a file, do this.
,s/\r$//
CR in the middle of a line should probably become a true line break.
,s/\r/\n/g
Change all collections of tabs and spaces to a single space.
Remember, whitespace doesn't mean anything in html, so may as well simplify it.
,s/[ \t]+/ /g
I have an edbrowse script that does a fair job of unwording a file,
so you can read the text in whatever.doc.
For more info, send questions to eklhad@comcast.net.
Karl
^ permalink raw reply [flat|nested] 5+ messages in thread
* Editing Control Characters, Linefeeds, Etc.
@ John J. Boyer
` Lee Maschmeyer
` jude dashiell
0 siblings, 2 replies; 5+ messages in thread
From: John J. Boyer @ UTC (permalink / raw)
To: blinux-list
Hello,
This also pertains tho the websirte I am maintaining, which is for
Wisconsin Braille, Inc. The original website was created using Frontpage.
I've been trying out Tidy on it and may use Edbrowse also. Some of the
material that goes on it is originally from Word files. This material has
a lot of extra linefeeds and a lot of tabs when it is converted to text.
Is there an editor which can do a find and replace on these characters?
Thanks,
John
--
Computers to Help People, Inc.
http://www.chpi.org
825 East Johnson; Madison, WI 53703
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Editing Control Characters, Linefeeds, Etc.
John J. Boyer
@ ` Lee Maschmeyer
` Lee Maschmeyer
` jude dashiell
1 sibling, 1 reply; 5+ messages in thread
From: Lee Maschmeyer @ UTC (permalink / raw)
To: blinux-list
John,
Emacs can do this, though it's taken me six months to find out how and I
may not be doing it the best way (part of the reason I'm responding).
To enter a control character, precede it with a C-Q. To replace all
occurrences of a string after Point, use the replace-string function.
For example: Recently I had to repair a Web Braille file (Captains
Courageous) with faulty end-of-page sequences that my bb.sh script
couldn't handle. The key sequence was as follows:
C-M-< (top-of-file)
M-xreplace-s<tab> (resulted in replace-string)
<Enter>
^q^m^q^l
<enter>
^q^m^q^j^q^l
<enter>
All done.
I've been using emacs for the past 6 months solid and am still by no
means fond of its interface, but it seems to be able to do lots of
stuff if you have a few lifetimes to find out how.
On a very distantly-related note, how can people not on Debian handle
Debian packages? I tried once getting edbrowse but got depressed
before figuring out how to deal with .deb files. No fair cheating by
telling me I don't need the Debian distribution; I want to know about
.deb files whether or not it's necessary in this case. <Grin>
Thanks and hope this helps,
Lee
On Tue, Jun 03, 2003 at 10:51:28AM -0500, John J. Boyer wrote: > Hello,
> > This also pertains tho the websirte I am maintaining, which is for
> Wisconsin Braille, Inc. The original website was created using Frontpage.
> I've been trying out Tidy on it and may use Edbrowse also. Some of the
> material that goes on it is originally from Word files. This material has
> a lot of extra linefeeds and a lot of tabs when it is converted to text.
> Is there an editor which can do a find and replace on these characters?
>
> Thanks,
> John
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: Editing Control Characters, Linefeeds, Etc.
` Lee Maschmeyer
@ ` Lee Maschmeyer
0 siblings, 0 replies; 5+ messages in thread
From: Lee Maschmeyer @ UTC (permalink / raw)
To: blinux-list
I realized as I got up this morning that top-of-file is M-<, not C-M-<.
This is corrected in the version below:
On Tue, Jun 03, 2003 at 02:16:19PM -0400, Lee Maschmeyer wrote:
> John,
>
> Emacs can do this, though it's taken me six months to find out how and I
> may not be doing it the best way (part of the reason I'm responding).
>
> To enter a control character, precede it with a C-Q. To replace all
> occurrences of a string after Point, use the replace-string function.
>
> For example: Recently I had to repair a Web Braille file (Captains
> Courageous) with faulty end-of-page sequences that my bb.sh script
> couldn't handle. The key sequence was as follows:
>
> M-< (top-of-file)
> M-xreplace-s<tab> (resulted in replace-string)
> <Enter>
> ^q^m^q^l
> <enter>
> ^q^m^q^j^q^l
> <enter>
>
> All done.
>
> I've been using emacs for the past 6 months solid and am still by no
> means fond of its interface, but it seems to be able to do lots of
> stuff if you have a few lifetimes to find out how.
>
> On a very distantly-related note, how can people not on Debian handle
> Debian packages? I tried once getting edbrowse but got depressed
> before figuring out how to deal with .deb files. No fair cheating by
> telling me I don't need the Debian distribution; I want to know about
> .deb files whether or not it's necessary in this case. <Grin>
>
> Thanks and hope this helps,
>
> Lee
>
> On Tue, Jun 03, 2003 at 10:51:28AM -0500, John J. Boyer wrote:
> > Hello,
> >
> > This also pertains tho the websirte I am maintaining, which is for
> > Wisconsin Braille, Inc. The original website was created using Frontpage.
> > I've been trying out Tidy on it and may use Edbrowse also. Some of the
> > material that goes on it is originally from Word files. This material has
> > a lot of extra linefeeds and a lot of tabs when it is converted to text.
> > Is there an editor which can do a find and replace on these characters?
> >
> > Thanks,
> > John
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Editing Control Characters, Linefeeds, Etc.
John J. Boyer
` Lee Maschmeyer
@ ` jude dashiell
1 sibling, 0 replies; 5+ messages in thread
From: jude dashiell @ UTC (permalink / raw)
To: blinux-list
sed can handle control characters if you have a version that's fancy
enough. I'm pretty certain doing these kinds of conversions is listed in
the sed.faq file. There's tr that can be used too. You can join
sed-users and that's a yahoogroups.com mailing list if you run into any
problems.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~ UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
Editing Control Characters, Linefeeds, Etc Karl Dahlke
John J. Boyer
` Lee Maschmeyer
` Lee Maschmeyer
` jude dashiell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).