oster@dewey.soe.berkeley.edu (David Phillip Oster) (09/30/88)
Let me know if I am out to lunch on this one. Background: The news reader I use is "rn". When I want to reply to a posting, I give a command to "rn". "rn" copies an appropriate header into a temporary file, and hands the file to an editor program it gets from an environment variable. It sleeps until the editor exits, then uses the contents of the temporary file as the message to send. The Problem: The problem is I want to use emacs as my editor, but I don't like waiting for a new copy of emacs to be created. What I want: I want (1) a short C program that opens a pseudotty (or a named pipe.), writes its first argument (a filename) to that output, flushes the output, and sleeps. When it recieves an acknowledgment, it exits. (2) an emacs macro to listen on such a pseudotty (or named pipe.) until it sees a filename, then read it into an editor buffer. The editor buffer should have a "Done" command bound to a control key sequence that (a) writes the file out, (b) sends the acknowledgment to the C program described in (1). (c) closes the buffer. I need the whole thing to work throught the vt100 emulator I'm using to talk to unix. This will let me keep one emacs process running all the time, and send files to it from outside, whenever I want. Does anyone have such a beast? --- David Phillip Oster --When you asked me to live in sin with you Arpa: oster@dewey.soe.berkeley.edu --I didn't know you meant sloth. Uucp: {uwvax,decvax,ihnp4}!ucbvax!oster%dewey.soe.berkeley.edu
nate@mipos2.intel.com (Nate Hess) (10/03/88)
In article <704@nic.MR.NET>, davem@gonzo (Dave Marquardt) writes: >In article <23050@tut.cis.ohio-state.edu> karl@triceratops.cis.ohio-state.edu (Karl Kleinpaste) writes: >>oster@dewey.soe.berkeley.edu (David Phillip Oster) writes: >>> [Stuff about having to wait when kicking up a new emacs each time the >>> editor is called from "rn".] >>Look in your emacs/etc directory for emacsclient.c and server.c, then >>check over lisp/server.el. Essentially, in your .emacs, include >> (server-start) >>and set your $EDITOR to "emacsclient." Poof, you're done. >Well, that's fine, if you've already got your emacs started. How can you even think of being logged in to a Unix system and *not* have an emacs started?!? Gack. An even nicer solution to your problem is so use Gnews, instead of rn. Gnews implements a news reader very similar to rn inside of Emacs, with all the advantages theretoforthwitheth. Gnews is quite usable even if you're an Emacs novice; I have gotten people who had been using rn for less than a week up and running with Gnews under GNU Emacs with absolutely no pain. When you do a followup or a reply to an article, the reply buffer is ready for your text in about the time it takes to blink... Happy Gnewsing! --woodstock -- "What I like is when you're looking and thinking and looking and thinking...and suddenly you wake up." - Hobbes woodstock@sc.intel.com ...!{decwrl|hplabs!oliveb|amd}!intelca!mipos3!nate