home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / gnu / emacs / help / 5294 < prev    next >
Encoding:
Text File  |  1993-01-07  |  3.0 KB  |  75 lines

  1. Xref: sparky gnu.emacs.help:5294 comp.sys.next.software:3324
  2. Newsgroups: gnu.emacs.help,comp.sys.next.software
  3. Path: 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
  4. From: miyasita@is.s.u-tokyo.ac.jp (MIYASHITA Ken)
  5. Subject: Re: webster with emacs 18.59 ?
  6. References: <7233@ucsbcsl.ucsb.edu> <tom.726164342@dynamo.ecn.purdue.edu>
  7. Nntp-Posting-Host: beatrice
  8. Message-ID: <1993Jan8.35445.19302@kei.is.s.u-tokyo.ac.jp>
  9. Organization: Dept. of Info. Sci., Fac. of Sci, Univ. of Tokyo, Japan.
  10. In-Reply-To: tom@dynamo.ecn.purdue.edu's message of 4 Jan 93 16:19:02 GMT
  11. Sender: news@kei.is.s.u-tokyo.ac.jp (Usenet News System)
  12. Date: Fri, 8 Jan 1993 03:54:43 GMT
  13. X-Bytes: 2327
  14. Lines: 60
  15.  
  16. In article <tom.726164342@dynamo.ecn.purdue.edu> tom@dynamo.ecn.purdue.edu (Tom McCain) writes:
  17.  
  18.  > : Has someone running webster.el (version last changed 4/15/92) with
  19.  > : emacs 18.59? I always get 'Attempting to connect to server ...' and
  20.  > : then 'Process webster not running'. This error message is generated by
  21.  > : the line 
  22.  > :   (process-send-string  webster-process webster-command)
  23.  > : in webster-send-request; I suspect that the problem lies in the
  24.  > : command make-shell a few lines earlier. Did the definition of
  25.  > : make-shell change in the new emacs release? Why is make-shell nowhere
  26.  > : documented? 
  27.  > 
  28.  > I have the same problem....  Let me know if you find a fix.  Also, how
  29.  > do you find a "webster server"?
  30.  
  31. I had the same problem with my NeXT and fortunately have found the solution
  32. for this. A new (only one line is added) webster-send-request in
  33. webster.el is following. The new line (accept-process-output webster-process) 
  34. makes the emacs process wait for output from webster (telnet) process.
  35. Enjoy it!!
  36.  
  37. (defun webster-send-request (kind word)
  38.   (require 'shell)
  39.   (let
  40.       ((webster-command (concat "open " webster-host " " webster-port "\n")))
  41.     (if (or 
  42.      (not webster-buffer)
  43.      (not webster-process)
  44.      (not (eq (process-status webster-process) 'run)))
  45.     (progn
  46.       (message
  47.        (concat "Attempting to connect to server " webster-host "..."))
  48.       (setq webster-buffer
  49.         (make-shell webster-process-name "telnet"))
  50.       (let
  51.           ((this-buffer (current-buffer)))
  52.         (set-buffer webster-buffer)
  53.         (webster-mode)
  54.         (set-buffer this-buffer))
  55.       (setq webster-process (get-process webster-process-name))
  56.  
  57.           ;; this line is added now.
  58.       (accept-process-output webster-process)
  59.  
  60.       (set-process-filter webster-process 'webster-initial-filter)
  61.       (process-send-string  webster-process webster-command)
  62.       (setq webster-running nil)    ;
  63.       (while (not webster-running)    ; wait for feedback
  64.         (accept-process-output))))
  65.     (display-buffer webster-buffer nil)
  66.     (process-send-string webster-process (concat kind " " word "\n"))))
  67.  
  68. --
  69.  
  70.     Ken MIYASHITA
  71.         miyasita@is.s.u-tokyo.ac.jp
  72.         (Dept. of Info. Sci., Fac. of Sci.,  Univ. of Tokyo, Japan)
  73.         $@5\2<(J  $@7r(J (Japanese Kanji)
  74.         $@El5~Bg3XM}3X7O8&5f2J>pJs2J3X@l96JF_78&5f<<(J (Japanese Kanji)
  75.