2023-05-25 ed

All this enthusiasm about newsgroups has brought me back to `tin`. Back in the early days, when I got an account at the computer centre of our university, when I learned about email and Usenet, I used tin to read the news. This was before I learned about Emacs. I guess at the time I was still using vi? Or whatever they used as the standard editor back then?

These days I like to use ed for the occasional news post and email!

Here I’m reading the news and writing a post using ed.

kensanata@cosmic:~$ tin
Reading config file...
135
6a
Yo! Ahooooooy! It's working. People can read and write
to the campaignwiki.* newsgroups on cosmic.voyage.

Cheers
Alex
.
wq
254

“6a” starts appending at line 6 (after the headers, before the signature). “.” ends input and “wq” writes the file and quits.

It’s not so bad, actually! I even managed to write sections of the buffer to a new file, and run `fmt` on it. It’s not perfect because when I read the formatted file, the lines get appended at the end of the buffer instead of being inserted at the current line. There are still workflows to work out! 😄

If you need a book, @mwl has your back: Ed Mastery.

@mwl

Ed Mastery

And of course there’s this:

golem> ed

?
help
?
?
?
quit
?
exit
?
bye
?
hello?
?
eat flaming death
?
^C
?
^C
?
^D
?

“Note the consistent user interface and error reportage. Ed is generous enough to flag errors, yet prudent enough not to overwhelm the novice with verbosity.” – The True Path

The True Path

​#Editors

Comments

(Please contact me if you want to remove your comment.)

Here’s me doing a quick edit to the tin config file. Notice how I didn’t know how to advance the current line once I had found the comment. p prints it, n numbers it, 42p then explicitly sets and prints it. I discovered that a simple +1 would have done that, too. Nice!

alex@melanobombus ~> ed .tin/tinrc
24758
/reconnect
# If ON automatically reconnect to NNTP server if the connection is broken
p
# If ON automatically reconnect to NNTP server if the connection is broken
n
41	# If ON automatically reconnect to NNTP server if the connection is broken
42p
auto_reconnect=OFF
s/OFF/ON/
p
auto_reconnect=ON
wq
24757
alex@melanobombus ~> ed .tin/tinrc
24757
/reconnect
# If ON automatically reconnect to NNTP server if the connection is broken
+1
auto_reconnect=ON
q

– Alex 2023-06-01 05:37 UTC