Annotation of 43BSD/contrib/news/misc/rnews.ml, revision 1.1

1.1     ! root        1: Date: 25 Apr 1983 10:29-PDT (Monday)
        !             2: From: Jim Rees  <jim@uw-beaver>
        !             3: Subject: rnews.ml
        !             4: Message-Id: <83/04/25 1029.783@uw-beaver>
        !             5: 
        !             6:        Emacs Readnews Distribution
        !             7: 
        !             8: This is an mlisp package, rnews.ml, for reading the news in Gosling
        !             9: Emacs.  It is similar to rmail.ml, and in fact depends on some of the
        !            10: functions in rmail.ml.  Our rmail.ml is modified, but I think this will
        !            11: also work with the unmodified rmail.ml.
        !            12: 
        !            13: This version is for use with news 2.10.  There is a different version for
        !            14: use with news 2.9.
        !            15: 
        !            16: To install rnews, install rnews.ml in your emacs/maclib directory.  In your
        !            17: profile, put an autoload for rnews.ml:
        !            18: 
        !            19:        (autoload "rnews" "rnews.ml")
        !            20: 
        !            21: Then enter emacs and do ESC-X-rnews.
        !            22: 
        !            23: The rnews directory is kept in your ~/Messages directory, so if you
        !            24: don't use rmail you might have to make this directory before you can
        !            25: use rnews.
        !            26: 
        !            27: There is an info page, written by grkermit!chris.  To install it, change to
        !            28: your Emacs databases directory and run "dbadd info emacs:rnews" with the
        !            29: info page as standard input.  To be complete you should change all the info
        !            30: nodes pointing to rnews, for example "up", "previous", and "next", but it
        !            31: will work if you don't change them.
        !            32: 
        !            33: If you have any suggestions or criticisms, or want your name added to the
        !            34: distribution list for new releases and updates, send mail to
        !            35: emacs-rnews-request at uw-beaver via uucp or Arpanet.  You can send mail to
        !            36: the list by mailing to emacs-rnews at uw-beaver.
        !            37: 
        !            38: Here are the info page and rnews.ml:
        !            39: 
        !            40: File: emacs     Node: rnews     Up: Packages
        !            41: 
        !            42:  Unix Emacs readnews facility.
        !            43: 
        !            44: "rnews" is used for reading news.  Executing it places your news
        !            45: directory into a window and enters a special command interpretation loop.
        !            46: The commands that it understands are:
        !            47: 
        !            48: p          move to the previous article.
        !            49: n          move to the next article.
        !            50: f          move forward in the current article.
        !            51: b and <backspace>
        !            52:            move backward in the current article.
        !            53: d          delete the current article. (the one indicated by '>')
        !            54: u          undelete the current article.
        !            55: D          delete the article at the cursor.
        !            56: U          undelete the article at the cursor.
        !            57: r          reply to the current article.
        !            58: m          enter smail, to send mail.
        !            59: a          append the current article to a file.
        !            60: F          Post a followup to the current article.
        !            61: P          Post an article.
        !            62: q          quit out of Rnews, saving undeleted articles.
        !            63: ?          display the info page for rnews
        !            64: <          go to the first article
        !            65: >          go to the last article
        !            66: s          asks for a number, skips down that number of articles
        !            67: g          asks for a number, goes to the article that many lines from the top
        !            68: `          decrypts a net.jokes "rot 13" article
        !            69: H          show the entire article header, including "junk" lines
        !            70: ^X-U       unsubscribe to the current group
        !            71: :          execute an emacs extended command
        !            72: <space> and <return>
        !            73:            make the article at the cursor be the current article
        !            74: 
        !            75: When in Post mode:
        !            76: 
        !            77: ^Xd        positions you in the Distribution: field of the message,
        !            78:            creating it if necessary.
        !            79: 
        !            80: 
        !            81: While in rnews, the current article is indicated with an ">" on the left
        !            82: margin.  You can move the cursor around with C-N, C-P, C-V, arrow keys,
        !            83: searches etc.  If you move the cursor, and want to see an article far from
        !            84: the current article, <space> or <return> makes the article at the cursor
        !            85: current.
        !            86: 
        !            87: If you provide an argument to the rnews command (usually with ^U) you will
        !            88: be put into rnews, but the directory will not be updated to include new
        !            89: articles.  This is much faster and is useful, for example, if you just want
        !            90: to post a new article or re-read an old one.
        !            91: 
        !            92: ------------------------------ Rnews.ml----------------------------------
        !            93: (if (! (is-bound rmail-default-log))
        !            94:     (load "rmail.ml"))
        !            95: (message "Loading the news system, please wait...")
        !            96: (sit-for 0)
        !            97: 
        !            98: ; Unix Emacs readnews facility.
        !            99: 
        !           100: ; "rnews" is used for reading news.  Executing it places your news
        !           101: ; directory into a window and enters a special command interpretation loop.
        !           102: ; The commands that it understands are:
        !           103: ;  p   move to the previous message.
        !           104: ;  n   move to the next message.
        !           105: ;  f   move forward in the current message.
        !           106: ;  b   move backward in the current message.
        !           107: ;  d   delete the current message.
        !           108: ;  u   undelete the last deleted message.
        !           109: ;  D   delete the article at the cursor.
        !           110: ;  U    undelete the article at the cursor.
        !           111: ;  r   reply to the current message.
        !           112: ;  m   enter smail, to send mail.
        !           113: ;  a   append the current message to a file.
        !           114: ;  F   Post a followup to the current message.
        !           115: ;  P   Post a message.
        !           116: ;  q   quit out of RMail, appending all undeleted messages to mbox.
        !           117: ;  ?   display the info page for rnews
        !           118: ;  <   go to the first article
        !           119: ;  >   go to the last article
        !           120: ;  s   asks for a number, skips down that number of articles
        !           121: ;  g   asks for a number, goes to the article that many lines from the top
        !           122: ;  `   decrypts a net.jokes "rot 13" article
        !           123: ;  H   show the entire article header, including "junk" lines
        !           124: ;  ^X-U        unsubscribe to the current group
        !           125: ;  :   execute an emacs extended command
        !           126: ;  <space> and <return>
        !           127: ;         make the article at the cursor be the current article
        !           128: 
        !           129: ; When in Post mode,
        !           130: ;  ^Xd positions you in the Distribution: field of the message,
        !           131: ;      creating it if necessary.
        !           132: 
        !           133: ; If you want replies sent back along the path by which they arrived,
        !           134: ; change the 1 in (setq internet-replies 1) to 0.  You will need to do
        !           135: ; this if your mail program doesn't do automatic uucp routing.
        !           136: 
        !           137: ; "smail" is used for sending mail.  It places you in a buffer for
        !           138: ; constructing the message and locally defines a few commands:
        !           139: ;  ^X^S        send the mail -- if all went well the window will disappear,
        !           140: ;      otherwise a message indicating which addresses failed will appear
        !           141: ;      at the bottom of the acreen.  Unfortunatly, the way the mailers on
        !           142: ;      Unix work, the message will have been sent to those addresses which
        !           143: ;      succeded and not to the others, so you have to delete some
        !           144: ;      addresses and fix up the others before you resend the message.
        !           145: ;  ^Xt positions you in the To: field of the message.
        !           146: ;  ^Xc positions you in the Cc: field of the message, creating it if it
        !           147: ;      doesn't already exist.
        !           148: ;              The abbrev facility is used for mail address expansion,
        !           149: ;              the file /usr/local/lib/emacs/RMailAbbrevs should contain
        !           150: ;              abbrev definitions to expand login names to their
        !           151: ;              proper mail address.  This gets used at CMU since we have
        !           152: ;              7 VAXen, 4 10's and countless 11's;  remembering where a
        !           153: ;              person usually logs in is nearly impossible.
        !           154: ;  ^Xs positions you in the Subject: field of the message.
        !           155: ;  ^Xa positions you to the end of the body of the message, ready to
        !           156: ;      append more text.
        !           157: 
        !           158: (defun
        !           159:     (rnews nbx internet-replies
        !           160:        this-from this-id this-length
        !           161: 
        !           162:        (setq internet-replies 1)
        !           163:        (setq nbx (concat (getenv "HOME") "/Messages/Newsbox"))
        !           164:        (message "Please wait while I read the news...")
        !           165:        (sit-for 0)
        !           166:        (save-window-excursion
        !           167:            (pop-to-buffer "rnews-directory")
        !           168:            (setq mode-line-format
        !           169:                (concat "     News from message file "
        !           170:                    (substr nbx 1 -1)
        !           171:                    "      %M   %[%p%]"))
        !           172:            (setq mode-string "RNews")
        !           173:            (erase-buffer)
        !           174:            (set-mark)
        !           175:            (if (! prefix-argument-provided)
        !           176:                (filter-region (concat "readnews -e >> " nbx)))
        !           177:            (read-file nbx)
        !           178:            (end-of-file)
        !           179:            (setq case-fold-search 0)
        !           180:            (if (error-occured (re-search-reverse "^[>N ]"))
        !           181:                (beginning-of-file)
        !           182:                (next-line)
        !           183:            )
        !           184:            (error-occured
        !           185:                (re-replace-string "^" "N "))
        !           186:            (setq case-fold-search 1)
        !           187:            (save-excursion
        !           188:                (temp-use-buffer "Full Header")
        !           189:                (setq needs-checkpointing 0)
        !           190:            )
        !           191:            (rnews-position)
        !           192:            (rnews-mark)
        !           193:            (sit-for 0)
        !           194:            (message "Type ^C to exit rnews; ? for help")
        !           195:            (recursive-edit)
        !           196:            (pop-to-buffer "rnews-directory")
        !           197:            (rnews-erase-messages)
        !           198:            (if buffer-is-modified (write-current-file))
        !           199:            (temp-use-buffer "current-message")
        !           200:            (setq buffer-is-modified 0)
        !           201:        )
        !           202:        (novalue)
        !           203:     )
        !           204: )
        !           205: 
        !           206: (defun
        !           207:     (rnews-position
        !           208:        (beginning-of-line)
        !           209:        (if (! (looking-at "^>"))
        !           210:            (progn
        !           211:                (beginning-of-file)
        !           212:                (if (error-occured (re-search-forward "^>"))
        !           213:                    (if (error-occured (re-search-forward "^N"))
        !           214:                        (progn
        !           215:                            (end-of-file)
        !           216:                            (previous-line)
        !           217:                        )
        !           218:                    )
        !           219:                )
        !           220:                (beginning-of-line)
        !           221:            )
        !           222:        )
        !           223:     )
        !           224: )
        !           225: 
        !           226: (defun
        !           227:     (rnews-pickup rnews-file
        !           228:        (beginning-of-line)
        !           229:        (save-excursion
        !           230:            (provide-prefix-argument 2 (forward-character))
        !           231:            (set-mark)
        !           232:            (search-forward " ")
        !           233:            (backward-character)
        !           234:            (copy-region-to-buffer "Scratch Stuff")
        !           235:            (temp-use-buffer "Scratch Stuff")
        !           236:            (setq needs-checkpointing 0)
        !           237:            (beginning-of-file)
        !           238:            (set-mark)
        !           239:            (error-occured
        !           240:                (replace-string "." "/"))
        !           241:            (end-of-line)
        !           242:            (setq rnews-file (region-to-string))
        !           243:            (pop-to-buffer "current-message")
        !           244:            (setq needs-checkpointing 0)
        !           245:            (setq this-from "")
        !           246:            (setq this-length "")
        !           247:            (setq this-id "")
        !           248:            (if (error-occured
        !           249:                    (read-file (concat "/usr/spool/news/" rnews-file)))
        !           250:                (progn
        !           251:                    (erase-buffer)
        !           252:                    (setq mode-line-format
        !           253:                        (concat "Expired article " rnews-file)))
        !           254:                (progn
        !           255:                    (setq case-fold-search 1)
        !           256:                    (beginning-of-file)
        !           257:                    (if (error-occured (search-forward "\n\n"))
        !           258:                        (message "Garbled header")
        !           259:                        (rnews-fix-header))
        !           260:                    (set-rnews-mode-line-format))
        !           261:            )
        !           262:        )
        !           263:     )
        !           264: 
        !           265:     (rnews-fix-header
        !           266:        (set-mark)
        !           267:        (beginning-of-file)
        !           268:        (copy-region-to-buffer "Full Header")
        !           269:        (narrow-region)
        !           270:        (convert-head "Posted:" "Date:")
        !           271:        (convert-head "Title:" "Subject:")
        !           272:        (convert-head "Article-I.D.:" "Message-ID:")
        !           273:        (error-occured
        !           274:            (re-search-forward "^From:[ \t]")
        !           275:            (end-of-line)
        !           276:            (set-mark)
        !           277:            (re-search-reverse "[!:@]")
        !           278:            (re-search-reverse "[!: ]")
        !           279:            (forward-character)
        !           280:            (setq this-from (region-to-string))
        !           281:            (beginning-of-file)
        !           282:        )
        !           283:        (error-occured
        !           284:            (re-search-forward "^Lines:[ \t]*\\(.*\\)")
        !           285:            (region-around-match 1)
        !           286:            (setq this-length (region-to-string))
        !           287:            (beginning-of-file)
        !           288:            (re-replace-string "^Lines:.*\n" "")
        !           289:            (beginning-of-file)
        !           290:        )
        !           291:        (error-occured
        !           292:            (re-search-forward "^Message-ID:[ \t]*\\(.*\\)")
        !           293:            (region-around-match 1)
        !           294:            (setq this-id (region-to-string))
        !           295:            (beginning-of-file)
        !           296:            (re-replace-string "^Message-ID:.*\n" "")
        !           297:            (beginning-of-file)
        !           298:        )
        !           299:        (error-occured (re-replace-string "^.*-version:.*\n" ""))
        !           300:        (error-occured (re-replace-string "^Path:.*\n" ""))
        !           301:        (error-occured (re-replace-string "^Sender:.*\n" ""))
        !           302:        (error-occured (re-replace-string "^.*received:.*\n" ""))
        !           303:        (widen-region)
        !           304:        (if (= (length this-length) 0)
        !           305:                                ; The constant 38 comes from the average
        !           306:                                ; line length of 356 articles in net.*
        !           307:            (setq this-length (concat "~" (/ (buffer-size) 38))))
        !           308:     )
        !           309: 
        !           310:     (convert-head re1 re2
        !           311:        (setq re1 (concat "^" (arg 1)))
        !           312:        (setq re2 (concat "^" (arg 2)))
        !           313:        (if (error-occured (re-search-forward re2))
        !           314:            (error-occured (re-replace-string re1 (arg 2)))
        !           315:            (beginning-of-file))
        !           316:        (error-occured (re-replace-string (concat re1 ".*\n") ""))
        !           317:     )
        !           318: 
        !           319:     (rnews-show-full-header
        !           320:        (save-window-excursion
        !           321:            (temp-use-buffer "current-message")
        !           322:            (beginning-of-file)
        !           323:            (set-mark)
        !           324:            (error-occured
        !           325:                (search-forward "\n\n")
        !           326:                (erase-region)
        !           327:                (yank-buffer "Full Header")
        !           328:            )
        !           329:        )
        !           330:     )
        !           331: 
        !           332:     (rnews-next-page
        !           333:        (save-excursion
        !           334:            (pop-to-buffer "current-message")
        !           335:            (next-page)
        !           336:            (set-rnews-mode-line-format)
        !           337:        )
        !           338:     )
        !           339:     
        !           340:     (rnews-previous-page
        !           341:        (save-excursion
        !           342:            (pop-to-buffer "current-message")
        !           343:            (previous-page)
        !           344:            (set-rnews-mode-line-format)
        !           345:        )
        !           346:     )
        !           347: 
        !           348:     (set-rnews-mode-line-format from
        !           349:        (save-excursion 
        !           350:            (temp-use-buffer "Scratch Stuff")
        !           351:            (erase-buffer)
        !           352:            (insert-string this-from)
        !           353:            (set-mark)
        !           354:            (beginning-of-line)
        !           355:            (error-occured (replace-string "%" "%%"))
        !           356:            (setq from (region-to-string))
        !           357:            (use-old-buffer "current-message")
        !           358:            (end-of-file)
        !           359:            (setq mode-line-format
        !           360:                (concat
        !           361:                    "From: " from
        !           362:                    (if (!= (length this-length) 0)
        !           363:                        (concat "  Lines: " this-length)
        !           364:                        "")
        !           365:                    "  %[%p%]"
        !           366:                    (if (dot-is-visible)
        !           367:                        ""
        !           368:                        "  --More--")
        !           369:                )))
        !           370:     )
        !           371: )
        !           372: 
        !           373: (defun
        !           374:     (rnews-erase-messages
        !           375:        (save-excursion
        !           376:            (pop-to-buffer "rnews-directory")
        !           377:            (beginning-of-file)
        !           378:            (error-occured
        !           379:                (while 1
        !           380:                    (re-search-forward "^.D")
        !           381:                    (beginning-of-line)
        !           382:                    (set-mark)
        !           383:                    (end-of-line)
        !           384:                    (forward-character)
        !           385:                    (erase-region)
        !           386:                )
        !           387:            )
        !           388:        )
        !           389:     )
        !           390: )
        !           391: 
        !           392: (defun
        !           393:     (rnews-com
        !           394:        (argc)
        !           395:        (rnews)
        !           396:        (exit-emacs)
        !           397:     )
        !           398: 
        !           399:     (rnews-next-message
        !           400:        (rnews-position)
        !           401:        (delete-next-character)
        !           402:        (insert-character ' ')
        !           403:        (beginning-of-line)
        !           404:        (next-line)
        !           405:        (if (eobp) (progn (previous-line)
        !           406:                          (message "You're at the last message already")))
        !           407:        (delete-next-character)
        !           408:        (insert-character '>')
        !           409:        (rnews-pickup)
        !           410:     )
        !           411: 
        !           412:     (rnews-previous-message
        !           413:        (rnews-position)
        !           414:        (delete-next-character)
        !           415:        (insert-character ' ')
        !           416:        (previous-line)
        !           417:        (beginning-of-line)
        !           418:        (delete-next-character)
        !           419:        (insert-character '>')
        !           420:        (rnews-pickup)
        !           421:     )
        !           422: 
        !           423:     (rnews-delete-message
        !           424:        (rnews-position)
        !           425:        (forward-character)
        !           426:        (delete-next-character)
        !           427:        (insert-character 'D')
        !           428:        (beginning-of-line)
        !           429:     )
        !           430: 
        !           431:     (rnews-undelete-message
        !           432:        (rnews-position)
        !           433:        (forward-character)
        !           434:        (delete-next-character)
        !           435:        (insert-character ' ')
        !           436:        (beginning-of-line)
        !           437:     )
        !           438: 
        !           439:     (rnews-delete-message-at-cursor
        !           440:        (beginning-of-line)     
        !           441:        (forward-character)
        !           442:        (delete-next-character)
        !           443:        (insert-character 'D')
        !           444:        (beginning-of-line)
        !           445:     )
        !           446: 
        !           447:     (rnews-undelete-message-at-cursor
        !           448:        (beginning-of-line)
        !           449:        (forward-character)
        !           450:        (delete-next-character)
        !           451:        (insert-character ' ')
        !           452:        (beginning-of-line)
        !           453:     )
        !           454: 
        !           455:     (rnews-goto-message n
        !           456:        (setq n (get-tty-string "Goto message number: "))
        !           457:        (rnews-unmark)
        !           458:        (beginning-of-file)
        !           459:        (provide-prefix-argument n (next-line))
        !           460:        (rnews-mark)
        !           461:     )
        !           462: )
        !           463: 
        !           464: (defun
        !           465:     (rnews-help
        !           466:        (&info "emacs" "rnews")))
        !           467: 
        !           468: (defun
        !           469:     (rnews-reply subject dest excess refs
        !           470:        (setq subject "")
        !           471:        (setq dest "")
        !           472:        (setq excess "")
        !           473:        (save-window-excursion
        !           474:            (pop-to-buffer "current-message")
        !           475:            (setq case-fold-search 1)
        !           476:            (beginning-of-file)
        !           477:            (search-forward "\n\n")
        !           478:            (set-mark)
        !           479:            (beginning-of-file)
        !           480:            (narrow-region)
        !           481:            (error-occured
        !           482:                (re-search-forward "^Subject:[ \t]*\\(.*\\)")
        !           483:                (region-around-match 1)
        !           484:                (setq subject (region-to-string))
        !           485:                (if (!= (substr subject 1 3) "Re:")
        !           486:                    (setq subject (concat "Re: " subject))
        !           487:                )
        !           488:            )
        !           489:            (save-excursion
        !           490:                (temp-use-buffer "Full Header")
        !           491:                (beginning-of-file)
        !           492:                    (if internet-replies
        !           493:                        (if (error-occured (re-search-forward
        !           494:                                               "^Reply-To:[ \t]*\\(.*\\)"))
        !           495:                            (setq dest this-from)
        !           496:                            (progn
        !           497:                                (region-around-match 1)
        !           498:                                (setq dest (region-to-string)))
        !           499:                        )
        !           500:                        (progn
        !           501:                            (if (error-occured (re-search-forward
        !           502:                                    "^Path:[ \t]*[^ \t!]*!\\(.*\\)"))
        !           503:                                (re-search-forward
        !           504:                                    "^From:[ \t]*[^ \t!]*!\\(.*\\)"))
        !           505:                            (region-around-match 1)
        !           506:                            (setq dest (region-to-string))))
        !           507:            )
        !           508:            (beginning-of-file)
        !           509:            (error-occured edest
        !           510:                (save-excursion 
        !           511:                    (temp-use-buffer "Scratch Stuff")
        !           512:                    (setq needs-checkpointing 0)
        !           513:                    (erase-buffer)
        !           514:                    (insert-string dest)
        !           515:                    (set-mark)
        !           516:                    (beginning-of-file)
        !           517:                    (if (! (error-occured
        !           518:                        (re-search-forward " (\\(.*\\))")))
        !           519:                        (progn
        !           520:                            (region-around-match 1)
        !           521:                            (setq dest (region-to-string))
        !           522:                            (beginning-of-file)
        !           523:                            (insert-string (concat dest "  <"))
        !           524:                            (re-replace-string "  *(.*" ">")
        !           525:                            (end-of-line)
        !           526:                            (set-mark)
        !           527:                            (beginning-of-line)
        !           528:                            (setq dest (region-to-string))
        !           529:                        )
        !           530:                    )
        !           531:                    (error-occured 
        !           532:                        (re-replace-string
        !           533:                            "  *at  *[^,\n]*\\| *@ *[^,\n]*\\| *([^)\n]*)\\| *<[^>\n]*>"
        !           534:                            ""))
        !           535:                    (error-occured
        !           536:                        (re-replace-string ".*!" ""))
        !           537:                    (setq edest (region-to-string))
        !           538:                )
        !           539:                (error-occured
        !           540:                    (re-search-forward "^Date:[ \t]*\\(.*\\)")
        !           541:                    (region-around-match 1)
        !           542:                )
        !           543:                (setq excess (concat
        !           544:                                 "In-Reply-To: "
        !           545:                                 edest "'s message of "
        !           546:                                 (region-to-string)
        !           547:                                 "\n"))
        !           548:                (beginning-of-file)
        !           549:                (if (error-occured
        !           550:                        (re-search-forward "^References:[ \t]*\\(.*\\)")
        !           551:                        (region-around-match 1)
        !           552:                        (setq refs (concat (region-to-string) " " this-id)))
        !           553:                    (setq refs this-id))
        !           554:            )
        !           555:            (widen-region)
        !           556:            (pop-to-buffer "send-mail")
        !           557:            (setq needs-checkpointing 0)
        !           558:            (setq case-fold-search 1)
        !           559:            (erase-buffer)
        !           560:            (insert-string subject)
        !           561:            (newline)
        !           562:            (insert-string dest)
        !           563:            (newline)
        !           564:            (insert-string excess)
        !           565:            (insert-string (concat "References: " refs "\n"))
        !           566:            (do-mail-setup)
        !           567:        )
        !           568:        (rnews-position)
        !           569:        (if (looking-at "^>")
        !           570:            (progn
        !           571:                (forward-character)
        !           572:                (delete-next-character)
        !           573:                (insert-character 'A')
        !           574:                (beginning-of-line)))
        !           575:     )
        !           576: )
        !           577: 
        !           578: (defun
        !           579:     (rnews-followup newsgroups subject refs
        !           580:        (setq newsgroups "")
        !           581:        (setq subject "")
        !           582:        (setq refs "")
        !           583:        (save-window-excursion
        !           584:            (pop-to-buffer "current-message")
        !           585:            (beginning-of-file)
        !           586:            (search-forward "\n\n")
        !           587:            (set-mark)
        !           588:            (beginning-of-file)
        !           589:            (narrow-region)
        !           590:            (error-occured
        !           591:                (re-search-forward "^Newsgroups:[ \t]*\\(.*\\)")
        !           592:                (region-around-match 1)
        !           593:                (setq newsgroups (region-to-string))
        !           594:            )
        !           595:            (save-excursion
        !           596:                (temp-use-buffer "Scratch Stuff")
        !           597:                (setq needs-checkpointing 0)
        !           598:                (erase-buffer)
        !           599:                (insert-string newsgroups)
        !           600:                (beginning-of-file)
        !           601:                (error-occured
        !           602:                    (replace-string "general" "followup"))
        !           603:                (set-mark)
        !           604:                (end-of-file)
        !           605:                (setq newsgroups (region-to-string))
        !           606:            )
        !           607:            (beginning-of-file)
        !           608:            (error-occured
        !           609:                (re-search-forward "^Subject:[ \t]*\\(.*\\)")
        !           610:                (region-around-match 1)
        !           611:                (setq subject (region-to-string))
        !           612:                (if (!= (substr subject 1 3) "Re:")
        !           613:                    (setq subject (concat "Re: " subject))
        !           614:                )
        !           615:            )
        !           616:            (beginning-of-file)
        !           617:            (if (error-occured
        !           618:                    (re-search-forward "^References:[ \t]*\\(.*\\)")
        !           619:                    (region-around-match 1)
        !           620:                    (setq refs (concat (region-to-string) " " this-id)))
        !           621:                (setq refs this-id))
        !           622:            (beginning-of-file)
        !           623:            (widen-region)
        !           624:            (pop-to-buffer "send-mail")
        !           625:            (setq needs-checkpointing 0)
        !           626:            (setq case-fold-search 1)
        !           627:            (erase-buffer)
        !           628:            (insert-string (concat "Newsgroups: " newsgroups))
        !           629:            (newline)
        !           630:            (insert-string (concat "Subject: " subject))
        !           631:            (newline)
        !           632:            (insert-string (concat "References: " refs))
        !           633:            (newline)
        !           634:            (newline)
        !           635:            (rnews-do-post)
        !           636:        )
        !           637:        (rnews-position)
        !           638:        (if (looking-at "^>")
        !           639:            (progn
        !           640:                (forward-character)
        !           641:                (delete-next-character)
        !           642:                (insert-character 'F')
        !           643:                (beginning-of-line)))
        !           644:     )
        !           645: 
        !           646:     (rnews-post
        !           647:        (save-window-excursion
        !           648:            (pop-to-buffer "send-mail")
        !           649:            (setq needs-checkpointing 0)
        !           650:            (setq case-fold-search 1)
        !           651:            (erase-buffer)
        !           652:            (insert-string "Newsgroups: \nSubject: \n\n")
        !           653:            (beginning-of-file)
        !           654:            (end-of-line)
        !           655:            (rnews-do-post)
        !           656:        )
        !           657:     )
        !           658: 
        !           659:     (rnews-do-post rnews-do-send
        !           660:        (setq rnews-do-send 1)
        !           661:        (setq right-margin 72)
        !           662:        (local-bind-to-key "exit-emacs" "\^X\^S")
        !           663:        (local-bind-to-key "exit-emacs" "\^X\^F")
        !           664:        (local-bind-to-key "rnews-abort-send" "\^X\^A")
        !           665:        (local-bind-to-key "justify-paragraph" "\ej")
        !           666:        (local-bind-to-key "rnews-post-goto-dist" "\^Xd")
        !           667:        (while (= rnews-do-send 1)
        !           668:            (progn
        !           669:                (recursive-edit)
        !           670:                (if (= rnews-do-send 1)
        !           671:                    (rnews-call-inews))))
        !           672:     )
        !           673: 
        !           674:     (rnews-post-goto-dist      ; Move to the "Distribution:" field
        !           675:        (beginning-of-file)
        !           676:        (if (error-occured (re-search-forward "^Distribution:.*"))
        !           677:            (progn (re-search-forward "\n\n\\|^Subject:.*\n.")
        !           678:                (backward-character)
        !           679:                (backward-character)
        !           680:                (insert-string "\nDistribution: ")))
        !           681:     )
        !           682: 
        !           683:     (rnews-call-inews inews-errors
        !           684:        (save-excursion
        !           685:            (beginning-of-file)
        !           686:            (set-mark)
        !           687:            (end-of-file)
        !           688:            (copy-region-to-buffer "Delivery-errors")
        !           689:        )
        !           690:        (message "Sending...")
        !           691:        (sit-for 0)
        !           692:        (save-window-excursion
        !           693:            (temp-use-buffer "Delivery-errors")
        !           694:            (setq needs-checkpointing 0)
        !           695:            (beginning-of-file)
        !           696:            (set-mark)
        !           697:            (end-of-file)
        !           698:            (filter-region "inews -h")
        !           699:            (beginning-of-file)
        !           700:            (set-mark)
        !           701:            (error-occured (re-replace-string "\n\n* *" "; "))
        !           702:            (end-of-line)
        !           703:            (setq inews-errors (region-to-string))
        !           704:            (if (= (length inews-errors) 0)
        !           705:                (progn
        !           706:                    (setq rnews-do-send 0)
        !           707:                    (message "Posted")
        !           708:                )
        !           709:                (message inews-errors)
        !           710:            )
        !           711:        )
        !           712:     )
        !           713: 
        !           714:     (rnews-abort-send
        !           715:        (if (!= "y" (substr (get-tty-string
        !           716:                                "Do you really want to abort the message? ")
        !           717:                            1 1))
        !           718:            (error-message "Turkey!"))
        !           719:        (setq rnews-do-send 0)
        !           720:        (exit-emacs)
        !           721:     )
        !           722: )
        !           723: 
        !           724: (defun
        !           725:     (rnews-unmark
        !           726:        (error-occured
        !           727:            (rnews-position)
        !           728:            (delete-next-character)
        !           729:            (insert-character ' ')
        !           730:            (beginning-of-line)))
        !           731:     
        !           732:     (rnews-mark
        !           733:        (beginning-of-line)
        !           734:        (if (error-occured
        !           735:                (if (eobp)
        !           736:                    (re-search-reverse "^.")
        !           737:                    (progn
        !           738:                        (re-search-forward "^.")
        !           739:                        (beginning-of-line)))
        !           740:            )
        !           741:            (message "No messages")
        !           742:            (progn
        !           743:                (delete-next-character)
        !           744:                (insert-character '>')
        !           745:                (rnews-pickup))
        !           746:        )
        !           747:     )
        !           748: 
        !           749:     (rnews-first-message
        !           750:        (rnews-unmark)
        !           751:        (beginning-of-file)
        !           752:        (rnews-mark)
        !           753:     )
        !           754: 
        !           755:     (rnews-last-message
        !           756:        (rnews-unmark)
        !           757:        (end-of-file)
        !           758:        (rnews-mark)
        !           759:     )
        !           760: 
        !           761:     (rnews-skip n
        !           762:        (setq n (get-tty-string "Skip messages: "))
        !           763:        (rnews-unmark)
        !           764:        (provide-prefix-argument n (next-line))
        !           765:        (rnews-mark)
        !           766:     )
        !           767: 
        !           768:     (rnews-this-message save-dot
        !           769:        (setq save-dot (dot))
        !           770:        (rnews-unmark)
        !           771:        (goto-character save-dot)
        !           772:        (rnews-mark)
        !           773:     )
        !           774: 
        !           775:     (rnews-decrypt-joke
        !           776:        (save-window-excursion
        !           777:            (temp-use-buffer "current-message")
        !           778:            (beginning-of-file)
        !           779:            (search-forward "\n\n")
        !           780:            (set-mark)
        !           781:            (end-of-file)
        !           782:            (filter-region "tr a-zA-Z n-za-mN-ZA-M")
        !           783:        )
        !           784:     )
        !           785: 
        !           786:     (rnews-unsubscribe group newsrc
        !           787:        (beginning-of-line)
        !           788:        (save-excursion
        !           789:            (provide-prefix-argument 2 (forward-character))
        !           790:            (set-mark)
        !           791:            (search-forward " ")
        !           792:            (search-reverse "/")
        !           793:            (setq group (region-to-string))
        !           794:            (temp-use-buffer ".newsrc")
        !           795:            (if (error-occured (setq newsrc (getenv "NEWSRC")))
        !           796:                (setq newsrc (concat (getenv "HOME") "/.newsrc")))
        !           797:            (read-file newsrc)
        !           798:            (if (error-occured (search-forward (concat group ":")))
        !           799:                (message "Already unsubscribed")
        !           800:                (progn
        !           801:                    (delete-previous-character)
        !           802:                    (insert-character '!')
        !           803:                    (write-current-file)
        !           804:                    (message (concat "Unsubscribed from " group))))
        !           805:        )
        !           806:     )
        !           807: )
        !           808: 
        !           809: (save-excursion i
        !           810:     (temp-use-buffer "rnews-directory")
        !           811:     (setq i ' ')
        !           812:     (while (< i 128)
        !           813:        (local-bind-to-key "illegal-operation" i)
        !           814:        (setq i (+ i 1)))
        !           815:     (local-bind-to-key "rnews-next-page" 'f')
        !           816:     (local-bind-to-key "rnews-previous-page" 'b')
        !           817:     (local-bind-to-key "rnews-previous-page" '^H')
        !           818:     (local-bind-to-key "rnews-next-message" 'n')
        !           819:     (local-bind-to-key "rnews-previous-message" 'p')
        !           820:     (local-bind-to-key "rnews-delete-message" 'd')
        !           821:     (local-bind-to-key "rnews-undelete-message" 'u')
        !           822:     (local-bind-to-key "rnews-delete-message-at-cursor" 'D')
        !           823:     (local-bind-to-key "rnews-undelete-message-at-cursor" 'U')
        !           824:     (local-bind-to-key "rnews-help" '?')
        !           825:     (local-bind-to-key "exit-emacs" 'q')
        !           826:     (local-bind-to-key "rnews-reply" 'r')
        !           827:     (local-bind-to-key "rnews-followup" 'F')
        !           828:     (local-bind-to-key "rnews-post" 'P')
        !           829:     (local-bind-to-key "smail" 'm')
        !           830:     (local-bind-to-key "rnews-goto-message" 'g')
        !           831:     (local-bind-to-key "rnews-first-message" '<')
        !           832:     (local-bind-to-key "rnews-last-message" '>')
        !           833:     (local-bind-to-key "rnews-skip" 's')
        !           834:     (local-bind-to-key "rmail-append" 'a')
        !           835:     (local-bind-to-key "rmail-shell" '!')
        !           836:     (local-bind-to-key "execute-extended-command" ':')
        !           837:     (local-bind-to-key "rnews-this-message" ' ')
        !           838:     (local-bind-to-key "rnews-this-message" '\r')
        !           839:     (local-bind-to-key "rnews-decrypt-joke" '`')
        !           840:     (local-bind-to-key "rnews-show-full-header" 'H')
        !           841:     (local-bind-to-key "rnews-unsubscribe" "\^Xu")
        !           842: )

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.