On Thu, 06 Nov 2003 11:48:36 +0900, "Stephen J. Turnbull" said:
It sounds like something that would be worth taking a hack at. What
kind of API do you need? Ie, suppose there were a variable
`gnuclient-environmental-conditions'. What kinds of questions would
you want to ask it, and what kinds of answers do you want in what
conditions?
Or maybe gnuclient should somehow intervene in the environment that
getenv sees? (That's too evil to actually implement I suspect, but it
might suggest something more appropriate.) Maybe there could be a
display-local environment process environment?
Actually, it's easier than that, at least for all the cases that I
was worried about. From gnuserv.el, line 426:
TYPE should either be a (tty TTY TERM PID) list, or (x DISPLAY) list.
Hey lookie all that neat info in TYPE ;)
So a few lines later:
(dest-frame (if (functionp gnuserv-frame)
(funcall gnuserv-frame (car type))
gnuserv-frame))
We pass (car type), when (type) would be much more useful. I played
around with having gnuserv-frame return a lambda that would evaluate
type and DTRT, but never got all the quoting to work out so it
would evaluate later...
Of course, the next lines explain why it's busticated:
;; The gnuserv-frame dependencies are ugly, but it's
;; extremely hard to make that stuff cleaner without
;; breaking everything in sight.
Oh well.