home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / tcl / 1781 < prev    next >
Encoding:
Text File  |  1992-11-10  |  2.4 KB  |  64 lines

  1. Newsgroups: comp.lang.tcl
  2. Path: sparky!uunet!think.com!linus!linus.mitre.org!news!mbunix!blk
  3. From: blk@mitre.org (Brian L. Kahn)
  4. Subject: Re: Tcl with emacs or epoch
  5. In-Reply-To: blk@mitre.org's message of Sun, 8 Nov 1992 21:30:51 GMT
  6. Message-ID: <BLK.92Nov10114311@vanity.mitre.org>
  7. Sender: news@linus.mitre.org (News Service)
  8. Nntp-Posting-Host: vanity.mitre.org
  9. Organization: The MITRE Corp. Bedford, MA
  10. References: <BLK.92Nov8163051@vanity.mitre.org>
  11. Date: Tue, 10 Nov 1992 16:43:11 GMT
  12. Lines: 50
  13.  
  14.  
  15. In article <BLK.92Nov8163051@vanity.mitre.org> blk@mitre.org (Brian L. Kahn) writes:
  16.  
  17.    Has anyone produced patches to incorporate tk/tcl into emacs or epoch?
  18.    I looked in the FAQ and docs, but couldn't find a reference.
  19.  
  20.  
  21.  
  22. Here's some email that I thought might be of general interest:
  23.  
  24. To: lvirden@cas.org (Larry W. Virden)
  25. Subject: Re: Tcl with emacs or epoch 
  26. In-reply-to: Your message of "Mon, 09 Nov 92 07:41:30 EST."
  27.              <9211091242.AA06062@cas.org> 
  28. Date: Tue, 10 Nov 92 11:16:40 EST
  29. From: blk
  30.  
  31.  
  32. >> there is a tk widget which uses emacs bindings, but so far, few folk
  33. >> have contributed ANY existing programs modified to incorporate tk/tcl/tclx.
  34.  
  35. I don't quite get what you're saying here, do you mean there is a set
  36. of emacs lisp bindings for all the tk functions?  I don't think that's
  37. what you mean.
  38.  
  39. >> Emacs would particularly be a bear since it has its own interpreter so
  40. >> firmly embedded.
  41.  
  42. Two approaches are possible:  the Tk library can be bound to elisp
  43. functions, or tcl can be a subordinate to the elisp interpretter.
  44.  
  45. I thought it would be fairly easy to do the following:
  46.   add C code to init a tcl interpretter
  47.   add an emacs function (in C) that gives a string to the interp
  48.   
  49. The async input generated by the tcl interp is more of a problem.  The
  50. only async mechanisms I know in emacs are process sentinals, which I
  51. suppose could be cobbled up to this internal, async process.  I use
  52. epoch, so I would much prefer to get my input from property changes on
  53. the relevant windows.  This wouldn't be the default mechanism, but
  54. rather something that is settable via tcl.
  55.  
  56. This approach drops tcl out of the main loop, which probably makes the
  57. "send" function inconsistent.  Can be handled other ways, I suppose.
  58. Sends can still work to the epoch implementation by setting properties
  59. on the emacs windows instead of on the root window, which will be
  60. executed by the tcl interp.
  61. --
  62. B<   Brian Kahn   blk@mitre.org   "may the farce be with you"
  63.  
  64.