* interpreting ^Hs in text files
@ 2003-01-16 15:22 Maciej Kalisiak
2003-01-16 15:43 ` David Kastrup
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Maciej Kalisiak @ 2003-01-16 15:22 UTC (permalink / raw)
Text files occasionally use double-striking using ^H to create effects such as
bold and underlined lettering. How do I make Emacs parse and interpret the
text file according to this convention?
--
Maciej Kalisiak | <mac at dgp.toronto.edu> | http://www.dgp.toronto.edu/~mac
PGP->finger|www; (0x39AC36F5) 9F BB 9E 11 F0 1E 5D 20 0B 31 3D 37 47 D0 67 C7
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: interpreting ^Hs in text files
2003-01-16 15:22 interpreting ^Hs in text files Maciej Kalisiak
@ 2003-01-16 15:43 ` David Kastrup
2003-01-17 18:39 ` Maciej Kalisiak
2003-01-16 19:37 ` Dan Kalikow
2003-01-16 19:58 ` Kai Großjohann
2 siblings, 1 reply; 9+ messages in thread
From: David Kastrup @ 2003-01-16 15:43 UTC (permalink / raw)
mac@die.spammer.die.dgp.toronto.edu (Maciej Kalisiak) writes:
> Text files occasionally use double-striking using ^H to create
> effects such as bold and underlined lettering. How do I make Emacs
> parse and interpret the text file according to this convention?
Take a look at
(defun Man-cleanup-manpage ()
"Remove overstriking and underlining from the current buffer."
in man.el
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: interpreting ^Hs in text files
2003-01-16 15:22 interpreting ^Hs in text files Maciej Kalisiak
2003-01-16 15:43 ` David Kastrup
@ 2003-01-16 19:37 ` Dan Kalikow
2003-01-20 7:50 ` Lee Sau Dan
2003-01-16 19:58 ` Kai Großjohann
2 siblings, 1 reply; 9+ messages in thread
From: Dan Kalikow @ 2003-01-16 19:37 UTC (permalink / raw)
In <slrnb2djh3.9kl.mac@mac.dgp.toronto.edu> Maciej Kalisiak wrote:
> Text files occasionally use double-striking using ^H to create effects
> such as bold and underlined lettering. How do I make Emacs parse and
> interpret the text file according to this convention?
FWIW Maciej, I believe that such uses of ^H mostly occur these days as
jokes. In the old days indeed ^H would execute a physical backspace of
"the print-head" thus permitting it to over-strike a previously-typed
letter. A common use of this was to underscore such a previously-
printed letter. E.g., to print and underscore the word "the" the
sequence of characters transmitted would be
the^H^H^H___
where ^H was ctrl-H. It could also be used to strike through or
obliterate a previously-typed letter. It survived in that mode for
awhile as "glass TTYs" supplanted paper terminals, but gradually fell
into disuse in that mode. Nowadays, I normally see such ^H stuff used
as a "figure of net-speech" like this --
=====
Microsoft Windows is the most excellent^H^H^H^H^H^Hinsidious operating
system known to exist today.
=====
HTH^H^H^HI don't care if this helps or not to tell you the truth :-)
/Dan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: interpreting ^Hs in text files
2003-01-16 15:22 interpreting ^Hs in text files Maciej Kalisiak
2003-01-16 15:43 ` David Kastrup
2003-01-16 19:37 ` Dan Kalikow
@ 2003-01-16 19:58 ` Kai Großjohann
2003-01-20 7:50 ` Lee Sau Dan
2 siblings, 1 reply; 9+ messages in thread
From: Kai Großjohann @ 2003-01-16 19:58 UTC (permalink / raw)
mac@die.spammer.die.dgp.toronto.edu (Maciej Kalisiak) writes:
> Text files occasionally use double-striking using ^H to create effects such as
> bold and underlined lettering. How do I make Emacs parse and interpret the
> text file according to this convention?
Hm. Gnus has code to do that, and Emacs can do it for man pages,
too. So you might be able to find some code there. I'd start with
M-x apropos RET, then specify regular expressions such as the
following:
gnus.*bold
article.*bold
treat.*bold
bold.*treat
Hm. There is the function Man-cleanup-manpage. It's also a command.
--
Ambibibentists unite!
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: interpreting ^Hs in text files
2003-01-16 15:43 ` David Kastrup
@ 2003-01-17 18:39 ` Maciej Kalisiak
2003-01-17 19:37 ` Alan Shutko
2003-01-17 19:41 ` Henrik Enberg
0 siblings, 2 replies; 9+ messages in thread
From: Maciej Kalisiak @ 2003-01-17 18:39 UTC (permalink / raw)
* David Kastrup <dak@gnu.org>:
> Take a look at
>
> (defun Man-cleanup-manpage ()
> "Remove overstriking and underlining from the current buffer."
>
> in man.el
Thanks, that will do nicely (viewing mutt's manual.txt in Emacs). Although if
anybody knows of a package function that actually interprets these and sets the
faces appropriately, that would be even better.
--
Maciej Kalisiak | <mac@dgp.toronto.edu> | http://www.dgp.toronto.edu/~mac [McQ]
PGP->finger|www; (0x39AC36F5) 9F BB 9E 11 F0 1E 5D 20 0B 31 3D 37 47 D0 67 C7
GE/CS d- s++:+ a- C++(+++) ULAI++ P+++ L+++ E+++ W++ N- o? K? !w--- O- M- V--
PS PE+ Y+ PGP+ t+ 5 !X-- R+ tv-- b+>++++ DI+ G+ e>+++>++++(*) h--- r+++ y?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: interpreting ^Hs in text files
2003-01-17 18:39 ` Maciej Kalisiak
@ 2003-01-17 19:37 ` Alan Shutko
2003-01-17 19:41 ` Henrik Enberg
1 sibling, 0 replies; 9+ messages in thread
From: Alan Shutko @ 2003-01-17 19:37 UTC (permalink / raw)
Maciej Kalisiak <mac@die.spammer.die.dgp.toronto.edu> writes:
> Although if anybody knows of a package function that actually
> interprets these and sets the faces appropriately, that would be
> even better.
Man-fontify-manpage
--
Alan Shutko <ats@acm.org> - In a variety of flavors!
Yo mama so ugly she'd scare a buzzard off a gut wagon.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: interpreting ^Hs in text files
2003-01-17 18:39 ` Maciej Kalisiak
2003-01-17 19:37 ` Alan Shutko
@ 2003-01-17 19:41 ` Henrik Enberg
1 sibling, 0 replies; 9+ messages in thread
From: Henrik Enberg @ 2003-01-17 19:41 UTC (permalink / raw)
Maciej Kalisiak <mac@die.spammer.die.dgp.toronto.edu> writes:
> Thanks, that will do nicely (viewing mutt's manual.txt in Emacs).
> Although if anybody knows of a package function that actually
> interprets these and sets the faces appropriately, that would be even
> better.
woman.el, which is part of Emacs 21.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: interpreting ^Hs in text files
2003-01-16 19:58 ` Kai Großjohann
@ 2003-01-20 7:50 ` Lee Sau Dan
0 siblings, 0 replies; 9+ messages in thread
From: Lee Sau Dan @ 2003-01-20 7:50 UTC (permalink / raw)
>>>>> "Kai" == Kai Großjohann <kai.grossjohann@uni-duisburg.de> writes:
Kai> mac@die.spammer.die.dgp.toronto.edu (Maciej Kalisiak) writes:
>> Text files occasionally use double-striking using ^H to create
>> effects such as bold and underlined lettering. How do I make
>> Emacs parse and interpret the text file according to this
>> convention?
Kai> Hm. Gnus has code to do that, and Emacs can do it for man
Kai> pages, too.
Gnus even does _underline_ and *bold*. :D
--
Lee Sau Dan 李守敦(Big5) ~{@nJX6X~}(HZ)
E-mail: danlee@informatik.uni-freiburg.de
Home page: http://www.informatik.uni-freiburg.de/~danlee
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: interpreting ^Hs in text files
2003-01-16 19:37 ` Dan Kalikow
@ 2003-01-20 7:50 ` Lee Sau Dan
0 siblings, 0 replies; 9+ messages in thread
From: Lee Sau Dan @ 2003-01-20 7:50 UTC (permalink / raw)
>>>>> "Dan" == Dan Kalikow <DrDan@Kalikow.com> writes:
Dan> E.g., to print and underscore the word "the" the sequence of
Dan> characters transmitted would be the^H^H^H___ where ^H was
Dan> ctrl-H.
This would result in "___" being displayed on a dumber CRT terminal.
So, most people would rather do it with "___^H^H^Hthe", which is more
fault-proof. :)
Dan> It could also be used to strike through or
Dan> obliterate a previously-typed letter. It survived in that
Dan> mode for awhile as "glass TTYs" supplanted paper terminals,
Dan> but gradually fell into disuse in that mode.
And some smarter CRT terminals actually emulated those effects to some
extent.
Dan> Nowadays, I normally see such ^H stuff used as a "figure of
Dan> net-speech" like this -- ===== Microsoft Windows is the most
Dan> excellent^H^H^H^H^H^Hinsidious operating system known to
Dan> exist today. ===== HTH^H^H^HI don't care if this helps or
Dan> not to tell you the truth :-)
But that's not a real Control-H. It's 2 characters: ^ and H. Anyway,
that's the convention to represent a Control-H with visible
characters. How many people can still appreciate those uses of ^ and
H?
--
Lee Sau Dan 李守敦(Big5) ~{@nJX6X~}(HZ)
E-mail: danlee@informatik.uni-freiburg.de
Home page: http://www.informatik.uni-freiburg.de/~danlee
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2003-01-20 7:50 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-16 15:22 interpreting ^Hs in text files Maciej Kalisiak
2003-01-16 15:43 ` David Kastrup
2003-01-17 18:39 ` Maciej Kalisiak
2003-01-17 19:37 ` Alan Shutko
2003-01-17 19:41 ` Henrik Enberg
2003-01-16 19:37 ` Dan Kalikow
2003-01-20 7:50 ` Lee Sau Dan
2003-01-16 19:58 ` Kai Großjohann
2003-01-20 7:50 ` Lee Sau Dan
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.