🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.help
Article #2102

Re: webster with emacs 18.59 ?

#2102
From: MIYASHITA Ken
Date: Fri, 08 Jan 1993 03:54
59 lines
3103 bytes
In article <tom.726164342@dynamo.ecn.purdue.edu> tom@dynamo.ecn.purdue.edu (Tom McCain) writes:

 > : Has someone running webster.el (version last changed 4/15/92) with
 > : emacs 18.59? I always get 'Attempting to connect to server ...' and
 > : then 'Process webster not running'. This error message is generated by
 > : the line 
 > :   (process-send-string  webster-process webster-command)
 > : in webster-send-request; I suspect that the problem lies in the
 > : command make-shell a few lines earlier. Did the definition of
 > : make-shell change in the new emacs release? Why is make-shell nowhere
 > : documented? 
 > 
 > I have the same problem....  Let me know if you find a fix.  Also, how
 > do you find a "webster server"?

I had the same problem with my NeXT and fortunately have found the solution
for this. A new (only one line is added) webster-send-request in
webster.el is following. The new line (accept-process-output webster-process) 
makes the emacs process wait for output from webster (telnet) process.
Enjoy it!!

(defun webster-send-request (kind word)
  (require 'shell)
  (let
      ((webster-command (concat "open " webster-host " " webster-port "\n")))
    (if (or 
	 (not webster-buffer)
	 (not webster-process)
	 (not (eq (process-status webster-process) 'run)))
	(progn
	  (message
	   (concat "Attempting to connect to server " webster-host "..."))
	  (setq webster-buffer
		(make-shell webster-process-name "telnet"))
	  (let
	      ((this-buffer (current-buffer)))
	    (set-buffer webster-buffer)
	    (webster-mode)
	    (set-buffer this-buffer))
	  (setq webster-process (get-process webster-process-name))

          ;; this line is added now.
	  (accept-process-output webster-process)

	  (set-process-filter webster-process 'webster-initial-filter)
	  (process-send-string  webster-process webster-command)
	  (setq webster-running nil)    ;
	  (while (not webster-running)	; wait for feedback
	    (accept-process-output))))
    (display-buffer webster-buffer nil)
    (process-send-string webster-process (concat kind " " word "\n"))))

--

	Ken MIYASHITA
        miyasita@is.s.u-tokyo.ac.jp
        (Dept. of Info. Sci., Fac. of Sci.,  Univ. of Tokyo, Japan)
        $@5\2<(J  $@7r(J (Japanese Kanji)
        $@El5~Bg3XM}3X7O8&5f2J>pJs2J3X@l96JF_78&5f<<(J (Japanese Kanji)
Technical Details
Message-ID: <1993Jan8.35445.19302@kei.is.s.u-tokyo.ac.jp>
Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!cs.utexas.edu!swrinde!sgiblab!nec-gw!nec-tyo!wnoc-tyo-news!news.u-tokyo.ac.jp!ccut!s.u-tokyo!is.s.u-tokyo!miyasita
References: <7233@ucsbcsl.ucsb.edu> <tom.726164342@dynamo.ecn.purdue.edu>

Show Full Headers
Complete Article Headers
Newsgroups: gnu.emacs.help,comp.sys.next.software
Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!cs.utexas.edu!swrinde!sgiblab!nec-gw!nec-tyo!wnoc-tyo-news!news.u-tokyo.ac.jp!ccut!s.u-tokyo!is.s.u-tokyo!miyasita
From: miyasita@is.s.u-tokyo.ac.jp (MIYASHITA Ken)
Subject: Re: webster with emacs 18.59 ?
References: <7233@ucsbcsl.ucsb.edu> <tom.726164342@dynamo.ecn.purdue.edu>
Nntp-Posting-Host: beatrice
Message-ID: <1993Jan8.35445.19302@kei.is.s.u-tokyo.ac.jp>
Organization: Dept. of Info. Sci., Fac. of Sci, Univ. of Tokyo, Japan.
In-Reply-To: tom@dynamo.ecn.purdue.edu's message of 4 Jan 93 16:19:02 GMT
Sender: news@kei.is.s.u-tokyo.ac.jp (Usenet News System)
Date: Fri, 8 Jan 1993 03:54:43 GMT
X-Bytes: 2327
Lines: 60