* GDS does not support Emacs 23?
@ 2006-09-19 20:29 netawater
2006-09-22 18:29 ` Neil Jerram
0 siblings, 1 reply; 9+ messages in thread
From: netawater @ 2006-09-19 20:29 UTC (permalink / raw)
I use it very well in Emacs 21, but there is
a error when (require 'gds) is executed in
Emacs 23:
error in process filter: Wrong type argument:
listp, Backtrace:
Thanks in advance!
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: GDS does not support Emacs 23?
2006-09-19 20:29 GDS does not support Emacs 23? netawater
@ 2006-09-22 18:29 ` Neil Jerram
2006-09-22 23:10 ` William Xu
0 siblings, 1 reply; 9+ messages in thread
From: Neil Jerram @ 2006-09-22 18:29 UTC (permalink / raw)
Cc: guile-user
netawater <wangyi000@yeah.net> writes:
> I use it very well in Emacs 21, but there is
> a error when (require 'gds) is executed in
> Emacs 23:
> error in process filter: Wrong type argument:
> listp, Backtrace:
Emacs 23, gosh :-)
Anyway, please can you cut and paste the whole contents of the
gds-debug buffer when this happens, and send that in reply to this
email?
Regards,
Neil
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: GDS does not support Emacs 23?
2006-09-22 18:29 ` Neil Jerram
@ 2006-09-22 23:10 ` William Xu
2006-09-23 9:48 ` Neil Jerram
2006-09-23 16:30 ` netawater
0 siblings, 2 replies; 9+ messages in thread
From: William Xu @ 2006-09-22 23:10 UTC (permalink / raw)
Neil Jerram <neil@ossau.uklinux.net> writes:
> netawater <wangyi000@yeah.net> writes:
>
>> I use it very well in Emacs 21, but there is
>> a error when (require 'gds) is executed in
>> Emacs 23:
>> error in process filter: Wrong type argument:
>> listp, Backtrace:
>
> Emacs 23, gosh :-)
>
> Anyway, please can you cut and paste the whole contents of the
> gds-debug buffer when this happens, and send that in reply to this
> email?
Seems it's caused by running two emacs sessions, thus two gds-server,
resulting in "Address already in use" error.
Mine is emscs 22.0.50.1 on debian.
Backtrace,
---------------------------------8<-------------------------------------
Debugger entered--Lisp error: (wrong-type-argument listp Backtrace:)
car(Backtrace:)
(funcall gds-protocol-handler (car form) (cdr form))
(save-excursion (funcall gds-protocol-handler (car form) (cdr form)))
(if form (save-excursion (funcall gds-protocol-handler ... ...)))
(let ((form ...)) (if form (save-excursion ...)) form)
(while (let (...) (if form ...) form) (setq gds-read-cursor (point)))
(save-current-buffer (set-buffer (process-buffer proc)) (save-excursion (goto-char ...) (insert-before-markers string)) (goto-char gds-read-cursor) (while (let ... ... form) (setq gds-read-cursor ...)))
(with-current-buffer (process-buffer proc) (save-excursion (goto-char ...) (insert-before-markers string)) (goto-char gds-read-cursor) (while (let ... ... form) (setq gds-read-cursor ...)))
gds-filter(#<process gds-debug> "Backtrace:\nIn current input:\n 1: 0* (begin (begin (process-use-modules #) *unspecified*) (run-server 8333))\n 4: 1 [run-server 8333]\nIn /home/william/share/guile/ossau/gds-server.scm:\n 39: 2 (let* ((server #)) (setsockopt server SOL_SOCKET ...) ...)\n 43: 3* [bind #<input-output: socket 5> 2 0 8333]\n\n/home/william/share/guile/ossau/gds-server.scm:43:5: In procedure bind in expression (bind server AF_INET ...):\n/home/william/share/guile/ossau/gds-server.scm:43:5: Address already in use\n")
---------------------------------8<-------------------------------------
--
William
You should emulate your heros, but don't carry it too far. Especially
if they are dead.
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: GDS does not support Emacs 23?
2006-09-22 23:10 ` William Xu
@ 2006-09-23 9:48 ` Neil Jerram
2006-09-23 16:38 ` William Xu
2006-09-23 16:30 ` netawater
1 sibling, 1 reply; 9+ messages in thread
From: Neil Jerram @ 2006-09-23 9:48 UTC (permalink / raw)
Cc: guile-user
William Xu <william.xwl@gmail.com> writes:
> Seems it's caused by running two emacs sessions, thus two gds-server,
> resulting in "Address already in use" error.
Yes, that is a problem that isn't well handled at the moment. I've
been thinking about this and have two possible solutions in mind.
1. (Easier) Change the GDS elisp code so that the gds-server process
is only started when needed. This would probably avoid most
occurrences of the reported problem, because most users will
probably do GDS stuff in just one Emacs session.
2. (Harder) Create a new GDS "broker" component to handle the
possibility of multiple Emacs sessions running multiple
gds-servers.
Any thoughts/preference?
Regards,
Neil
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: GDS does not support Emacs 23?
2006-09-22 23:10 ` William Xu
2006-09-23 9:48 ` Neil Jerram
@ 2006-09-23 16:30 ` netawater
1 sibling, 0 replies; 9+ messages in thread
From: netawater @ 2006-09-23 16:30 UTC (permalink / raw)
Yes, I have met this situation if I open two session when I
used emacs 21.
But this time I only open one emacs session.
Thanks you.
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: GDS does not support Emacs 23?
2006-09-23 9:48 ` Neil Jerram
@ 2006-09-23 16:38 ` William Xu
2006-09-23 21:52 ` Neil Jerram
0 siblings, 1 reply; 9+ messages in thread
From: William Xu @ 2006-09-23 16:38 UTC (permalink / raw)
Neil Jerram <neil@ossau.uklinux.net> writes:
> Yes, that is a problem that isn't well handled at the moment. I've
> been thinking about this and have two possible solutions in mind.
>
> 1. (Easier) Change the GDS elisp code so that the gds-server process
> is only started when needed. This would probably avoid most
> occurrences of the reported problem, because most users will
> probably do GDS stuff in just one Emacs session.
>
> 2. (Harder) Create a new GDS "broker" component to handle the
> possibility of multiple Emacs sessions running multiple
> gds-servers.
>
> Any thoughts/preference?
i'd prefer solution 2, but solution 1 is acceptable. As for solution 1,
maybe we could let newer gds-server override older one, just like emacs
server's way.
--
William
Q: Would you like to see the WINE list?
A: What's on it, anything expensive?
Q: No, just Solitaire and MineSweeper for now, but the WINE is free.
-- Kevin M. Bealer, about the WINdows Emulator
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: GDS does not support Emacs 23?
2006-09-23 16:38 ` William Xu
@ 2006-09-23 21:52 ` Neil Jerram
2006-09-24 11:56 ` William Xu
0 siblings, 1 reply; 9+ messages in thread
From: Neil Jerram @ 2006-09-23 21:52 UTC (permalink / raw)
Cc: guile-user
William Xu <william.xwl@gmail.com> writes:
> Neil Jerram <neil@ossau.uklinux.net> writes:
>
>> Yes, that is a problem that isn't well handled at the moment. I've
>> been thinking about this and have two possible solutions in mind.
>>
>> 1. (Easier) Change the GDS elisp code so that the gds-server process
>> is only started when needed. This would probably avoid most
>> occurrences of the reported problem, because most users will
>> probably do GDS stuff in just one Emacs session.
>>
>> 2. (Harder) Create a new GDS "broker" component to handle the
>> possibility of multiple Emacs sessions running multiple
>> gds-servers.
>>
>> Any thoughts/preference?
>
> i'd prefer solution 2, but solution 1 is acceptable.
I agree. I should get to this in the next month or so. If anyone
would like to help, please let me know.
> As for solution 1, maybe we could let newer gds-server override
> older one, just like emacs server's way.
That's interesting. How can one call bind() so that it steals the
address and port number from a previous listen socket?
Regards,
Neil
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: GDS does not support Emacs 23?
2006-09-23 21:52 ` Neil Jerram
@ 2006-09-24 11:56 ` William Xu
2006-09-27 18:40 ` Neil Jerram
0 siblings, 1 reply; 9+ messages in thread
From: William Xu @ 2006-09-24 11:56 UTC (permalink / raw)
Neil Jerram <neil@ossau.uklinux.net> writes:
> That's interesting. How can one call bind() so that it steals the
> address and port number from a previous listen socket?
Change socket from AF_INET to AF_UNIX does the trick. The following
patch seems to work fine. Now i can call gds-server from either Emacs
sessions. I only test it with gds-help-symbol, though. And there are
still some cleanups left to do, due to socket family change.
The patch,
---------------------------------8<-------------------------------------
xiaowei:~/studio/cvs/guile-debugging$ cvs diff
cvs server: Diffing .
cvs server: Diffing ice-9
cvs server: Diffing ice-9/debugging
cvs server: Diffing ossau
Index: ossau/gds-client.scm
===================================================================
RCS file: /cvs/guile-debugging/guile-debugging/ossau/gds-client.scm,v
retrieving revision 1.20
diff -r1.20 gds-client.scm
177,181c177,178
< (let ((s (socket PF_INET SOCK_STREAM 0))
< (SOL_TCP 6)
< (TCP_NODELAY 1))
< (setsockopt s SOL_TCP TCP_NODELAY 1)
< (connect s AF_INET (inet-aton "127.0.0.1") 8333)
---
> (let ((s (socket AF_UNIX SOCK_STREAM 0)))
> (connect s AF_UNIX "/tmp/.gds_socket")
Index: ossau/gds-server.scm
===================================================================
RCS file: /cvs/guile-debugging/guile-debugging/ossau/gds-server.scm,v
retrieving revision 1.4
diff -r1.4 gds-server.scm
9c9
< ;;
---
> ;;
14c14
< ;;
---
> ;;
40,45c40,46
<
< (let ((server (socket PF_INET SOCK_STREAM 0)))
<
< ;; Initialize server socket.
< (setsockopt server SOL_SOCKET SO_REUSEADDR 1)
< (bind server AF_INET INADDR_ANY port)
---
> ;; Initialize server socket.
> (let ((server (socket AF_UNIX SOCK_STREAM 0))
> (path "/tmp/.gds_socket"))
> (catch #t
> (lambda () (delete-file path))
> (lambda key #f))
> (bind server AF_UNIX path)
70c71
< (trc "client not found")))
---
> (trc "client not found")))
cvs server: Diffing ossau/debugging
---------------------------------8<-------------------------------------
--
William
"Trust me. I know what I'm doing."
-- Sledge Hammer
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: GDS does not support Emacs 23?
2006-09-24 11:56 ` William Xu
@ 2006-09-27 18:40 ` Neil Jerram
0 siblings, 0 replies; 9+ messages in thread
From: Neil Jerram @ 2006-09-27 18:40 UTC (permalink / raw)
Cc: guile-user
William Xu <william.xwl@gmail.com> writes:
> Neil Jerram <neil@ossau.uklinux.net> writes:
>
>> That's interesting. How can one call bind() so that it steals the
>> address and port number from a previous listen socket?
>
> Change socket from AF_INET to AF_UNIX does the trick. The following
> patch seems to work fine. Now i can call gds-server from either Emacs
> sessions. I only test it with gds-help-symbol, though. And there are
> still some cleanups left to do, due to socket family change.
>
> The patch,
Wow, fantastic, thanks. I'm not sure I feel confident yet about a
permanent change from AF_INET to AF_UNIX, so I think I'll merge the
existing and your patch together, with a switch somewhere to select
which kind of socket to use.
I hope to make a new release, including this, within the next two
weeks.
Regards,
Neil
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2006-09-27 18:40 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-19 20:29 GDS does not support Emacs 23? netawater
2006-09-22 18:29 ` Neil Jerram
2006-09-22 23:10 ` William Xu
2006-09-23 9:48 ` Neil Jerram
2006-09-23 16:38 ` William Xu
2006-09-23 21:52 ` Neil Jerram
2006-09-24 11:56 ` William Xu
2006-09-27 18:40 ` Neil Jerram
2006-09-23 16:30 ` netawater
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).