gnuclient & new frames

gnuclient & new frames

Post by Jerome Kalif » Fri, 25 Oct 1996 04:00:00



Hi,

I would like to disable gnuserv from opening a new frame when using
gnuclient (for example when clicking on a file via tkdesk).
I have looked at the Xemacs FAQ in the help menu. Part 21 is devoted to
gnuserv and question 21.1 is *How do I disable gnuserv from opening a
new frame?*.
A suggestion is :

**
you could put

     (setq gnuserv-screen (selected-frame))

   early on in your `.emacs', to ensure that the first frame created is
the one used for your gnuserv buffers.
**

I 've done this. I 've even tried to put this command in different
places in my .emacs. This still doesn't work, every gnuclient keeps
being opened in a new frame. Any idea?
Muchas gracias amigos?
--
Jerome Kalifa
Centre de Mathematiques Appliquees,
Ecole Polytechnique,  91128 Palaiseau Cedex,
France.  (33) (1) 69333981

 
 
 

gnuclient & new frames

Post by Thomas Feuste » Thu, 31 Oct 1996 04:00:00



> Hi,

> I would like to disable gnuserv from opening a new frame when using
> gnuclient (for example when clicking on a file via tkdesk).

From my .emacs (one more thanks to the forgotten programer):

;;;; start the gnuserv
(require 'gnuserv)
;;; Files from edit server will be opened in the selected frame.
;;; If this frame is deleted we will select another frame to use.

;; Selects another frame for the edit server to use if the frame
actually
;; used is deleted.
(add-hook 'delete-frame-hook
          '(lambda (frame) (if (eq frame gnuserv-frame)
                          (setq gnuserv-frame (next-frame frame nil)))))

;; Makes the selected frame respond to edit server requests.
(add-hook 'select-frame-hook
          '(lambda () (setq gnuserv-frame (selected-frame))))

(setq gnuserv-frame (selected-frame))
;;; start edit server
(gnuserv-start)

This works fine, but it may not change the focus to your XEmacs-session
(but thats then a problem of your X11 progs...)

HTH,
Thomas
--
Thomas Feuster                      Institut fuer theoretische Physik

Phone: +49 641 702-2832             Heinrich-Buff-Ring 16
Fax  : +49 641 702-2868             35392 Giessen, Germany
http://theorie.physik.uni-giessen.de/~feuster