Subject: Gnuserv Drag 'n Drop from Winfile

From: Peter Breton <[email-masked]>
Date: Fri, 4 Oct 1996 15:53:01 -0400

sj017gu> Another question: I am not familiar with the lisp
 sj017gu> language. Is there a way to change the code not to open a
 sj017gu> new frame on every document sent by gnuclient?

You need to change the variable gnuserv-frame. This hack works:

  (setq gnuserv-frame (car frame-list))

			Peter

---

From: David Biesack <[email-masked]>
Date: Fri, 4 Oct 1996 16:58:09 -0400

> From: [email-masked]
> Comments: Authenticated sender is <[email-masked]>
> Date: Fri, 4 Oct 1996 20:54:24 +0000
> Content-Transfer-Encoding: 7BIT
> Priority: normal
> 
> Hello EMacser,
> 
> I am sorry to be a bit off-topic but I hope someone will help me too. 
> Why does emacs start when I drop a file on the gnuclientw shortcut on 
> my desktop from the explorer but not when I drop it from winfile?
> 
> Is this normal behaviour?

I think winfile and explorer use a different drag and drop
mechanism. I use Explorer instead of winfile. winfile only seems
to allow dropping on program items inside winfile.

> Thanks for your help!
> 
> Another question: I am not familiar with the lisp language. Is there 
> a way to change the code not to open a new frame on every document 
> sent by gnuclient?

     (setq gnuserv-frame (selected-frame))

will tell gnuserv to use the current existing frame.  This will suffice
if you normall work with and keep one frame. It would be nice if
gnuserv.el *evaluated* the value of gnuserv-frame, so that you could
just set it to '(default-frame).

As is, if you ever delete the initial frame, guserv will revert back to
opening new frames.  To make it more bullet-proof, you can use advice:

    (load-library "advice")

    (defadvice server-edit-files (before
                                  server-use-default-frame
                                  activate)
      (setq gnuserv-frame (selected-frame)))

    (defadvice server-edit-files-quickly (before
                                          server-use-default-frame-q
                                          activate)
      (setq gnuserv-frame (selected-frame)))

I think this works, if you put it in your .emacs after the
place where you load gnuserv. advice.el has a pretty complicated
activation mechanism, so YMMV.

> Thanks,
> Martin Guddat