home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / alt / lucidem / help / 139 < prev    next >
Encoding:
Text File  |  1992-07-27  |  1.5 KB  |  42 lines

  1. Path: sparky!uunet!mcsun!corton!sophia!rhea.inria.fr!beust
  2. From: beust@rhea.inria.fr (Cedric Beust)
  3. Newsgroups: alt.lucid-emacs.help
  4. Subject: Re: Trying to write x-find-file.
  5. Message-ID: <25517@sophia.inria.fr>
  6. Date: 27 Jul 92 10:17:56 GMT
  7. References: <9207120216.AA00923@sergei.mitre.org>
  8. Sender: news@sophia.inria.fr
  9. Organization: University of Nice Sophia-Antipolis, France
  10. Lines: 30
  11.  
  12. In article <9207120216.AA00923@sergei.mitre.org>, bcotton@sergei.mitre.org (Robert T. Cotton) writes:
  13.  
  14. >I am a novice elisp hacker at best, and am trying to figure out how to
  15. >write two functions, x-find-file, and x-find-buffer.  Doing the
  16. >obivous, find file/buffer in another screen (creating if necessary).
  17. >Poking around the NEWS file and the elisp code I cannot figure out
  18. >what needs to be done.  I have looked at display-buffer,
  19. >get-screen-for-buffer, and x-create-screen but to no avail.
  20. >Could someone point me in the right direction?
  21. >
  22.  
  23.  
  24.     Here it is :
  25.  
  26. (defun x-find-file (filename)
  27.   "Does find file in new X Window"
  28.   (interactive "FFind file other screen: ")
  29.   (select-screen (x-create-screen nil))
  30.   (switch-to-buffer (find-file-noselect filename)))
  31.  
  32. (defun x-switch-to-buffer (filename)
  33.   "Does switch to buffer in new X Window"
  34.   (interactive "BSwitch to buffer other screen: ")
  35.   (select-screen (x-create-screen nil))
  36.   (switch-to-buffer filename))
  37.  
  38.  
  39. --
  40. Cedric BEUST, beust@sa.inria.fr, Bull Research Koala proj, KoalaBus & xforum
  41. Pho:(33) 93.65.77.70(.66 Fax), INRIA, B.P.93 - 06902 Sophia Antipolis, FRANCE.
  42.