home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!corton!sophia!rhea.inria.fr!beust
- From: beust@rhea.inria.fr (Cedric Beust)
- Newsgroups: alt.lucid-emacs.help
- Subject: Re: Trying to write x-find-file.
- Message-ID: <25517@sophia.inria.fr>
- Date: 27 Jul 92 10:17:56 GMT
- References: <9207120216.AA00923@sergei.mitre.org>
- Sender: news@sophia.inria.fr
- Organization: University of Nice Sophia-Antipolis, France
- Lines: 30
-
- In article <9207120216.AA00923@sergei.mitre.org>, bcotton@sergei.mitre.org (Robert T. Cotton) writes:
-
- >I am a novice elisp hacker at best, and am trying to figure out how to
- >write two functions, x-find-file, and x-find-buffer. Doing the
- >obivous, find file/buffer in another screen (creating if necessary).
- >Poking around the NEWS file and the elisp code I cannot figure out
- >what needs to be done. I have looked at display-buffer,
- >get-screen-for-buffer, and x-create-screen but to no avail.
- >Could someone point me in the right direction?
- >
-
-
- Here it is :
-
- (defun x-find-file (filename)
- "Does find file in new X Window"
- (interactive "FFind file other screen: ")
- (select-screen (x-create-screen nil))
- (switch-to-buffer (find-file-noselect filename)))
-
- (defun x-switch-to-buffer (filename)
- "Does switch to buffer in new X Window"
- (interactive "BSwitch to buffer other screen: ")
- (select-screen (x-create-screen nil))
- (switch-to-buffer filename))
-
-
- --
- Cedric BEUST, beust@sa.inria.fr, Bull Research Koala proj, KoalaBus & xforum
- Pho:(33) 93.65.77.70(.66 Fax), INRIA, B.P.93 - 06902 Sophia Antipolis, FRANCE.
-